Use correct type name in comments about freezing.
[pgsql.git] / configure
blob3966368b8d9f4d23bdd52a3602443e0452027d90
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 16devel.
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='16devel'
586 PACKAGE_STRING='PostgreSQL 16devel'
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_SHARED_BUILD
638 TCL_LIB_SPEC
639 TCL_LIBS
640 TCL_INCLUDE_SPEC
641 TCL_CONFIG_SH
642 TCLSH
643 XGETTEXT
644 MSGMERGE
645 MSGFMT_FLAGS
646 MSGFMT
647 PG_CRC32C_OBJS
648 CFLAGS_ARMV8_CRC32C
649 CFLAGS_SSE42
650 LIBOBJS
651 OPENSSL
652 ZSTD
654 UUID_LIBS
655 LDAP_LIBS_BE
656 LDAP_LIBS_FE
657 with_ssl
658 PTHREAD_CFLAGS
659 PTHREAD_LIBS
660 PTHREAD_CC
661 ax_pthread_config
662 EGREP
663 GREP
666 python_additional_libs
667 python_libspec
668 python_libdir
669 python_includespec
670 python_version
671 python_majorversion
672 PYTHON
673 perl_embed_ldflags
674 perl_embed_ccflags
675 perl_includespec
676 perl_useshrplib
677 perl_privlibexp
678 perl_archlibexp
679 PERL
680 FLEXFLAGS
681 FLEX
682 BISONFLAGS
683 BISON
684 MKDIR_P
685 LN_S
687 install_bin
688 INSTALL_DATA
689 INSTALL_SCRIPT
690 INSTALL_PROGRAM
691 WINDRES
693 STRIP_SHARED_LIB
694 STRIP_STATIC_LIB
695 STRIP
696 with_gnu_ld
698 LDFLAGS_SL
699 LDFLAGS_EX
700 ZSTD_LIBS
701 ZSTD_CFLAGS
702 with_zstd
703 LZ4_LIBS
704 LZ4_CFLAGS
705 with_lz4
706 with_zlib
707 with_system_tzdata
708 with_libxslt
709 XML2_LIBS
710 XML2_CFLAGS
711 XML2_CONFIG
712 with_libxml
713 with_uuid
714 with_readline
715 with_systemd
716 with_selinux
717 with_ldap
718 with_krb_srvnam
719 krb_srvtab
720 with_gssapi
721 with_python
722 with_perl
723 with_tcl
724 ICU_LIBS
725 ICU_CFLAGS
726 with_icu
727 enable_thread_safety
728 INCLUDES
729 autodepend
730 PKG_CONFIG_LIBDIR
731 PKG_CONFIG_PATH
732 PKG_CONFIG
733 DLSUFFIX
737 CFLAGS_SL
738 BITCODE_CXXFLAGS
739 BITCODE_CFLAGS
740 CXXFLAGS_SL_MODULE
741 CFLAGS_SL_MODULE
742 CFLAGS_VECTORIZE
743 CFLAGS_UNROLL_LOOPS
744 PERMIT_DECLARATION_AFTER_STATEMENT
745 LLVM_BINPATH
746 LLVM_CXXFLAGS
747 LLVM_CFLAGS
748 LLVM_CPPFLAGS
749 LLVM_LIBS
750 CLANG
751 LLVM_CONFIG
753 with_llvm
754 SUN_STUDIO_CC
755 ac_ct_CXX
756 CXXFLAGS
758 OBJEXT
759 EXEEXT
760 ac_ct_CC
761 CPPFLAGS
762 LDFLAGS
763 CFLAGS
765 enable_tap_tests
766 enable_dtrace
767 DTRACEFLAGS
768 DTRACE
769 enable_coverage
770 GENHTML
771 LCOV
772 GCOV
773 enable_debug
774 enable_rpath
775 default_port
776 WANTED_LANGUAGES
777 enable_nls
778 PORTNAME
779 host_os
780 host_vendor
781 host_cpu
782 host
783 build_os
784 build_vendor
785 build_cpu
786 build
787 PG_MAJORVERSION
788 target_alias
789 host_alias
790 build_alias
791 LIBS
792 ECHO_T
793 ECHO_N
794 ECHO_C
795 DEFS
796 mandir
797 localedir
798 libdir
799 psdir
800 pdfdir
801 dvidir
802 htmldir
803 infodir
804 docdir
805 oldincludedir
806 includedir
807 localstatedir
808 sharedstatedir
809 sysconfdir
810 datadir
811 datarootdir
812 libexecdir
813 sbindir
814 bindir
815 program_transform_name
816 prefix
817 exec_prefix
818 PACKAGE_URL
819 PACKAGE_BUGREPORT
820 PACKAGE_STRING
821 PACKAGE_VERSION
822 PACKAGE_TARNAME
823 PACKAGE_NAME
824 PATH_SEPARATOR
825 SHELL'
826 ac_subst_files=''
827 ac_user_opts='
828 enable_option_checking
829 with_extra_version
830 with_template
831 with_includes
832 with_libraries
833 with_libs
834 enable_integer_datetimes
835 enable_nls
836 with_pgport
837 enable_rpath
838 enable_spinlocks
839 enable_atomics
840 enable_debug
841 enable_profiling
842 enable_coverage
843 enable_dtrace
844 enable_tap_tests
845 with_blocksize
846 with_segsize
847 with_wal_blocksize
848 with_CC
849 with_llvm
850 enable_depend
851 enable_cassert
852 enable_thread_safety
853 with_icu
854 with_tcl
855 with_tclconfig
856 with_perl
857 with_python
858 with_gssapi
859 with_krb_srvnam
860 with_pam
861 with_bsd_auth
862 with_ldap
863 with_bonjour
864 with_selinux
865 with_systemd
866 with_readline
867 with_libedit_preferred
868 with_uuid
869 with_ossp_uuid
870 with_libxml
871 with_libxslt
872 with_system_tzdata
873 with_zlib
874 with_lz4
875 with_zstd
876 with_gnu_ld
877 with_ssl
878 with_openssl
879 enable_largefile
881 ac_precious_vars='build_alias
882 host_alias
883 target_alias
885 CFLAGS
886 LDFLAGS
887 LIBS
888 CPPFLAGS
890 CXXFLAGS
892 LLVM_CONFIG
893 CLANG
895 PKG_CONFIG
896 PKG_CONFIG_PATH
897 PKG_CONFIG_LIBDIR
898 ICU_CFLAGS
899 ICU_LIBS
900 XML2_CONFIG
901 XML2_CFLAGS
902 XML2_LIBS
903 LZ4_CFLAGS
904 LZ4_LIBS
905 ZSTD_CFLAGS
906 ZSTD_LIBS
907 LDFLAGS_EX
908 LDFLAGS_SL
909 PERL
910 PYTHON
911 MSGFMT
912 TCLSH'
915 # Initialize some variables set by options.
916 ac_init_help=
917 ac_init_version=false
918 ac_unrecognized_opts=
919 ac_unrecognized_sep=
920 # The variables have the same names as the options, with
921 # dashes changed to underlines.
922 cache_file=/dev/null
923 exec_prefix=NONE
924 no_create=
925 no_recursion=
926 prefix=NONE
927 program_prefix=NONE
928 program_suffix=NONE
929 program_transform_name=s,x,x,
930 silent=
931 site=
932 srcdir=
933 verbose=
934 x_includes=NONE
935 x_libraries=NONE
937 # Installation directory options.
938 # These are left unexpanded so users can "make install exec_prefix=/foo"
939 # and all the variables that are supposed to be based on exec_prefix
940 # by default will actually change.
941 # Use braces instead of parens because sh, perl, etc. also accept them.
942 # (The list follows the same order as the GNU Coding Standards.)
943 bindir='${exec_prefix}/bin'
944 sbindir='${exec_prefix}/sbin'
945 libexecdir='${exec_prefix}/libexec'
946 datarootdir='${prefix}/share'
947 datadir='${datarootdir}'
948 sysconfdir='${prefix}/etc'
949 sharedstatedir='${prefix}/com'
950 localstatedir='${prefix}/var'
951 includedir='${prefix}/include'
952 oldincludedir='/usr/include'
953 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
954 infodir='${datarootdir}/info'
955 htmldir='${docdir}'
956 dvidir='${docdir}'
957 pdfdir='${docdir}'
958 psdir='${docdir}'
959 libdir='${exec_prefix}/lib'
960 localedir='${datarootdir}/locale'
961 mandir='${datarootdir}/man'
963 ac_prev=
964 ac_dashdash=
965 for ac_option
967 # If the previous option needs an argument, assign it.
968 if test -n "$ac_prev"; then
969 eval $ac_prev=\$ac_option
970 ac_prev=
971 continue
974 case $ac_option in
975 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
976 *=) ac_optarg= ;;
977 *) ac_optarg=yes ;;
978 esac
980 # Accept the important Cygnus configure options, so we can diagnose typos.
982 case $ac_dashdash$ac_option in
984 ac_dashdash=yes ;;
986 -bindir | --bindir | --bindi | --bind | --bin | --bi)
987 ac_prev=bindir ;;
988 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
989 bindir=$ac_optarg ;;
991 -build | --build | --buil | --bui | --bu)
992 ac_prev=build_alias ;;
993 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
994 build_alias=$ac_optarg ;;
996 -cache-file | --cache-file | --cache-fil | --cache-fi \
997 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
998 ac_prev=cache_file ;;
999 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1000 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1001 cache_file=$ac_optarg ;;
1003 --config-cache | -C)
1004 cache_file=config.cache ;;
1006 -datadir | --datadir | --datadi | --datad)
1007 ac_prev=datadir ;;
1008 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1009 datadir=$ac_optarg ;;
1011 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1012 | --dataroo | --dataro | --datar)
1013 ac_prev=datarootdir ;;
1014 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1015 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1016 datarootdir=$ac_optarg ;;
1018 -disable-* | --disable-*)
1019 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1020 # Reject names that are not valid shell variable names.
1021 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1022 as_fn_error $? "invalid feature name: $ac_useropt"
1023 ac_useropt_orig=$ac_useropt
1024 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1025 case $ac_user_opts in
1027 "enable_$ac_useropt"
1028 "*) ;;
1029 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1030 ac_unrecognized_sep=', ';;
1031 esac
1032 eval enable_$ac_useropt=no ;;
1034 -docdir | --docdir | --docdi | --doc | --do)
1035 ac_prev=docdir ;;
1036 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1037 docdir=$ac_optarg ;;
1039 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1040 ac_prev=dvidir ;;
1041 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1042 dvidir=$ac_optarg ;;
1044 -enable-* | --enable-*)
1045 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1046 # Reject names that are not valid shell variable names.
1047 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1048 as_fn_error $? "invalid feature name: $ac_useropt"
1049 ac_useropt_orig=$ac_useropt
1050 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1051 case $ac_user_opts in
1053 "enable_$ac_useropt"
1054 "*) ;;
1055 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1056 ac_unrecognized_sep=', ';;
1057 esac
1058 eval enable_$ac_useropt=\$ac_optarg ;;
1060 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1061 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1062 | --exec | --exe | --ex)
1063 ac_prev=exec_prefix ;;
1064 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1065 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1066 | --exec=* | --exe=* | --ex=*)
1067 exec_prefix=$ac_optarg ;;
1069 -gas | --gas | --ga | --g)
1070 # Obsolete; use --with-gas.
1071 with_gas=yes ;;
1073 -help | --help | --hel | --he | -h)
1074 ac_init_help=long ;;
1075 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1076 ac_init_help=recursive ;;
1077 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1078 ac_init_help=short ;;
1080 -host | --host | --hos | --ho)
1081 ac_prev=host_alias ;;
1082 -host=* | --host=* | --hos=* | --ho=*)
1083 host_alias=$ac_optarg ;;
1085 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1086 ac_prev=htmldir ;;
1087 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1088 | --ht=*)
1089 htmldir=$ac_optarg ;;
1091 -includedir | --includedir | --includedi | --included | --include \
1092 | --includ | --inclu | --incl | --inc)
1093 ac_prev=includedir ;;
1094 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1095 | --includ=* | --inclu=* | --incl=* | --inc=*)
1096 includedir=$ac_optarg ;;
1098 -infodir | --infodir | --infodi | --infod | --info | --inf)
1099 ac_prev=infodir ;;
1100 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1101 infodir=$ac_optarg ;;
1103 -libdir | --libdir | --libdi | --libd)
1104 ac_prev=libdir ;;
1105 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1106 libdir=$ac_optarg ;;
1108 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1109 | --libexe | --libex | --libe)
1110 ac_prev=libexecdir ;;
1111 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1112 | --libexe=* | --libex=* | --libe=*)
1113 libexecdir=$ac_optarg ;;
1115 -localedir | --localedir | --localedi | --localed | --locale)
1116 ac_prev=localedir ;;
1117 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1118 localedir=$ac_optarg ;;
1120 -localstatedir | --localstatedir | --localstatedi | --localstated \
1121 | --localstate | --localstat | --localsta | --localst | --locals)
1122 ac_prev=localstatedir ;;
1123 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1124 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1125 localstatedir=$ac_optarg ;;
1127 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1128 ac_prev=mandir ;;
1129 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1130 mandir=$ac_optarg ;;
1132 -nfp | --nfp | --nf)
1133 # Obsolete; use --without-fp.
1134 with_fp=no ;;
1136 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1137 | --no-cr | --no-c | -n)
1138 no_create=yes ;;
1140 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1141 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1142 no_recursion=yes ;;
1144 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1145 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1146 | --oldin | --oldi | --old | --ol | --o)
1147 ac_prev=oldincludedir ;;
1148 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1149 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1150 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1151 oldincludedir=$ac_optarg ;;
1153 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1154 ac_prev=prefix ;;
1155 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1156 prefix=$ac_optarg ;;
1158 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1159 | --program-pre | --program-pr | --program-p)
1160 ac_prev=program_prefix ;;
1161 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1162 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1163 program_prefix=$ac_optarg ;;
1165 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1166 | --program-suf | --program-su | --program-s)
1167 ac_prev=program_suffix ;;
1168 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1169 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1170 program_suffix=$ac_optarg ;;
1172 -program-transform-name | --program-transform-name \
1173 | --program-transform-nam | --program-transform-na \
1174 | --program-transform-n | --program-transform- \
1175 | --program-transform | --program-transfor \
1176 | --program-transfo | --program-transf \
1177 | --program-trans | --program-tran \
1178 | --progr-tra | --program-tr | --program-t)
1179 ac_prev=program_transform_name ;;
1180 -program-transform-name=* | --program-transform-name=* \
1181 | --program-transform-nam=* | --program-transform-na=* \
1182 | --program-transform-n=* | --program-transform-=* \
1183 | --program-transform=* | --program-transfor=* \
1184 | --program-transfo=* | --program-transf=* \
1185 | --program-trans=* | --program-tran=* \
1186 | --progr-tra=* | --program-tr=* | --program-t=*)
1187 program_transform_name=$ac_optarg ;;
1189 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1190 ac_prev=pdfdir ;;
1191 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1192 pdfdir=$ac_optarg ;;
1194 -psdir | --psdir | --psdi | --psd | --ps)
1195 ac_prev=psdir ;;
1196 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1197 psdir=$ac_optarg ;;
1199 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1200 | -silent | --silent | --silen | --sile | --sil)
1201 silent=yes ;;
1203 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1204 ac_prev=sbindir ;;
1205 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1206 | --sbi=* | --sb=*)
1207 sbindir=$ac_optarg ;;
1209 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1210 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1211 | --sharedst | --shareds | --shared | --share | --shar \
1212 | --sha | --sh)
1213 ac_prev=sharedstatedir ;;
1214 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1215 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1216 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1217 | --sha=* | --sh=*)
1218 sharedstatedir=$ac_optarg ;;
1220 -site | --site | --sit)
1221 ac_prev=site ;;
1222 -site=* | --site=* | --sit=*)
1223 site=$ac_optarg ;;
1225 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1226 ac_prev=srcdir ;;
1227 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1228 srcdir=$ac_optarg ;;
1230 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1231 | --syscon | --sysco | --sysc | --sys | --sy)
1232 ac_prev=sysconfdir ;;
1233 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1234 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1235 sysconfdir=$ac_optarg ;;
1237 -target | --target | --targe | --targ | --tar | --ta | --t)
1238 ac_prev=target_alias ;;
1239 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1240 target_alias=$ac_optarg ;;
1242 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1243 verbose=yes ;;
1245 -version | --version | --versio | --versi | --vers | -V)
1246 ac_init_version=: ;;
1248 -with-* | --with-*)
1249 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1250 # Reject names that are not valid shell variable names.
1251 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1252 as_fn_error $? "invalid package name: $ac_useropt"
1253 ac_useropt_orig=$ac_useropt
1254 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1255 case $ac_user_opts in
1257 "with_$ac_useropt"
1258 "*) ;;
1259 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1260 ac_unrecognized_sep=', ';;
1261 esac
1262 eval with_$ac_useropt=\$ac_optarg ;;
1264 -without-* | --without-*)
1265 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1266 # Reject names that are not valid shell variable names.
1267 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1268 as_fn_error $? "invalid package name: $ac_useropt"
1269 ac_useropt_orig=$ac_useropt
1270 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1271 case $ac_user_opts in
1273 "with_$ac_useropt"
1274 "*) ;;
1275 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1276 ac_unrecognized_sep=', ';;
1277 esac
1278 eval with_$ac_useropt=no ;;
1280 --x)
1281 # Obsolete; use --with-x.
1282 with_x=yes ;;
1284 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1285 | --x-incl | --x-inc | --x-in | --x-i)
1286 ac_prev=x_includes ;;
1287 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1288 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1289 x_includes=$ac_optarg ;;
1291 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1292 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1293 ac_prev=x_libraries ;;
1294 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1295 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1296 x_libraries=$ac_optarg ;;
1298 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1299 Try \`$0 --help' for more information"
1302 *=*)
1303 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1304 # Reject names that are not valid shell variable names.
1305 case $ac_envvar in #(
1306 '' | [0-9]* | *[!_$as_cr_alnum]* )
1307 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1308 esac
1309 eval $ac_envvar=\$ac_optarg
1310 export $ac_envvar ;;
1313 # FIXME: should be removed in autoconf 3.0.
1314 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1315 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1316 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1317 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1320 esac
1321 done
1323 if test -n "$ac_prev"; then
1324 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1325 as_fn_error $? "missing argument to $ac_option"
1328 if test -n "$ac_unrecognized_opts"; then
1329 case $enable_option_checking in
1330 no) ;;
1331 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1332 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1333 esac
1336 # Check all directory arguments for consistency.
1337 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1338 datadir sysconfdir sharedstatedir localstatedir includedir \
1339 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1340 libdir localedir mandir
1342 eval ac_val=\$$ac_var
1343 # Remove trailing slashes.
1344 case $ac_val in
1345 */ )
1346 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1347 eval $ac_var=\$ac_val;;
1348 esac
1349 # Be sure to have absolute directory names.
1350 case $ac_val in
1351 [\\/$]* | ?:[\\/]* ) continue;;
1352 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1353 esac
1354 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1355 done
1357 # There might be people who depend on the old broken behavior: `$host'
1358 # used to hold the argument of --host etc.
1359 # FIXME: To remove some day.
1360 build=$build_alias
1361 host=$host_alias
1362 target=$target_alias
1364 # FIXME: To remove some day.
1365 if test "x$host_alias" != x; then
1366 if test "x$build_alias" = x; then
1367 cross_compiling=maybe
1368 elif test "x$build_alias" != "x$host_alias"; then
1369 cross_compiling=yes
1373 ac_tool_prefix=
1374 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1376 test "$silent" = yes && exec 6>/dev/null
1379 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1380 ac_ls_di=`ls -di .` &&
1381 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1382 as_fn_error $? "working directory cannot be determined"
1383 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1384 as_fn_error $? "pwd does not report name of working directory"
1387 # Find the source files, if location was not specified.
1388 if test -z "$srcdir"; then
1389 ac_srcdir_defaulted=yes
1390 # Try the directory containing this script, then the parent directory.
1391 ac_confdir=`$as_dirname -- "$as_myself" ||
1392 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1393 X"$as_myself" : 'X\(//\)[^/]' \| \
1394 X"$as_myself" : 'X\(//\)$' \| \
1395 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1396 $as_echo X"$as_myself" |
1397 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1398 s//\1/
1401 /^X\(\/\/\)[^/].*/{
1402 s//\1/
1405 /^X\(\/\/\)$/{
1406 s//\1/
1409 /^X\(\/\).*/{
1410 s//\1/
1413 s/.*/./; q'`
1414 srcdir=$ac_confdir
1415 if test ! -r "$srcdir/$ac_unique_file"; then
1416 srcdir=..
1418 else
1419 ac_srcdir_defaulted=no
1421 if test ! -r "$srcdir/$ac_unique_file"; then
1422 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1423 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1425 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1426 ac_abs_confdir=`(
1427 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1428 pwd)`
1429 # When building in place, set srcdir=.
1430 if test "$ac_abs_confdir" = "$ac_pwd"; then
1431 srcdir=.
1433 # Remove unnecessary trailing slashes from srcdir.
1434 # Double slashes in file names in object file debugging info
1435 # mess up M-x gdb in Emacs.
1436 case $srcdir in
1437 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1438 esac
1439 for ac_var in $ac_precious_vars; do
1440 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1441 eval ac_env_${ac_var}_value=\$${ac_var}
1442 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1443 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1444 done
1447 # Report the --help message.
1449 if test "$ac_init_help" = "long"; then
1450 # Omit some internal or obsolete options to make the list less imposing.
1451 # This message is too long to be a string in the A/UX 3.1 sh.
1452 cat <<_ACEOF
1453 \`configure' configures PostgreSQL 16devel to adapt to many kinds of systems.
1455 Usage: $0 [OPTION]... [VAR=VALUE]...
1457 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1458 VAR=VALUE. See below for descriptions of some of the useful variables.
1460 Defaults for the options are specified in brackets.
1462 Configuration:
1463 -h, --help display this help and exit
1464 --help=short display options specific to this package
1465 --help=recursive display the short help of all the included packages
1466 -V, --version display version information and exit
1467 -q, --quiet, --silent do not print \`checking ...' messages
1468 --cache-file=FILE cache test results in FILE [disabled]
1469 -C, --config-cache alias for \`--cache-file=config.cache'
1470 -n, --no-create do not create output files
1471 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1473 Installation directories:
1474 --prefix=PREFIX install architecture-independent files in PREFIX
1475 [$ac_default_prefix]
1476 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1477 [PREFIX]
1479 By default, \`make install' will install all the files in
1480 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1481 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1482 for instance \`--prefix=\$HOME'.
1484 For better control, use the options below.
1486 Fine tuning of the installation directories:
1487 --bindir=DIR user executables [EPREFIX/bin]
1488 --sbindir=DIR system admin executables [EPREFIX/sbin]
1489 --libexecdir=DIR program executables [EPREFIX/libexec]
1490 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1491 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1492 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1493 --libdir=DIR object code libraries [EPREFIX/lib]
1494 --includedir=DIR C header files [PREFIX/include]
1495 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1496 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1497 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1498 --infodir=DIR info documentation [DATAROOTDIR/info]
1499 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1500 --mandir=DIR man documentation [DATAROOTDIR/man]
1501 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1502 --htmldir=DIR html documentation [DOCDIR]
1503 --dvidir=DIR dvi documentation [DOCDIR]
1504 --pdfdir=DIR pdf documentation [DOCDIR]
1505 --psdir=DIR ps documentation [DOCDIR]
1506 _ACEOF
1508 cat <<\_ACEOF
1510 System types:
1511 --build=BUILD configure for building on BUILD [guessed]
1512 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1513 _ACEOF
1516 if test -n "$ac_init_help"; then
1517 case $ac_init_help in
1518 short | recursive ) echo "Configuration of PostgreSQL 16devel:";;
1519 esac
1520 cat <<\_ACEOF
1522 Optional Features:
1523 --disable-option-checking ignore unrecognized --enable/--with options
1524 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1525 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1526 --disable-integer-datetimes
1527 obsolete option, no longer supported
1528 --enable-nls[=LANGUAGES]
1529 enable Native Language Support
1530 --disable-rpath do not embed shared library search path in
1531 executables
1532 --disable-spinlocks do not use spinlocks
1533 --disable-atomics do not use atomic operations
1534 --enable-debug build with debugging symbols (-g)
1535 --enable-profiling build with profiling enabled
1536 --enable-coverage build with coverage testing instrumentation
1537 --enable-dtrace build with DTrace support
1538 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1539 --enable-depend turn on automatic dependency tracking
1540 --enable-cassert enable assertion checks (for debugging)
1541 --disable-thread-safety disable thread-safety in client libraries
1542 --disable-largefile omit support for large files
1544 Optional Packages:
1545 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1546 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1547 --with-extra-version=STRING
1548 append STRING to version
1549 --with-template=NAME override operating system template
1550 --with-includes=DIRS look for additional header files in DIRS
1551 --with-libraries=DIRS look for additional libraries in DIRS
1552 --with-libs=DIRS alternative spelling of --with-libraries
1553 --with-pgport=PORTNUM set default port number [5432]
1554 --with-blocksize=BLOCKSIZE
1555 set table block size in kB [8]
1556 --with-segsize=SEGSIZE set table segment size in GB [1]
1557 --with-wal-blocksize=BLOCKSIZE
1558 set WAL block size in kB [8]
1559 --with-CC=CMD set compiler (deprecated)
1560 --with-llvm build with LLVM based JIT support
1561 --with-icu build with ICU support
1562 --with-tcl build Tcl modules (PL/Tcl)
1563 --with-tclconfig=DIR tclConfig.sh is in DIR
1564 --with-perl build Perl modules (PL/Perl)
1565 --with-python build Python modules (PL/Python)
1566 --with-gssapi build with GSSAPI support
1567 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1568 [postgres]
1569 --with-pam build with PAM support
1570 --with-bsd-auth build with BSD Authentication support
1571 --with-ldap build with LDAP support
1572 --with-bonjour build with Bonjour support
1573 --with-selinux build with SELinux support
1574 --with-systemd build with systemd support
1575 --without-readline do not use GNU Readline nor BSD Libedit for editing
1576 --with-libedit-preferred
1577 prefer BSD Libedit over GNU Readline
1578 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1579 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1580 --with-libxml build with XML support
1581 --with-libxslt use XSLT support when building contrib/xml2
1582 --with-system-tzdata=DIR
1583 use system time zone data in DIR
1584 --without-zlib do not use Zlib
1585 --with-lz4 build with LZ4 support
1586 --with-zstd build with ZSTD support
1587 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1588 --with-ssl=LIB use LIB for SSL/TLS support (openssl)
1589 --with-openssl obsolete spelling of --with-ssl=openssl
1591 Some influential environment variables:
1592 CC C compiler command
1593 CFLAGS C compiler flags
1594 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1595 nonstandard directory <lib dir>
1596 LIBS libraries to pass to the linker, e.g. -l<library>
1597 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1598 you have headers in a nonstandard directory <include dir>
1599 CXX C++ compiler command
1600 CXXFLAGS C++ compiler flags
1601 LLVM_CONFIG path to llvm-config command
1602 CLANG path to clang compiler to generate bitcode
1603 CPP C preprocessor
1604 PKG_CONFIG path to pkg-config utility
1605 PKG_CONFIG_PATH
1606 directories to add to pkg-config's search path
1607 PKG_CONFIG_LIBDIR
1608 path overriding pkg-config's built-in search path
1609 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1610 ICU_LIBS linker flags for ICU, overriding pkg-config
1611 XML2_CONFIG path to xml2-config utility
1612 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1613 XML2_LIBS linker flags for XML2, overriding pkg-config
1614 LZ4_CFLAGS C compiler flags for LZ4, overriding pkg-config
1615 LZ4_LIBS linker flags for LZ4, overriding pkg-config
1616 ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
1617 ZSTD_LIBS linker flags for ZSTD, overriding pkg-config
1618 LDFLAGS_EX extra linker flags for linking executables only
1619 LDFLAGS_SL extra linker flags for linking shared libraries only
1620 PERL Perl program
1621 PYTHON Python program
1622 MSGFMT msgfmt program for NLS
1623 TCLSH Tcl interpreter program (tclsh)
1625 Use these variables to override the choices made by `configure' or to help
1626 it to find libraries and programs with nonstandard names/locations.
1628 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1629 PostgreSQL home page: <https://www.postgresql.org/>.
1630 _ACEOF
1631 ac_status=$?
1634 if test "$ac_init_help" = "recursive"; then
1635 # If there are subdirs, report their specific --help.
1636 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1637 test -d "$ac_dir" ||
1638 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1639 continue
1640 ac_builddir=.
1642 case "$ac_dir" in
1643 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1645 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1646 # A ".." for each directory in $ac_dir_suffix.
1647 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1648 case $ac_top_builddir_sub in
1649 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1650 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1651 esac ;;
1652 esac
1653 ac_abs_top_builddir=$ac_pwd
1654 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1655 # for backward compatibility:
1656 ac_top_builddir=$ac_top_build_prefix
1658 case $srcdir in
1659 .) # We are building in place.
1660 ac_srcdir=.
1661 ac_top_srcdir=$ac_top_builddir_sub
1662 ac_abs_top_srcdir=$ac_pwd ;;
1663 [\\/]* | ?:[\\/]* ) # Absolute name.
1664 ac_srcdir=$srcdir$ac_dir_suffix;
1665 ac_top_srcdir=$srcdir
1666 ac_abs_top_srcdir=$srcdir ;;
1667 *) # Relative name.
1668 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1669 ac_top_srcdir=$ac_top_build_prefix$srcdir
1670 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1671 esac
1672 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1674 cd "$ac_dir" || { ac_status=$?; continue; }
1675 # Check for guested configure.
1676 if test -f "$ac_srcdir/configure.gnu"; then
1677 echo &&
1678 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1679 elif test -f "$ac_srcdir/configure"; then
1680 echo &&
1681 $SHELL "$ac_srcdir/configure" --help=recursive
1682 else
1683 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1684 fi || ac_status=$?
1685 cd "$ac_pwd" || { ac_status=$?; break; }
1686 done
1689 test -n "$ac_init_help" && exit $ac_status
1690 if $ac_init_version; then
1691 cat <<\_ACEOF
1692 PostgreSQL configure 16devel
1693 generated by GNU Autoconf 2.69
1695 Copyright (C) 2012 Free Software Foundation, Inc.
1696 This configure script is free software; the Free Software Foundation
1697 gives unlimited permission to copy, distribute and modify it.
1699 Copyright (c) 1996-2022, PostgreSQL Global Development Group
1700 _ACEOF
1701 exit
1704 ## ------------------------ ##
1705 ## Autoconf initialization. ##
1706 ## ------------------------ ##
1708 # ac_fn_c_try_compile LINENO
1709 # --------------------------
1710 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1711 ac_fn_c_try_compile ()
1713 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1714 rm -f conftest.$ac_objext
1715 if { { ac_try="$ac_compile"
1716 case "(($ac_try" in
1717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1718 *) ac_try_echo=$ac_try;;
1719 esac
1720 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1721 $as_echo "$ac_try_echo"; } >&5
1722 (eval "$ac_compile") 2>conftest.err
1723 ac_status=$?
1724 if test -s conftest.err; then
1725 grep -v '^ *+' conftest.err >conftest.er1
1726 cat conftest.er1 >&5
1727 mv -f conftest.er1 conftest.err
1729 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1730 test $ac_status = 0; } && {
1731 test -z "$ac_c_werror_flag" ||
1732 test ! -s conftest.err
1733 } && test -s conftest.$ac_objext; then :
1734 ac_retval=0
1735 else
1736 $as_echo "$as_me: failed program was:" >&5
1737 sed 's/^/| /' conftest.$ac_ext >&5
1739 ac_retval=1
1741 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1742 as_fn_set_status $ac_retval
1744 } # ac_fn_c_try_compile
1746 # ac_fn_cxx_try_compile LINENO
1747 # ----------------------------
1748 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1749 ac_fn_cxx_try_compile ()
1751 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1752 rm -f conftest.$ac_objext
1753 if { { ac_try="$ac_compile"
1754 case "(($ac_try" in
1755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1756 *) ac_try_echo=$ac_try;;
1757 esac
1758 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1759 $as_echo "$ac_try_echo"; } >&5
1760 (eval "$ac_compile") 2>conftest.err
1761 ac_status=$?
1762 if test -s conftest.err; then
1763 grep -v '^ *+' conftest.err >conftest.er1
1764 cat conftest.er1 >&5
1765 mv -f conftest.er1 conftest.err
1767 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1768 test $ac_status = 0; } && {
1769 test -z "$ac_cxx_werror_flag" ||
1770 test ! -s conftest.err
1771 } && test -s conftest.$ac_objext; then :
1772 ac_retval=0
1773 else
1774 $as_echo "$as_me: failed program was:" >&5
1775 sed 's/^/| /' conftest.$ac_ext >&5
1777 ac_retval=1
1779 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1780 as_fn_set_status $ac_retval
1782 } # ac_fn_cxx_try_compile
1784 # ac_fn_c_try_link LINENO
1785 # -----------------------
1786 # Try to link conftest.$ac_ext, and return whether this succeeded.
1787 ac_fn_c_try_link ()
1789 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1790 rm -f conftest.$ac_objext conftest$ac_exeext
1791 if { { ac_try="$ac_link"
1792 case "(($ac_try" in
1793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1794 *) ac_try_echo=$ac_try;;
1795 esac
1796 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1797 $as_echo "$ac_try_echo"; } >&5
1798 (eval "$ac_link") 2>conftest.err
1799 ac_status=$?
1800 if test -s conftest.err; then
1801 grep -v '^ *+' conftest.err >conftest.er1
1802 cat conftest.er1 >&5
1803 mv -f conftest.er1 conftest.err
1805 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1806 test $ac_status = 0; } && {
1807 test -z "$ac_c_werror_flag" ||
1808 test ! -s conftest.err
1809 } && test -s conftest$ac_exeext && {
1810 test "$cross_compiling" = yes ||
1811 test -x conftest$ac_exeext
1812 }; then :
1813 ac_retval=0
1814 else
1815 $as_echo "$as_me: failed program was:" >&5
1816 sed 's/^/| /' conftest.$ac_ext >&5
1818 ac_retval=1
1820 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1821 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1822 # interfere with the next link command; also delete a directory that is
1823 # left behind by Apple's compiler. We do this before executing the actions.
1824 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1825 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1826 as_fn_set_status $ac_retval
1828 } # ac_fn_c_try_link
1830 # ac_fn_c_try_cpp LINENO
1831 # ----------------------
1832 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1833 ac_fn_c_try_cpp ()
1835 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1836 if { { ac_try="$ac_cpp conftest.$ac_ext"
1837 case "(($ac_try" in
1838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1839 *) ac_try_echo=$ac_try;;
1840 esac
1841 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1842 $as_echo "$ac_try_echo"; } >&5
1843 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1844 ac_status=$?
1845 if test -s conftest.err; then
1846 grep -v '^ *+' conftest.err >conftest.er1
1847 cat conftest.er1 >&5
1848 mv -f conftest.er1 conftest.err
1850 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1851 test $ac_status = 0; } > conftest.i && {
1852 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1853 test ! -s conftest.err
1854 }; then :
1855 ac_retval=0
1856 else
1857 $as_echo "$as_me: failed program was:" >&5
1858 sed 's/^/| /' conftest.$ac_ext >&5
1860 ac_retval=1
1862 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1863 as_fn_set_status $ac_retval
1865 } # ac_fn_c_try_cpp
1867 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1868 # -------------------------------------------------------
1869 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1870 # the include files in INCLUDES and setting the cache variable VAR
1871 # accordingly.
1872 ac_fn_c_check_header_mongrel ()
1874 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1875 if eval \${$3+:} false; then :
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1877 $as_echo_n "checking for $2... " >&6; }
1878 if eval \${$3+:} false; then :
1879 $as_echo_n "(cached) " >&6
1881 eval ac_res=\$$3
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1883 $as_echo "$ac_res" >&6; }
1884 else
1885 # Is the header compilable?
1886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1887 $as_echo_n "checking $2 usability... " >&6; }
1888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1889 /* end confdefs.h. */
1891 #include <$2>
1892 _ACEOF
1893 if ac_fn_c_try_compile "$LINENO"; then :
1894 ac_header_compiler=yes
1895 else
1896 ac_header_compiler=no
1898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1900 $as_echo "$ac_header_compiler" >&6; }
1902 # Is the header present?
1903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1904 $as_echo_n "checking $2 presence... " >&6; }
1905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1906 /* end confdefs.h. */
1907 #include <$2>
1908 _ACEOF
1909 if ac_fn_c_try_cpp "$LINENO"; then :
1910 ac_header_preproc=yes
1911 else
1912 ac_header_preproc=no
1914 rm -f conftest.err conftest.i conftest.$ac_ext
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1916 $as_echo "$ac_header_preproc" >&6; }
1918 # So? What about this header?
1919 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1920 yes:no: )
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1922 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1924 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1926 no:yes:* )
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1928 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1930 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1932 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1934 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1936 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1937 ( $as_echo "## ---------------------------------------------- ##
1938 ## Report this to pgsql-bugs@lists.postgresql.org ##
1939 ## ---------------------------------------------- ##"
1940 ) | sed "s/^/$as_me: WARNING: /" >&2
1942 esac
1943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1944 $as_echo_n "checking for $2... " >&6; }
1945 if eval \${$3+:} false; then :
1946 $as_echo_n "(cached) " >&6
1947 else
1948 eval "$3=\$ac_header_compiler"
1950 eval ac_res=\$$3
1951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1952 $as_echo "$ac_res" >&6; }
1954 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1956 } # ac_fn_c_check_header_mongrel
1958 # ac_fn_c_try_run LINENO
1959 # ----------------------
1960 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1961 # that executables *can* be run.
1962 ac_fn_c_try_run ()
1964 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1965 if { { ac_try="$ac_link"
1966 case "(($ac_try" in
1967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1968 *) ac_try_echo=$ac_try;;
1969 esac
1970 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1971 $as_echo "$ac_try_echo"; } >&5
1972 (eval "$ac_link") 2>&5
1973 ac_status=$?
1974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1975 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1976 { { case "(($ac_try" in
1977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1978 *) ac_try_echo=$ac_try;;
1979 esac
1980 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1981 $as_echo "$ac_try_echo"; } >&5
1982 (eval "$ac_try") 2>&5
1983 ac_status=$?
1984 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1985 test $ac_status = 0; }; }; then :
1986 ac_retval=0
1987 else
1988 $as_echo "$as_me: program exited with status $ac_status" >&5
1989 $as_echo "$as_me: failed program was:" >&5
1990 sed 's/^/| /' conftest.$ac_ext >&5
1992 ac_retval=$ac_status
1994 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1995 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1996 as_fn_set_status $ac_retval
1998 } # ac_fn_c_try_run
2000 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2001 # -------------------------------------------------------
2002 # Tests whether HEADER exists and can be compiled using the include files in
2003 # INCLUDES, setting the cache variable VAR accordingly.
2004 ac_fn_c_check_header_compile ()
2006 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2008 $as_echo_n "checking for $2... " >&6; }
2009 if eval \${$3+:} false; then :
2010 $as_echo_n "(cached) " >&6
2011 else
2012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013 /* end confdefs.h. */
2015 #include <$2>
2016 _ACEOF
2017 if ac_fn_c_try_compile "$LINENO"; then :
2018 eval "$3=yes"
2019 else
2020 eval "$3=no"
2022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2024 eval ac_res=\$$3
2025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2026 $as_echo "$ac_res" >&6; }
2027 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2029 } # ac_fn_c_check_header_compile
2031 # ac_fn_c_check_func LINENO FUNC VAR
2032 # ----------------------------------
2033 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2034 ac_fn_c_check_func ()
2036 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2038 $as_echo_n "checking for $2... " >&6; }
2039 if eval \${$3+:} false; then :
2040 $as_echo_n "(cached) " >&6
2041 else
2042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043 /* end confdefs.h. */
2044 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2045 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2046 #define $2 innocuous_$2
2048 /* System header to define __stub macros and hopefully few prototypes,
2049 which can conflict with char $2 (); below.
2050 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2051 <limits.h> exists even on freestanding compilers. */
2053 #ifdef __STDC__
2054 # include <limits.h>
2055 #else
2056 # include <assert.h>
2057 #endif
2059 #undef $2
2061 /* Override any GCC internal prototype to avoid an error.
2062 Use char because int might match the return type of a GCC
2063 builtin and then its argument prototype would still apply. */
2064 #ifdef __cplusplus
2065 extern "C"
2066 #endif
2067 char $2 ();
2068 /* The GNU C library defines this for functions which it implements
2069 to always fail with ENOSYS. Some functions are actually named
2070 something starting with __ and the normal name is an alias. */
2071 #if defined __stub_$2 || defined __stub___$2
2072 choke me
2073 #endif
2076 main ()
2078 return $2 ();
2080 return 0;
2082 _ACEOF
2083 if ac_fn_c_try_link "$LINENO"; then :
2084 eval "$3=yes"
2085 else
2086 eval "$3=no"
2088 rm -f core conftest.err conftest.$ac_objext \
2089 conftest$ac_exeext conftest.$ac_ext
2091 eval ac_res=\$$3
2092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2093 $as_echo "$ac_res" >&6; }
2094 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2096 } # ac_fn_c_check_func
2098 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2099 # -------------------------------------------
2100 # Tests whether TYPE exists after having included INCLUDES, setting cache
2101 # variable VAR accordingly.
2102 ac_fn_c_check_type ()
2104 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2106 $as_echo_n "checking for $2... " >&6; }
2107 if eval \${$3+:} false; then :
2108 $as_echo_n "(cached) " >&6
2109 else
2110 eval "$3=no"
2111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2112 /* end confdefs.h. */
2115 main ()
2117 if (sizeof ($2))
2118 return 0;
2120 return 0;
2122 _ACEOF
2123 if ac_fn_c_try_compile "$LINENO"; then :
2124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125 /* end confdefs.h. */
2128 main ()
2130 if (sizeof (($2)))
2131 return 0;
2133 return 0;
2135 _ACEOF
2136 if ac_fn_c_try_compile "$LINENO"; then :
2138 else
2139 eval "$3=yes"
2141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145 eval ac_res=\$$3
2146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2147 $as_echo "$ac_res" >&6; }
2148 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2150 } # ac_fn_c_check_type
2152 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2153 # ----------------------------------------------------
2154 # Tries to find if the field MEMBER exists in type AGGR, after including
2155 # INCLUDES, setting cache variable VAR accordingly.
2156 ac_fn_c_check_member ()
2158 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2160 $as_echo_n "checking for $2.$3... " >&6; }
2161 if eval \${$4+:} false; then :
2162 $as_echo_n "(cached) " >&6
2163 else
2164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2165 /* end confdefs.h. */
2168 main ()
2170 static $2 ac_aggr;
2171 if (ac_aggr.$3)
2172 return 0;
2174 return 0;
2176 _ACEOF
2177 if ac_fn_c_try_compile "$LINENO"; then :
2178 eval "$4=yes"
2179 else
2180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181 /* end confdefs.h. */
2184 main ()
2186 static $2 ac_aggr;
2187 if (sizeof ac_aggr.$3)
2188 return 0;
2190 return 0;
2192 _ACEOF
2193 if ac_fn_c_try_compile "$LINENO"; then :
2194 eval "$4=yes"
2195 else
2196 eval "$4=no"
2198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2202 eval ac_res=\$$4
2203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2204 $as_echo "$ac_res" >&6; }
2205 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2207 } # ac_fn_c_check_member
2209 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2210 # --------------------------------------------
2211 # Tries to find the compile-time value of EXPR in a program that includes
2212 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2213 # computed
2214 ac_fn_c_compute_int ()
2216 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2217 if test "$cross_compiling" = yes; then
2218 # Depending upon the size, compute the lo and hi bounds.
2219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2220 /* end confdefs.h. */
2223 main ()
2225 static int test_array [1 - 2 * !(($2) >= 0)];
2226 test_array [0] = 0;
2227 return test_array [0];
2230 return 0;
2232 _ACEOF
2233 if ac_fn_c_try_compile "$LINENO"; then :
2234 ac_lo=0 ac_mid=0
2235 while :; do
2236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2237 /* end confdefs.h. */
2240 main ()
2242 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2243 test_array [0] = 0;
2244 return test_array [0];
2247 return 0;
2249 _ACEOF
2250 if ac_fn_c_try_compile "$LINENO"; then :
2251 ac_hi=$ac_mid; break
2252 else
2253 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2254 if test $ac_lo -le $ac_mid; then
2255 ac_lo= ac_hi=
2256 break
2258 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2261 done
2262 else
2263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2264 /* end confdefs.h. */
2267 main ()
2269 static int test_array [1 - 2 * !(($2) < 0)];
2270 test_array [0] = 0;
2271 return test_array [0];
2274 return 0;
2276 _ACEOF
2277 if ac_fn_c_try_compile "$LINENO"; then :
2278 ac_hi=-1 ac_mid=-1
2279 while :; do
2280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2281 /* end confdefs.h. */
2284 main ()
2286 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2287 test_array [0] = 0;
2288 return test_array [0];
2291 return 0;
2293 _ACEOF
2294 if ac_fn_c_try_compile "$LINENO"; then :
2295 ac_lo=$ac_mid; break
2296 else
2297 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2298 if test $ac_mid -le $ac_hi; then
2299 ac_lo= ac_hi=
2300 break
2302 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2305 done
2306 else
2307 ac_lo= ac_hi=
2309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2312 # Binary search between lo and hi bounds.
2313 while test "x$ac_lo" != "x$ac_hi"; do
2314 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316 /* end confdefs.h. */
2319 main ()
2321 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2322 test_array [0] = 0;
2323 return test_array [0];
2326 return 0;
2328 _ACEOF
2329 if ac_fn_c_try_compile "$LINENO"; then :
2330 ac_hi=$ac_mid
2331 else
2332 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2335 done
2336 case $ac_lo in #((
2337 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2338 '') ac_retval=1 ;;
2339 esac
2340 else
2341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2342 /* end confdefs.h. */
2344 static long int longval () { return $2; }
2345 static unsigned long int ulongval () { return $2; }
2346 #include <stdio.h>
2347 #include <stdlib.h>
2349 main ()
2352 FILE *f = fopen ("conftest.val", "w");
2353 if (! f)
2354 return 1;
2355 if (($2) < 0)
2357 long int i = longval ();
2358 if (i != ($2))
2359 return 1;
2360 fprintf (f, "%ld", i);
2362 else
2364 unsigned long int i = ulongval ();
2365 if (i != ($2))
2366 return 1;
2367 fprintf (f, "%lu", i);
2369 /* Do not output a trailing newline, as this causes \r\n confusion
2370 on some platforms. */
2371 return ferror (f) || fclose (f) != 0;
2374 return 0;
2376 _ACEOF
2377 if ac_fn_c_try_run "$LINENO"; then :
2378 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2379 else
2380 ac_retval=1
2382 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2383 conftest.$ac_objext conftest.beam conftest.$ac_ext
2384 rm -f conftest.val
2387 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2388 as_fn_set_status $ac_retval
2390 } # ac_fn_c_compute_int
2392 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2393 # ---------------------------------------------
2394 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2395 # accordingly.
2396 ac_fn_c_check_decl ()
2398 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2399 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2400 as_decl_name=`echo $2|sed 's/ *(.*//'`
2401 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2403 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2404 if eval \${$3+:} false; then :
2405 $as_echo_n "(cached) " >&6
2406 else
2407 ac_save_werror_flag=$ac_c_werror_flag
2408 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2410 /* end confdefs.h. */
2413 main ()
2415 #ifndef $as_decl_name
2416 #ifdef __cplusplus
2417 (void) $as_decl_use;
2418 #else
2419 (void) $as_decl_name;
2420 #endif
2421 #endif
2424 return 0;
2426 _ACEOF
2427 if ac_fn_c_try_compile "$LINENO"; then :
2428 eval "$3=yes"
2429 else
2430 eval "$3=no"
2432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2433 ac_c_werror_flag=$ac_save_werror_flag
2435 eval ac_res=\$$3
2436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2437 $as_echo "$ac_res" >&6; }
2438 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2440 } # ac_fn_c_check_decl
2441 cat >config.log <<_ACEOF
2442 This file contains any messages produced by compilers while
2443 running configure, to aid debugging if configure makes a mistake.
2445 It was created by PostgreSQL $as_me 16devel, which was
2446 generated by GNU Autoconf 2.69. Invocation command line was
2448 $ $0 $@
2450 _ACEOF
2451 exec 5>>config.log
2453 cat <<_ASUNAME
2454 ## --------- ##
2455 ## Platform. ##
2456 ## --------- ##
2458 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2459 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2460 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2461 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2462 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2464 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2465 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2467 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2468 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2469 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2470 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2471 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2472 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2473 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2475 _ASUNAME
2477 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2478 for as_dir in $PATH
2480 IFS=$as_save_IFS
2481 test -z "$as_dir" && as_dir=.
2482 $as_echo "PATH: $as_dir"
2483 done
2484 IFS=$as_save_IFS
2486 } >&5
2488 cat >&5 <<_ACEOF
2491 ## ----------- ##
2492 ## Core tests. ##
2493 ## ----------- ##
2495 _ACEOF
2498 # Keep a trace of the command line.
2499 # Strip out --no-create and --no-recursion so they do not pile up.
2500 # Strip out --silent because we don't want to record it for future runs.
2501 # Also quote any args containing shell meta-characters.
2502 # Make two passes to allow for proper duplicate-argument suppression.
2503 ac_configure_args=
2504 ac_configure_args0=
2505 ac_configure_args1=
2506 ac_must_keep_next=false
2507 for ac_pass in 1 2
2509 for ac_arg
2511 case $ac_arg in
2512 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2513 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2514 | -silent | --silent | --silen | --sile | --sil)
2515 continue ;;
2516 *\'*)
2517 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2518 esac
2519 case $ac_pass in
2520 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2522 as_fn_append ac_configure_args1 " '$ac_arg'"
2523 if test $ac_must_keep_next = true; then
2524 ac_must_keep_next=false # Got value, back to normal.
2525 else
2526 case $ac_arg in
2527 *=* | --config-cache | -C | -disable-* | --disable-* \
2528 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2529 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2530 | -with-* | --with-* | -without-* | --without-* | --x)
2531 case "$ac_configure_args0 " in
2532 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2533 esac
2535 -* ) ac_must_keep_next=true ;;
2536 esac
2538 as_fn_append ac_configure_args " '$ac_arg'"
2540 esac
2541 done
2542 done
2543 { ac_configure_args0=; unset ac_configure_args0;}
2544 { ac_configure_args1=; unset ac_configure_args1;}
2546 # When interrupted or exit'd, cleanup temporary files, and complete
2547 # config.log. We remove comments because anyway the quotes in there
2548 # would cause problems or look ugly.
2549 # WARNING: Use '\'' to represent an apostrophe within the trap.
2550 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2551 trap 'exit_status=$?
2552 # Save into config.log some information that might help in debugging.
2554 echo
2556 $as_echo "## ---------------- ##
2557 ## Cache variables. ##
2558 ## ---------------- ##"
2559 echo
2560 # The following way of writing the cache mishandles newlines in values,
2562 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2563 eval ac_val=\$$ac_var
2564 case $ac_val in #(
2565 *${as_nl}*)
2566 case $ac_var in #(
2567 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2568 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2569 esac
2570 case $ac_var in #(
2571 _ | IFS | as_nl) ;; #(
2572 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2573 *) { eval $ac_var=; unset $ac_var;} ;;
2574 esac ;;
2575 esac
2576 done
2577 (set) 2>&1 |
2578 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2579 *${as_nl}ac_space=\ *)
2580 sed -n \
2581 "s/'\''/'\''\\\\'\'''\''/g;
2582 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2583 ;; #(
2585 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2587 esac |
2588 sort
2590 echo
2592 $as_echo "## ----------------- ##
2593 ## Output variables. ##
2594 ## ----------------- ##"
2595 echo
2596 for ac_var in $ac_subst_vars
2598 eval ac_val=\$$ac_var
2599 case $ac_val in
2600 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2601 esac
2602 $as_echo "$ac_var='\''$ac_val'\''"
2603 done | sort
2604 echo
2606 if test -n "$ac_subst_files"; then
2607 $as_echo "## ------------------- ##
2608 ## File substitutions. ##
2609 ## ------------------- ##"
2610 echo
2611 for ac_var in $ac_subst_files
2613 eval ac_val=\$$ac_var
2614 case $ac_val in
2615 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2616 esac
2617 $as_echo "$ac_var='\''$ac_val'\''"
2618 done | sort
2619 echo
2622 if test -s confdefs.h; then
2623 $as_echo "## ----------- ##
2624 ## confdefs.h. ##
2625 ## ----------- ##"
2626 echo
2627 cat confdefs.h
2628 echo
2630 test "$ac_signal" != 0 &&
2631 $as_echo "$as_me: caught signal $ac_signal"
2632 $as_echo "$as_me: exit $exit_status"
2633 } >&5
2634 rm -f core *.core core.conftest.* &&
2635 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2636 exit $exit_status
2638 for ac_signal in 1 2 13 15; do
2639 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2640 done
2641 ac_signal=0
2643 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2644 rm -f -r conftest* confdefs.h
2646 $as_echo "/* confdefs.h */" > confdefs.h
2648 # Predefined preprocessor variables.
2650 cat >>confdefs.h <<_ACEOF
2651 #define PACKAGE_NAME "$PACKAGE_NAME"
2652 _ACEOF
2654 cat >>confdefs.h <<_ACEOF
2655 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2656 _ACEOF
2658 cat >>confdefs.h <<_ACEOF
2659 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2660 _ACEOF
2662 cat >>confdefs.h <<_ACEOF
2663 #define PACKAGE_STRING "$PACKAGE_STRING"
2664 _ACEOF
2666 cat >>confdefs.h <<_ACEOF
2667 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2668 _ACEOF
2670 cat >>confdefs.h <<_ACEOF
2671 #define PACKAGE_URL "$PACKAGE_URL"
2672 _ACEOF
2675 # Let the site file select an alternate cache file if it wants to.
2676 # Prefer an explicitly selected file to automatically selected ones.
2677 ac_site_file1=NONE
2678 ac_site_file2=NONE
2679 if test -n "$CONFIG_SITE"; then
2680 # We do not want a PATH search for config.site.
2681 case $CONFIG_SITE in #((
2682 -*) ac_site_file1=./$CONFIG_SITE;;
2683 */*) ac_site_file1=$CONFIG_SITE;;
2684 *) ac_site_file1=./$CONFIG_SITE;;
2685 esac
2686 elif test "x$prefix" != xNONE; then
2687 ac_site_file1=$prefix/share/config.site
2688 ac_site_file2=$prefix/etc/config.site
2689 else
2690 ac_site_file1=$ac_default_prefix/share/config.site
2691 ac_site_file2=$ac_default_prefix/etc/config.site
2693 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2695 test "x$ac_site_file" = xNONE && continue
2696 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2697 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2698 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2699 sed 's/^/| /' "$ac_site_file" >&5
2700 . "$ac_site_file" \
2701 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2702 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2703 as_fn_error $? "failed to load site script $ac_site_file
2704 See \`config.log' for more details" "$LINENO" 5; }
2706 done
2708 if test -r "$cache_file"; then
2709 # Some versions of bash will fail to source /dev/null (special files
2710 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2711 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2713 $as_echo "$as_me: loading cache $cache_file" >&6;}
2714 case $cache_file in
2715 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2716 *) . "./$cache_file";;
2717 esac
2719 else
2720 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2721 $as_echo "$as_me: creating cache $cache_file" >&6;}
2722 >$cache_file
2725 # Check that the precious variables saved in the cache have kept the same
2726 # value.
2727 ac_cache_corrupted=false
2728 for ac_var in $ac_precious_vars; do
2729 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2730 eval ac_new_set=\$ac_env_${ac_var}_set
2731 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2732 eval ac_new_val=\$ac_env_${ac_var}_value
2733 case $ac_old_set,$ac_new_set in
2734 set,)
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2736 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2737 ac_cache_corrupted=: ;;
2738 ,set)
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2740 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2741 ac_cache_corrupted=: ;;
2742 ,);;
2744 if test "x$ac_old_val" != "x$ac_new_val"; then
2745 # differences in whitespace do not lead to failure.
2746 ac_old_val_w=`echo x $ac_old_val`
2747 ac_new_val_w=`echo x $ac_new_val`
2748 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2750 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2751 ac_cache_corrupted=:
2752 else
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2754 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2755 eval $ac_var=\$ac_old_val
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2758 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2760 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2761 fi;;
2762 esac
2763 # Pass precious variables to config.status.
2764 if test "$ac_new_set" = set; then
2765 case $ac_new_val in
2766 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2767 *) ac_arg=$ac_var=$ac_new_val ;;
2768 esac
2769 case " $ac_configure_args " in
2770 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2771 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2772 esac
2774 done
2775 if $ac_cache_corrupted; then
2776 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2777 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2779 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2780 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2782 ## -------------------- ##
2783 ## Main body of script. ##
2784 ## -------------------- ##
2786 ac_ext=c
2787 ac_cpp='$CPP $CPPFLAGS'
2788 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2789 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2790 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2797 ac_aux_dir=
2798 for ac_dir in config "$srcdir"/config; do
2799 if test -f "$ac_dir/install-sh"; then
2800 ac_aux_dir=$ac_dir
2801 ac_install_sh="$ac_aux_dir/install-sh -c"
2802 break
2803 elif test -f "$ac_dir/install.sh"; then
2804 ac_aux_dir=$ac_dir
2805 ac_install_sh="$ac_aux_dir/install.sh -c"
2806 break
2807 elif test -f "$ac_dir/shtool"; then
2808 ac_aux_dir=$ac_dir
2809 ac_install_sh="$ac_aux_dir/shtool install -c"
2810 break
2812 done
2813 if test -z "$ac_aux_dir"; then
2814 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2817 # These three variables are undocumented and unsupported,
2818 # and are intended to be withdrawn in a future Autoconf release.
2819 # They can cause serious problems if a builder's source tree is in a directory
2820 # whose full name contains unusual characters.
2821 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2822 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2823 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2828 cat >>confdefs.h <<_ACEOF
2829 #define CONFIGURE_ARGS "$ac_configure_args"
2830 _ACEOF
2833 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2834 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2835 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2838 cat >>confdefs.h <<_ACEOF
2839 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2840 _ACEOF
2843 cat >>confdefs.h <<_ACEOF
2844 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2845 _ACEOF
2848 cat >>confdefs.h <<_ACEOF
2849 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2850 _ACEOF
2856 # Check whether --with-extra-version was given.
2857 if test "${with_extra_version+set}" = set; then :
2858 withval=$with_extra_version;
2859 case $withval in
2860 yes)
2861 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2864 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2867 PG_VERSION="$PACKAGE_VERSION$withval"
2869 esac
2871 else
2872 PG_VERSION="$PACKAGE_VERSION"
2877 cat >>confdefs.h <<_ACEOF
2878 #define PG_VERSION "$PG_VERSION"
2879 _ACEOF
2882 # Make sure we can run config.sub.
2883 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2884 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2887 $as_echo_n "checking build system type... " >&6; }
2888 if ${ac_cv_build+:} false; then :
2889 $as_echo_n "(cached) " >&6
2890 else
2891 ac_build_alias=$build_alias
2892 test "x$ac_build_alias" = x &&
2893 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2894 test "x$ac_build_alias" = x &&
2895 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2896 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2897 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2901 $as_echo "$ac_cv_build" >&6; }
2902 case $ac_cv_build in
2903 *-*-*) ;;
2904 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2905 esac
2906 build=$ac_cv_build
2907 ac_save_IFS=$IFS; IFS='-'
2908 set x $ac_cv_build
2909 shift
2910 build_cpu=$1
2911 build_vendor=$2
2912 shift; shift
2913 # Remember, the first character of IFS is used to create $*,
2914 # except with old shells:
2915 build_os=$*
2916 IFS=$ac_save_IFS
2917 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2921 $as_echo_n "checking host system type... " >&6; }
2922 if ${ac_cv_host+:} false; then :
2923 $as_echo_n "(cached) " >&6
2924 else
2925 if test "x$host_alias" = x; then
2926 ac_cv_host=$ac_cv_build
2927 else
2928 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2929 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2934 $as_echo "$ac_cv_host" >&6; }
2935 case $ac_cv_host in
2936 *-*-*) ;;
2937 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2938 esac
2939 host=$ac_cv_host
2940 ac_save_IFS=$IFS; IFS='-'
2941 set x $ac_cv_host
2942 shift
2943 host_cpu=$1
2944 host_vendor=$2
2945 shift; shift
2946 # Remember, the first character of IFS is used to create $*,
2947 # except with old shells:
2948 host_os=$*
2949 IFS=$ac_save_IFS
2950 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2954 template=
2955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2956 $as_echo_n "checking which template to use... " >&6; }
2961 # Check whether --with-template was given.
2962 if test "${with_template+set}" = set; then :
2963 withval=$with_template;
2964 case $withval in
2965 yes)
2966 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2969 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2973 case $withval in
2974 list) echo; ls "$srcdir/src/template"; exit;;
2975 *) if test -f "$srcdir/src/template/$with_template" ; then
2976 template=$withval
2977 else
2978 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2979 fi;;
2980 esac
2983 esac
2985 else
2987 # --with-template not given
2989 case $host_os in
2990 aix*) template=aix ;;
2991 cygwin*|msys*) template=cygwin ;;
2992 darwin*) template=darwin ;;
2993 dragonfly*) template=netbsd ;;
2994 freebsd*) template=freebsd ;;
2995 linux*|gnu*|k*bsd*-gnu)
2996 template=linux ;;
2997 mingw*) template=win32 ;;
2998 netbsd*) template=netbsd ;;
2999 openbsd*) template=openbsd ;;
3000 solaris*) template=solaris ;;
3001 esac
3003 if test x"$template" = x"" ; then
3004 as_fn_error $? "
3005 *******************************************************************
3006 PostgreSQL has apparently not been ported to your platform yet.
3007 To try a manual configuration, look into the src/template directory
3008 for a similar platform and use the '--with-template=' option.
3010 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
3011 rectifying this. Include the above 'checking host system type...'
3012 line.
3013 *******************************************************************
3014 " "$LINENO" 5
3022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3023 $as_echo "$template" >&6; }
3025 PORTNAME=$template
3028 # Initialize default assumption that we do not need separate assembly code
3029 # for TAS (test-and-set). This can be overridden by the template file
3030 # when it's executed.
3031 need_tas=no
3032 tas_file=dummy.s
3034 # Default, works for most platforms, override in template file if needed
3035 DLSUFFIX=".so"
3040 ## Command line options
3044 # Add non-standard directories to the include path
3049 # Check whether --with-includes was given.
3050 if test "${with_includes+set}" = set; then :
3051 withval=$with_includes;
3052 case $withval in
3053 yes)
3054 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3057 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3062 esac
3070 # Add non-standard directories to the library search path
3075 # Check whether --with-libraries was given.
3076 if test "${with_libraries+set}" = set; then :
3077 withval=$with_libraries;
3078 case $withval in
3079 yes)
3080 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3083 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3086 LIBRARY_DIRS=$withval
3088 esac
3097 # Check whether --with-libs was given.
3098 if test "${with_libs+set}" = set; then :
3099 withval=$with_libs;
3100 case $withval in
3101 yes)
3102 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3105 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3108 LIBRARY_DIRS=$withval
3110 esac
3118 # 64-bit integer date/time storage is now the only option, but to avoid
3119 # unnecessary breakage of build scripts, continue to accept an explicit
3120 # "--enable-integer-datetimes" switch.
3124 # Check whether --enable-integer-datetimes was given.
3125 if test "${enable_integer_datetimes+set}" = set; then :
3126 enableval=$enable_integer_datetimes;
3127 case $enableval in
3128 yes)
3132 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3135 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3137 esac
3139 else
3140 enable_integer_datetimes=yes
3148 # NLS
3150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3151 $as_echo_n "checking whether NLS is wanted... " >&6; }
3154 # Check whether --enable-nls was given.
3155 if test "${enable_nls+set}" = set; then :
3156 enableval=$enable_nls;
3157 case $enableval in
3158 yes)
3165 enable_nls=yes
3166 WANTED_LANGUAGES=$enableval
3168 esac
3170 else
3171 enable_nls=no
3176 if test "$enable_nls" = yes; then
3178 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3183 $as_echo "$enable_nls" >&6; }
3188 # Default port number (--with-pgport), default 5432
3190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3191 $as_echo_n "checking for default port number... " >&6; }
3195 # Check whether --with-pgport was given.
3196 if test "${with_pgport+set}" = set; then :
3197 withval=$with_pgport;
3198 case $withval in
3199 yes)
3200 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3203 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3206 default_port=$withval
3208 esac
3210 else
3211 default_port=5432
3215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3216 $as_echo "$default_port" >&6; }
3217 # Need both of these because some places want an integer and some a string
3219 cat >>confdefs.h <<_ACEOF
3220 #define DEF_PGPORT ${default_port}
3221 _ACEOF
3224 cat >>confdefs.h <<_ACEOF
3225 #define DEF_PGPORT_STR "${default_port}"
3226 _ACEOF
3230 # It's worth validating port; you can get very confusing errors otherwise
3231 if test x"$default_port" = x""; then
3232 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3233 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3234 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3235 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3236 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3237 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3238 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3242 # '-rpath'-like feature can be disabled
3246 # Check whether --enable-rpath was given.
3247 if test "${enable_rpath+set}" = set; then :
3248 enableval=$enable_rpath;
3249 case $enableval in
3250 yes)
3257 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3259 esac
3261 else
3262 enable_rpath=yes
3270 # Spinlocks
3274 # Check whether --enable-spinlocks was given.
3275 if test "${enable_spinlocks+set}" = set; then :
3276 enableval=$enable_spinlocks;
3277 case $enableval in
3278 yes)
3285 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3287 esac
3289 else
3290 enable_spinlocks=yes
3297 # Atomic operations
3301 # Check whether --enable-atomics was given.
3302 if test "${enable_atomics+set}" = set; then :
3303 enableval=$enable_atomics;
3304 case $enableval in
3305 yes)
3312 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3314 esac
3316 else
3317 enable_atomics=yes
3324 # --enable-debug adds -g to compiler flags
3328 # Check whether --enable-debug was given.
3329 if test "${enable_debug+set}" = set; then :
3330 enableval=$enable_debug;
3331 case $enableval in
3332 yes)
3339 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3341 esac
3343 else
3344 enable_debug=no
3352 # --enable-profiling enables gcc profiling
3356 # Check whether --enable-profiling was given.
3357 if test "${enable_profiling+set}" = set; then :
3358 enableval=$enable_profiling;
3359 case $enableval in
3360 yes)
3367 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3369 esac
3371 else
3372 enable_profiling=no
3379 # --enable-coverage enables generation of code coverage metrics with gcov
3383 # Check whether --enable-coverage was given.
3384 if test "${enable_coverage+set}" = set; then :
3385 enableval=$enable_coverage;
3386 case $enableval in
3387 yes)
3388 if test -z "$GCOV"; then
3389 for ac_prog in gcov
3391 # Extract the first word of "$ac_prog", so it can be a program name with args.
3392 set dummy $ac_prog; ac_word=$2
3393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3394 $as_echo_n "checking for $ac_word... " >&6; }
3395 if ${ac_cv_path_GCOV+:} false; then :
3396 $as_echo_n "(cached) " >&6
3397 else
3398 case $GCOV in
3399 [\\/]* | ?:[\\/]*)
3400 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3403 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3404 for as_dir in $PATH
3406 IFS=$as_save_IFS
3407 test -z "$as_dir" && as_dir=.
3408 for ac_exec_ext in '' $ac_executable_extensions; do
3409 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3410 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3411 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3412 break 2
3414 done
3415 done
3416 IFS=$as_save_IFS
3419 esac
3421 GCOV=$ac_cv_path_GCOV
3422 if test -n "$GCOV"; then
3423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3424 $as_echo "$GCOV" >&6; }
3425 else
3426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3427 $as_echo "no" >&6; }
3431 test -n "$GCOV" && break
3432 done
3434 else
3435 # Report the value of GCOV in configure's output in all cases.
3436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3437 $as_echo_n "checking for GCOV... " >&6; }
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3439 $as_echo "$GCOV" >&6; }
3442 if test -z "$GCOV"; then
3443 as_fn_error $? "gcov not found" "$LINENO" 5
3445 if test -z "$LCOV"; then
3446 for ac_prog in lcov
3448 # Extract the first word of "$ac_prog", so it can be a program name with args.
3449 set dummy $ac_prog; ac_word=$2
3450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3451 $as_echo_n "checking for $ac_word... " >&6; }
3452 if ${ac_cv_path_LCOV+:} false; then :
3453 $as_echo_n "(cached) " >&6
3454 else
3455 case $LCOV in
3456 [\\/]* | ?:[\\/]*)
3457 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3461 for as_dir in $PATH
3463 IFS=$as_save_IFS
3464 test -z "$as_dir" && as_dir=.
3465 for ac_exec_ext in '' $ac_executable_extensions; do
3466 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3467 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3468 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3469 break 2
3471 done
3472 done
3473 IFS=$as_save_IFS
3476 esac
3478 LCOV=$ac_cv_path_LCOV
3479 if test -n "$LCOV"; then
3480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3481 $as_echo "$LCOV" >&6; }
3482 else
3483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3484 $as_echo "no" >&6; }
3488 test -n "$LCOV" && break
3489 done
3491 else
3492 # Report the value of LCOV in configure's output in all cases.
3493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3494 $as_echo_n "checking for LCOV... " >&6; }
3495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3496 $as_echo "$LCOV" >&6; }
3499 if test -z "$LCOV"; then
3500 as_fn_error $? "lcov not found" "$LINENO" 5
3502 if test -z "$GENHTML"; then
3503 for ac_prog in genhtml
3505 # Extract the first word of "$ac_prog", so it can be a program name with args.
3506 set dummy $ac_prog; ac_word=$2
3507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3508 $as_echo_n "checking for $ac_word... " >&6; }
3509 if ${ac_cv_path_GENHTML+:} false; then :
3510 $as_echo_n "(cached) " >&6
3511 else
3512 case $GENHTML in
3513 [\\/]* | ?:[\\/]*)
3514 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3518 for as_dir in $PATH
3520 IFS=$as_save_IFS
3521 test -z "$as_dir" && as_dir=.
3522 for ac_exec_ext in '' $ac_executable_extensions; do
3523 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3524 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3525 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3526 break 2
3528 done
3529 done
3530 IFS=$as_save_IFS
3533 esac
3535 GENHTML=$ac_cv_path_GENHTML
3536 if test -n "$GENHTML"; then
3537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3538 $as_echo "$GENHTML" >&6; }
3539 else
3540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3541 $as_echo "no" >&6; }
3545 test -n "$GENHTML" && break
3546 done
3548 else
3549 # Report the value of GENHTML in configure's output in all cases.
3550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3551 $as_echo_n "checking for GENHTML... " >&6; }
3552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3553 $as_echo "$GENHTML" >&6; }
3556 if test -z "$GENHTML"; then
3557 as_fn_error $? "genhtml not found" "$LINENO" 5
3564 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3566 esac
3568 else
3569 enable_coverage=no
3577 # DTrace
3581 # Check whether --enable-dtrace was given.
3582 if test "${enable_dtrace+set}" = set; then :
3583 enableval=$enable_dtrace;
3584 case $enableval in
3585 yes)
3586 if test -z "$DTRACE"; then
3587 for ac_prog in dtrace
3589 # Extract the first word of "$ac_prog", so it can be a program name with args.
3590 set dummy $ac_prog; ac_word=$2
3591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3592 $as_echo_n "checking for $ac_word... " >&6; }
3593 if ${ac_cv_path_DTRACE+:} false; then :
3594 $as_echo_n "(cached) " >&6
3595 else
3596 case $DTRACE in
3597 [\\/]* | ?:[\\/]*)
3598 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3601 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3602 for as_dir in $PATH
3604 IFS=$as_save_IFS
3605 test -z "$as_dir" && as_dir=.
3606 for ac_exec_ext in '' $ac_executable_extensions; do
3607 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3608 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3609 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3610 break 2
3612 done
3613 done
3614 IFS=$as_save_IFS
3617 esac
3619 DTRACE=$ac_cv_path_DTRACE
3620 if test -n "$DTRACE"; then
3621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3622 $as_echo "$DTRACE" >&6; }
3623 else
3624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3625 $as_echo "no" >&6; }
3629 test -n "$DTRACE" && break
3630 done
3632 else
3633 # Report the value of DTRACE in configure's output in all cases.
3634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3635 $as_echo_n "checking for DTRACE... " >&6; }
3636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3637 $as_echo "$DTRACE" >&6; }
3640 if test -z "$DTRACE"; then
3641 as_fn_error $? "dtrace not found" "$LINENO" 5
3649 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3651 esac
3653 else
3654 enable_dtrace=no
3662 # TAP tests
3666 # Check whether --enable-tap-tests was given.
3667 if test "${enable_tap_tests+set}" = set; then :
3668 enableval=$enable_tap_tests;
3669 case $enableval in
3670 yes)
3677 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3679 esac
3681 else
3682 enable_tap_tests=no
3690 # Block size
3692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3693 $as_echo_n "checking for block size... " >&6; }
3697 # Check whether --with-blocksize was given.
3698 if test "${with_blocksize+set}" = set; then :
3699 withval=$with_blocksize;
3700 case $withval in
3701 yes)
3702 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3705 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3708 blocksize=$withval
3710 esac
3712 else
3713 blocksize=8
3717 case ${blocksize} in
3718 1) BLCKSZ=1024;;
3719 2) BLCKSZ=2048;;
3720 4) BLCKSZ=4096;;
3721 8) BLCKSZ=8192;;
3722 16) BLCKSZ=16384;;
3723 32) BLCKSZ=32768;;
3724 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3725 esac
3726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3727 $as_echo "${blocksize}kB" >&6; }
3730 cat >>confdefs.h <<_ACEOF
3731 #define BLCKSZ ${BLCKSZ}
3732 _ACEOF
3736 # Relation segment size
3738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3739 $as_echo_n "checking for segment size... " >&6; }
3743 # Check whether --with-segsize was given.
3744 if test "${with_segsize+set}" = set; then :
3745 withval=$with_segsize;
3746 case $withval in
3747 yes)
3748 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3751 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3754 segsize=$withval
3756 esac
3758 else
3759 segsize=1
3763 # this expression is set up to avoid unnecessary integer overflow
3764 # blocksize is already guaranteed to be a factor of 1024
3765 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3766 test $? -eq 0 || exit 1
3767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3768 $as_echo "${segsize}GB" >&6; }
3771 cat >>confdefs.h <<_ACEOF
3772 #define RELSEG_SIZE ${RELSEG_SIZE}
3773 _ACEOF
3777 # WAL block size
3779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3780 $as_echo_n "checking for WAL block size... " >&6; }
3784 # Check whether --with-wal-blocksize was given.
3785 if test "${with_wal_blocksize+set}" = set; then :
3786 withval=$with_wal_blocksize;
3787 case $withval in
3788 yes)
3789 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3792 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3795 wal_blocksize=$withval
3797 esac
3799 else
3800 wal_blocksize=8
3804 case ${wal_blocksize} in
3805 1) XLOG_BLCKSZ=1024;;
3806 2) XLOG_BLCKSZ=2048;;
3807 4) XLOG_BLCKSZ=4096;;
3808 8) XLOG_BLCKSZ=8192;;
3809 16) XLOG_BLCKSZ=16384;;
3810 32) XLOG_BLCKSZ=32768;;
3811 64) XLOG_BLCKSZ=65536;;
3812 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3813 esac
3814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3815 $as_echo "${wal_blocksize}kB" >&6; }
3818 cat >>confdefs.h <<_ACEOF
3819 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3820 _ACEOF
3824 # C compiler
3827 # For historical reasons you can also use --with-CC to specify the C compiler
3828 # to use, although the standard way to do this is to set the CC environment
3829 # variable.
3833 # Check whether --with-CC was given.
3834 if test "${with_CC+set}" = set; then :
3835 withval=$with_CC;
3836 case $withval in
3837 yes)
3838 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3841 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3844 CC=$with_CC
3846 esac
3852 case $template in
3853 aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3854 *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3855 esac
3857 ac_ext=c
3858 ac_cpp='$CPP $CPPFLAGS'
3859 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3860 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3861 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3862 if test -n "$ac_tool_prefix"; then
3863 for ac_prog in $pgac_cc_list
3865 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3866 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3868 $as_echo_n "checking for $ac_word... " >&6; }
3869 if ${ac_cv_prog_CC+:} false; then :
3870 $as_echo_n "(cached) " >&6
3871 else
3872 if test -n "$CC"; then
3873 ac_cv_prog_CC="$CC" # Let the user override the test.
3874 else
3875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3876 for as_dir in $PATH
3878 IFS=$as_save_IFS
3879 test -z "$as_dir" && as_dir=.
3880 for ac_exec_ext in '' $ac_executable_extensions; do
3881 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3882 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3883 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3884 break 2
3886 done
3887 done
3888 IFS=$as_save_IFS
3892 CC=$ac_cv_prog_CC
3893 if test -n "$CC"; then
3894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3895 $as_echo "$CC" >&6; }
3896 else
3897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3898 $as_echo "no" >&6; }
3902 test -n "$CC" && break
3903 done
3905 if test -z "$CC"; then
3906 ac_ct_CC=$CC
3907 for ac_prog in $pgac_cc_list
3909 # Extract the first word of "$ac_prog", so it can be a program name with args.
3910 set dummy $ac_prog; ac_word=$2
3911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3912 $as_echo_n "checking for $ac_word... " >&6; }
3913 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3914 $as_echo_n "(cached) " >&6
3915 else
3916 if test -n "$ac_ct_CC"; then
3917 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3918 else
3919 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3920 for as_dir in $PATH
3922 IFS=$as_save_IFS
3923 test -z "$as_dir" && as_dir=.
3924 for ac_exec_ext in '' $ac_executable_extensions; do
3925 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3926 ac_cv_prog_ac_ct_CC="$ac_prog"
3927 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3928 break 2
3930 done
3931 done
3932 IFS=$as_save_IFS
3936 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3937 if test -n "$ac_ct_CC"; then
3938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3939 $as_echo "$ac_ct_CC" >&6; }
3940 else
3941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3942 $as_echo "no" >&6; }
3946 test -n "$ac_ct_CC" && break
3947 done
3949 if test "x$ac_ct_CC" = x; then
3950 CC=""
3951 else
3952 case $cross_compiling:$ac_tool_warned in
3953 yes:)
3954 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3955 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3956 ac_tool_warned=yes ;;
3957 esac
3958 CC=$ac_ct_CC
3963 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3964 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3965 as_fn_error $? "no acceptable C compiler found in \$PATH
3966 See \`config.log' for more details" "$LINENO" 5; }
3968 # Provide some information about the compiler.
3969 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3970 set X $ac_compile
3971 ac_compiler=$2
3972 for ac_option in --version -v -V -qversion; do
3973 { { ac_try="$ac_compiler $ac_option >&5"
3974 case "(($ac_try" in
3975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3976 *) ac_try_echo=$ac_try;;
3977 esac
3978 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3979 $as_echo "$ac_try_echo"; } >&5
3980 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3981 ac_status=$?
3982 if test -s conftest.err; then
3983 sed '10a\
3984 ... rest of stderr output deleted ...
3985 10q' conftest.err >conftest.er1
3986 cat conftest.er1 >&5
3988 rm -f conftest.er1 conftest.err
3989 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3990 test $ac_status = 0; }
3991 done
3993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3994 /* end confdefs.h. */
3997 main ()
4001 return 0;
4003 _ACEOF
4004 ac_clean_files_save=$ac_clean_files
4005 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4006 # Try to create an executable without -o first, disregard a.out.
4007 # It will help us diagnose broken compilers, and finding out an intuition
4008 # of exeext.
4009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4010 $as_echo_n "checking whether the C compiler works... " >&6; }
4011 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4013 # The possible output files:
4014 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4016 ac_rmfiles=
4017 for ac_file in $ac_files
4019 case $ac_file in
4020 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4021 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4022 esac
4023 done
4024 rm -f $ac_rmfiles
4026 if { { ac_try="$ac_link_default"
4027 case "(($ac_try" in
4028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4029 *) ac_try_echo=$ac_try;;
4030 esac
4031 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4032 $as_echo "$ac_try_echo"; } >&5
4033 (eval "$ac_link_default") 2>&5
4034 ac_status=$?
4035 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4036 test $ac_status = 0; }; then :
4037 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4038 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4039 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4040 # so that the user can short-circuit this test for compilers unknown to
4041 # Autoconf.
4042 for ac_file in $ac_files ''
4044 test -f "$ac_file" || continue
4045 case $ac_file in
4046 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4048 [ab].out )
4049 # We found the default executable, but exeext='' is most
4050 # certainly right.
4051 break;;
4052 *.* )
4053 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4054 then :; else
4055 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4057 # We set ac_cv_exeext here because the later test for it is not
4058 # safe: cross compilers may not add the suffix if given an `-o'
4059 # argument, so we may need to know it at that point already.
4060 # Even if this section looks crufty: it has the advantage of
4061 # actually working.
4062 break;;
4064 break;;
4065 esac
4066 done
4067 test "$ac_cv_exeext" = no && ac_cv_exeext=
4069 else
4070 ac_file=''
4072 if test -z "$ac_file"; then :
4073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4074 $as_echo "no" >&6; }
4075 $as_echo "$as_me: failed program was:" >&5
4076 sed 's/^/| /' conftest.$ac_ext >&5
4078 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4079 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4080 as_fn_error 77 "C compiler cannot create executables
4081 See \`config.log' for more details" "$LINENO" 5; }
4082 else
4083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4084 $as_echo "yes" >&6; }
4086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4087 $as_echo_n "checking for C compiler default output file name... " >&6; }
4088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4089 $as_echo "$ac_file" >&6; }
4090 ac_exeext=$ac_cv_exeext
4092 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4093 ac_clean_files=$ac_clean_files_save
4094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4095 $as_echo_n "checking for suffix of executables... " >&6; }
4096 if { { ac_try="$ac_link"
4097 case "(($ac_try" in
4098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4099 *) ac_try_echo=$ac_try;;
4100 esac
4101 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4102 $as_echo "$ac_try_echo"; } >&5
4103 (eval "$ac_link") 2>&5
4104 ac_status=$?
4105 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4106 test $ac_status = 0; }; then :
4107 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4108 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4109 # work properly (i.e., refer to `conftest.exe'), while it won't with
4110 # `rm'.
4111 for ac_file in conftest.exe conftest conftest.*; do
4112 test -f "$ac_file" || continue
4113 case $ac_file in
4114 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4115 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4116 break;;
4117 * ) break;;
4118 esac
4119 done
4120 else
4121 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4122 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4123 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4124 See \`config.log' for more details" "$LINENO" 5; }
4126 rm -f conftest conftest$ac_cv_exeext
4127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4128 $as_echo "$ac_cv_exeext" >&6; }
4130 rm -f conftest.$ac_ext
4131 EXEEXT=$ac_cv_exeext
4132 ac_exeext=$EXEEXT
4133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4134 /* end confdefs.h. */
4135 #include <stdio.h>
4137 main ()
4139 FILE *f = fopen ("conftest.out", "w");
4140 return ferror (f) || fclose (f) != 0;
4143 return 0;
4145 _ACEOF
4146 ac_clean_files="$ac_clean_files conftest.out"
4147 # Check that the compiler produces executables we can run. If not, either
4148 # the compiler is broken, or we cross compile.
4149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4150 $as_echo_n "checking whether we are cross compiling... " >&6; }
4151 if test "$cross_compiling" != yes; then
4152 { { ac_try="$ac_link"
4153 case "(($ac_try" in
4154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4155 *) ac_try_echo=$ac_try;;
4156 esac
4157 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4158 $as_echo "$ac_try_echo"; } >&5
4159 (eval "$ac_link") 2>&5
4160 ac_status=$?
4161 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4162 test $ac_status = 0; }
4163 if { ac_try='./conftest$ac_cv_exeext'
4164 { { case "(($ac_try" in
4165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4166 *) ac_try_echo=$ac_try;;
4167 esac
4168 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4169 $as_echo "$ac_try_echo"; } >&5
4170 (eval "$ac_try") 2>&5
4171 ac_status=$?
4172 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4173 test $ac_status = 0; }; }; then
4174 cross_compiling=no
4175 else
4176 if test "$cross_compiling" = maybe; then
4177 cross_compiling=yes
4178 else
4179 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4180 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4181 as_fn_error $? "cannot run C compiled programs.
4182 If you meant to cross compile, use \`--host'.
4183 See \`config.log' for more details" "$LINENO" 5; }
4187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4188 $as_echo "$cross_compiling" >&6; }
4190 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4191 ac_clean_files=$ac_clean_files_save
4192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4193 $as_echo_n "checking for suffix of object files... " >&6; }
4194 if ${ac_cv_objext+:} false; then :
4195 $as_echo_n "(cached) " >&6
4196 else
4197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4198 /* end confdefs.h. */
4201 main ()
4205 return 0;
4207 _ACEOF
4208 rm -f conftest.o conftest.obj
4209 if { { ac_try="$ac_compile"
4210 case "(($ac_try" in
4211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4212 *) ac_try_echo=$ac_try;;
4213 esac
4214 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4215 $as_echo "$ac_try_echo"; } >&5
4216 (eval "$ac_compile") 2>&5
4217 ac_status=$?
4218 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4219 test $ac_status = 0; }; then :
4220 for ac_file in conftest.o conftest.obj conftest.*; do
4221 test -f "$ac_file" || continue;
4222 case $ac_file in
4223 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4224 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4225 break;;
4226 esac
4227 done
4228 else
4229 $as_echo "$as_me: failed program was:" >&5
4230 sed 's/^/| /' conftest.$ac_ext >&5
4232 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4233 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4234 as_fn_error $? "cannot compute suffix of object files: cannot compile
4235 See \`config.log' for more details" "$LINENO" 5; }
4237 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4240 $as_echo "$ac_cv_objext" >&6; }
4241 OBJEXT=$ac_cv_objext
4242 ac_objext=$OBJEXT
4243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4244 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4245 if ${ac_cv_c_compiler_gnu+:} false; then :
4246 $as_echo_n "(cached) " >&6
4247 else
4248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4249 /* end confdefs.h. */
4252 main ()
4254 #ifndef __GNUC__
4255 choke me
4256 #endif
4259 return 0;
4261 _ACEOF
4262 if ac_fn_c_try_compile "$LINENO"; then :
4263 ac_compiler_gnu=yes
4264 else
4265 ac_compiler_gnu=no
4267 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4268 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4272 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4273 if test $ac_compiler_gnu = yes; then
4274 GCC=yes
4275 else
4276 GCC=
4278 ac_test_CFLAGS=${CFLAGS+set}
4279 ac_save_CFLAGS=$CFLAGS
4280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4281 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4282 if ${ac_cv_prog_cc_g+:} false; then :
4283 $as_echo_n "(cached) " >&6
4284 else
4285 ac_save_c_werror_flag=$ac_c_werror_flag
4286 ac_c_werror_flag=yes
4287 ac_cv_prog_cc_g=no
4288 CFLAGS="-g"
4289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4290 /* end confdefs.h. */
4293 main ()
4297 return 0;
4299 _ACEOF
4300 if ac_fn_c_try_compile "$LINENO"; then :
4301 ac_cv_prog_cc_g=yes
4302 else
4303 CFLAGS=""
4304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4305 /* end confdefs.h. */
4308 main ()
4312 return 0;
4314 _ACEOF
4315 if ac_fn_c_try_compile "$LINENO"; then :
4317 else
4318 ac_c_werror_flag=$ac_save_c_werror_flag
4319 CFLAGS="-g"
4320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4321 /* end confdefs.h. */
4324 main ()
4328 return 0;
4330 _ACEOF
4331 if ac_fn_c_try_compile "$LINENO"; then :
4332 ac_cv_prog_cc_g=yes
4334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4336 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4339 ac_c_werror_flag=$ac_save_c_werror_flag
4341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4342 $as_echo "$ac_cv_prog_cc_g" >&6; }
4343 if test "$ac_test_CFLAGS" = set; then
4344 CFLAGS=$ac_save_CFLAGS
4345 elif test $ac_cv_prog_cc_g = yes; then
4346 if test "$GCC" = yes; then
4347 CFLAGS="-g -O2"
4348 else
4349 CFLAGS="-g"
4351 else
4352 if test "$GCC" = yes; then
4353 CFLAGS="-O2"
4354 else
4355 CFLAGS=
4358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4359 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4360 if ${ac_cv_prog_cc_c89+:} false; then :
4361 $as_echo_n "(cached) " >&6
4362 else
4363 ac_cv_prog_cc_c89=no
4364 ac_save_CC=$CC
4365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4366 /* end confdefs.h. */
4367 #include <stdarg.h>
4368 #include <stdio.h>
4369 struct stat;
4370 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4371 struct buf { int x; };
4372 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4373 static char *e (p, i)
4374 char **p;
4375 int i;
4377 return p[i];
4379 static char *f (char * (*g) (char **, int), char **p, ...)
4381 char *s;
4382 va_list v;
4383 va_start (v,p);
4384 s = g (p, va_arg (v,int));
4385 va_end (v);
4386 return s;
4389 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4390 function prototypes and stuff, but not '\xHH' hex character constants.
4391 These don't provoke an error unfortunately, instead are silently treated
4392 as 'x'. The following induces an error, until -std is added to get
4393 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4394 array size at least. It's necessary to write '\x00'==0 to get something
4395 that's true only with -std. */
4396 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4398 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4399 inside strings and character constants. */
4400 #define FOO(x) 'x'
4401 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4403 int test (int i, double x);
4404 struct s1 {int (*f) (int a);};
4405 struct s2 {int (*f) (double a);};
4406 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4407 int argc;
4408 char **argv;
4410 main ()
4412 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4414 return 0;
4416 _ACEOF
4417 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4418 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4420 CC="$ac_save_CC $ac_arg"
4421 if ac_fn_c_try_compile "$LINENO"; then :
4422 ac_cv_prog_cc_c89=$ac_arg
4424 rm -f core conftest.err conftest.$ac_objext
4425 test "x$ac_cv_prog_cc_c89" != "xno" && break
4426 done
4427 rm -f conftest.$ac_ext
4428 CC=$ac_save_CC
4431 # AC_CACHE_VAL
4432 case "x$ac_cv_prog_cc_c89" in
4434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4435 $as_echo "none needed" >&6; } ;;
4436 xno)
4437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4438 $as_echo "unsupported" >&6; } ;;
4440 CC="$CC $ac_cv_prog_cc_c89"
4441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4442 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4443 esac
4444 if test "x$ac_cv_prog_cc_c89" != xno; then :
4448 ac_ext=c
4449 ac_cpp='$CPP $CPPFLAGS'
4450 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4451 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4452 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4455 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4456 if ${ac_cv_prog_cc_c99+:} false; then :
4457 $as_echo_n "(cached) " >&6
4458 else
4459 ac_cv_prog_cc_c99=no
4460 ac_save_CC=$CC
4461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4462 /* end confdefs.h. */
4463 #include <stdarg.h>
4464 #include <stdbool.h>
4465 #include <stdlib.h>
4466 #include <wchar.h>
4467 #include <stdio.h>
4469 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4470 #define debug(...) fprintf (stderr, __VA_ARGS__)
4471 #define showlist(...) puts (#__VA_ARGS__)
4472 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4473 static void
4474 test_varargs_macros (void)
4476 int x = 1234;
4477 int y = 5678;
4478 debug ("Flag");
4479 debug ("X = %d\n", x);
4480 showlist (The first, second, and third items.);
4481 report (x>y, "x is %d but y is %d", x, y);
4484 // Check long long types.
4485 #define BIG64 18446744073709551615ull
4486 #define BIG32 4294967295ul
4487 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4488 #if !BIG_OK
4489 your preprocessor is broken;
4490 #endif
4491 #if BIG_OK
4492 #else
4493 your preprocessor is broken;
4494 #endif
4495 static long long int bignum = -9223372036854775807LL;
4496 static unsigned long long int ubignum = BIG64;
4498 struct incomplete_array
4500 int datasize;
4501 double data[];
4504 struct named_init {
4505 int number;
4506 const wchar_t *name;
4507 double average;
4510 typedef const char *ccp;
4512 static inline int
4513 test_restrict (ccp restrict text)
4515 // See if C++-style comments work.
4516 // Iterate through items via the restricted pointer.
4517 // Also check for declarations in for loops.
4518 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4519 continue;
4520 return 0;
4523 // Check varargs and va_copy.
4524 static void
4525 test_varargs (const char *format, ...)
4527 va_list args;
4528 va_start (args, format);
4529 va_list args_copy;
4530 va_copy (args_copy, args);
4532 const char *str;
4533 int number;
4534 float fnumber;
4536 while (*format)
4538 switch (*format++)
4540 case 's': // string
4541 str = va_arg (args_copy, const char *);
4542 break;
4543 case 'd': // int
4544 number = va_arg (args_copy, int);
4545 break;
4546 case 'f': // float
4547 fnumber = va_arg (args_copy, double);
4548 break;
4549 default:
4550 break;
4553 va_end (args_copy);
4554 va_end (args);
4558 main ()
4561 // Check bool.
4562 _Bool success = false;
4564 // Check restrict.
4565 if (test_restrict ("String literal") == 0)
4566 success = true;
4567 char *restrict newvar = "Another string";
4569 // Check varargs.
4570 test_varargs ("s, d' f .", "string", 65, 34.234);
4571 test_varargs_macros ();
4573 // Check flexible array members.
4574 struct incomplete_array *ia =
4575 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4576 ia->datasize = 10;
4577 for (int i = 0; i < ia->datasize; ++i)
4578 ia->data[i] = i * 1.234;
4580 // Check named initializers.
4581 struct named_init ni = {
4582 .number = 34,
4583 .name = L"Test wide string",
4584 .average = 543.34343,
4587 ni.number = 58;
4589 int dynamic_array[ni.number];
4590 dynamic_array[ni.number - 1] = 543;
4592 // work around unused variable warnings
4593 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4594 || dynamic_array[ni.number - 1] != 543);
4597 return 0;
4599 _ACEOF
4600 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4602 CC="$ac_save_CC $ac_arg"
4603 if ac_fn_c_try_compile "$LINENO"; then :
4604 ac_cv_prog_cc_c99=$ac_arg
4606 rm -f core conftest.err conftest.$ac_objext
4607 test "x$ac_cv_prog_cc_c99" != "xno" && break
4608 done
4609 rm -f conftest.$ac_ext
4610 CC=$ac_save_CC
4613 # AC_CACHE_VAL
4614 case "x$ac_cv_prog_cc_c99" in
4616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4617 $as_echo "none needed" >&6; } ;;
4618 xno)
4619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4620 $as_echo "unsupported" >&6; } ;;
4622 CC="$CC $ac_cv_prog_cc_c99"
4623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4624 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4625 esac
4626 if test "x$ac_cv_prog_cc_c99" != xno; then :
4632 # Error out if the compiler does not support C99, as the codebase
4633 # relies on that.
4634 if test "$ac_cv_prog_cc_c99" = no; then
4635 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4638 ac_ext=cpp
4639 ac_cpp='$CXXCPP $CPPFLAGS'
4640 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4641 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4642 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4643 if test -z "$CXX"; then
4644 if test -n "$CCC"; then
4645 CXX=$CCC
4646 else
4647 if test -n "$ac_tool_prefix"; then
4648 for ac_prog in $pgac_cxx_list
4650 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4651 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4653 $as_echo_n "checking for $ac_word... " >&6; }
4654 if ${ac_cv_prog_CXX+:} false; then :
4655 $as_echo_n "(cached) " >&6
4656 else
4657 if test -n "$CXX"; then
4658 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4659 else
4660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4661 for as_dir in $PATH
4663 IFS=$as_save_IFS
4664 test -z "$as_dir" && as_dir=.
4665 for ac_exec_ext in '' $ac_executable_extensions; do
4666 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4667 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4668 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4669 break 2
4671 done
4672 done
4673 IFS=$as_save_IFS
4677 CXX=$ac_cv_prog_CXX
4678 if test -n "$CXX"; then
4679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4680 $as_echo "$CXX" >&6; }
4681 else
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4683 $as_echo "no" >&6; }
4687 test -n "$CXX" && break
4688 done
4690 if test -z "$CXX"; then
4691 ac_ct_CXX=$CXX
4692 for ac_prog in $pgac_cxx_list
4694 # Extract the first word of "$ac_prog", so it can be a program name with args.
4695 set dummy $ac_prog; ac_word=$2
4696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4697 $as_echo_n "checking for $ac_word... " >&6; }
4698 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4699 $as_echo_n "(cached) " >&6
4700 else
4701 if test -n "$ac_ct_CXX"; then
4702 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4703 else
4704 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4705 for as_dir in $PATH
4707 IFS=$as_save_IFS
4708 test -z "$as_dir" && as_dir=.
4709 for ac_exec_ext in '' $ac_executable_extensions; do
4710 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4711 ac_cv_prog_ac_ct_CXX="$ac_prog"
4712 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4713 break 2
4715 done
4716 done
4717 IFS=$as_save_IFS
4721 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4722 if test -n "$ac_ct_CXX"; then
4723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4724 $as_echo "$ac_ct_CXX" >&6; }
4725 else
4726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4727 $as_echo "no" >&6; }
4731 test -n "$ac_ct_CXX" && break
4732 done
4734 if test "x$ac_ct_CXX" = x; then
4735 CXX="g++"
4736 else
4737 case $cross_compiling:$ac_tool_warned in
4738 yes:)
4739 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4740 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4741 ac_tool_warned=yes ;;
4742 esac
4743 CXX=$ac_ct_CXX
4749 # Provide some information about the compiler.
4750 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4751 set X $ac_compile
4752 ac_compiler=$2
4753 for ac_option in --version -v -V -qversion; do
4754 { { ac_try="$ac_compiler $ac_option >&5"
4755 case "(($ac_try" in
4756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4757 *) ac_try_echo=$ac_try;;
4758 esac
4759 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4760 $as_echo "$ac_try_echo"; } >&5
4761 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4762 ac_status=$?
4763 if test -s conftest.err; then
4764 sed '10a\
4765 ... rest of stderr output deleted ...
4766 10q' conftest.err >conftest.er1
4767 cat conftest.er1 >&5
4769 rm -f conftest.er1 conftest.err
4770 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4771 test $ac_status = 0; }
4772 done
4774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4775 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4776 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4777 $as_echo_n "(cached) " >&6
4778 else
4779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4780 /* end confdefs.h. */
4783 main ()
4785 #ifndef __GNUC__
4786 choke me
4787 #endif
4790 return 0;
4792 _ACEOF
4793 if ac_fn_cxx_try_compile "$LINENO"; then :
4794 ac_compiler_gnu=yes
4795 else
4796 ac_compiler_gnu=no
4798 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4799 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4803 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4804 if test $ac_compiler_gnu = yes; then
4805 GXX=yes
4806 else
4807 GXX=
4809 ac_test_CXXFLAGS=${CXXFLAGS+set}
4810 ac_save_CXXFLAGS=$CXXFLAGS
4811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4812 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4813 if ${ac_cv_prog_cxx_g+:} false; then :
4814 $as_echo_n "(cached) " >&6
4815 else
4816 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4817 ac_cxx_werror_flag=yes
4818 ac_cv_prog_cxx_g=no
4819 CXXFLAGS="-g"
4820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4821 /* end confdefs.h. */
4824 main ()
4828 return 0;
4830 _ACEOF
4831 if ac_fn_cxx_try_compile "$LINENO"; then :
4832 ac_cv_prog_cxx_g=yes
4833 else
4834 CXXFLAGS=""
4835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4836 /* end confdefs.h. */
4839 main ()
4843 return 0;
4845 _ACEOF
4846 if ac_fn_cxx_try_compile "$LINENO"; then :
4848 else
4849 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4850 CXXFLAGS="-g"
4851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4852 /* end confdefs.h. */
4855 main ()
4859 return 0;
4861 _ACEOF
4862 if ac_fn_cxx_try_compile "$LINENO"; then :
4863 ac_cv_prog_cxx_g=yes
4865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4870 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4873 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4874 if test "$ac_test_CXXFLAGS" = set; then
4875 CXXFLAGS=$ac_save_CXXFLAGS
4876 elif test $ac_cv_prog_cxx_g = yes; then
4877 if test "$GXX" = yes; then
4878 CXXFLAGS="-g -O2"
4879 else
4880 CXXFLAGS="-g"
4882 else
4883 if test "$GXX" = yes; then
4884 CXXFLAGS="-O2"
4885 else
4886 CXXFLAGS=
4889 ac_ext=c
4890 ac_cpp='$CPP $CPPFLAGS'
4891 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4892 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4893 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4896 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4897 # but has idiosyncrasies of its own. We assume icc will define
4898 # __INTEL_COMPILER regardless of CFLAGS.
4900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4901 /* end confdefs.h. */
4904 main ()
4906 #ifndef __INTEL_COMPILER
4907 choke me
4908 #endif
4910 return 0;
4912 _ACEOF
4913 if ac_fn_c_try_compile "$LINENO"; then :
4914 ICC=yes
4915 else
4916 ICC=no
4918 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4920 # Check if it's Sun Studio compiler. We assume that
4921 # __SUNPRO_C will be defined for Sun Studio compilers
4922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4923 /* end confdefs.h. */
4926 main ()
4928 #ifndef __SUNPRO_C
4929 choke me
4930 #endif
4932 return 0;
4934 _ACEOF
4935 if ac_fn_c_try_compile "$LINENO"; then :
4936 SUN_STUDIO_CC=yes
4937 else
4938 SUN_STUDIO_CC=no
4940 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4946 # LLVM
4948 # Checked early because subsequent tests depend on it.
4952 # Check whether --with-llvm was given.
4953 if test "${with_llvm+set}" = set; then :
4954 withval=$with_llvm;
4955 case $withval in
4956 yes)
4958 $as_echo "#define USE_LLVM 1" >>confdefs.h
4965 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4967 esac
4969 else
4970 with_llvm=no
4976 for ac_prog in gawk mawk nawk awk
4978 # Extract the first word of "$ac_prog", so it can be a program name with args.
4979 set dummy $ac_prog; ac_word=$2
4980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4981 $as_echo_n "checking for $ac_word... " >&6; }
4982 if ${ac_cv_prog_AWK+:} false; then :
4983 $as_echo_n "(cached) " >&6
4984 else
4985 if test -n "$AWK"; then
4986 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4987 else
4988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4989 for as_dir in $PATH
4991 IFS=$as_save_IFS
4992 test -z "$as_dir" && as_dir=.
4993 for ac_exec_ext in '' $ac_executable_extensions; do
4994 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4995 ac_cv_prog_AWK="$ac_prog"
4996 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4997 break 2
4999 done
5000 done
5001 IFS=$as_save_IFS
5005 AWK=$ac_cv_prog_AWK
5006 if test -n "$AWK"; then
5007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5008 $as_echo "$AWK" >&6; }
5009 else
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5011 $as_echo "no" >&6; }
5015 test -n "$AWK" && break
5016 done
5018 if test "$with_llvm" = yes; then :
5024 if test -z "$LLVM_CONFIG"; then
5025 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
5027 # Extract the first word of "$ac_prog", so it can be a program name with args.
5028 set dummy $ac_prog; ac_word=$2
5029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5030 $as_echo_n "checking for $ac_word... " >&6; }
5031 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5032 $as_echo_n "(cached) " >&6
5033 else
5034 case $LLVM_CONFIG in
5035 [\\/]* | ?:[\\/]*)
5036 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5040 for as_dir in $PATH
5042 IFS=$as_save_IFS
5043 test -z "$as_dir" && as_dir=.
5044 for ac_exec_ext in '' $ac_executable_extensions; do
5045 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5046 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5047 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5048 break 2
5050 done
5051 done
5052 IFS=$as_save_IFS
5055 esac
5057 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5058 if test -n "$LLVM_CONFIG"; then
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5060 $as_echo "$LLVM_CONFIG" >&6; }
5061 else
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5063 $as_echo "no" >&6; }
5067 test -n "$LLVM_CONFIG" && break
5068 done
5070 else
5071 # Report the value of LLVM_CONFIG in configure's output in all cases.
5072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5073 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5075 $as_echo "$LLVM_CONFIG" >&6; }
5079 # no point continuing if llvm wasn't found
5080 if test -z "$LLVM_CONFIG"; then
5081 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5083 # check if detected $LLVM_CONFIG is executable
5084 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5085 if test "x$pgac_llvm_version" = "xno"; then
5086 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5088 # and whether the version is supported
5089 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5090 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5093 # need clang to create some bitcode files
5095 if test -z "$CLANG"; then
5096 for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5098 # Extract the first word of "$ac_prog", so it can be a program name with args.
5099 set dummy $ac_prog; ac_word=$2
5100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5101 $as_echo_n "checking for $ac_word... " >&6; }
5102 if ${ac_cv_path_CLANG+:} false; then :
5103 $as_echo_n "(cached) " >&6
5104 else
5105 case $CLANG in
5106 [\\/]* | ?:[\\/]*)
5107 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5110 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5111 for as_dir in $PATH
5113 IFS=$as_save_IFS
5114 test -z "$as_dir" && as_dir=.
5115 for ac_exec_ext in '' $ac_executable_extensions; do
5116 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5117 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5119 break 2
5121 done
5122 done
5123 IFS=$as_save_IFS
5126 esac
5128 CLANG=$ac_cv_path_CLANG
5129 if test -n "$CLANG"; then
5130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5131 $as_echo "$CLANG" >&6; }
5132 else
5133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5134 $as_echo "no" >&6; }
5138 test -n "$CLANG" && break
5139 done
5141 else
5142 # Report the value of CLANG in configure's output in all cases.
5143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5144 $as_echo_n "checking for CLANG... " >&6; }
5145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5146 $as_echo "$CLANG" >&6; }
5149 if test -z "$CLANG"; then
5150 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5152 # make sure clang is executable
5153 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5154 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5156 # Could check clang version, but it doesn't seem that
5157 # important. Systems with a new enough LLVM version are usually
5158 # going to have a decent clang version too. It's also not entirely
5159 # clear what the minimum version is.
5161 # Collect compiler flags necessary to build the LLVM dependent
5162 # shared library.
5163 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5164 case $pgac_option in
5165 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5166 esac
5167 done
5169 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5170 case $pgac_option in
5171 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5172 esac
5173 done
5175 # ABI influencing options, standard influencing options
5176 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5177 case $pgac_option in
5178 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5179 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5180 esac
5181 done
5183 # Look for components we're interested in, collect necessary
5184 # libs. As some components are optional, we can't just list all of
5185 # them as it'd raise an error.
5186 pgac_components='';
5187 for pgac_component in `$LLVM_CONFIG --components`; do
5188 case $pgac_component in
5189 engine) pgac_components="$pgac_components $pgac_component";;
5190 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5191 orcjit) pgac_components="$pgac_components $pgac_component";;
5192 passes) pgac_components="$pgac_components $pgac_component";;
5193 native) pgac_components="$pgac_components $pgac_component";;
5194 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5195 esac
5196 done;
5198 # And then get the libraries that need to be linked in for the
5199 # selected components. They're large libraries, we only want to
5200 # link them into the LLVM using shared library.
5201 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5202 case $pgac_option in
5203 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5204 esac
5205 done
5207 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5217 fi # fi
5220 unset CFLAGS
5221 unset CXXFLAGS
5224 # Read the template
5226 . "$srcdir/src/template/$template" || exit
5228 # C[XX]FLAGS are selected so:
5229 # If the user specifies something in the environment, that is used.
5230 # else: If the template file set something, that is used.
5231 # else: If coverage was enabled, don't set anything.
5232 # else: If the compiler is GCC, then we use -O2.
5233 # else: If the compiler is something else, then we use -O, unless debugging.
5235 if test "$ac_env_CFLAGS_set" = set; then
5236 CFLAGS=$ac_env_CFLAGS_value
5237 elif test "${CFLAGS+set}" = set; then
5238 : # (keep what template set)
5239 elif test "$enable_coverage" = yes; then
5240 : # no optimization by default
5241 elif test "$GCC" = yes; then
5242 CFLAGS="-O2"
5243 else
5244 # if the user selected debug mode, don't use -O
5245 if test "$enable_debug" != yes; then
5246 CFLAGS="-O"
5250 if test "$ac_env_CXXFLAGS_set" = set; then
5251 CXXFLAGS=$ac_env_CXXFLAGS_value
5252 elif test "${CXXFLAGS+set}" = set; then
5253 : # (keep what template set)
5254 elif test "$enable_coverage" = yes; then
5255 : # no optimization by default
5256 elif test "$GCC" = yes; then
5257 CXXFLAGS="-O2"
5258 else
5259 # if the user selected debug mode, don't use -O
5260 if test "$enable_debug" != yes; then
5261 CXXFLAGS="-O"
5265 # When generating bitcode (for inlining) we always want to use -O2
5266 # even when --enable-debug is specified. The bitcode is not going to
5267 # be used for line-by-line debugging, and JIT inlining doesn't work
5268 # without at least -O1 (otherwise clang will emit 'noinline'
5269 # attributes everywhere), which is bad for testing. Still allow the
5270 # environment to override if done explicitly.
5271 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5272 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5273 else
5274 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5276 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5277 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5278 else
5279 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5282 # C[XX]FLAGS we determined above will be added back at the end
5283 user_CFLAGS=$CFLAGS
5284 CFLAGS=""
5285 user_CXXFLAGS=$CXXFLAGS
5286 CXXFLAGS=""
5287 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5288 BITCODE_CFLAGS=""
5289 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5290 BITCODE_CXXFLAGS=""
5292 # set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5293 if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5294 CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5296 if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5297 CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5300 # Some versions of GCC support some additional useful warning flags.
5301 # Check whether they are supported, and add them to CFLAGS if so.
5302 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5303 # but has its own. Also check other compiler-specific flags here.
5305 if test "$GCC" = yes -a "$ICC" = no; then
5306 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5307 CXXFLAGS="-Wall -Wpointer-arith"
5308 # These work in some but not all gcc versions
5309 save_CFLAGS=$CFLAGS
5311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5312 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5313 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5314 $as_echo_n "(cached) " >&6
5315 else
5316 pgac_save_CFLAGS=$CFLAGS
5317 pgac_save_CC=$CC
5318 CC=${CC}
5319 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5320 ac_save_c_werror_flag=$ac_c_werror_flag
5321 ac_c_werror_flag=yes
5322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5323 /* end confdefs.h. */
5326 main ()
5330 return 0;
5332 _ACEOF
5333 if ac_fn_c_try_compile "$LINENO"; then :
5334 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5335 else
5336 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5339 ac_c_werror_flag=$ac_save_c_werror_flag
5340 CFLAGS="$pgac_save_CFLAGS"
5341 CC="$pgac_save_CC"
5343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5344 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5345 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5346 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5350 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5351 # disable it, so AC_SUBST the negative form.
5352 PERMIT_DECLARATION_AFTER_STATEMENT=
5353 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5354 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5357 # Really don't want VLAs to be used in our dialect of C
5359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5360 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5361 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5362 $as_echo_n "(cached) " >&6
5363 else
5364 pgac_save_CFLAGS=$CFLAGS
5365 pgac_save_CC=$CC
5366 CC=${CC}
5367 CFLAGS="${CFLAGS} -Werror=vla"
5368 ac_save_c_werror_flag=$ac_c_werror_flag
5369 ac_c_werror_flag=yes
5370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5371 /* end confdefs.h. */
5374 main ()
5378 return 0;
5380 _ACEOF
5381 if ac_fn_c_try_compile "$LINENO"; then :
5382 pgac_cv_prog_CC_cflags__Werror_vla=yes
5383 else
5384 pgac_cv_prog_CC_cflags__Werror_vla=no
5386 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5387 ac_c_werror_flag=$ac_save_c_werror_flag
5388 CFLAGS="$pgac_save_CFLAGS"
5389 CC="$pgac_save_CC"
5391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5392 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5393 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5394 CFLAGS="${CFLAGS} -Werror=vla"
5398 # On macOS, complain about usage of symbols newer than the deployment target
5400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS" >&5
5401 $as_echo_n "checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS... " >&6; }
5402 if ${pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new+:} false; then :
5403 $as_echo_n "(cached) " >&6
5404 else
5405 pgac_save_CFLAGS=$CFLAGS
5406 pgac_save_CC=$CC
5407 CC=${CC}
5408 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5409 ac_save_c_werror_flag=$ac_c_werror_flag
5410 ac_c_werror_flag=yes
5411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5412 /* end confdefs.h. */
5415 main ()
5419 return 0;
5421 _ACEOF
5422 if ac_fn_c_try_compile "$LINENO"; then :
5423 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=yes
5424 else
5425 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=no
5427 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5428 ac_c_werror_flag=$ac_save_c_werror_flag
5429 CFLAGS="$pgac_save_CFLAGS"
5430 CC="$pgac_save_CC"
5432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&5
5433 $as_echo "$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&6; }
5434 if test x"$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" = x"yes"; then
5435 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS" >&5
5440 $as_echo_n "checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS... " >&6; }
5441 if ${pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new+:} false; then :
5442 $as_echo_n "(cached) " >&6
5443 else
5444 pgac_save_CXXFLAGS=$CXXFLAGS
5445 pgac_save_CXX=$CXX
5446 CXX=${CXX}
5447 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5448 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5449 ac_cxx_werror_flag=yes
5450 ac_ext=cpp
5451 ac_cpp='$CXXCPP $CPPFLAGS'
5452 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5453 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5454 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5457 /* end confdefs.h. */
5460 main ()
5464 return 0;
5466 _ACEOF
5467 if ac_fn_cxx_try_compile "$LINENO"; then :
5468 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=yes
5469 else
5470 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=no
5472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5473 ac_ext=c
5474 ac_cpp='$CPP $CPPFLAGS'
5475 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5476 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5477 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5479 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5480 CXXFLAGS="$pgac_save_CXXFLAGS"
5481 CXX="$pgac_save_CXX"
5483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&5
5484 $as_echo "$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&6; }
5485 if test x"$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" = x"yes"; then
5486 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5490 # -Wvla is not applicable for C++
5492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5493 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5494 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5495 $as_echo_n "(cached) " >&6
5496 else
5497 pgac_save_CFLAGS=$CFLAGS
5498 pgac_save_CC=$CC
5499 CC=${CC}
5500 CFLAGS="${CFLAGS} -Wendif-labels"
5501 ac_save_c_werror_flag=$ac_c_werror_flag
5502 ac_c_werror_flag=yes
5503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5504 /* end confdefs.h. */
5507 main ()
5511 return 0;
5513 _ACEOF
5514 if ac_fn_c_try_compile "$LINENO"; then :
5515 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5516 else
5517 pgac_cv_prog_CC_cflags__Wendif_labels=no
5519 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5520 ac_c_werror_flag=$ac_save_c_werror_flag
5521 CFLAGS="$pgac_save_CFLAGS"
5522 CC="$pgac_save_CC"
5524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5525 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5526 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5527 CFLAGS="${CFLAGS} -Wendif-labels"
5531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5532 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5533 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5534 $as_echo_n "(cached) " >&6
5535 else
5536 pgac_save_CXXFLAGS=$CXXFLAGS
5537 pgac_save_CXX=$CXX
5538 CXX=${CXX}
5539 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5540 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5541 ac_cxx_werror_flag=yes
5542 ac_ext=cpp
5543 ac_cpp='$CXXCPP $CPPFLAGS'
5544 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5545 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5546 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5549 /* end confdefs.h. */
5552 main ()
5556 return 0;
5558 _ACEOF
5559 if ac_fn_cxx_try_compile "$LINENO"; then :
5560 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5561 else
5562 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5565 ac_ext=c
5566 ac_cpp='$CPP $CPPFLAGS'
5567 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5568 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5569 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5571 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5572 CXXFLAGS="$pgac_save_CXXFLAGS"
5573 CXX="$pgac_save_CXX"
5575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5576 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5577 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5578 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5584 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5585 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5586 $as_echo_n "(cached) " >&6
5587 else
5588 pgac_save_CFLAGS=$CFLAGS
5589 pgac_save_CC=$CC
5590 CC=${CC}
5591 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5592 ac_save_c_werror_flag=$ac_c_werror_flag
5593 ac_c_werror_flag=yes
5594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5595 /* end confdefs.h. */
5598 main ()
5602 return 0;
5604 _ACEOF
5605 if ac_fn_c_try_compile "$LINENO"; then :
5606 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5607 else
5608 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5611 ac_c_werror_flag=$ac_save_c_werror_flag
5612 CFLAGS="$pgac_save_CFLAGS"
5613 CC="$pgac_save_CC"
5615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5616 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5617 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5618 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5623 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5624 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5625 $as_echo_n "(cached) " >&6
5626 else
5627 pgac_save_CXXFLAGS=$CXXFLAGS
5628 pgac_save_CXX=$CXX
5629 CXX=${CXX}
5630 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5631 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5632 ac_cxx_werror_flag=yes
5633 ac_ext=cpp
5634 ac_cpp='$CXXCPP $CPPFLAGS'
5635 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5636 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5637 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5640 /* end confdefs.h. */
5643 main ()
5647 return 0;
5649 _ACEOF
5650 if ac_fn_cxx_try_compile "$LINENO"; then :
5651 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5652 else
5653 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5655 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5656 ac_ext=c
5657 ac_cpp='$CPP $CPPFLAGS'
5658 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5659 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5660 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5662 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5663 CXXFLAGS="$pgac_save_CXXFLAGS"
5664 CXX="$pgac_save_CXX"
5666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5667 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5668 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5669 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5675 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5676 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5677 $as_echo_n "(cached) " >&6
5678 else
5679 pgac_save_CFLAGS=$CFLAGS
5680 pgac_save_CC=$CC
5681 CC=${CC}
5682 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5683 ac_save_c_werror_flag=$ac_c_werror_flag
5684 ac_c_werror_flag=yes
5685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5686 /* end confdefs.h. */
5689 main ()
5693 return 0;
5695 _ACEOF
5696 if ac_fn_c_try_compile "$LINENO"; then :
5697 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5698 else
5699 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5702 ac_c_werror_flag=$ac_save_c_werror_flag
5703 CFLAGS="$pgac_save_CFLAGS"
5704 CC="$pgac_save_CC"
5706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5707 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5708 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5709 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5714 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5715 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5716 $as_echo_n "(cached) " >&6
5717 else
5718 pgac_save_CXXFLAGS=$CXXFLAGS
5719 pgac_save_CXX=$CXX
5720 CXX=${CXX}
5721 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5722 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5723 ac_cxx_werror_flag=yes
5724 ac_ext=cpp
5725 ac_cpp='$CXXCPP $CPPFLAGS'
5726 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5727 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5728 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5731 /* end confdefs.h. */
5734 main ()
5738 return 0;
5740 _ACEOF
5741 if ac_fn_cxx_try_compile "$LINENO"; then :
5742 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5743 else
5744 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5747 ac_ext=c
5748 ac_cpp='$CPP $CPPFLAGS'
5749 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5750 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5751 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5753 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5754 CXXFLAGS="$pgac_save_CXXFLAGS"
5755 CXX="$pgac_save_CXX"
5757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5758 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5759 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5760 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5766 $as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5767 if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5768 $as_echo_n "(cached) " >&6
5769 else
5770 pgac_save_CFLAGS=$CFLAGS
5771 pgac_save_CC=$CC
5772 CC=${CC}
5773 CFLAGS="${CFLAGS} -Wcast-function-type"
5774 ac_save_c_werror_flag=$ac_c_werror_flag
5775 ac_c_werror_flag=yes
5776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5777 /* end confdefs.h. */
5780 main ()
5784 return 0;
5786 _ACEOF
5787 if ac_fn_c_try_compile "$LINENO"; then :
5788 pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5789 else
5790 pgac_cv_prog_CC_cflags__Wcast_function_type=no
5792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5793 ac_c_werror_flag=$ac_save_c_werror_flag
5794 CFLAGS="$pgac_save_CFLAGS"
5795 CC="$pgac_save_CC"
5797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5798 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5799 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5800 CFLAGS="${CFLAGS} -Wcast-function-type"
5804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5805 $as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5806 if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5807 $as_echo_n "(cached) " >&6
5808 else
5809 pgac_save_CXXFLAGS=$CXXFLAGS
5810 pgac_save_CXX=$CXX
5811 CXX=${CXX}
5812 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5813 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5814 ac_cxx_werror_flag=yes
5815 ac_ext=cpp
5816 ac_cpp='$CXXCPP $CPPFLAGS'
5817 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5818 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5819 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5822 /* end confdefs.h. */
5825 main ()
5829 return 0;
5831 _ACEOF
5832 if ac_fn_cxx_try_compile "$LINENO"; then :
5833 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5834 else
5835 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5837 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5838 ac_ext=c
5839 ac_cpp='$CPP $CPPFLAGS'
5840 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5841 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5842 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5844 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5845 CXXFLAGS="$pgac_save_CXXFLAGS"
5846 CXX="$pgac_save_CXX"
5848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5849 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5850 if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5851 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS" >&5
5857 $as_echo_n "checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS... " >&6; }
5858 if ${pgac_cv_prog_CC_cflags__Wshadow_compatible_local+:} false; then :
5859 $as_echo_n "(cached) " >&6
5860 else
5861 pgac_save_CFLAGS=$CFLAGS
5862 pgac_save_CC=$CC
5863 CC=${CC}
5864 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5865 ac_save_c_werror_flag=$ac_c_werror_flag
5866 ac_c_werror_flag=yes
5867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5868 /* end confdefs.h. */
5871 main ()
5875 return 0;
5877 _ACEOF
5878 if ac_fn_c_try_compile "$LINENO"; then :
5879 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=yes
5880 else
5881 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=no
5883 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5884 ac_c_werror_flag=$ac_save_c_werror_flag
5885 CFLAGS="$pgac_save_CFLAGS"
5886 CC="$pgac_save_CC"
5888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&5
5889 $as_echo "$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&6; }
5890 if test x"$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" = x"yes"; then
5891 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS" >&5
5896 $as_echo_n "checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS... " >&6; }
5897 if ${pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local+:} false; then :
5898 $as_echo_n "(cached) " >&6
5899 else
5900 pgac_save_CXXFLAGS=$CXXFLAGS
5901 pgac_save_CXX=$CXX
5902 CXX=${CXX}
5903 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5904 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5905 ac_cxx_werror_flag=yes
5906 ac_ext=cpp
5907 ac_cpp='$CXXCPP $CPPFLAGS'
5908 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5909 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5910 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5913 /* end confdefs.h. */
5916 main ()
5920 return 0;
5922 _ACEOF
5923 if ac_fn_cxx_try_compile "$LINENO"; then :
5924 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=yes
5925 else
5926 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=no
5928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5929 ac_ext=c
5930 ac_cpp='$CPP $CPPFLAGS'
5931 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5932 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5933 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5935 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5936 CXXFLAGS="$pgac_save_CXXFLAGS"
5937 CXX="$pgac_save_CXX"
5939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&5
5940 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&6; }
5941 if test x"$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" = x"yes"; then
5942 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5946 # This was included in -Wall/-Wformat in older GCC versions
5948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5949 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5950 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5951 $as_echo_n "(cached) " >&6
5952 else
5953 pgac_save_CFLAGS=$CFLAGS
5954 pgac_save_CC=$CC
5955 CC=${CC}
5956 CFLAGS="${CFLAGS} -Wformat-security"
5957 ac_save_c_werror_flag=$ac_c_werror_flag
5958 ac_c_werror_flag=yes
5959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5960 /* end confdefs.h. */
5963 main ()
5967 return 0;
5969 _ACEOF
5970 if ac_fn_c_try_compile "$LINENO"; then :
5971 pgac_cv_prog_CC_cflags__Wformat_security=yes
5972 else
5973 pgac_cv_prog_CC_cflags__Wformat_security=no
5975 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5976 ac_c_werror_flag=$ac_save_c_werror_flag
5977 CFLAGS="$pgac_save_CFLAGS"
5978 CC="$pgac_save_CC"
5980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5981 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5982 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5983 CFLAGS="${CFLAGS} -Wformat-security"
5987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5988 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5989 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5990 $as_echo_n "(cached) " >&6
5991 else
5992 pgac_save_CXXFLAGS=$CXXFLAGS
5993 pgac_save_CXX=$CXX
5994 CXX=${CXX}
5995 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5996 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5997 ac_cxx_werror_flag=yes
5998 ac_ext=cpp
5999 ac_cpp='$CXXCPP $CPPFLAGS'
6000 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6001 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6002 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6005 /* end confdefs.h. */
6008 main ()
6012 return 0;
6014 _ACEOF
6015 if ac_fn_cxx_try_compile "$LINENO"; then :
6016 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
6017 else
6018 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
6020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6021 ac_ext=c
6022 ac_cpp='$CPP $CPPFLAGS'
6023 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6024 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6025 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6027 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6028 CXXFLAGS="$pgac_save_CXXFLAGS"
6029 CXX="$pgac_save_CXX"
6031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
6032 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
6033 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
6034 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6038 # Disable strict-aliasing rules; needed for gcc 3.3+
6040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6041 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6042 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6043 $as_echo_n "(cached) " >&6
6044 else
6045 pgac_save_CFLAGS=$CFLAGS
6046 pgac_save_CC=$CC
6047 CC=${CC}
6048 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6049 ac_save_c_werror_flag=$ac_c_werror_flag
6050 ac_c_werror_flag=yes
6051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6052 /* end confdefs.h. */
6055 main ()
6059 return 0;
6061 _ACEOF
6062 if ac_fn_c_try_compile "$LINENO"; then :
6063 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6064 else
6065 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6068 ac_c_werror_flag=$ac_save_c_werror_flag
6069 CFLAGS="$pgac_save_CFLAGS"
6070 CC="$pgac_save_CC"
6072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6073 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6074 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6075 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6080 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6081 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6082 $as_echo_n "(cached) " >&6
6083 else
6084 pgac_save_CXXFLAGS=$CXXFLAGS
6085 pgac_save_CXX=$CXX
6086 CXX=${CXX}
6087 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6088 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6089 ac_cxx_werror_flag=yes
6090 ac_ext=cpp
6091 ac_cpp='$CXXCPP $CPPFLAGS'
6092 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6093 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6094 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6097 /* end confdefs.h. */
6100 main ()
6104 return 0;
6106 _ACEOF
6107 if ac_fn_cxx_try_compile "$LINENO"; then :
6108 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6109 else
6110 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6112 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6113 ac_ext=c
6114 ac_cpp='$CPP $CPPFLAGS'
6115 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6116 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6117 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6119 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6120 CXXFLAGS="$pgac_save_CXXFLAGS"
6121 CXX="$pgac_save_CXX"
6123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6124 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6125 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6126 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6130 # Disable optimizations that assume no overflow; needed for gcc 4.3+
6132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
6133 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
6134 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
6135 $as_echo_n "(cached) " >&6
6136 else
6137 pgac_save_CFLAGS=$CFLAGS
6138 pgac_save_CC=$CC
6139 CC=${CC}
6140 CFLAGS="${CFLAGS} -fwrapv"
6141 ac_save_c_werror_flag=$ac_c_werror_flag
6142 ac_c_werror_flag=yes
6143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6144 /* end confdefs.h. */
6147 main ()
6151 return 0;
6153 _ACEOF
6154 if ac_fn_c_try_compile "$LINENO"; then :
6155 pgac_cv_prog_CC_cflags__fwrapv=yes
6156 else
6157 pgac_cv_prog_CC_cflags__fwrapv=no
6159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6160 ac_c_werror_flag=$ac_save_c_werror_flag
6161 CFLAGS="$pgac_save_CFLAGS"
6162 CC="$pgac_save_CC"
6164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
6165 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
6166 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
6167 CFLAGS="${CFLAGS} -fwrapv"
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
6172 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
6173 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
6174 $as_echo_n "(cached) " >&6
6175 else
6176 pgac_save_CXXFLAGS=$CXXFLAGS
6177 pgac_save_CXX=$CXX
6178 CXX=${CXX}
6179 CXXFLAGS="${CXXFLAGS} -fwrapv"
6180 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6181 ac_cxx_werror_flag=yes
6182 ac_ext=cpp
6183 ac_cpp='$CXXCPP $CPPFLAGS'
6184 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6185 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6186 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6189 /* end confdefs.h. */
6192 main ()
6196 return 0;
6198 _ACEOF
6199 if ac_fn_cxx_try_compile "$LINENO"; then :
6200 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6201 else
6202 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6204 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6205 ac_ext=c
6206 ac_cpp='$CPP $CPPFLAGS'
6207 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6208 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6209 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6211 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6212 CXXFLAGS="$pgac_save_CXXFLAGS"
6213 CXX="$pgac_save_CXX"
6215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6216 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6217 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6218 CXXFLAGS="${CXXFLAGS} -fwrapv"
6222 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6225 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6226 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6227 $as_echo_n "(cached) " >&6
6228 else
6229 pgac_save_CFLAGS=$CFLAGS
6230 pgac_save_CC=$CC
6231 CC=${CC}
6232 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6233 ac_save_c_werror_flag=$ac_c_werror_flag
6234 ac_c_werror_flag=yes
6235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6236 /* end confdefs.h. */
6239 main ()
6243 return 0;
6245 _ACEOF
6246 if ac_fn_c_try_compile "$LINENO"; then :
6247 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6248 else
6249 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6251 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6252 ac_c_werror_flag=$ac_save_c_werror_flag
6253 CFLAGS="$pgac_save_CFLAGS"
6254 CC="$pgac_save_CC"
6256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6257 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6258 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6259 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6264 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6265 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6266 $as_echo_n "(cached) " >&6
6267 else
6268 pgac_save_CXXFLAGS=$CXXFLAGS
6269 pgac_save_CXX=$CXX
6270 CXX=${CXX}
6271 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6272 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6273 ac_cxx_werror_flag=yes
6274 ac_ext=cpp
6275 ac_cpp='$CXXCPP $CPPFLAGS'
6276 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6277 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6278 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6281 /* end confdefs.h. */
6284 main ()
6288 return 0;
6290 _ACEOF
6291 if ac_fn_cxx_try_compile "$LINENO"; then :
6292 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6293 else
6294 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6296 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6297 ac_ext=c
6298 ac_cpp='$CPP $CPPFLAGS'
6299 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6300 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6301 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6303 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6304 CXXFLAGS="$pgac_save_CXXFLAGS"
6305 CXX="$pgac_save_CXX"
6307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6308 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6309 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6310 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6314 # Optimization flags for specific files that benefit from loop unrolling
6315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6316 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6317 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} 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="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
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__funroll_loops=yes
6339 else
6340 pgac_cv_prog_CC_cflags__funroll_loops=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__funroll_loops" >&5
6348 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6349 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6350 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6354 # Optimization flags for specific files that benefit from vectorization
6355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6356 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6357 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6358 $as_echo_n "(cached) " >&6
6359 else
6360 pgac_save_CFLAGS=$CFLAGS
6361 pgac_save_CC=$CC
6362 CC=${CC}
6363 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6364 ac_save_c_werror_flag=$ac_c_werror_flag
6365 ac_c_werror_flag=yes
6366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6367 /* end confdefs.h. */
6370 main ()
6374 return 0;
6376 _ACEOF
6377 if ac_fn_c_try_compile "$LINENO"; then :
6378 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6379 else
6380 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6382 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6383 ac_c_werror_flag=$ac_save_c_werror_flag
6384 CFLAGS="$pgac_save_CFLAGS"
6385 CC="$pgac_save_CC"
6387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6388 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6389 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6390 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6395 # The following tests want to suppress various unhelpful warnings by adding
6396 # -Wno-foo switches. But gcc won't complain about unrecognized -Wno-foo
6397 # switches, so we have to test for the positive form and if that works,
6398 # add the negative form. Note that tests of this form typically need to
6399 # be duplicated in the BITCODE_CFLAGS setup stanza below.
6401 # Suppress clang's unhelpful unused-command-line-argument warnings.
6402 NOT_THE_CFLAGS=""
6403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6404 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6405 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6406 $as_echo_n "(cached) " >&6
6407 else
6408 pgac_save_CFLAGS=$CFLAGS
6409 pgac_save_CC=$CC
6410 CC=${CC}
6411 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6412 ac_save_c_werror_flag=$ac_c_werror_flag
6413 ac_c_werror_flag=yes
6414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6415 /* end confdefs.h. */
6418 main ()
6422 return 0;
6424 _ACEOF
6425 if ac_fn_c_try_compile "$LINENO"; then :
6426 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6427 else
6428 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6431 ac_c_werror_flag=$ac_save_c_werror_flag
6432 CFLAGS="$pgac_save_CFLAGS"
6433 CC="$pgac_save_CC"
6435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6436 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6437 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6438 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6442 if test -n "$NOT_THE_CFLAGS"; then
6443 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6445 # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
6446 # of warnings when building plperl because of usages in the Perl headers.
6447 NOT_THE_CFLAGS=""
6448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
6449 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
6450 if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then :
6451 $as_echo_n "(cached) " >&6
6452 else
6453 pgac_save_CFLAGS=$CFLAGS
6454 pgac_save_CC=$CC
6455 CC=${CC}
6456 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6457 ac_save_c_werror_flag=$ac_c_werror_flag
6458 ac_c_werror_flag=yes
6459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6460 /* end confdefs.h. */
6463 main ()
6467 return 0;
6469 _ACEOF
6470 if ac_fn_c_try_compile "$LINENO"; then :
6471 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes
6472 else
6473 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no
6475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6476 ac_c_werror_flag=$ac_save_c_werror_flag
6477 CFLAGS="$pgac_save_CFLAGS"
6478 CC="$pgac_save_CC"
6480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5
6481 $as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; }
6482 if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then
6483 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6487 if test -n "$NOT_THE_CFLAGS"; then
6488 CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
6490 # Similarly disable useless truncation warnings from gcc 8+
6491 NOT_THE_CFLAGS=""
6492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6493 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6494 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6495 $as_echo_n "(cached) " >&6
6496 else
6497 pgac_save_CFLAGS=$CFLAGS
6498 pgac_save_CC=$CC
6499 CC=${CC}
6500 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6501 ac_save_c_werror_flag=$ac_c_werror_flag
6502 ac_c_werror_flag=yes
6503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6504 /* end confdefs.h. */
6507 main ()
6511 return 0;
6513 _ACEOF
6514 if ac_fn_c_try_compile "$LINENO"; then :
6515 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6516 else
6517 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6519 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6520 ac_c_werror_flag=$ac_save_c_werror_flag
6521 CFLAGS="$pgac_save_CFLAGS"
6522 CC="$pgac_save_CC"
6524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6525 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6526 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6527 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6531 if test -n "$NOT_THE_CFLAGS"; then
6532 CFLAGS="$CFLAGS -Wno-format-truncation"
6534 NOT_THE_CFLAGS=""
6535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6536 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6537 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6538 $as_echo_n "(cached) " >&6
6539 else
6540 pgac_save_CFLAGS=$CFLAGS
6541 pgac_save_CC=$CC
6542 CC=${CC}
6543 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6544 ac_save_c_werror_flag=$ac_c_werror_flag
6545 ac_c_werror_flag=yes
6546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6547 /* end confdefs.h. */
6550 main ()
6554 return 0;
6556 _ACEOF
6557 if ac_fn_c_try_compile "$LINENO"; then :
6558 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6559 else
6560 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6563 ac_c_werror_flag=$ac_save_c_werror_flag
6564 CFLAGS="$pgac_save_CFLAGS"
6565 CC="$pgac_save_CC"
6567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6568 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6569 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6570 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6574 if test -n "$NOT_THE_CFLAGS"; then
6575 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6577 elif test "$ICC" = yes; then
6578 # Intel's compiler has a bug/misoptimization in checking for
6579 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6582 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6583 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6584 $as_echo_n "(cached) " >&6
6585 else
6586 pgac_save_CFLAGS=$CFLAGS
6587 pgac_save_CC=$CC
6588 CC=${CC}
6589 CFLAGS="${CFLAGS} -mp1"
6590 ac_save_c_werror_flag=$ac_c_werror_flag
6591 ac_c_werror_flag=yes
6592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6593 /* end confdefs.h. */
6596 main ()
6600 return 0;
6602 _ACEOF
6603 if ac_fn_c_try_compile "$LINENO"; then :
6604 pgac_cv_prog_CC_cflags__mp1=yes
6605 else
6606 pgac_cv_prog_CC_cflags__mp1=no
6608 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6609 ac_c_werror_flag=$ac_save_c_werror_flag
6610 CFLAGS="$pgac_save_CFLAGS"
6611 CC="$pgac_save_CC"
6613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6614 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6615 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6616 CFLAGS="${CFLAGS} -mp1"
6620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6621 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6622 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6623 $as_echo_n "(cached) " >&6
6624 else
6625 pgac_save_CXXFLAGS=$CXXFLAGS
6626 pgac_save_CXX=$CXX
6627 CXX=${CXX}
6628 CXXFLAGS="${CXXFLAGS} -mp1"
6629 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6630 ac_cxx_werror_flag=yes
6631 ac_ext=cpp
6632 ac_cpp='$CXXCPP $CPPFLAGS'
6633 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6634 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6635 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6638 /* end confdefs.h. */
6641 main ()
6645 return 0;
6647 _ACEOF
6648 if ac_fn_cxx_try_compile "$LINENO"; then :
6649 pgac_cv_prog_CXX_cxxflags__mp1=yes
6650 else
6651 pgac_cv_prog_CXX_cxxflags__mp1=no
6653 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6654 ac_ext=c
6655 ac_cpp='$CPP $CPPFLAGS'
6656 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6657 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6658 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6660 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6661 CXXFLAGS="$pgac_save_CXXFLAGS"
6662 CXX="$pgac_save_CXX"
6664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6665 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6666 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6667 CXXFLAGS="${CXXFLAGS} -mp1"
6671 # Make sure strict aliasing is off (though this is said to be the default)
6673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6674 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6675 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6676 $as_echo_n "(cached) " >&6
6677 else
6678 pgac_save_CFLAGS=$CFLAGS
6679 pgac_save_CC=$CC
6680 CC=${CC}
6681 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6682 ac_save_c_werror_flag=$ac_c_werror_flag
6683 ac_c_werror_flag=yes
6684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6685 /* end confdefs.h. */
6688 main ()
6692 return 0;
6694 _ACEOF
6695 if ac_fn_c_try_compile "$LINENO"; then :
6696 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6697 else
6698 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6701 ac_c_werror_flag=$ac_save_c_werror_flag
6702 CFLAGS="$pgac_save_CFLAGS"
6703 CC="$pgac_save_CC"
6705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6706 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6707 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6708 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6713 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6714 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6715 $as_echo_n "(cached) " >&6
6716 else
6717 pgac_save_CXXFLAGS=$CXXFLAGS
6718 pgac_save_CXX=$CXX
6719 CXX=${CXX}
6720 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6721 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6722 ac_cxx_werror_flag=yes
6723 ac_ext=cpp
6724 ac_cpp='$CXXCPP $CPPFLAGS'
6725 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6726 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6727 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6730 /* end confdefs.h. */
6733 main ()
6737 return 0;
6739 _ACEOF
6740 if ac_fn_cxx_try_compile "$LINENO"; then :
6741 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6742 else
6743 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6745 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6746 ac_ext=c
6747 ac_cpp='$CPP $CPPFLAGS'
6748 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6749 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6750 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6752 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6753 CXXFLAGS="$pgac_save_CXXFLAGS"
6754 CXX="$pgac_save_CXX"
6756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6757 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6758 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6759 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6763 elif test "$PORTNAME" = "aix"; then
6764 # AIX's xlc has to have strict aliasing turned off too
6766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6767 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6768 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6769 $as_echo_n "(cached) " >&6
6770 else
6771 pgac_save_CFLAGS=$CFLAGS
6772 pgac_save_CC=$CC
6773 CC=${CC}
6774 CFLAGS="${CFLAGS} -qnoansialias"
6775 ac_save_c_werror_flag=$ac_c_werror_flag
6776 ac_c_werror_flag=yes
6777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6778 /* end confdefs.h. */
6781 main ()
6785 return 0;
6787 _ACEOF
6788 if ac_fn_c_try_compile "$LINENO"; then :
6789 pgac_cv_prog_CC_cflags__qnoansialias=yes
6790 else
6791 pgac_cv_prog_CC_cflags__qnoansialias=no
6793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6794 ac_c_werror_flag=$ac_save_c_werror_flag
6795 CFLAGS="$pgac_save_CFLAGS"
6796 CC="$pgac_save_CC"
6798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6799 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6800 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6801 CFLAGS="${CFLAGS} -qnoansialias"
6805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6806 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6807 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6808 $as_echo_n "(cached) " >&6
6809 else
6810 pgac_save_CXXFLAGS=$CXXFLAGS
6811 pgac_save_CXX=$CXX
6812 CXX=${CXX}
6813 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6814 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6815 ac_cxx_werror_flag=yes
6816 ac_ext=cpp
6817 ac_cpp='$CXXCPP $CPPFLAGS'
6818 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6819 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6820 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6823 /* end confdefs.h. */
6826 main ()
6830 return 0;
6832 _ACEOF
6833 if ac_fn_cxx_try_compile "$LINENO"; then :
6834 pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6835 else
6836 pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6839 ac_ext=c
6840 ac_cpp='$CPP $CPPFLAGS'
6841 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6842 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6843 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6845 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6846 CXXFLAGS="$pgac_save_CXXFLAGS"
6847 CXX="$pgac_save_CXX"
6849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6850 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6851 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6852 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6858 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6859 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6860 $as_echo_n "(cached) " >&6
6861 else
6862 pgac_save_CFLAGS=$CFLAGS
6863 pgac_save_CC=$CC
6864 CC=${CC}
6865 CFLAGS="${CFLAGS} -qlonglong"
6866 ac_save_c_werror_flag=$ac_c_werror_flag
6867 ac_c_werror_flag=yes
6868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6869 /* end confdefs.h. */
6872 main ()
6876 return 0;
6878 _ACEOF
6879 if ac_fn_c_try_compile "$LINENO"; then :
6880 pgac_cv_prog_CC_cflags__qlonglong=yes
6881 else
6882 pgac_cv_prog_CC_cflags__qlonglong=no
6884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6885 ac_c_werror_flag=$ac_save_c_werror_flag
6886 CFLAGS="$pgac_save_CFLAGS"
6887 CC="$pgac_save_CC"
6889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6890 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6891 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6892 CFLAGS="${CFLAGS} -qlonglong"
6896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6897 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6898 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6899 $as_echo_n "(cached) " >&6
6900 else
6901 pgac_save_CXXFLAGS=$CXXFLAGS
6902 pgac_save_CXX=$CXX
6903 CXX=${CXX}
6904 CXXFLAGS="${CXXFLAGS} -qlonglong"
6905 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6906 ac_cxx_werror_flag=yes
6907 ac_ext=cpp
6908 ac_cpp='$CXXCPP $CPPFLAGS'
6909 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6910 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6911 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6914 /* end confdefs.h. */
6917 main ()
6921 return 0;
6923 _ACEOF
6924 if ac_fn_cxx_try_compile "$LINENO"; then :
6925 pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6926 else
6927 pgac_cv_prog_CXX_cxxflags__qlonglong=no
6929 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6930 ac_ext=c
6931 ac_cpp='$CPP $CPPFLAGS'
6932 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6933 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6934 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6936 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6937 CXXFLAGS="$pgac_save_CXXFLAGS"
6938 CXX="$pgac_save_CXX"
6940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6941 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6942 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6943 CXXFLAGS="${CXXFLAGS} -qlonglong"
6949 # If the compiler knows how to hide symbols, add the switch needed for that to
6950 # CFLAGS_SL_MODULE and define HAVE_VISIBILITY_ATTRIBUTE.
6952 # This is done separately from the above because -fvisibility is supported by
6953 # quite a few different compilers, making the required repetition bothersome.
6955 # We might need to add a separate test to check if
6956 # __attribute__((visibility("hidden"))) is supported, if we encounter a
6957 # compiler that supports one of the supported variants of -fvisibility=hidden
6958 # but uses a different syntax to mark a symbol as exported.
6959 if test "$GCC" = yes -o "$SUN_STUDIO_CC" = yes ; then
6960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE" >&5
6961 $as_echo_n "checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
6962 if ${pgac_cv_prog_CC_cflags__fvisibility_hidden+:} false; then :
6963 $as_echo_n "(cached) " >&6
6964 else
6965 pgac_save_CFLAGS=$CFLAGS
6966 pgac_save_CC=$CC
6967 CC=${CC}
6968 CFLAGS="${CFLAGS_SL_MODULE} -fvisibility=hidden"
6969 ac_save_c_werror_flag=$ac_c_werror_flag
6970 ac_c_werror_flag=yes
6971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6972 /* end confdefs.h. */
6975 main ()
6979 return 0;
6981 _ACEOF
6982 if ac_fn_c_try_compile "$LINENO"; then :
6983 pgac_cv_prog_CC_cflags__fvisibility_hidden=yes
6984 else
6985 pgac_cv_prog_CC_cflags__fvisibility_hidden=no
6987 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6988 ac_c_werror_flag=$ac_save_c_werror_flag
6989 CFLAGS="$pgac_save_CFLAGS"
6990 CC="$pgac_save_CC"
6992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fvisibility_hidden" >&5
6993 $as_echo "$pgac_cv_prog_CC_cflags__fvisibility_hidden" >&6; }
6994 if test x"$pgac_cv_prog_CC_cflags__fvisibility_hidden" = x"yes"; then
6995 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -fvisibility=hidden"
6999 # For C++ we additionally want -fvisibility-inlines-hidden
7000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
7001 $as_echo_n "checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
7002 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_hidden+:} false; then :
7003 $as_echo_n "(cached) " >&6
7004 else
7005 pgac_save_CXXFLAGS=$CXXFLAGS
7006 pgac_save_CXX=$CXX
7007 CXX=${CXX}
7008 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
7009 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7010 ac_cxx_werror_flag=yes
7011 ac_ext=cpp
7012 ac_cpp='$CXXCPP $CPPFLAGS'
7013 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7014 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7015 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7018 /* end confdefs.h. */
7021 main ()
7025 return 0;
7027 _ACEOF
7028 if ac_fn_cxx_try_compile "$LINENO"; then :
7029 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=yes
7030 else
7031 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=no
7033 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7034 ac_ext=c
7035 ac_cpp='$CPP $CPPFLAGS'
7036 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7037 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7038 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7040 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7041 CXXFLAGS="$pgac_save_CXXFLAGS"
7042 CXX="$pgac_save_CXX"
7044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&5
7045 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&6; }
7046 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" = x"yes"; then
7047 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
7050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE" >&5
7051 $as_echo_n "checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE... " >&6; }
7052 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden+:} false; then :
7053 $as_echo_n "(cached) " >&6
7054 else
7055 pgac_save_CXXFLAGS=$CXXFLAGS
7056 pgac_save_CXX=$CXX
7057 CXX=${CXX}
7058 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
7059 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7060 ac_cxx_werror_flag=yes
7061 ac_ext=cpp
7062 ac_cpp='$CXXCPP $CPPFLAGS'
7063 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7064 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7065 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7068 /* end confdefs.h. */
7071 main ()
7075 return 0;
7077 _ACEOF
7078 if ac_fn_cxx_try_compile "$LINENO"; then :
7079 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=yes
7080 else
7081 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=no
7083 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7084 ac_ext=c
7085 ac_cpp='$CPP $CPPFLAGS'
7086 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7087 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7088 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7090 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7091 CXXFLAGS="$pgac_save_CXXFLAGS"
7092 CXX="$pgac_save_CXX"
7094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&5
7095 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&6; }
7096 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" = x"yes"; then
7097 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
7100 have_visibility_attribute=$pgac_cv_prog_CC_cflags__fvisibility_hidden
7101 elif test "$PORTNAME" = "aix"; then
7102 # Note that xlc accepts -fvisibility=hidden as a file.
7103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qvisibility=hidden, for CFLAGS_SL_MODULE" >&5
7104 $as_echo_n "checking whether ${CC} supports -qvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
7105 if ${pgac_cv_prog_CC_cflags__qvisibility_hidden+:} false; then :
7106 $as_echo_n "(cached) " >&6
7107 else
7108 pgac_save_CFLAGS=$CFLAGS
7109 pgac_save_CC=$CC
7110 CC=${CC}
7111 CFLAGS="${CFLAGS_SL_MODULE} -qvisibility=hidden"
7112 ac_save_c_werror_flag=$ac_c_werror_flag
7113 ac_c_werror_flag=yes
7114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7115 /* end confdefs.h. */
7118 main ()
7122 return 0;
7124 _ACEOF
7125 if ac_fn_c_try_compile "$LINENO"; then :
7126 pgac_cv_prog_CC_cflags__qvisibility_hidden=yes
7127 else
7128 pgac_cv_prog_CC_cflags__qvisibility_hidden=no
7130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7131 ac_c_werror_flag=$ac_save_c_werror_flag
7132 CFLAGS="$pgac_save_CFLAGS"
7133 CC="$pgac_save_CC"
7135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qvisibility_hidden" >&5
7136 $as_echo "$pgac_cv_prog_CC_cflags__qvisibility_hidden" >&6; }
7137 if test x"$pgac_cv_prog_CC_cflags__qvisibility_hidden" = x"yes"; then
7138 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -qvisibility=hidden"
7142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
7143 $as_echo_n "checking whether ${CXX} supports -qvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
7144 if ${pgac_cv_prog_CXX_cxxflags__qvisibility_hidden+:} false; then :
7145 $as_echo_n "(cached) " >&6
7146 else
7147 pgac_save_CXXFLAGS=$CXXFLAGS
7148 pgac_save_CXX=$CXX
7149 CXX=${CXX}
7150 CXXFLAGS="${CXXFLAGS_SL_MODULE} -qvisibility=hidden"
7151 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7152 ac_cxx_werror_flag=yes
7153 ac_ext=cpp
7154 ac_cpp='$CXXCPP $CPPFLAGS'
7155 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7156 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7157 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7160 /* end confdefs.h. */
7163 main ()
7167 return 0;
7169 _ACEOF
7170 if ac_fn_cxx_try_compile "$LINENO"; then :
7171 pgac_cv_prog_CXX_cxxflags__qvisibility_hidden=yes
7172 else
7173 pgac_cv_prog_CXX_cxxflags__qvisibility_hidden=no
7175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7176 ac_ext=c
7177 ac_cpp='$CPP $CPPFLAGS'
7178 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7179 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7180 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7182 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7183 CXXFLAGS="$pgac_save_CXXFLAGS"
7184 CXX="$pgac_save_CXX"
7186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" >&5
7187 $as_echo "$pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" >&6; }
7188 if test x"$pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" = x"yes"; then
7189 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -qvisibility=hidden"
7192 have_visibility_attribute=$pgac_cv_prog_CC_cflags__qvisibility_hidden
7193 # Old xlc versions (<13.1) don't have support for -qvisibility. Use expfull to force
7194 # all extension module symbols to be exported.
7195 if test "$pgac_cv_prog_CC_cflags__qvisibility_hidden" != "yes"; then
7196 CFLAGS_SL_MODULE="$CFLAGS_SL_MODULE -Wl,-b,expfull"
7200 if test "$have_visibility_attribute" = "yes"; then
7202 $as_echo "#define HAVE_VISIBILITY_ATTRIBUTE 1" >>confdefs.h
7211 # Determine flags used to emit bitcode for JIT inlining.
7212 # 1. We must duplicate any behaviour-changing compiler flags used above,
7213 # to keep compatibility with the compiler used for normal Postgres code.
7214 # 2. We don't bother to duplicate extra-warnings switches --- seeing a
7215 # warning in the main build is enough.
7216 # 3. But we must duplicate -Wno-warning flags, else we'll see those anyway.
7217 if test "$with_llvm" = yes ; then
7218 CLANGXX="$CLANG -xc++"
7220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
7221 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
7222 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
7223 $as_echo_n "(cached) " >&6
7224 else
7225 pgac_save_CFLAGS=$CFLAGS
7226 pgac_save_CC=$CC
7227 CC=${CLANG}
7228 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7229 ac_save_c_werror_flag=$ac_c_werror_flag
7230 ac_c_werror_flag=yes
7231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7232 /* end confdefs.h. */
7235 main ()
7239 return 0;
7241 _ACEOF
7242 if ac_fn_c_try_compile "$LINENO"; then :
7243 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
7244 else
7245 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
7247 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7248 ac_c_werror_flag=$ac_save_c_werror_flag
7249 CFLAGS="$pgac_save_CFLAGS"
7250 CC="$pgac_save_CC"
7252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
7253 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
7254 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
7255 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
7259 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
7260 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
7261 $as_echo_n "(cached) " >&6
7262 else
7263 pgac_save_CXXFLAGS=$CXXFLAGS
7264 pgac_save_CXX=$CXX
7265 CXX=${CLANGXX}
7266 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7267 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7268 ac_cxx_werror_flag=yes
7269 ac_ext=cpp
7270 ac_cpp='$CXXCPP $CPPFLAGS'
7271 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7272 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7273 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7276 /* end confdefs.h. */
7279 main ()
7283 return 0;
7285 _ACEOF
7286 if ac_fn_cxx_try_compile "$LINENO"; then :
7287 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
7288 else
7289 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
7291 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7292 ac_ext=c
7293 ac_cpp='$CPP $CPPFLAGS'
7294 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7295 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7296 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7298 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7299 CXXFLAGS="$pgac_save_CXXFLAGS"
7300 CXX="$pgac_save_CXX"
7302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
7303 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
7304 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
7305 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
7309 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
7310 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
7311 $as_echo_n "(cached) " >&6
7312 else
7313 pgac_save_CFLAGS=$CFLAGS
7314 pgac_save_CC=$CC
7315 CC=${CLANG}
7316 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7317 ac_save_c_werror_flag=$ac_c_werror_flag
7318 ac_c_werror_flag=yes
7319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7320 /* end confdefs.h. */
7323 main ()
7327 return 0;
7329 _ACEOF
7330 if ac_fn_c_try_compile "$LINENO"; then :
7331 pgac_cv_prog_CLANG_cflags__fwrapv=yes
7332 else
7333 pgac_cv_prog_CLANG_cflags__fwrapv=no
7335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7336 ac_c_werror_flag=$ac_save_c_werror_flag
7337 CFLAGS="$pgac_save_CFLAGS"
7338 CC="$pgac_save_CC"
7340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
7341 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
7342 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
7343 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
7347 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
7348 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
7349 $as_echo_n "(cached) " >&6
7350 else
7351 pgac_save_CXXFLAGS=$CXXFLAGS
7352 pgac_save_CXX=$CXX
7353 CXX=${CLANGXX}
7354 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7355 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7356 ac_cxx_werror_flag=yes
7357 ac_ext=cpp
7358 ac_cpp='$CXXCPP $CPPFLAGS'
7359 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7360 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7361 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7364 /* end confdefs.h. */
7367 main ()
7371 return 0;
7373 _ACEOF
7374 if ac_fn_cxx_try_compile "$LINENO"; then :
7375 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
7376 else
7377 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
7379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7380 ac_ext=c
7381 ac_cpp='$CPP $CPPFLAGS'
7382 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7383 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7384 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7386 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7387 CXXFLAGS="$pgac_save_CXXFLAGS"
7388 CXX="$pgac_save_CXX"
7390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
7391 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
7392 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
7393 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
7397 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
7398 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
7399 $as_echo_n "(cached) " >&6
7400 else
7401 pgac_save_CFLAGS=$CFLAGS
7402 pgac_save_CC=$CC
7403 CC=${CLANG}
7404 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7405 ac_save_c_werror_flag=$ac_c_werror_flag
7406 ac_c_werror_flag=yes
7407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7408 /* end confdefs.h. */
7411 main ()
7415 return 0;
7417 _ACEOF
7418 if ac_fn_c_try_compile "$LINENO"; then :
7419 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7420 else
7421 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7423 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7424 ac_c_werror_flag=$ac_save_c_werror_flag
7425 CFLAGS="$pgac_save_CFLAGS"
7426 CC="$pgac_save_CC"
7428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7429 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7430 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7431 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7435 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7436 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7437 $as_echo_n "(cached) " >&6
7438 else
7439 pgac_save_CXXFLAGS=$CXXFLAGS
7440 pgac_save_CXX=$CXX
7441 CXX=${CLANGXX}
7442 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7443 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7444 ac_cxx_werror_flag=yes
7445 ac_ext=cpp
7446 ac_cpp='$CXXCPP $CPPFLAGS'
7447 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7448 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7449 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7452 /* end confdefs.h. */
7455 main ()
7459 return 0;
7461 _ACEOF
7462 if ac_fn_cxx_try_compile "$LINENO"; then :
7463 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7464 else
7465 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7468 ac_ext=c
7469 ac_cpp='$CPP $CPPFLAGS'
7470 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7471 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7472 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7474 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7475 CXXFLAGS="$pgac_save_CXXFLAGS"
7476 CXX="$pgac_save_CXX"
7478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7479 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7480 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7481 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS" >&5
7486 $as_echo_n "checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS... " >&6; }
7487 if ${pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers+:} false; then :
7488 $as_echo_n "(cached) " >&6
7489 else
7490 pgac_save_CFLAGS=$CFLAGS
7491 pgac_save_CC=$CC
7492 CC=${CLANG}
7493 CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7494 ac_save_c_werror_flag=$ac_c_werror_flag
7495 ac_c_werror_flag=yes
7496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7497 /* end confdefs.h. */
7500 main ()
7504 return 0;
7506 _ACEOF
7507 if ac_fn_c_try_compile "$LINENO"; then :
7508 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=yes
7509 else
7510 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=no
7512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7513 ac_c_werror_flag=$ac_save_c_werror_flag
7514 CFLAGS="$pgac_save_CFLAGS"
7515 CC="$pgac_save_CC"
7517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&5
7518 $as_echo "$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&6; }
7519 if test x"$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" = x"yes"; then
7520 BITCODE_CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS" >&5
7524 $as_echo_n "checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS... " >&6; }
7525 if ${pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers+:} false; then :
7526 $as_echo_n "(cached) " >&6
7527 else
7528 pgac_save_CXXFLAGS=$CXXFLAGS
7529 pgac_save_CXX=$CXX
7530 CXX=${CLANGXX}
7531 CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7532 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7533 ac_cxx_werror_flag=yes
7534 ac_ext=cpp
7535 ac_cpp='$CXXCPP $CPPFLAGS'
7536 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7537 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7538 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7541 /* end confdefs.h. */
7544 main ()
7548 return 0;
7550 _ACEOF
7551 if ac_fn_cxx_try_compile "$LINENO"; then :
7552 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=yes
7553 else
7554 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=no
7556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7557 ac_ext=c
7558 ac_cpp='$CPP $CPPFLAGS'
7559 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7560 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7561 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7563 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7564 CXXFLAGS="$pgac_save_CXXFLAGS"
7565 CXX="$pgac_save_CXX"
7567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&5
7568 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&6; }
7569 if test x"$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" = x"yes"; then
7570 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7574 NOT_THE_CFLAGS=""
7575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
7576 $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
7577 if ${pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument+:} false; then :
7578 $as_echo_n "(cached) " >&6
7579 else
7580 pgac_save_CFLAGS=$CFLAGS
7581 pgac_save_CC=$CC
7582 CC=${CLANG}
7583 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7584 ac_save_c_werror_flag=$ac_c_werror_flag
7585 ac_c_werror_flag=yes
7586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7587 /* end confdefs.h. */
7590 main ()
7594 return 0;
7596 _ACEOF
7597 if ac_fn_c_try_compile "$LINENO"; then :
7598 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=yes
7599 else
7600 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=no
7602 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7603 ac_c_werror_flag=$ac_save_c_werror_flag
7604 CFLAGS="$pgac_save_CFLAGS"
7605 CC="$pgac_save_CC"
7607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&5
7608 $as_echo "$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&6; }
7609 if test x"$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" = x"yes"; then
7610 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7613 if test -n "$NOT_THE_CFLAGS"; then
7614 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-unused-command-line-argument"
7616 NOT_THE_CFLAGS=""
7617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
7618 $as_echo_n "checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
7619 if ${pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro+:} false; then :
7620 $as_echo_n "(cached) " >&6
7621 else
7622 pgac_save_CFLAGS=$CFLAGS
7623 pgac_save_CC=$CC
7624 CC=${CLANG}
7625 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7626 ac_save_c_werror_flag=$ac_c_werror_flag
7627 ac_c_werror_flag=yes
7628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7629 /* end confdefs.h. */
7632 main ()
7636 return 0;
7638 _ACEOF
7639 if ac_fn_c_try_compile "$LINENO"; then :
7640 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=yes
7641 else
7642 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=no
7644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7645 ac_c_werror_flag=$ac_save_c_werror_flag
7646 CFLAGS="$pgac_save_CFLAGS"
7647 CC="$pgac_save_CC"
7649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&5
7650 $as_echo "$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&6; }
7651 if test x"$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" = x"yes"; then
7652 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7655 if test -n "$NOT_THE_CFLAGS"; then
7656 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
7658 NOT_THE_CFLAGS=""
7659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
7660 $as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
7661 if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :
7662 $as_echo_n "(cached) " >&6
7663 else
7664 pgac_save_CFLAGS=$CFLAGS
7665 pgac_save_CC=$CC
7666 CC=${CLANG}
7667 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7668 ac_save_c_werror_flag=$ac_c_werror_flag
7669 ac_c_werror_flag=yes
7670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7671 /* end confdefs.h. */
7674 main ()
7678 return 0;
7680 _ACEOF
7681 if ac_fn_c_try_compile "$LINENO"; then :
7682 pgac_cv_prog_CLANG_cflags__Wformat_truncation=yes
7683 else
7684 pgac_cv_prog_CLANG_cflags__Wformat_truncation=no
7686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7687 ac_c_werror_flag=$ac_save_c_werror_flag
7688 CFLAGS="$pgac_save_CFLAGS"
7689 CC="$pgac_save_CC"
7691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&5
7692 $as_echo "$pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&6; }
7693 if test x"$pgac_cv_prog_CLANG_cflags__Wformat_truncation" = x"yes"; then
7694 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7697 if test -n "$NOT_THE_CFLAGS"; then
7698 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"
7700 NOT_THE_CFLAGS=""
7701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
7702 $as_echo_n "checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
7703 if ${pgac_cv_prog_CLANG_cflags__Wstringop_truncation+:} false; then :
7704 $as_echo_n "(cached) " >&6
7705 else
7706 pgac_save_CFLAGS=$CFLAGS
7707 pgac_save_CC=$CC
7708 CC=${CLANG}
7709 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7710 ac_save_c_werror_flag=$ac_c_werror_flag
7711 ac_c_werror_flag=yes
7712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7713 /* end confdefs.h. */
7716 main ()
7720 return 0;
7722 _ACEOF
7723 if ac_fn_c_try_compile "$LINENO"; then :
7724 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=yes
7725 else
7726 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=no
7728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7729 ac_c_werror_flag=$ac_save_c_werror_flag
7730 CFLAGS="$pgac_save_CFLAGS"
7731 CC="$pgac_save_CC"
7733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&5
7734 $as_echo "$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&6; }
7735 if test x"$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" = x"yes"; then
7736 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7739 if test -n "$NOT_THE_CFLAGS"; then
7740 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-stringop-truncation"
7744 # supply -g if --enable-debug
7745 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7746 CFLAGS="$CFLAGS -g"
7749 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7750 CXXFLAGS="$CXXFLAGS -g"
7753 # enable code coverage if --enable-coverage
7754 if test "$enable_coverage" = yes; then
7755 if test "$GCC" = yes; then
7756 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7757 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7758 else
7759 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7763 # enable profiling if --enable-profiling
7764 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7765 if test "$GCC" = yes; then
7767 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7769 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7770 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7771 else
7772 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7776 # On Solaris, we need this #define to get POSIX-conforming versions
7777 # of many interfaces (sigwait, getpwuid_r, ...).
7778 if test "$PORTNAME" = "solaris"; then
7779 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
7782 # We already have this in Makefile.win32, but configure needs it too
7783 if test "$PORTNAME" = "win32"; then
7784 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7787 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7788 # user-specified flags (if any) at the end. This lets users override
7789 # the automatic additions.
7790 CFLAGS="$CFLAGS $user_CFLAGS"
7791 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7792 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7793 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7798 # The template file must set up CFLAGS_SL; we don't support user override
7801 # Check if the compiler still works with the final flag settings
7802 # (note, we're not checking that for CXX, which is optional)
7803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7804 $as_echo_n "checking whether the C compiler still works... " >&6; }
7805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7806 /* end confdefs.h. */
7809 main ()
7811 return 0;
7813 return 0;
7815 _ACEOF
7816 if ac_fn_c_try_link "$LINENO"; then :
7817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7818 $as_echo "yes" >&6; }
7819 else
7820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7821 $as_echo "no" >&6; }
7822 as_fn_error $? "cannot proceed" "$LINENO" 5
7824 rm -f core conftest.err conftest.$ac_objext \
7825 conftest$ac_exeext conftest.$ac_ext
7827 # Defend against gcc -ffast-math
7828 if test "$GCC" = yes; then
7829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7830 /* end confdefs.h. */
7833 main ()
7835 #ifdef __FAST_MATH__
7836 choke me
7837 #endif
7839 return 0;
7841 _ACEOF
7842 if ac_fn_c_try_compile "$LINENO"; then :
7844 else
7845 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7850 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7851 # versions of clang do not understand -fexcess-precision=standard, the use of
7852 # x87 floating point operations leads to problems like isinf possibly returning
7853 # false for a value that is infinite when converted from the 80bit register to
7854 # the 8byte memory representation.
7856 # Only perform the test if the compiler doesn't understand
7857 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7858 # automatically.
7859 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7861 /* end confdefs.h. */
7864 main ()
7867 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7868 choke me
7869 #endif
7872 return 0;
7874 _ACEOF
7875 if ac_fn_c_try_compile "$LINENO"; then :
7877 else
7878 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7880 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7883 ac_ext=c
7884 ac_cpp='$CPP $CPPFLAGS'
7885 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7886 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7887 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7889 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7890 # On Suns, sometimes $CPP names a directory.
7891 if test -n "$CPP" && test -d "$CPP"; then
7892 CPP=
7894 if test -z "$CPP"; then
7895 if ${ac_cv_prog_CPP+:} false; then :
7896 $as_echo_n "(cached) " >&6
7897 else
7898 # Double quotes because CPP needs to be expanded
7899 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7901 ac_preproc_ok=false
7902 for ac_c_preproc_warn_flag in '' yes
7904 # Use a header file that comes with gcc, so configuring glibc
7905 # with a fresh cross-compiler works.
7906 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7907 # <limits.h> exists even on freestanding compilers.
7908 # On the NeXT, cc -E runs the code through the compiler's parser,
7909 # not just through cpp. "Syntax error" is here to catch this case.
7910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7911 /* end confdefs.h. */
7912 #ifdef __STDC__
7913 # include <limits.h>
7914 #else
7915 # include <assert.h>
7916 #endif
7917 Syntax error
7918 _ACEOF
7919 if ac_fn_c_try_cpp "$LINENO"; then :
7921 else
7922 # Broken: fails on valid input.
7923 continue
7925 rm -f conftest.err conftest.i conftest.$ac_ext
7927 # OK, works on sane cases. Now check whether nonexistent headers
7928 # can be detected and how.
7929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7930 /* end confdefs.h. */
7931 #include <ac_nonexistent.h>
7932 _ACEOF
7933 if ac_fn_c_try_cpp "$LINENO"; then :
7934 # Broken: success on invalid input.
7935 continue
7936 else
7937 # Passes both tests.
7938 ac_preproc_ok=:
7939 break
7941 rm -f conftest.err conftest.i conftest.$ac_ext
7943 done
7944 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7945 rm -f conftest.i conftest.err conftest.$ac_ext
7946 if $ac_preproc_ok; then :
7947 break
7950 done
7951 ac_cv_prog_CPP=$CPP
7954 CPP=$ac_cv_prog_CPP
7955 else
7956 ac_cv_prog_CPP=$CPP
7958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7959 $as_echo "$CPP" >&6; }
7960 ac_preproc_ok=false
7961 for ac_c_preproc_warn_flag in '' yes
7963 # Use a header file that comes with gcc, so configuring glibc
7964 # with a fresh cross-compiler works.
7965 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7966 # <limits.h> exists even on freestanding compilers.
7967 # On the NeXT, cc -E runs the code through the compiler's parser,
7968 # not just through cpp. "Syntax error" is here to catch this case.
7969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7970 /* end confdefs.h. */
7971 #ifdef __STDC__
7972 # include <limits.h>
7973 #else
7974 # include <assert.h>
7975 #endif
7976 Syntax error
7977 _ACEOF
7978 if ac_fn_c_try_cpp "$LINENO"; then :
7980 else
7981 # Broken: fails on valid input.
7982 continue
7984 rm -f conftest.err conftest.i conftest.$ac_ext
7986 # OK, works on sane cases. Now check whether nonexistent headers
7987 # can be detected and how.
7988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7989 /* end confdefs.h. */
7990 #include <ac_nonexistent.h>
7991 _ACEOF
7992 if ac_fn_c_try_cpp "$LINENO"; then :
7993 # Broken: success on invalid input.
7994 continue
7995 else
7996 # Passes both tests.
7997 ac_preproc_ok=:
7998 break
8000 rm -f conftest.err conftest.i conftest.$ac_ext
8002 done
8003 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8004 rm -f conftest.i conftest.err conftest.$ac_ext
8005 if $ac_preproc_ok; then :
8007 else
8008 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8009 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8010 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
8011 See \`config.log' for more details" "$LINENO" 5; }
8014 ac_ext=c
8015 ac_cpp='$CPP $CPPFLAGS'
8016 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8017 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8018 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8024 # Set up TAS assembly code if needed; the template file has now had its
8025 # chance to request this.
8027 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
8030 if test "$need_tas" = yes ; then
8031 TAS=tas.o
8032 else
8033 TAS=""
8038 cat >>confdefs.h <<_ACEOF
8039 #define DLSUFFIX "$DLSUFFIX"
8040 _ACEOF
8044 # Set up pkg_config in case we need it below
8053 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8054 if test -n "$ac_tool_prefix"; then
8055 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8056 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
8057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8058 $as_echo_n "checking for $ac_word... " >&6; }
8059 if ${ac_cv_path_PKG_CONFIG+:} false; then :
8060 $as_echo_n "(cached) " >&6
8061 else
8062 case $PKG_CONFIG in
8063 [\\/]* | ?:[\\/]*)
8064 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8068 for as_dir in $PATH
8070 IFS=$as_save_IFS
8071 test -z "$as_dir" && as_dir=.
8072 for ac_exec_ext in '' $ac_executable_extensions; do
8073 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8074 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8076 break 2
8078 done
8079 done
8080 IFS=$as_save_IFS
8083 esac
8085 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8086 if test -n "$PKG_CONFIG"; then
8087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8088 $as_echo "$PKG_CONFIG" >&6; }
8089 else
8090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8091 $as_echo "no" >&6; }
8096 if test -z "$ac_cv_path_PKG_CONFIG"; then
8097 ac_pt_PKG_CONFIG=$PKG_CONFIG
8098 # Extract the first word of "pkg-config", so it can be a program name with args.
8099 set dummy pkg-config; ac_word=$2
8100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8101 $as_echo_n "checking for $ac_word... " >&6; }
8102 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
8103 $as_echo_n "(cached) " >&6
8104 else
8105 case $ac_pt_PKG_CONFIG in
8106 [\\/]* | ?:[\\/]*)
8107 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8110 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8111 for as_dir in $PATH
8113 IFS=$as_save_IFS
8114 test -z "$as_dir" && as_dir=.
8115 for ac_exec_ext in '' $ac_executable_extensions; do
8116 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8117 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8119 break 2
8121 done
8122 done
8123 IFS=$as_save_IFS
8126 esac
8128 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8129 if test -n "$ac_pt_PKG_CONFIG"; then
8130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8131 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
8132 else
8133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8134 $as_echo "no" >&6; }
8137 if test "x$ac_pt_PKG_CONFIG" = x; then
8138 PKG_CONFIG=""
8139 else
8140 case $cross_compiling:$ac_tool_warned in
8141 yes:)
8142 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8143 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8144 ac_tool_warned=yes ;;
8145 esac
8146 PKG_CONFIG=$ac_pt_PKG_CONFIG
8148 else
8149 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8153 if test -n "$PKG_CONFIG"; then
8154 _pkg_min_version=0.9.0
8155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
8156 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
8157 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8159 $as_echo "yes" >&6; }
8160 else
8161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8162 $as_echo "no" >&6; }
8163 PKG_CONFIG=""
8168 # Automatic dependency tracking
8172 # Check whether --enable-depend was given.
8173 if test "${enable_depend+set}" = set; then :
8174 enableval=$enable_depend;
8175 case $enableval in
8176 yes)
8177 autodepend=yes
8183 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
8185 esac
8187 else
8188 enable_depend=no
8197 # Enable assert checks
8201 # Check whether --enable-cassert was given.
8202 if test "${enable_cassert+set}" = set; then :
8203 enableval=$enable_cassert;
8204 case $enableval in
8205 yes)
8207 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
8214 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
8216 esac
8218 else
8219 enable_cassert=no
8227 # Include directories
8229 ac_save_IFS=$IFS
8230 IFS="${IFS}${PATH_SEPARATOR}"
8231 # SRCH_INC comes from the template file
8232 for dir in $with_includes $SRCH_INC; do
8233 if test -d "$dir"; then
8234 INCLUDES="$INCLUDES -I$dir"
8235 else
8236 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
8237 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
8239 done
8240 IFS=$ac_save_IFS
8245 # Library directories
8247 ac_save_IFS=$IFS
8248 IFS="${IFS}${PATH_SEPARATOR}"
8249 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
8250 for dir in $LIBRARY_DIRS $SRCH_LIB; do
8251 if test -d "$dir"; then
8252 LIBDIRS="$LIBDIRS -L$dir"
8253 else
8254 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
8255 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
8257 done
8258 IFS=$ac_save_IFS
8261 # Enable thread-safe client libraries
8263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
8264 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
8267 # Check whether --enable-thread-safety was given.
8268 if test "${enable_thread_safety+set}" = set; then :
8269 enableval=$enable_thread_safety;
8270 case $enableval in
8271 yes)
8278 as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
8280 esac
8282 else
8283 enable_thread_safety=yes
8288 if test "$enable_thread_safety" = yes; then
8290 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
8293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
8294 $as_echo "$enable_thread_safety" >&6; }
8298 # ICU
8300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
8301 $as_echo_n "checking whether to build with ICU support... " >&6; }
8305 # Check whether --with-icu was given.
8306 if test "${with_icu+set}" = set; then :
8307 withval=$with_icu;
8308 case $withval in
8309 yes)
8311 $as_echo "#define USE_ICU 1" >>confdefs.h
8318 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
8320 esac
8322 else
8323 with_icu=no
8328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
8329 $as_echo "$with_icu" >&6; }
8332 if test "$with_icu" = yes; then
8334 pkg_failed=no
8335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
8336 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
8338 if test -n "$ICU_CFLAGS"; then
8339 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
8340 elif test -n "$PKG_CONFIG"; then
8341 if test -n "$PKG_CONFIG" && \
8342 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8343 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8344 ac_status=$?
8345 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8346 test $ac_status = 0; }; then
8347 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
8348 test "x$?" != "x0" && pkg_failed=yes
8349 else
8350 pkg_failed=yes
8352 else
8353 pkg_failed=untried
8355 if test -n "$ICU_LIBS"; then
8356 pkg_cv_ICU_LIBS="$ICU_LIBS"
8357 elif test -n "$PKG_CONFIG"; then
8358 if test -n "$PKG_CONFIG" && \
8359 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8360 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8361 ac_status=$?
8362 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8363 test $ac_status = 0; }; then
8364 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
8365 test "x$?" != "x0" && pkg_failed=yes
8366 else
8367 pkg_failed=yes
8369 else
8370 pkg_failed=untried
8375 if test $pkg_failed = yes; then
8376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8377 $as_echo "no" >&6; }
8379 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8380 _pkg_short_errors_supported=yes
8381 else
8382 _pkg_short_errors_supported=no
8384 if test $_pkg_short_errors_supported = yes; then
8385 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8386 else
8387 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8389 # Put the nasty error message in config.log where it belongs
8390 echo "$ICU_PKG_ERRORS" >&5
8392 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
8394 $ICU_PKG_ERRORS
8396 Consider adjusting the PKG_CONFIG_PATH environment variable if you
8397 installed software in a non-standard prefix.
8399 Alternatively, you may set the environment variables ICU_CFLAGS
8400 and ICU_LIBS to avoid the need to call pkg-config.
8401 See the pkg-config man page for more details." "$LINENO" 5
8402 elif test $pkg_failed = untried; then
8403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8404 $as_echo "no" >&6; }
8405 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8406 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8407 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
8408 is in your PATH or set the PKG_CONFIG environment variable to the full
8409 path to pkg-config.
8411 Alternatively, you may set the environment variables ICU_CFLAGS
8412 and ICU_LIBS to avoid the need to call pkg-config.
8413 See the pkg-config man page for more details.
8415 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
8416 See \`config.log' for more details" "$LINENO" 5; }
8417 else
8418 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
8419 ICU_LIBS=$pkg_cv_ICU_LIBS
8420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8421 $as_echo "yes" >&6; }
8427 # Optionally build Tcl modules (PL/Tcl)
8429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
8430 $as_echo_n "checking whether to build with Tcl... " >&6; }
8434 # Check whether --with-tcl was given.
8435 if test "${with_tcl+set}" = set; then :
8436 withval=$with_tcl;
8437 case $withval in
8438 yes)
8445 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
8447 esac
8449 else
8450 with_tcl=no
8455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
8456 $as_echo "$with_tcl" >&6; }
8459 # We see if the path to the Tcl/Tk configuration scripts is specified.
8460 # This will override the use of tclsh to find the paths to search.
8465 # Check whether --with-tclconfig was given.
8466 if test "${with_tclconfig+set}" = set; then :
8467 withval=$with_tclconfig;
8468 case $withval in
8469 yes)
8470 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8473 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8478 esac
8485 # Optionally build Perl modules (PL/Perl)
8487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
8488 $as_echo_n "checking whether to build Perl modules... " >&6; }
8492 # Check whether --with-perl was given.
8493 if test "${with_perl+set}" = set; then :
8494 withval=$with_perl;
8495 case $withval in
8496 yes)
8503 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
8505 esac
8507 else
8508 with_perl=no
8513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
8514 $as_echo "$with_perl" >&6; }
8518 # Optionally build Python modules (PL/Python)
8520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
8521 $as_echo_n "checking whether to build Python modules... " >&6; }
8525 # Check whether --with-python was given.
8526 if test "${with_python+set}" = set; then :
8527 withval=$with_python;
8528 case $withval in
8529 yes)
8536 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
8538 esac
8540 else
8541 with_python=no
8546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8547 $as_echo "$with_python" >&6; }
8551 # GSSAPI
8553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
8554 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
8558 # Check whether --with-gssapi was given.
8559 if test "${with_gssapi+set}" = set; then :
8560 withval=$with_gssapi;
8561 case $withval in
8562 yes)
8565 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
8567 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
8574 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
8576 esac
8578 else
8579 with_gssapi=no
8584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8585 $as_echo "$with_gssapi" >&6; }
8593 # Kerberos configuration parameters
8598 # Check whether --with-krb-srvnam was given.
8599 if test "${with_krb_srvnam+set}" = set; then :
8600 withval=$with_krb_srvnam;
8601 case $withval in
8602 yes)
8603 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8606 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8611 esac
8613 else
8614 with_krb_srvnam="postgres"
8620 cat >>confdefs.h <<_ACEOF
8621 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8622 _ACEOF
8627 # PAM
8629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8630 $as_echo_n "checking whether to build with PAM support... " >&6; }
8634 # Check whether --with-pam was given.
8635 if test "${with_pam+set}" = set; then :
8636 withval=$with_pam;
8637 case $withval in
8638 yes)
8640 $as_echo "#define USE_PAM 1" >>confdefs.h
8647 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8649 esac
8651 else
8652 with_pam=no
8657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8658 $as_echo "$with_pam" >&6; }
8662 # BSD AUTH
8664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8665 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8669 # Check whether --with-bsd-auth was given.
8670 if test "${with_bsd_auth+set}" = set; then :
8671 withval=$with_bsd_auth;
8672 case $withval in
8673 yes)
8675 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8682 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8684 esac
8686 else
8687 with_bsd_auth=no
8692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8693 $as_echo "$with_bsd_auth" >&6; }
8697 # LDAP
8699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8700 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8704 # Check whether --with-ldap was given.
8705 if test "${with_ldap+set}" = set; then :
8706 withval=$with_ldap;
8707 case $withval in
8708 yes)
8710 $as_echo "#define USE_LDAP 1" >>confdefs.h
8717 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8719 esac
8721 else
8722 with_ldap=no
8727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8728 $as_echo "$with_ldap" >&6; }
8733 # Bonjour
8735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8736 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8740 # Check whether --with-bonjour was given.
8741 if test "${with_bonjour+set}" = set; then :
8742 withval=$with_bonjour;
8743 case $withval in
8744 yes)
8746 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8753 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8755 esac
8757 else
8758 with_bonjour=no
8763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8764 $as_echo "$with_bonjour" >&6; }
8768 # SELinux
8770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8771 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8775 # Check whether --with-selinux was given.
8776 if test "${with_selinux+set}" = set; then :
8777 withval=$with_selinux;
8778 case $withval in
8779 yes)
8786 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8788 esac
8790 else
8791 with_selinux=no
8797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8798 $as_echo "$with_selinux" >&6; }
8801 # Systemd
8803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8804 $as_echo_n "checking whether to build with systemd support... " >&6; }
8808 # Check whether --with-systemd was given.
8809 if test "${with_systemd+set}" = set; then :
8810 withval=$with_systemd;
8811 case $withval in
8812 yes)
8814 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8821 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8823 esac
8825 else
8826 with_systemd=no
8832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8833 $as_echo "$with_systemd" >&6; }
8836 # Readline
8841 # Check whether --with-readline was given.
8842 if test "${with_readline+set}" = set; then :
8843 withval=$with_readline;
8844 case $withval in
8845 yes)
8852 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8854 esac
8856 else
8857 with_readline=yes
8862 # readline on MinGW has problems with backslashes in psql and other bugs.
8863 # This is particularly a problem with non-US code pages.
8864 # Therefore disable its use until we understand the cause. 2004-07-20
8865 if test "$PORTNAME" = "win32"; then
8866 if test "$with_readline" = yes; then
8867 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8868 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8869 with_readline=no
8876 # Prefer libedit
8881 # Check whether --with-libedit-preferred was given.
8882 if test "${with_libedit_preferred+set}" = set; then :
8883 withval=$with_libedit_preferred;
8884 case $withval in
8885 yes)
8892 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8894 esac
8896 else
8897 with_libedit_preferred=no
8905 # UUID library
8907 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8908 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8909 # UUID library. More than one of these might be present on a given platform,
8910 # so we make the user say which one she wants.
8915 # Check whether --with-uuid was given.
8916 if test "${with_uuid+set}" = set; then :
8917 withval=$with_uuid;
8918 case $withval in
8919 yes)
8920 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8923 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8928 esac
8933 if test x"$with_uuid" = x"" ; then
8934 with_uuid=no
8939 # Check whether --with-ossp-uuid was given.
8940 if test "${with_ossp_uuid+set}" = set; then :
8941 withval=$with_ossp_uuid;
8942 case $withval in
8943 yes)
8950 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8952 esac
8954 else
8955 with_ossp_uuid=no
8960 if test "$with_ossp_uuid" = yes ; then
8961 with_uuid=ossp
8964 if test "$with_uuid" != no ; then
8965 if test "$with_uuid" = bsd ; then
8967 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8969 elif test "$with_uuid" = e2fs ; then
8971 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8973 elif test "$with_uuid" = ossp ; then
8975 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8977 else
8978 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8985 # XML
8987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
8988 $as_echo_n "checking whether to build with XML support... " >&6; }
8992 # Check whether --with-libxml was given.
8993 if test "${with_libxml+set}" = set; then :
8994 withval=$with_libxml;
8995 case $withval in
8996 yes)
8998 $as_echo "#define USE_LIBXML 1" >>confdefs.h
9005 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
9007 esac
9009 else
9010 with_libxml=no
9015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
9016 $as_echo "$with_libxml" >&6; }
9019 if test "$with_libxml" = yes ; then
9020 # Check pkg-config, then xml2-config. But for backwards compatibility,
9021 # setting XML2_CONFIG overrides pkg-config.
9022 have_libxml2_pkg_config=no
9023 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
9025 pkg_failed=no
9026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
9027 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
9029 if test -n "$XML2_CFLAGS"; then
9030 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
9031 elif test -n "$PKG_CONFIG"; then
9032 if test -n "$PKG_CONFIG" && \
9033 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
9034 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
9035 ac_status=$?
9036 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9037 test $ac_status = 0; }; then
9038 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
9039 test "x$?" != "x0" && pkg_failed=yes
9040 else
9041 pkg_failed=yes
9043 else
9044 pkg_failed=untried
9046 if test -n "$XML2_LIBS"; then
9047 pkg_cv_XML2_LIBS="$XML2_LIBS"
9048 elif test -n "$PKG_CONFIG"; then
9049 if test -n "$PKG_CONFIG" && \
9050 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
9051 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
9052 ac_status=$?
9053 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9054 test $ac_status = 0; }; then
9055 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
9056 test "x$?" != "x0" && pkg_failed=yes
9057 else
9058 pkg_failed=yes
9060 else
9061 pkg_failed=untried
9066 if test $pkg_failed = yes; then
9067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9068 $as_echo "no" >&6; }
9070 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9071 _pkg_short_errors_supported=yes
9072 else
9073 _pkg_short_errors_supported=no
9075 if test $_pkg_short_errors_supported = yes; then
9076 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
9077 else
9078 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
9080 # Put the nasty error message in config.log where it belongs
9081 echo "$XML2_PKG_ERRORS" >&5
9083 # do nothing
9084 elif test $pkg_failed = untried; then
9085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9086 $as_echo "no" >&6; }
9087 # do nothing
9088 else
9089 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
9090 XML2_LIBS=$pkg_cv_XML2_LIBS
9091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9092 $as_echo "yes" >&6; }
9093 have_libxml2_pkg_config=yes
9096 if test "$have_libxml2_pkg_config" = no ; then
9097 if test -z "$XML2_CONFIG"; then
9098 for ac_prog in xml2-config
9100 # Extract the first word of "$ac_prog", so it can be a program name with args.
9101 set dummy $ac_prog; ac_word=$2
9102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9103 $as_echo_n "checking for $ac_word... " >&6; }
9104 if ${ac_cv_path_XML2_CONFIG+:} false; then :
9105 $as_echo_n "(cached) " >&6
9106 else
9107 case $XML2_CONFIG in
9108 [\\/]* | ?:[\\/]*)
9109 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
9112 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9113 for as_dir in $PATH
9115 IFS=$as_save_IFS
9116 test -z "$as_dir" && as_dir=.
9117 for ac_exec_ext in '' $ac_executable_extensions; do
9118 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9119 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9120 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9121 break 2
9123 done
9124 done
9125 IFS=$as_save_IFS
9128 esac
9130 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
9131 if test -n "$XML2_CONFIG"; then
9132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
9133 $as_echo "$XML2_CONFIG" >&6; }
9134 else
9135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9136 $as_echo "no" >&6; }
9140 test -n "$XML2_CONFIG" && break
9141 done
9143 else
9144 # Report the value of XML2_CONFIG in configure's output in all cases.
9145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
9146 $as_echo_n "checking for XML2_CONFIG... " >&6; }
9147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
9148 $as_echo "$XML2_CONFIG" >&6; }
9151 if test -n "$XML2_CONFIG"; then
9152 XML2_CFLAGS=`$XML2_CONFIG --cflags`
9153 XML2_LIBS=`$XML2_CONFIG --libs`
9156 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
9157 for pgac_option in $XML2_CFLAGS; do
9158 case $pgac_option in
9159 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9160 esac
9161 done
9162 for pgac_option in $XML2_LIBS; do
9163 case $pgac_option in
9164 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9165 esac
9166 done
9171 # XSLT
9176 # Check whether --with-libxslt was given.
9177 if test "${with_libxslt+set}" = set; then :
9178 withval=$with_libxslt;
9179 case $withval in
9180 yes)
9182 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
9189 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
9191 esac
9193 else
9194 with_libxslt=no
9204 # tzdata
9209 # Check whether --with-system-tzdata was given.
9210 if test "${with_system_tzdata+set}" = set; then :
9211 withval=$with_system_tzdata;
9212 case $withval in
9213 yes)
9214 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
9217 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
9222 esac
9230 # Zlib
9235 # Check whether --with-zlib was given.
9236 if test "${with_zlib+set}" = set; then :
9237 withval=$with_zlib;
9238 case $withval in
9239 yes)
9246 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
9248 esac
9250 else
9251 with_zlib=yes
9259 # LZ4
9261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
9262 $as_echo_n "checking whether to build with LZ4 support... " >&6; }
9266 # Check whether --with-lz4 was given.
9267 if test "${with_lz4+set}" = set; then :
9268 withval=$with_lz4;
9269 case $withval in
9270 yes)
9272 $as_echo "#define USE_LZ4 1" >>confdefs.h
9279 as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
9281 esac
9283 else
9284 with_lz4=no
9289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
9290 $as_echo "$with_lz4" >&6; }
9293 if test "$with_lz4" = yes; then
9295 pkg_failed=no
9296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
9297 $as_echo_n "checking for liblz4... " >&6; }
9299 if test -n "$LZ4_CFLAGS"; then
9300 pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
9301 elif test -n "$PKG_CONFIG"; then
9302 if test -n "$PKG_CONFIG" && \
9303 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9304 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9305 ac_status=$?
9306 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9307 test $ac_status = 0; }; then
9308 pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
9309 test "x$?" != "x0" && pkg_failed=yes
9310 else
9311 pkg_failed=yes
9313 else
9314 pkg_failed=untried
9316 if test -n "$LZ4_LIBS"; then
9317 pkg_cv_LZ4_LIBS="$LZ4_LIBS"
9318 elif test -n "$PKG_CONFIG"; then
9319 if test -n "$PKG_CONFIG" && \
9320 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9321 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9322 ac_status=$?
9323 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9324 test $ac_status = 0; }; then
9325 pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
9326 test "x$?" != "x0" && pkg_failed=yes
9327 else
9328 pkg_failed=yes
9330 else
9331 pkg_failed=untried
9336 if test $pkg_failed = yes; then
9337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9338 $as_echo "no" >&6; }
9340 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9341 _pkg_short_errors_supported=yes
9342 else
9343 _pkg_short_errors_supported=no
9345 if test $_pkg_short_errors_supported = yes; then
9346 LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
9347 else
9348 LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
9350 # Put the nasty error message in config.log where it belongs
9351 echo "$LZ4_PKG_ERRORS" >&5
9353 as_fn_error $? "Package requirements (liblz4) were not met:
9355 $LZ4_PKG_ERRORS
9357 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9358 installed software in a non-standard prefix.
9360 Alternatively, you may set the environment variables LZ4_CFLAGS
9361 and LZ4_LIBS to avoid the need to call pkg-config.
9362 See the pkg-config man page for more details." "$LINENO" 5
9363 elif test $pkg_failed = untried; then
9364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9365 $as_echo "no" >&6; }
9366 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9367 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9368 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9369 is in your PATH or set the PKG_CONFIG environment variable to the full
9370 path to pkg-config.
9372 Alternatively, you may set the environment variables LZ4_CFLAGS
9373 and LZ4_LIBS to avoid the need to call pkg-config.
9374 See the pkg-config man page for more details.
9376 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9377 See \`config.log' for more details" "$LINENO" 5; }
9378 else
9379 LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
9380 LZ4_LIBS=$pkg_cv_LZ4_LIBS
9381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9382 $as_echo "yes" >&6; }
9385 # We only care about -I, -D, and -L switches;
9386 # note that -llz4 will be added by AC_CHECK_LIB below.
9387 for pgac_option in $LZ4_CFLAGS; do
9388 case $pgac_option in
9389 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9390 esac
9391 done
9392 for pgac_option in $LZ4_LIBS; do
9393 case $pgac_option in
9394 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9395 esac
9396 done
9400 # ZSTD
9402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ZSTD support" >&5
9403 $as_echo_n "checking whether to build with ZSTD support... " >&6; }
9407 # Check whether --with-zstd was given.
9408 if test "${with_zstd+set}" = set; then :
9409 withval=$with_zstd;
9410 case $withval in
9411 yes)
9413 $as_echo "#define USE_ZSTD 1" >>confdefs.h
9420 as_fn_error $? "no argument expected for --with-zstd option" "$LINENO" 5
9422 esac
9424 else
9425 with_zstd=no
9430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_zstd" >&5
9431 $as_echo "$with_zstd" >&6; }
9434 if test "$with_zstd" = yes; then
9436 pkg_failed=no
9437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd >= 1.4.0" >&5
9438 $as_echo_n "checking for libzstd >= 1.4.0... " >&6; }
9440 if test -n "$ZSTD_CFLAGS"; then
9441 pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
9442 elif test -n "$PKG_CONFIG"; then
9443 if test -n "$PKG_CONFIG" && \
9444 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9445 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9446 ac_status=$?
9447 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9448 test $ac_status = 0; }; then
9449 pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd >= 1.4.0" 2>/dev/null`
9450 test "x$?" != "x0" && pkg_failed=yes
9451 else
9452 pkg_failed=yes
9454 else
9455 pkg_failed=untried
9457 if test -n "$ZSTD_LIBS"; then
9458 pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
9459 elif test -n "$PKG_CONFIG"; then
9460 if test -n "$PKG_CONFIG" && \
9461 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9462 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9463 ac_status=$?
9464 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9465 test $ac_status = 0; }; then
9466 pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd >= 1.4.0" 2>/dev/null`
9467 test "x$?" != "x0" && pkg_failed=yes
9468 else
9469 pkg_failed=yes
9471 else
9472 pkg_failed=untried
9477 if test $pkg_failed = yes; then
9478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9479 $as_echo "no" >&6; }
9481 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9482 _pkg_short_errors_supported=yes
9483 else
9484 _pkg_short_errors_supported=no
9486 if test $_pkg_short_errors_supported = yes; then
9487 ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9488 else
9489 ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9491 # Put the nasty error message in config.log where it belongs
9492 echo "$ZSTD_PKG_ERRORS" >&5
9494 as_fn_error $? "Package requirements (libzstd >= 1.4.0) were not met:
9496 $ZSTD_PKG_ERRORS
9498 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9499 installed software in a non-standard prefix.
9501 Alternatively, you may set the environment variables ZSTD_CFLAGS
9502 and ZSTD_LIBS to avoid the need to call pkg-config.
9503 See the pkg-config man page for more details." "$LINENO" 5
9504 elif test $pkg_failed = untried; then
9505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9506 $as_echo "no" >&6; }
9507 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9508 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9509 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9510 is in your PATH or set the PKG_CONFIG environment variable to the full
9511 path to pkg-config.
9513 Alternatively, you may set the environment variables ZSTD_CFLAGS
9514 and ZSTD_LIBS to avoid the need to call pkg-config.
9515 See the pkg-config man page for more details.
9517 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9518 See \`config.log' for more details" "$LINENO" 5; }
9519 else
9520 ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
9521 ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
9522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9523 $as_echo "yes" >&6; }
9526 # We only care about -I, -D, and -L switches;
9527 # note that -lzstd will be added by AC_CHECK_LIB below.
9528 for pgac_option in $ZSTD_CFLAGS; do
9529 case $pgac_option in
9530 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9531 esac
9532 done
9533 for pgac_option in $ZSTD_LIBS; do
9534 case $pgac_option in
9535 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9536 esac
9537 done
9540 # Assignments
9543 CPPFLAGS="$CPPFLAGS $INCLUDES"
9544 LDFLAGS="$LDFLAGS $LIBDIRS"
9550 # Check whether --with-gnu-ld was given.
9551 if test "${with_gnu_ld+set}" = set; then :
9552 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
9553 else
9554 with_gnu_ld=no
9557 ac_prog=ld
9558 if test "$GCC" = yes; then
9559 # Check if gcc -print-prog-name=ld gives a path.
9560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
9561 $as_echo_n "checking for ld used by GCC... " >&6; }
9562 case $host in
9563 *-*-mingw*)
9564 # gcc leaves a trailing carriage return which upsets mingw
9565 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
9567 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
9568 esac
9569 case "$ac_prog" in
9570 # Accept absolute paths.
9571 [\\/]* | [A-Za-z]:[\\/]*)
9572 re_direlt='/[^/][^/]*/\.\./'
9573 # Canonicalize the path of ld
9574 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
9575 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
9576 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
9577 done
9578 test -z "$LD" && LD="$ac_prog"
9581 # If it fails, then pretend we aren't using GCC.
9582 ac_prog=ld
9585 # If it is relative, then search for the first ld in PATH.
9586 with_gnu_ld=unknown
9588 esac
9589 elif test "$with_gnu_ld" = yes; then
9590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
9591 $as_echo_n "checking for GNU ld... " >&6; }
9592 else
9593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9594 $as_echo_n "checking for non-GNU ld... " >&6; }
9596 if ${ac_cv_path_LD+:} false; then :
9597 $as_echo_n "(cached) " >&6
9598 else
9599 if test -z "$LD"; then
9600 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
9601 for ac_dir in $PATH; do
9602 test -z "$ac_dir" && ac_dir=.
9603 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9604 ac_cv_path_LD="$ac_dir/$ac_prog"
9605 # Check to see if the program is GNU ld. I'd rather use --version,
9606 # but apparently some GNU ld's only accept -v.
9607 # Break only if it was the GNU/non-GNU ld that we prefer.
9608 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
9609 test "$with_gnu_ld" != no && break
9610 else
9611 test "$with_gnu_ld" != yes && break
9614 done
9615 IFS="$ac_save_ifs"
9616 else
9617 ac_cv_path_LD="$LD" # Let the user override the test with a path.
9621 LD="$ac_cv_path_LD"
9622 if test -n "$LD"; then
9623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9624 $as_echo "$LD" >&6; }
9625 else
9626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9627 $as_echo "no" >&6; }
9629 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
9630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9631 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9632 if ${ac_cv_prog_gnu_ld+:} false; then :
9633 $as_echo_n "(cached) " >&6
9634 else
9635 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
9636 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
9637 ac_cv_prog_gnu_ld=yes
9638 else
9639 ac_cv_prog_gnu_ld=no
9642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
9643 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
9644 with_gnu_ld=$ac_cv_prog_gnu_ld
9650 if test -n "$ac_tool_prefix"; then
9651 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9652 set dummy ${ac_tool_prefix}strip; ac_word=$2
9653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9654 $as_echo_n "checking for $ac_word... " >&6; }
9655 if ${ac_cv_prog_STRIP+:} false; then :
9656 $as_echo_n "(cached) " >&6
9657 else
9658 if test -n "$STRIP"; then
9659 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9660 else
9661 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9662 for as_dir in $PATH
9664 IFS=$as_save_IFS
9665 test -z "$as_dir" && as_dir=.
9666 for ac_exec_ext in '' $ac_executable_extensions; do
9667 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9668 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9669 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9670 break 2
9672 done
9673 done
9674 IFS=$as_save_IFS
9678 STRIP=$ac_cv_prog_STRIP
9679 if test -n "$STRIP"; then
9680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9681 $as_echo "$STRIP" >&6; }
9682 else
9683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9684 $as_echo "no" >&6; }
9689 if test -z "$ac_cv_prog_STRIP"; then
9690 ac_ct_STRIP=$STRIP
9691 # Extract the first word of "strip", so it can be a program name with args.
9692 set dummy strip; ac_word=$2
9693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9694 $as_echo_n "checking for $ac_word... " >&6; }
9695 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9696 $as_echo_n "(cached) " >&6
9697 else
9698 if test -n "$ac_ct_STRIP"; then
9699 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9700 else
9701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9702 for as_dir in $PATH
9704 IFS=$as_save_IFS
9705 test -z "$as_dir" && as_dir=.
9706 for ac_exec_ext in '' $ac_executable_extensions; do
9707 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9708 ac_cv_prog_ac_ct_STRIP="strip"
9709 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9710 break 2
9712 done
9713 done
9714 IFS=$as_save_IFS
9718 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9719 if test -n "$ac_ct_STRIP"; then
9720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9721 $as_echo "$ac_ct_STRIP" >&6; }
9722 else
9723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9724 $as_echo "no" >&6; }
9727 if test "x$ac_ct_STRIP" = x; then
9728 STRIP=":"
9729 else
9730 case $cross_compiling:$ac_tool_warned in
9731 yes:)
9732 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9733 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9734 ac_tool_warned=yes ;;
9735 esac
9736 STRIP=$ac_ct_STRIP
9738 else
9739 STRIP="$ac_cv_prog_STRIP"
9743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9744 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9745 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9746 STRIP_STATIC_LIB="$STRIP -x"
9747 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9749 $as_echo "yes" >&6; }
9750 else
9751 case $host_os in
9752 darwin*)
9753 STRIP="$STRIP -x"
9754 STRIP_STATIC_LIB=$STRIP
9755 STRIP_SHARED_LIB=$STRIP
9756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9757 $as_echo "yes" >&6; }
9760 STRIP_STATIC_LIB=:
9761 STRIP_SHARED_LIB=:
9762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9763 $as_echo "no" >&6; }
9765 esac
9770 if test -n "$ac_tool_prefix"; then
9771 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9772 set dummy ${ac_tool_prefix}ar; ac_word=$2
9773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9774 $as_echo_n "checking for $ac_word... " >&6; }
9775 if ${ac_cv_prog_AR+:} false; then :
9776 $as_echo_n "(cached) " >&6
9777 else
9778 if test -n "$AR"; then
9779 ac_cv_prog_AR="$AR" # Let the user override the test.
9780 else
9781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9782 for as_dir in $PATH
9784 IFS=$as_save_IFS
9785 test -z "$as_dir" && as_dir=.
9786 for ac_exec_ext in '' $ac_executable_extensions; do
9787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9788 ac_cv_prog_AR="${ac_tool_prefix}ar"
9789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9790 break 2
9792 done
9793 done
9794 IFS=$as_save_IFS
9798 AR=$ac_cv_prog_AR
9799 if test -n "$AR"; then
9800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9801 $as_echo "$AR" >&6; }
9802 else
9803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9804 $as_echo "no" >&6; }
9809 if test -z "$ac_cv_prog_AR"; then
9810 ac_ct_AR=$AR
9811 # Extract the first word of "ar", so it can be a program name with args.
9812 set dummy ar; ac_word=$2
9813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9814 $as_echo_n "checking for $ac_word... " >&6; }
9815 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9816 $as_echo_n "(cached) " >&6
9817 else
9818 if test -n "$ac_ct_AR"; then
9819 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9820 else
9821 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9822 for as_dir in $PATH
9824 IFS=$as_save_IFS
9825 test -z "$as_dir" && as_dir=.
9826 for ac_exec_ext in '' $ac_executable_extensions; do
9827 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9828 ac_cv_prog_ac_ct_AR="ar"
9829 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9830 break 2
9832 done
9833 done
9834 IFS=$as_save_IFS
9838 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9839 if test -n "$ac_ct_AR"; then
9840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9841 $as_echo "$ac_ct_AR" >&6; }
9842 else
9843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9844 $as_echo "no" >&6; }
9847 if test "x$ac_ct_AR" = x; then
9848 AR="ar"
9849 else
9850 case $cross_compiling:$ac_tool_warned in
9851 yes:)
9852 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9853 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9854 ac_tool_warned=yes ;;
9855 esac
9856 AR=$ac_ct_AR
9858 else
9859 AR="$ac_cv_prog_AR"
9862 if test "$PORTNAME" = "win32"; then
9863 if test -n "$ac_tool_prefix"; then
9864 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9865 set dummy ${ac_tool_prefix}windres; ac_word=$2
9866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9867 $as_echo_n "checking for $ac_word... " >&6; }
9868 if ${ac_cv_prog_WINDRES+:} false; then :
9869 $as_echo_n "(cached) " >&6
9870 else
9871 if test -n "$WINDRES"; then
9872 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9873 else
9874 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9875 for as_dir in $PATH
9877 IFS=$as_save_IFS
9878 test -z "$as_dir" && as_dir=.
9879 for ac_exec_ext in '' $ac_executable_extensions; do
9880 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9881 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9882 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9883 break 2
9885 done
9886 done
9887 IFS=$as_save_IFS
9891 WINDRES=$ac_cv_prog_WINDRES
9892 if test -n "$WINDRES"; then
9893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9894 $as_echo "$WINDRES" >&6; }
9895 else
9896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9897 $as_echo "no" >&6; }
9902 if test -z "$ac_cv_prog_WINDRES"; then
9903 ac_ct_WINDRES=$WINDRES
9904 # Extract the first word of "windres", so it can be a program name with args.
9905 set dummy windres; ac_word=$2
9906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9907 $as_echo_n "checking for $ac_word... " >&6; }
9908 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9909 $as_echo_n "(cached) " >&6
9910 else
9911 if test -n "$ac_ct_WINDRES"; then
9912 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9913 else
9914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9915 for as_dir in $PATH
9917 IFS=$as_save_IFS
9918 test -z "$as_dir" && as_dir=.
9919 for ac_exec_ext in '' $ac_executable_extensions; do
9920 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9921 ac_cv_prog_ac_ct_WINDRES="windres"
9922 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9923 break 2
9925 done
9926 done
9927 IFS=$as_save_IFS
9931 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9932 if test -n "$ac_ct_WINDRES"; then
9933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9934 $as_echo "$ac_ct_WINDRES" >&6; }
9935 else
9936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9937 $as_echo "no" >&6; }
9940 if test "x$ac_ct_WINDRES" = x; then
9941 WINDRES="windres"
9942 else
9943 case $cross_compiling:$ac_tool_warned in
9944 yes:)
9945 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9946 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9947 ac_tool_warned=yes ;;
9948 esac
9949 WINDRES=$ac_ct_WINDRES
9951 else
9952 WINDRES="$ac_cv_prog_WINDRES"
9957 # Find a good install program. We prefer a C program (faster),
9958 # so one script is as good as another. But avoid the broken or
9959 # incompatible versions:
9960 # SysV /etc/install, /usr/sbin/install
9961 # SunOS /usr/etc/install
9962 # IRIX /sbin/install
9963 # AIX /bin/install
9964 # AmigaOS /C/install, which installs bootblocks on floppy discs
9965 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9966 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9967 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9968 # OS/2's system install, which has a completely different semantic
9969 # ./install, which can be erroneously created by make from ./install.sh.
9970 # Reject install programs that cannot install multiple files.
9971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9972 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9973 if test -z "$INSTALL"; then
9974 if ${ac_cv_path_install+:} false; then :
9975 $as_echo_n "(cached) " >&6
9976 else
9977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9978 for as_dir in $PATH
9980 IFS=$as_save_IFS
9981 test -z "$as_dir" && as_dir=.
9982 # Account for people who put trailing slashes in PATH elements.
9983 case $as_dir/ in #((
9984 ./ | .// | /[cC]/* | \
9985 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9986 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9987 /usr/ucb/* ) ;;
9989 # OSF1 and SCO ODT 3.0 have their own names for install.
9990 # Don't use installbsd from OSF since it installs stuff as root
9991 # by default.
9992 for ac_prog in ginstall scoinst install; do
9993 for ac_exec_ext in '' $ac_executable_extensions; do
9994 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9995 if test $ac_prog = install &&
9996 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9997 # AIX install. It has an incompatible calling convention.
9999 elif test $ac_prog = install &&
10000 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
10001 # program-specific install script used by HP pwplus--don't use.
10003 else
10004 rm -rf conftest.one conftest.two conftest.dir
10005 echo one > conftest.one
10006 echo two > conftest.two
10007 mkdir conftest.dir
10008 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
10009 test -s conftest.one && test -s conftest.two &&
10010 test -s conftest.dir/conftest.one &&
10011 test -s conftest.dir/conftest.two
10012 then
10013 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
10014 break 3
10018 done
10019 done
10021 esac
10023 done
10024 IFS=$as_save_IFS
10026 rm -rf conftest.one conftest.two conftest.dir
10029 if test "${ac_cv_path_install+set}" = set; then
10030 INSTALL=$ac_cv_path_install
10031 else
10032 # As a last resort, use the slow shell script. Don't cache a
10033 # value for INSTALL within a source directory, because that will
10034 # break other packages using the cache if that directory is
10035 # removed, or if the value is a relative name.
10036 INSTALL=$ac_install_sh
10039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
10040 $as_echo "$INSTALL" >&6; }
10042 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
10043 # It thinks the first close brace ends the variable substitution.
10044 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
10046 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
10048 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
10050 # When Autoconf chooses install-sh as install program it tries to generate
10051 # a relative path to it in each makefile where it substitutes it. This clashes
10052 # with our Makefile.global concept. This workaround helps.
10053 case $INSTALL in
10054 *install-sh*) install_bin='';;
10055 *) install_bin=$INSTALL;;
10056 esac
10059 if test -z "$TAR"; then
10060 for ac_prog in tar
10062 # Extract the first word of "$ac_prog", so it can be a program name with args.
10063 set dummy $ac_prog; ac_word=$2
10064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10065 $as_echo_n "checking for $ac_word... " >&6; }
10066 if ${ac_cv_path_TAR+:} false; then :
10067 $as_echo_n "(cached) " >&6
10068 else
10069 case $TAR in
10070 [\\/]* | ?:[\\/]*)
10071 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10074 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10075 for as_dir in $PATH
10077 IFS=$as_save_IFS
10078 test -z "$as_dir" && as_dir=.
10079 for ac_exec_ext in '' $ac_executable_extensions; do
10080 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10081 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10083 break 2
10085 done
10086 done
10087 IFS=$as_save_IFS
10090 esac
10092 TAR=$ac_cv_path_TAR
10093 if test -n "$TAR"; then
10094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10095 $as_echo "$TAR" >&6; }
10096 else
10097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10098 $as_echo "no" >&6; }
10102 test -n "$TAR" && break
10103 done
10105 else
10106 # Report the value of TAR in configure's output in all cases.
10107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10108 $as_echo_n "checking for TAR... " >&6; }
10109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10110 $as_echo "$TAR" >&6; }
10113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
10114 $as_echo_n "checking whether ln -s works... " >&6; }
10115 LN_S=$as_ln_s
10116 if test "$LN_S" = "ln -s"; then
10117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10118 $as_echo "yes" >&6; }
10119 else
10120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
10121 $as_echo "no, using $LN_S" >&6; }
10124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
10125 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
10126 if test -z "$MKDIR_P"; then
10127 if ${ac_cv_path_mkdir+:} false; then :
10128 $as_echo_n "(cached) " >&6
10129 else
10130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10131 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
10133 IFS=$as_save_IFS
10134 test -z "$as_dir" && as_dir=.
10135 for ac_prog in mkdir gmkdir; do
10136 for ac_exec_ext in '' $ac_executable_extensions; do
10137 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
10138 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
10139 'mkdir (GNU coreutils) '* | \
10140 'mkdir (coreutils) '* | \
10141 'mkdir (fileutils) '4.1*)
10142 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
10143 break 3;;
10144 esac
10145 done
10146 done
10147 done
10148 IFS=$as_save_IFS
10152 test -d ./--version && rmdir ./--version
10153 if test "${ac_cv_path_mkdir+set}" = set; then
10154 MKDIR_P="$ac_cv_path_mkdir -p"
10155 else
10156 # As a last resort, use the slow shell script. Don't cache a
10157 # value for MKDIR_P within a source directory, because that will
10158 # break other packages using the cache if that directory is
10159 # removed, or if the value is a relative name.
10160 MKDIR_P="$ac_install_sh -d"
10163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
10164 $as_echo "$MKDIR_P" >&6; }
10166 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
10167 # a relative path to it in each makefile where it substitutes it. This clashes
10168 # with our Makefile.global concept. This workaround helps.
10169 case $MKDIR_P in
10170 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
10171 esac
10173 if test -z "$BISON"; then
10174 for ac_prog in bison
10176 # Extract the first word of "$ac_prog", so it can be a program name with args.
10177 set dummy $ac_prog; ac_word=$2
10178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10179 $as_echo_n "checking for $ac_word... " >&6; }
10180 if ${ac_cv_path_BISON+:} false; then :
10181 $as_echo_n "(cached) " >&6
10182 else
10183 case $BISON in
10184 [\\/]* | ?:[\\/]*)
10185 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
10188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10189 for as_dir in $PATH
10191 IFS=$as_save_IFS
10192 test -z "$as_dir" && as_dir=.
10193 for ac_exec_ext in '' $ac_executable_extensions; do
10194 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10195 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
10196 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10197 break 2
10199 done
10200 done
10201 IFS=$as_save_IFS
10204 esac
10206 BISON=$ac_cv_path_BISON
10207 if test -n "$BISON"; then
10208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10209 $as_echo "$BISON" >&6; }
10210 else
10211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10212 $as_echo "no" >&6; }
10216 test -n "$BISON" && break
10217 done
10219 else
10220 # Report the value of BISON in configure's output in all cases.
10221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
10222 $as_echo_n "checking for BISON... " >&6; }
10223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10224 $as_echo "$BISON" >&6; }
10228 if test "$BISON"; then
10229 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
10230 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
10231 $as_echo "$as_me: using $pgac_bison_version" >&6;}
10232 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 2.3) exit 0; else exit 1;}'
10233 then
10234 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10235 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10236 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." >&5
10237 $as_echo "$as_me: WARNING:
10238 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10239 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." >&2;}
10240 BISON=""
10242 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
10243 # of the now preferred %name-prefix "base_yy", but the latter
10244 # doesn't work with Bison 2.3 or less. So for now we silence the
10245 # deprecation warnings.
10246 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
10247 then
10248 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
10252 if test -z "$BISON"; then
10253 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10254 *** Without Bison you will not be able to build PostgreSQL from Git nor
10255 *** change any of the parser definition files. You can obtain Bison from
10256 *** a GNU mirror site. (If you are using the official distribution of
10257 *** PostgreSQL then you do not need to worry about this, because the Bison
10258 *** output is pre-generated.)" >&5
10259 $as_echo "$as_me: WARNING:
10260 *** Without Bison you will not be able to build PostgreSQL from Git nor
10261 *** change any of the parser definition files. You can obtain Bison from
10262 *** a GNU mirror site. (If you are using the official distribution of
10263 *** PostgreSQL then you do not need to worry about this, because the Bison
10264 *** output is pre-generated.)" >&2;}
10268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
10269 $as_echo_n "checking for flex... " >&6; }
10270 if ${pgac_cv_path_flex+:} false; then :
10271 $as_echo_n "(cached) " >&6
10272 else
10273 # Let the user override the test
10274 if test -n "$FLEX"; then
10275 pgac_cv_path_flex=$FLEX
10276 else
10277 pgac_save_IFS=$IFS
10278 IFS=$PATH_SEPARATOR
10279 for pgac_dir in $PATH; do
10280 IFS=$pgac_save_IFS
10281 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
10282 pgac_dir=`pwd`
10284 for pgac_prog in flex lex; do
10285 pgac_candidate="$pgac_dir/$pgac_prog"
10286 if test -f "$pgac_candidate" \
10287 && $pgac_candidate --version </dev/null >/dev/null 2>&1
10288 then
10289 echo '%%' > conftest.l
10290 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
10291 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
10292 if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 == 2 && ($2 > 5 || ($2 == 5 && $3 >= 35))) exit 0; else exit 1;}'
10293 then
10294 pgac_cv_path_flex=$pgac_candidate
10295 break 2
10296 else
10297 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10298 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10299 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." >&5
10300 $as_echo "$as_me: WARNING:
10301 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10302 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." >&2;}
10306 done
10307 done
10308 rm -f conftest.l lex.yy.c
10309 : ${pgac_cv_path_flex=no}
10313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
10314 $as_echo "$pgac_cv_path_flex" >&6; }
10315 if test x"$pgac_cv_path_flex" = x"no"; then
10316 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10317 *** Without Flex you will not be able to build PostgreSQL from Git nor
10318 *** change any of the scanner definition files. You can obtain Flex from
10319 *** a GNU mirror site. (If you are using the official distribution of
10320 *** PostgreSQL then you do not need to worry about this because the Flex
10321 *** output is pre-generated.)" >&5
10322 $as_echo "$as_me: WARNING:
10323 *** Without Flex you will not be able to build PostgreSQL from Git nor
10324 *** change any of the scanner definition files. You can obtain Flex from
10325 *** a GNU mirror site. (If you are using the official distribution of
10326 *** PostgreSQL then you do not need to worry about this because the Flex
10327 *** output is pre-generated.)" >&2;}
10329 FLEX=
10330 else
10331 FLEX=$pgac_cv_path_flex
10332 pgac_flex_version=`$FLEX --version 2>/dev/null`
10333 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
10334 $as_echo "$as_me: using $pgac_flex_version" >&6;}
10341 if test -z "$PERL"; then
10342 for ac_prog in perl
10344 # Extract the first word of "$ac_prog", so it can be a program name with args.
10345 set dummy $ac_prog; ac_word=$2
10346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10347 $as_echo_n "checking for $ac_word... " >&6; }
10348 if ${ac_cv_path_PERL+:} false; then :
10349 $as_echo_n "(cached) " >&6
10350 else
10351 case $PERL in
10352 [\\/]* | ?:[\\/]*)
10353 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
10356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10357 for as_dir in $PATH
10359 IFS=$as_save_IFS
10360 test -z "$as_dir" && as_dir=.
10361 for ac_exec_ext in '' $ac_executable_extensions; do
10362 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10363 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
10364 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10365 break 2
10367 done
10368 done
10369 IFS=$as_save_IFS
10372 esac
10374 PERL=$ac_cv_path_PERL
10375 if test -n "$PERL"; then
10376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10377 $as_echo "$PERL" >&6; }
10378 else
10379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10380 $as_echo "no" >&6; }
10384 test -n "$PERL" && break
10385 done
10387 else
10388 # Report the value of PERL in configure's output in all cases.
10389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
10390 $as_echo_n "checking for PERL... " >&6; }
10391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10392 $as_echo "$PERL" >&6; }
10396 if test "$PERL"; then
10397 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'`
10398 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
10399 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
10400 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
10401 $AWK '{ if ($1 == 5 && ($2 >= 14)) exit 1; else exit 0;}'
10402 then
10403 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10404 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10405 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." >&5
10406 $as_echo "$as_me: WARNING:
10407 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10408 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." >&2;}
10409 PERL=""
10413 if test -z "$PERL"; then
10414 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10415 *** Without Perl you will not be able to build PostgreSQL from Git.
10416 *** You can obtain Perl from any CPAN mirror site.
10417 *** (If you are using the official distribution of PostgreSQL then you do not
10418 *** need to worry about this, because the Perl output is pre-generated.)" >&5
10419 $as_echo "$as_me: WARNING:
10420 *** Without Perl you will not be able to build PostgreSQL from Git.
10421 *** You can obtain Perl from any CPAN mirror site.
10422 *** (If you are using the official distribution of PostgreSQL then you do not
10423 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
10426 if test "$with_perl" = yes; then
10427 if test -z "$PERL"; then
10428 as_fn_error $? "Perl not found" "$LINENO" 5
10431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
10432 $as_echo_n "checking for Perl archlibexp... " >&6; }
10433 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
10434 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
10435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
10436 $as_echo "$perl_archlibexp" >&6; }
10437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
10438 $as_echo_n "checking for Perl privlibexp... " >&6; }
10439 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
10440 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
10441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
10442 $as_echo "$perl_privlibexp" >&6; }
10443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
10444 $as_echo_n "checking for Perl useshrplib... " >&6; }
10445 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
10446 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
10447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
10448 $as_echo "$perl_useshrplib" >&6; }
10449 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
10450 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
10451 You might have to rebuild your Perl installation. Refer to the
10452 documentation for details. Use --without-perl to disable building
10453 PL/Perl." "$LINENO" 5
10455 # On most platforms, archlibexp is also where the Perl include files live ...
10456 perl_includespec="-I$perl_archlibexp/CORE"
10457 # ... but on newer macOS versions, we must use -iwithsysroot to look
10458 # under $PG_SYSROOT
10459 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
10460 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
10461 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
10465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
10466 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
10467 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10469 $as_echo "$perl_ccflags" >&6; }
10470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10471 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10472 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10474 $as_echo "$perl_embed_ccflags" >&6; }
10477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10478 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10479 if test "$PORTNAME" = "win32" ; then
10480 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10481 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10482 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10483 else
10484 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10485 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10486 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10489 else
10490 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10491 pgac_tmp2=`$PERL -MConfig -e 'print "$Config{ccdlflags} $Config{ldflags}"'`
10492 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%"`
10494 if test -z "$perl_embed_ldflags" ; then
10495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10496 $as_echo "no" >&6; }
10497 as_fn_error $? "could not determine flags for linking embedded Perl.
10498 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10499 installed." "$LINENO" 5
10500 else
10501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10502 $as_echo "$perl_embed_ldflags" >&6; }
10507 if test "$with_python" = yes; then
10508 if test -z "$PYTHON"; then
10509 for ac_prog in python3 python
10511 # Extract the first word of "$ac_prog", so it can be a program name with args.
10512 set dummy $ac_prog; ac_word=$2
10513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10514 $as_echo_n "checking for $ac_word... " >&6; }
10515 if ${ac_cv_path_PYTHON+:} false; then :
10516 $as_echo_n "(cached) " >&6
10517 else
10518 case $PYTHON in
10519 [\\/]* | ?:[\\/]*)
10520 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10523 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10524 for as_dir in $PATH
10526 IFS=$as_save_IFS
10527 test -z "$as_dir" && as_dir=.
10528 for ac_exec_ext in '' $ac_executable_extensions; do
10529 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10530 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10531 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10532 break 2
10534 done
10535 done
10536 IFS=$as_save_IFS
10539 esac
10541 PYTHON=$ac_cv_path_PYTHON
10542 if test -n "$PYTHON"; then
10543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10544 $as_echo "$PYTHON" >&6; }
10545 else
10546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10547 $as_echo "no" >&6; }
10551 test -n "$PYTHON" && break
10552 done
10554 else
10555 # Report the value of PYTHON in configure's output in all cases.
10556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10557 $as_echo_n "checking for PYTHON... " >&6; }
10558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10559 $as_echo "$PYTHON" >&6; }
10562 if test x"$PYTHON" = x""; then
10563 as_fn_error $? "Python not found" "$LINENO" 5
10567 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10568 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10569 $as_echo "$as_me: using python $python_fullversion" >&6;}
10570 # python_fullversion is typically n.n.n plus some trailing junk
10571 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10572 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10573 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10574 # Reject unsupported Python versions as soon as practical.
10575 if test "$python_majorversion" -lt 3; then
10576 as_fn_error $? "Python version $python_version is too old (version 3 or later is required)" "$LINENO" 5
10579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
10580 $as_echo_n "checking for Python sysconfig module... " >&6; }
10581 if "${PYTHON}" -c 'import sysconfig' 2>&5
10582 then
10583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10584 $as_echo "yes" >&6; }
10585 else
10586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10587 $as_echo "no" >&6; }
10588 as_fn_error $? "sysconfig module not found" "$LINENO" 5
10591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10592 $as_echo_n "checking Python configuration directory... " >&6; }
10593 python_configdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBPL'))))"`
10594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10595 $as_echo "$python_configdir" >&6; }
10597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directory" >&5
10598 $as_echo_n "checking Python include directory... " >&6; }
10599 python_includespec=`${PYTHON} -c "import sysconfig; print('-I' + sysconfig.get_config_var('INCLUDEPY'))"`
10600 if test "$PORTNAME" = win32 ; then
10601 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10604 $as_echo "$python_includespec" >&6; }
10608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10609 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10611 python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10612 python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
10614 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10615 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10616 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10617 then
10618 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10619 found_shlib=1
10620 else
10621 # Otherwise, guess the base name of the shlib.
10622 # LDVERSION was added in Python 3.2, before that use VERSION,
10623 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10624 python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
10625 if test x"${python_ldversion}" != x""; then
10626 ldlibrary="python${python_ldversion}"
10627 else
10628 python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
10629 if test x"${python_version_var}" != x""; then
10630 ldlibrary="python${python_version_var}"
10631 else
10632 ldlibrary="python${python_version}"
10635 # Search for a likely-looking file.
10636 found_shlib=0
10637 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10639 if test -e "$d/lib${ldlibrary}${DLSUFFIX}"; then
10640 python_libdir="$d"
10641 found_shlib=1
10642 break 2
10644 done
10645 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10646 # (".so.n.n") as well. However, check this only after failing to find
10647 # ".so" anywhere, because yet other platforms (Debian) put the .so
10648 # symlink in a different directory from the underlying versioned shlib.
10649 if test "$found_shlib" != 1; then
10650 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10652 for f in "$d/lib${ldlibrary}.so."* ; do
10653 if test -e "$f"; then
10654 python_libdir="$d"
10655 found_shlib=1
10656 break 2
10658 done
10659 done
10661 # As usual, Windows has its own ideas. Possible default library
10662 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10663 # and the "lib" prefix might not be there.
10664 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10665 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10667 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10668 if test -e "$f"; then
10669 python_libdir="$d"
10670 found_shlib=1
10671 break 2
10673 done
10674 done
10677 if test "$found_shlib" != 1; then
10678 as_fn_error $? "could not find shared library for Python
10679 You might have to rebuild your Python installation. Refer to the
10680 documentation for details. Use --without-python to disable building
10681 PL/Python." "$LINENO" 5
10683 python_libspec="-L${python_libdir} -l${ldlibrary}"
10685 python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10688 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10694 if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then
10695 if test -z "$ZIC"; then
10696 for ac_prog in zic
10698 # Extract the first word of "$ac_prog", so it can be a program name with args.
10699 set dummy $ac_prog; ac_word=$2
10700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10701 $as_echo_n "checking for $ac_word... " >&6; }
10702 if ${ac_cv_path_ZIC+:} false; then :
10703 $as_echo_n "(cached) " >&6
10704 else
10705 case $ZIC in
10706 [\\/]* | ?:[\\/]*)
10707 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10711 for as_dir in $PATH
10713 IFS=$as_save_IFS
10714 test -z "$as_dir" && as_dir=.
10715 for ac_exec_ext in '' $ac_executable_extensions; do
10716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10717 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10719 break 2
10721 done
10722 done
10723 IFS=$as_save_IFS
10726 esac
10728 ZIC=$ac_cv_path_ZIC
10729 if test -n "$ZIC"; then
10730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10731 $as_echo "$ZIC" >&6; }
10732 else
10733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10734 $as_echo "no" >&6; }
10738 test -n "$ZIC" && break
10739 done
10741 else
10742 # Report the value of ZIC in configure's output in all cases.
10743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10744 $as_echo_n "checking for ZIC... " >&6; }
10745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10746 $as_echo "$ZIC" >&6; }
10749 if test -z "$ZIC"; then
10750 as_fn_error $? "
10751 When cross-compiling, either use the option --with-system-tzdata to use
10752 existing time-zone data, or set the environment variable ZIC to a zic
10753 program to use during the build." "$LINENO" 5
10758 # Pthreads
10760 # For each platform, we need to know about any special compile and link
10761 # libraries, and whether the normal C function names are thread-safe.
10762 # See the comment at the top of src/port/thread.c for more information.
10763 # WIN32 doesn't need the pthread tests; it always uses threads
10765 # These tests are run before the library-tests, because linking with the
10766 # other libraries can pull in the pthread functions as a side-effect. We
10767 # want to use the -pthread or similar flags directly, and not rely on
10768 # the side-effects of linking with some other library.
10770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10771 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10772 if ${ac_cv_path_SED+:} false; then :
10773 $as_echo_n "(cached) " >&6
10774 else
10775 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10776 for ac_i in 1 2 3 4 5 6 7; do
10777 ac_script="$ac_script$as_nl$ac_script"
10778 done
10779 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10780 { ac_script=; unset ac_script;}
10781 if test -z "$SED"; then
10782 ac_path_SED_found=false
10783 # Loop through the user's path and test for each of PROGNAME-LIST
10784 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10785 for as_dir in $PATH
10787 IFS=$as_save_IFS
10788 test -z "$as_dir" && as_dir=.
10789 for ac_prog in sed gsed; do
10790 for ac_exec_ext in '' $ac_executable_extensions; do
10791 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10792 as_fn_executable_p "$ac_path_SED" || continue
10793 # Check for GNU ac_path_SED and select it if it is found.
10794 # Check for GNU $ac_path_SED
10795 case `"$ac_path_SED" --version 2>&1` in
10796 *GNU*)
10797 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10799 ac_count=0
10800 $as_echo_n 0123456789 >"conftest.in"
10801 while :
10803 cat "conftest.in" "conftest.in" >"conftest.tmp"
10804 mv "conftest.tmp" "conftest.in"
10805 cp "conftest.in" "conftest.nl"
10806 $as_echo '' >> "conftest.nl"
10807 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10808 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10809 as_fn_arith $ac_count + 1 && ac_count=$as_val
10810 if test $ac_count -gt ${ac_path_SED_max-0}; then
10811 # Best one so far, save it but keep looking for a better one
10812 ac_cv_path_SED="$ac_path_SED"
10813 ac_path_SED_max=$ac_count
10815 # 10*(2^10) chars as input seems more than enough
10816 test $ac_count -gt 10 && break
10817 done
10818 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10819 esac
10821 $ac_path_SED_found && break 3
10822 done
10823 done
10824 done
10825 IFS=$as_save_IFS
10826 if test -z "$ac_cv_path_SED"; then
10827 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10829 else
10830 ac_cv_path_SED=$SED
10834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10835 $as_echo "$ac_cv_path_SED" >&6; }
10836 SED="$ac_cv_path_SED"
10837 rm -f conftest.sed
10840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10841 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10842 if ${ac_cv_path_GREP+:} false; then :
10843 $as_echo_n "(cached) " >&6
10844 else
10845 if test -z "$GREP"; then
10846 ac_path_GREP_found=false
10847 # Loop through the user's path and test for each of PROGNAME-LIST
10848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10849 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10851 IFS=$as_save_IFS
10852 test -z "$as_dir" && as_dir=.
10853 for ac_prog in grep ggrep; do
10854 for ac_exec_ext in '' $ac_executable_extensions; do
10855 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10856 as_fn_executable_p "$ac_path_GREP" || continue
10857 # Check for GNU ac_path_GREP and select it if it is found.
10858 # Check for GNU $ac_path_GREP
10859 case `"$ac_path_GREP" --version 2>&1` in
10860 *GNU*)
10861 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10863 ac_count=0
10864 $as_echo_n 0123456789 >"conftest.in"
10865 while :
10867 cat "conftest.in" "conftest.in" >"conftest.tmp"
10868 mv "conftest.tmp" "conftest.in"
10869 cp "conftest.in" "conftest.nl"
10870 $as_echo 'GREP' >> "conftest.nl"
10871 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10872 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10873 as_fn_arith $ac_count + 1 && ac_count=$as_val
10874 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10875 # Best one so far, save it but keep looking for a better one
10876 ac_cv_path_GREP="$ac_path_GREP"
10877 ac_path_GREP_max=$ac_count
10879 # 10*(2^10) chars as input seems more than enough
10880 test $ac_count -gt 10 && break
10881 done
10882 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10883 esac
10885 $ac_path_GREP_found && break 3
10886 done
10887 done
10888 done
10889 IFS=$as_save_IFS
10890 if test -z "$ac_cv_path_GREP"; then
10891 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10893 else
10894 ac_cv_path_GREP=$GREP
10898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10899 $as_echo "$ac_cv_path_GREP" >&6; }
10900 GREP="$ac_cv_path_GREP"
10903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10904 $as_echo_n "checking for egrep... " >&6; }
10905 if ${ac_cv_path_EGREP+:} false; then :
10906 $as_echo_n "(cached) " >&6
10907 else
10908 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10909 then ac_cv_path_EGREP="$GREP -E"
10910 else
10911 if test -z "$EGREP"; then
10912 ac_path_EGREP_found=false
10913 # Loop through the user's path and test for each of PROGNAME-LIST
10914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10915 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10917 IFS=$as_save_IFS
10918 test -z "$as_dir" && as_dir=.
10919 for ac_prog in egrep; do
10920 for ac_exec_ext in '' $ac_executable_extensions; do
10921 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10922 as_fn_executable_p "$ac_path_EGREP" || continue
10923 # Check for GNU ac_path_EGREP and select it if it is found.
10924 # Check for GNU $ac_path_EGREP
10925 case `"$ac_path_EGREP" --version 2>&1` in
10926 *GNU*)
10927 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10929 ac_count=0
10930 $as_echo_n 0123456789 >"conftest.in"
10931 while :
10933 cat "conftest.in" "conftest.in" >"conftest.tmp"
10934 mv "conftest.tmp" "conftest.in"
10935 cp "conftest.in" "conftest.nl"
10936 $as_echo 'EGREP' >> "conftest.nl"
10937 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10938 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10939 as_fn_arith $ac_count + 1 && ac_count=$as_val
10940 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10941 # Best one so far, save it but keep looking for a better one
10942 ac_cv_path_EGREP="$ac_path_EGREP"
10943 ac_path_EGREP_max=$ac_count
10945 # 10*(2^10) chars as input seems more than enough
10946 test $ac_count -gt 10 && break
10947 done
10948 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10949 esac
10951 $ac_path_EGREP_found && break 3
10952 done
10953 done
10954 done
10955 IFS=$as_save_IFS
10956 if test -z "$ac_cv_path_EGREP"; then
10957 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10959 else
10960 ac_cv_path_EGREP=$EGREP
10965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10966 $as_echo "$ac_cv_path_EGREP" >&6; }
10967 EGREP="$ac_cv_path_EGREP"
10970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10971 $as_echo_n "checking for ANSI C header files... " >&6; }
10972 if ${ac_cv_header_stdc+:} false; then :
10973 $as_echo_n "(cached) " >&6
10974 else
10975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10976 /* end confdefs.h. */
10977 #include <stdlib.h>
10978 #include <stdarg.h>
10979 #include <string.h>
10980 #include <float.h>
10983 main ()
10987 return 0;
10989 _ACEOF
10990 if ac_fn_c_try_compile "$LINENO"; then :
10991 ac_cv_header_stdc=yes
10992 else
10993 ac_cv_header_stdc=no
10995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10997 if test $ac_cv_header_stdc = yes; then
10998 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11000 /* end confdefs.h. */
11001 #include <string.h>
11003 _ACEOF
11004 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11005 $EGREP "memchr" >/dev/null 2>&1; then :
11007 else
11008 ac_cv_header_stdc=no
11010 rm -f conftest*
11014 if test $ac_cv_header_stdc = yes; then
11015 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11017 /* end confdefs.h. */
11018 #include <stdlib.h>
11020 _ACEOF
11021 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11022 $EGREP "free" >/dev/null 2>&1; then :
11024 else
11025 ac_cv_header_stdc=no
11027 rm -f conftest*
11031 if test $ac_cv_header_stdc = yes; then
11032 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11033 if test "$cross_compiling" = yes; then :
11035 else
11036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11037 /* end confdefs.h. */
11038 #include <ctype.h>
11039 #include <stdlib.h>
11040 #if ((' ' & 0x0FF) == 0x020)
11041 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11042 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11043 #else
11044 # define ISLOWER(c) \
11045 (('a' <= (c) && (c) <= 'i') \
11046 || ('j' <= (c) && (c) <= 'r') \
11047 || ('s' <= (c) && (c) <= 'z'))
11048 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11049 #endif
11051 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11053 main ()
11055 int i;
11056 for (i = 0; i < 256; i++)
11057 if (XOR (islower (i), ISLOWER (i))
11058 || toupper (i) != TOUPPER (i))
11059 return 2;
11060 return 0;
11062 _ACEOF
11063 if ac_fn_c_try_run "$LINENO"; then :
11065 else
11066 ac_cv_header_stdc=no
11068 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11069 conftest.$ac_objext conftest.beam conftest.$ac_ext
11074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11075 $as_echo "$ac_cv_header_stdc" >&6; }
11076 if test $ac_cv_header_stdc = yes; then
11078 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
11082 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11083 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11084 inttypes.h stdint.h unistd.h
11085 do :
11086 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11087 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
11089 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11090 cat >>confdefs.h <<_ACEOF
11091 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11092 _ACEOF
11096 done
11099 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
11100 # then
11105 ac_ext=c
11106 ac_cpp='$CPP $CPPFLAGS'
11107 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11108 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11109 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11111 ax_pthread_ok=no
11113 # We used to check for pthread.h first, but this fails if pthread.h
11114 # requires special compiler flags (e.g. on Tru64 or Sequent).
11115 # It gets checked for in the link test anyway.
11117 # First of all, check if the user has set any of the PTHREAD_LIBS,
11118 # etcetera environment variables, and if threads linking works using
11119 # them:
11120 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
11121 ax_pthread_save_CC="$CC"
11122 ax_pthread_save_CFLAGS="$CFLAGS"
11123 ax_pthread_save_LIBS="$LIBS"
11124 if test "x$PTHREAD_CC" != "x"; then :
11125 CC="$PTHREAD_CC"
11127 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11128 LIBS="$PTHREAD_LIBS $LIBS"
11129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
11130 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
11131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11132 /* end confdefs.h. */
11134 /* Override any GCC internal prototype to avoid an error.
11135 Use char because int might match the return type of a GCC
11136 builtin and then its argument prototype would still apply. */
11137 #ifdef __cplusplus
11138 extern "C"
11139 #endif
11140 char pthread_join ();
11142 main ()
11144 return pthread_join ();
11146 return 0;
11148 _ACEOF
11149 if ac_fn_c_try_link "$LINENO"; then :
11150 ax_pthread_ok=yes
11152 rm -f core conftest.err conftest.$ac_objext \
11153 conftest$ac_exeext conftest.$ac_ext
11154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11155 $as_echo "$ax_pthread_ok" >&6; }
11156 if test "x$ax_pthread_ok" = "xno"; then
11157 PTHREAD_LIBS=""
11158 PTHREAD_CFLAGS=""
11160 CC="$ax_pthread_save_CC"
11161 CFLAGS="$ax_pthread_save_CFLAGS"
11162 LIBS="$ax_pthread_save_LIBS"
11165 # We must check for the threads library under a number of different
11166 # names; the ordering is very important because some systems
11167 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
11168 # libraries is broken (non-POSIX).
11170 # Create a list of thread flags to try. Items starting with a "-" are
11171 # C compiler flags, and other items are library names, except for "none"
11172 # which indicates that we try without any flags at all, and "pthread-config"
11173 # which is a program returning the flags for the Pth emulation library.
11175 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
11177 # The ordering *is* (sometimes) important. Some notes on the
11178 # individual items follow:
11180 # pthreads: AIX (must check this before -lpthread)
11181 # none: in case threads are in libc; should be tried before -Kthread and
11182 # other compiler flags to prevent continual compiler warnings
11183 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
11184 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
11185 # (Note: HP C rejects this with "bad form for `-t' option")
11186 # -pthreads: Solaris/gcc (Note: HP C also rejects)
11187 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
11188 # doesn't hurt to check since this sometimes defines pthreads and
11189 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
11190 # is present but should not be used directly; and before -mthreads,
11191 # because the compiler interprets this as "-mt" + "-hreads")
11192 # -mthreads: Mingw32/gcc, Lynx/gcc
11193 # pthread: Linux, etcetera
11194 # --thread-safe: KAI C++
11195 # pthread-config: use pthread-config program (for GNU Pth library)
11197 case $host_os in
11199 freebsd*)
11201 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
11202 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
11204 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
11207 hpux*)
11209 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
11210 # multi-threading and also sets -lpthread."
11212 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
11215 openedition*)
11217 # IBM z/OS requires a feature-test macro to be defined in order to
11218 # enable POSIX threads at all, so give the user a hint if this is
11219 # not set. (We don't define these ourselves, as they can affect
11220 # other portions of the system API in unpredictable ways.)
11222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11223 /* end confdefs.h. */
11225 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
11226 AX_PTHREAD_ZOS_MISSING
11227 # endif
11229 _ACEOF
11230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11231 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
11232 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
11233 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
11235 rm -f conftest*
11239 solaris*)
11241 # On Solaris (at least, for some versions), libc contains stubbed
11242 # (non-functional) versions of the pthreads routines, so link-based
11243 # tests will erroneously succeed. (N.B.: The stubs are missing
11244 # pthread_cleanup_push, or rather a function called by this macro,
11245 # so we could check for that, but who knows whether they'll stub
11246 # that too in a future libc.) So we'll check first for the
11247 # standard Solaris way of linking pthreads (-mt -lpthread).
11249 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
11251 esac
11253 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
11255 if test "x$GCC" = "xyes"; then :
11256 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
11259 # The presence of a feature test macro requesting re-entrant function
11260 # definitions is, on some systems, a strong hint that pthreads support is
11261 # correctly enabled
11263 case $host_os in
11264 darwin* | hpux* | linux* | osf* | solaris*)
11265 ax_pthread_check_macro="_REENTRANT"
11268 aix*)
11269 ax_pthread_check_macro="_THREAD_SAFE"
11273 ax_pthread_check_macro="--"
11275 esac
11276 if test "x$ax_pthread_check_macro" = "x--"; then :
11277 ax_pthread_check_cond=0
11278 else
11279 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
11282 # Are we compiling with Clang?
11284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
11285 $as_echo_n "checking whether $CC is Clang... " >&6; }
11286 if ${ax_cv_PTHREAD_CLANG+:} false; then :
11287 $as_echo_n "(cached) " >&6
11288 else
11289 ax_cv_PTHREAD_CLANG=no
11290 # Note that Autoconf sets GCC=yes for Clang as well as GCC
11291 if test "x$GCC" = "xyes"; then
11292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11293 /* end confdefs.h. */
11294 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
11295 # if defined(__clang__) && defined(__llvm__)
11296 AX_PTHREAD_CC_IS_CLANG
11297 # endif
11299 _ACEOF
11300 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11301 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
11302 ax_cv_PTHREAD_CLANG=yes
11304 rm -f conftest*
11309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
11310 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
11311 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
11313 ax_pthread_clang_warning=no
11315 # Clang needs special handling, because older versions handle the -pthread
11316 # option in a rather... idiosyncratic way
11318 if test "x$ax_pthread_clang" = "xyes"; then
11320 # Clang takes -pthread; it has never supported any other flag
11322 # (Note 1: This will need to be revisited if a system that Clang
11323 # supports has POSIX threads in a separate library. This tends not
11324 # to be the way of modern systems, but it's conceivable.)
11326 # (Note 2: On some systems, notably Darwin, -pthread is not needed
11327 # to get POSIX threads support; the API is always present and
11328 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
11329 # -pthread does define _REENTRANT, and while the Darwin headers
11330 # ignore this macro, third-party headers might not.)
11332 PTHREAD_CFLAGS="-pthread"
11333 PTHREAD_LIBS=
11335 ax_pthread_ok=yes
11337 # However, older versions of Clang make a point of warning the user
11338 # that, in an invocation where only linking and no compilation is
11339 # taking place, the -pthread option has no effect ("argument unused
11340 # during compilation"). They expect -pthread to be passed in only
11341 # when source code is being compiled.
11343 # Problem is, this is at odds with the way Automake and most other
11344 # C build frameworks function, which is that the same flags used in
11345 # compilation (CFLAGS) are also used in linking. Many systems
11346 # supported by AX_PTHREAD require exactly this for POSIX threads
11347 # support, and in fact it is often not straightforward to specify a
11348 # flag that is used only in the compilation phase and not in
11349 # linking. Such a scenario is extremely rare in practice.
11351 # Even though use of the -pthread flag in linking would only print
11352 # a warning, this can be a nuisance for well-run software projects
11353 # that build with -Werror. So if the active version of Clang has
11354 # this misfeature, we search for an option to squash it.
11356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
11357 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
11358 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
11359 $as_echo_n "(cached) " >&6
11360 else
11361 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
11362 # Create an alternate version of $ac_link that compiles and
11363 # links in two steps (.c -> .o, .o -> exe) instead of one
11364 # (.c -> exe), because the warning occurs only in the second
11365 # step
11366 ax_pthread_save_ac_link="$ac_link"
11367 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
11368 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
11369 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
11370 ax_pthread_save_CFLAGS="$CFLAGS"
11371 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
11372 if test "x$ax_pthread_try" = "xunknown"; then :
11373 break
11375 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
11376 ac_link="$ax_pthread_save_ac_link"
11377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11378 /* end confdefs.h. */
11379 int main(void){return 0;}
11380 _ACEOF
11381 if ac_fn_c_try_link "$LINENO"; then :
11382 ac_link="$ax_pthread_2step_ac_link"
11383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11384 /* end confdefs.h. */
11385 int main(void){return 0;}
11386 _ACEOF
11387 if ac_fn_c_try_link "$LINENO"; then :
11388 break
11390 rm -f core conftest.err conftest.$ac_objext \
11391 conftest$ac_exeext conftest.$ac_ext
11394 rm -f core conftest.err conftest.$ac_objext \
11395 conftest$ac_exeext conftest.$ac_ext
11396 done
11397 ac_link="$ax_pthread_save_ac_link"
11398 CFLAGS="$ax_pthread_save_CFLAGS"
11399 if test "x$ax_pthread_try" = "x"; then :
11400 ax_pthread_try=no
11402 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
11405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
11406 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
11408 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
11409 no | unknown) ;;
11410 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
11411 esac
11413 fi # $ax_pthread_clang = yes
11415 if test "x$ax_pthread_ok" = "xno"; then
11416 for ax_pthread_try_flag in $ax_pthread_flags; do
11418 case $ax_pthread_try_flag in
11419 none)
11420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
11421 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
11424 -mt,pthread)
11425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
11426 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
11427 PTHREAD_CFLAGS="-mt"
11428 PTHREAD_LIBS="-lpthread"
11432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
11433 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
11434 PTHREAD_CFLAGS="$ax_pthread_try_flag"
11437 pthread-config)
11438 # Extract the first word of "pthread-config", so it can be a program name with args.
11439 set dummy pthread-config; ac_word=$2
11440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11441 $as_echo_n "checking for $ac_word... " >&6; }
11442 if ${ac_cv_prog_ax_pthread_config+:} false; then :
11443 $as_echo_n "(cached) " >&6
11444 else
11445 if test -n "$ax_pthread_config"; then
11446 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
11447 else
11448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11449 for as_dir in $PATH
11451 IFS=$as_save_IFS
11452 test -z "$as_dir" && as_dir=.
11453 for ac_exec_ext in '' $ac_executable_extensions; do
11454 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11455 ac_cv_prog_ax_pthread_config="yes"
11456 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11457 break 2
11459 done
11460 done
11461 IFS=$as_save_IFS
11463 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
11466 ax_pthread_config=$ac_cv_prog_ax_pthread_config
11467 if test -n "$ax_pthread_config"; then
11468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11469 $as_echo "$ax_pthread_config" >&6; }
11470 else
11471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11472 $as_echo "no" >&6; }
11476 if test "x$ax_pthread_config" = "xno"; then :
11477 continue
11479 PTHREAD_CFLAGS="`pthread-config --cflags`"
11480 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11485 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11486 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11488 esac
11490 ax_pthread_save_CFLAGS="$CFLAGS"
11491 ax_pthread_save_LIBS="$LIBS"
11492 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11493 LIBS="$PTHREAD_LIBS $LIBS"
11495 # Check for various functions. We must include pthread.h,
11496 # since some functions may be macros. (On the Sequent, we
11497 # need a special flag -Kthread to make this header compile.)
11498 # We check for pthread_join because it is in -lpthread on IRIX
11499 # while pthread_create is in libc. We check for pthread_attr_init
11500 # due to DEC craziness with -lpthreads. We check for
11501 # pthread_cleanup_push because it is one of the few pthread
11502 # functions on Solaris that doesn't have a non-functional libc stub.
11503 # We try pthread_create on general principles.
11505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11506 /* end confdefs.h. */
11507 #include <pthread.h>
11508 # if $ax_pthread_check_cond
11509 # error "$ax_pthread_check_macro must be defined"
11510 # endif
11511 static void routine(void *a) { a = 0; }
11512 static void *start_routine(void *a) { return a; }
11514 main ()
11516 pthread_t th; pthread_attr_t attr;
11517 pthread_create(&th, 0, start_routine, 0);
11518 pthread_join(th, 0);
11519 pthread_attr_init(&attr);
11520 pthread_cleanup_push(routine, 0);
11521 pthread_cleanup_pop(0) /* ; */
11523 return 0;
11525 _ACEOF
11526 if ac_fn_c_try_link "$LINENO"; then :
11527 ax_pthread_ok=yes
11529 rm -f core conftest.err conftest.$ac_objext \
11530 conftest$ac_exeext conftest.$ac_ext
11532 CFLAGS="$ax_pthread_save_CFLAGS"
11533 LIBS="$ax_pthread_save_LIBS"
11535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11536 $as_echo "$ax_pthread_ok" >&6; }
11537 if test "x$ax_pthread_ok" = "xyes"; then :
11538 break
11541 PTHREAD_LIBS=""
11542 PTHREAD_CFLAGS=""
11543 done
11546 # Various other checks:
11547 if test "x$ax_pthread_ok" = "xyes"; then
11548 ax_pthread_save_CFLAGS="$CFLAGS"
11549 ax_pthread_save_LIBS="$LIBS"
11550 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11551 LIBS="$PTHREAD_LIBS $LIBS"
11553 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11555 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11556 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11557 $as_echo_n "(cached) " >&6
11558 else
11559 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11560 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11562 /* end confdefs.h. */
11563 #include <pthread.h>
11565 main ()
11567 int attr = $ax_pthread_attr; return attr /* ; */
11569 return 0;
11571 _ACEOF
11572 if ac_fn_c_try_link "$LINENO"; then :
11573 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11575 rm -f core conftest.err conftest.$ac_objext \
11576 conftest$ac_exeext conftest.$ac_ext
11577 done
11580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11581 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11582 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11583 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11584 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11586 cat >>confdefs.h <<_ACEOF
11587 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11588 _ACEOF
11590 ax_pthread_joinable_attr_defined=yes
11594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11595 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11596 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11597 $as_echo_n "(cached) " >&6
11598 else
11599 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11600 case $host_os in
11601 solaris*)
11602 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11604 esac
11607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11608 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11609 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11610 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11611 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11612 ax_pthread_special_flags_added=yes
11615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11616 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11617 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11618 $as_echo_n "(cached) " >&6
11619 else
11620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11621 /* end confdefs.h. */
11622 #include <pthread.h>
11624 main ()
11626 int i = PTHREAD_PRIO_INHERIT;
11628 return 0;
11630 _ACEOF
11631 if ac_fn_c_try_link "$LINENO"; then :
11632 ax_cv_PTHREAD_PRIO_INHERIT=yes
11633 else
11634 ax_cv_PTHREAD_PRIO_INHERIT=no
11636 rm -f core conftest.err conftest.$ac_objext \
11637 conftest$ac_exeext conftest.$ac_ext
11640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11641 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11642 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11643 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11645 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11647 ax_pthread_prio_inherit_defined=yes
11651 CFLAGS="$ax_pthread_save_CFLAGS"
11652 LIBS="$ax_pthread_save_LIBS"
11654 # More AIX lossage: compile with *_r variant
11655 if test "x$GCC" != "xyes"; then
11656 case $host_os in
11657 aix*)
11658 case "x/$CC" in #(
11659 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11660 #handle absolute path differently from PATH based program lookup
11661 case "x$CC" in #(
11662 x/*) :
11663 if as_fn_executable_p ${CC}_r; then :
11664 PTHREAD_CC="${CC}_r"
11665 fi ;; #(
11666 *) :
11667 for ac_prog in ${CC}_r
11669 # Extract the first word of "$ac_prog", so it can be a program name with args.
11670 set dummy $ac_prog; ac_word=$2
11671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11672 $as_echo_n "checking for $ac_word... " >&6; }
11673 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11674 $as_echo_n "(cached) " >&6
11675 else
11676 if test -n "$PTHREAD_CC"; then
11677 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11678 else
11679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11680 for as_dir in $PATH
11682 IFS=$as_save_IFS
11683 test -z "$as_dir" && as_dir=.
11684 for ac_exec_ext in '' $ac_executable_extensions; do
11685 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11686 ac_cv_prog_PTHREAD_CC="$ac_prog"
11687 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11688 break 2
11690 done
11691 done
11692 IFS=$as_save_IFS
11696 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11697 if test -n "$PTHREAD_CC"; then
11698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11699 $as_echo "$PTHREAD_CC" >&6; }
11700 else
11701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11702 $as_echo "no" >&6; }
11706 test -n "$PTHREAD_CC" && break
11707 done
11708 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11710 esac ;; #(
11711 *) :
11713 esac
11715 esac
11719 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11725 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11726 if test "x$ax_pthread_ok" = "xyes"; then
11728 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11731 else
11732 ax_pthread_ok=no
11735 ac_ext=c
11736 ac_cpp='$CPP $CPPFLAGS'
11737 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11738 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11739 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11741 # set thread flags
11743 # Some platforms use these, so just define them. They can't hurt if they
11744 # are not supported.
11745 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE"
11747 # Check for *_r functions
11748 _CFLAGS="$CFLAGS"
11749 _LIBS="$LIBS"
11750 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11751 LIBS="$LIBS $PTHREAD_LIBS"
11753 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11754 if test "x$ac_cv_header_pthread_h" = xyes; then :
11756 else
11757 as_fn_error $? "
11758 pthread.h not found; use --disable-thread-safety to disable thread safety" "$LINENO" 5
11763 for ac_func in strerror_r
11764 do :
11765 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
11766 if test "x$ac_cv_func_strerror_r" = xyes; then :
11767 cat >>confdefs.h <<_ACEOF
11768 #define HAVE_STRERROR_R 1
11769 _ACEOF
11772 done
11775 # Do test here with the proper thread flags
11776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11777 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11778 if ${pgac_cv_func_strerror_r_int+:} false; then :
11779 $as_echo_n "(cached) " >&6
11780 else
11781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11782 /* end confdefs.h. */
11783 #include <string.h>
11785 main ()
11787 char buf[100];
11788 switch (strerror_r(1, buf, sizeof(buf)))
11789 { case 0: break; default: break; }
11792 return 0;
11794 _ACEOF
11795 if ac_fn_c_try_compile "$LINENO"; then :
11796 pgac_cv_func_strerror_r_int=yes
11797 else
11798 pgac_cv_func_strerror_r_int=no
11800 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11803 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11804 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11806 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11811 CFLAGS="$_CFLAGS"
11812 LIBS="$_LIBS"
11815 else
11816 # else
11817 # do not use values from template file
11818 PTHREAD_CFLAGS=
11819 PTHREAD_LIBS=
11821 fi # fi
11828 ## Libraries
11830 ## Most libraries are included only if they demonstrably provide a function
11831 ## we need, but libm is an exception: always include it, because there are
11832 ## too many compilers that play cute optimization games that will break
11833 ## probes for standard functions such as pow().
11836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11837 $as_echo_n "checking for main in -lm... " >&6; }
11838 if ${ac_cv_lib_m_main+:} false; then :
11839 $as_echo_n "(cached) " >&6
11840 else
11841 ac_check_lib_save_LIBS=$LIBS
11842 LIBS="-lm $LIBS"
11843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11844 /* end confdefs.h. */
11848 main ()
11850 return main ();
11852 return 0;
11854 _ACEOF
11855 if ac_fn_c_try_link "$LINENO"; then :
11856 ac_cv_lib_m_main=yes
11857 else
11858 ac_cv_lib_m_main=no
11860 rm -f core conftest.err conftest.$ac_objext \
11861 conftest$ac_exeext conftest.$ac_ext
11862 LIBS=$ac_check_lib_save_LIBS
11864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11865 $as_echo "$ac_cv_lib_m_main" >&6; }
11866 if test "x$ac_cv_lib_m_main" = xyes; then :
11867 cat >>confdefs.h <<_ACEOF
11868 #define HAVE_LIBM 1
11869 _ACEOF
11871 LIBS="-lm $LIBS"
11875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11876 $as_echo_n "checking for library containing setproctitle... " >&6; }
11877 if ${ac_cv_search_setproctitle+:} false; then :
11878 $as_echo_n "(cached) " >&6
11879 else
11880 ac_func_search_save_LIBS=$LIBS
11881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11882 /* end confdefs.h. */
11884 /* Override any GCC internal prototype to avoid an error.
11885 Use char because int might match the return type of a GCC
11886 builtin and then its argument prototype would still apply. */
11887 #ifdef __cplusplus
11888 extern "C"
11889 #endif
11890 char setproctitle ();
11892 main ()
11894 return setproctitle ();
11896 return 0;
11898 _ACEOF
11899 for ac_lib in '' util; do
11900 if test -z "$ac_lib"; then
11901 ac_res="none required"
11902 else
11903 ac_res=-l$ac_lib
11904 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11906 if ac_fn_c_try_link "$LINENO"; then :
11907 ac_cv_search_setproctitle=$ac_res
11909 rm -f core conftest.err conftest.$ac_objext \
11910 conftest$ac_exeext
11911 if ${ac_cv_search_setproctitle+:} false; then :
11912 break
11914 done
11915 if ${ac_cv_search_setproctitle+:} false; then :
11917 else
11918 ac_cv_search_setproctitle=no
11920 rm conftest.$ac_ext
11921 LIBS=$ac_func_search_save_LIBS
11923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11924 $as_echo "$ac_cv_search_setproctitle" >&6; }
11925 ac_res=$ac_cv_search_setproctitle
11926 if test "$ac_res" != no; then :
11927 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11931 # gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
11932 # when enabling asan the dlopen check doesn't notice that -ldl is actually
11933 # required. Just checking for dlsym() ought to suffice.
11934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
11935 $as_echo_n "checking for library containing dlsym... " >&6; }
11936 if ${ac_cv_search_dlsym+:} false; then :
11937 $as_echo_n "(cached) " >&6
11938 else
11939 ac_func_search_save_LIBS=$LIBS
11940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11941 /* end confdefs.h. */
11943 /* Override any GCC internal prototype to avoid an error.
11944 Use char because int might match the return type of a GCC
11945 builtin and then its argument prototype would still apply. */
11946 #ifdef __cplusplus
11947 extern "C"
11948 #endif
11949 char dlsym ();
11951 main ()
11953 return dlsym ();
11955 return 0;
11957 _ACEOF
11958 for ac_lib in '' dl; do
11959 if test -z "$ac_lib"; then
11960 ac_res="none required"
11961 else
11962 ac_res=-l$ac_lib
11963 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11965 if ac_fn_c_try_link "$LINENO"; then :
11966 ac_cv_search_dlsym=$ac_res
11968 rm -f core conftest.err conftest.$ac_objext \
11969 conftest$ac_exeext
11970 if ${ac_cv_search_dlsym+:} false; then :
11971 break
11973 done
11974 if ${ac_cv_search_dlsym+:} false; then :
11976 else
11977 ac_cv_search_dlsym=no
11979 rm conftest.$ac_ext
11980 LIBS=$ac_func_search_save_LIBS
11982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
11983 $as_echo "$ac_cv_search_dlsym" >&6; }
11984 ac_res=$ac_cv_search_dlsym
11985 if test "$ac_res" != no; then :
11986 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11991 $as_echo_n "checking for library containing socket... " >&6; }
11992 if ${ac_cv_search_socket+:} false; then :
11993 $as_echo_n "(cached) " >&6
11994 else
11995 ac_func_search_save_LIBS=$LIBS
11996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11997 /* end confdefs.h. */
11999 /* Override any GCC internal prototype to avoid an error.
12000 Use char because int might match the return type of a GCC
12001 builtin and then its argument prototype would still apply. */
12002 #ifdef __cplusplus
12003 extern "C"
12004 #endif
12005 char socket ();
12007 main ()
12009 return socket ();
12011 return 0;
12013 _ACEOF
12014 for ac_lib in '' socket ws2_32; do
12015 if test -z "$ac_lib"; then
12016 ac_res="none required"
12017 else
12018 ac_res=-l$ac_lib
12019 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12021 if ac_fn_c_try_link "$LINENO"; then :
12022 ac_cv_search_socket=$ac_res
12024 rm -f core conftest.err conftest.$ac_objext \
12025 conftest$ac_exeext
12026 if ${ac_cv_search_socket+:} false; then :
12027 break
12029 done
12030 if ${ac_cv_search_socket+:} false; then :
12032 else
12033 ac_cv_search_socket=no
12035 rm conftest.$ac_ext
12036 LIBS=$ac_func_search_save_LIBS
12038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
12039 $as_echo "$ac_cv_search_socket" >&6; }
12040 ac_res=$ac_cv_search_socket
12041 if test "$ac_res" != no; then :
12042 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
12047 $as_echo_n "checking for library containing getopt_long... " >&6; }
12048 if ${ac_cv_search_getopt_long+:} false; then :
12049 $as_echo_n "(cached) " >&6
12050 else
12051 ac_func_search_save_LIBS=$LIBS
12052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12053 /* end confdefs.h. */
12055 /* Override any GCC internal prototype to avoid an error.
12056 Use char because int might match the return type of a GCC
12057 builtin and then its argument prototype would still apply. */
12058 #ifdef __cplusplus
12059 extern "C"
12060 #endif
12061 char getopt_long ();
12063 main ()
12065 return getopt_long ();
12067 return 0;
12069 _ACEOF
12070 for ac_lib in '' getopt gnugetopt; do
12071 if test -z "$ac_lib"; then
12072 ac_res="none required"
12073 else
12074 ac_res=-l$ac_lib
12075 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12077 if ac_fn_c_try_link "$LINENO"; then :
12078 ac_cv_search_getopt_long=$ac_res
12080 rm -f core conftest.err conftest.$ac_objext \
12081 conftest$ac_exeext
12082 if ${ac_cv_search_getopt_long+:} false; then :
12083 break
12085 done
12086 if ${ac_cv_search_getopt_long+:} false; then :
12088 else
12089 ac_cv_search_getopt_long=no
12091 rm conftest.$ac_ext
12092 LIBS=$ac_func_search_save_LIBS
12094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
12095 $as_echo "$ac_cv_search_getopt_long" >&6; }
12096 ac_res=$ac_cv_search_getopt_long
12097 if test "$ac_res" != no; then :
12098 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
12103 $as_echo_n "checking for library containing shm_open... " >&6; }
12104 if ${ac_cv_search_shm_open+:} false; then :
12105 $as_echo_n "(cached) " >&6
12106 else
12107 ac_func_search_save_LIBS=$LIBS
12108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12109 /* end confdefs.h. */
12111 /* Override any GCC internal prototype to avoid an error.
12112 Use char because int might match the return type of a GCC
12113 builtin and then its argument prototype would still apply. */
12114 #ifdef __cplusplus
12115 extern "C"
12116 #endif
12117 char shm_open ();
12119 main ()
12121 return shm_open ();
12123 return 0;
12125 _ACEOF
12126 for ac_lib in '' rt; do
12127 if test -z "$ac_lib"; then
12128 ac_res="none required"
12129 else
12130 ac_res=-l$ac_lib
12131 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12133 if ac_fn_c_try_link "$LINENO"; then :
12134 ac_cv_search_shm_open=$ac_res
12136 rm -f core conftest.err conftest.$ac_objext \
12137 conftest$ac_exeext
12138 if ${ac_cv_search_shm_open+:} false; then :
12139 break
12141 done
12142 if ${ac_cv_search_shm_open+:} false; then :
12144 else
12145 ac_cv_search_shm_open=no
12147 rm conftest.$ac_ext
12148 LIBS=$ac_func_search_save_LIBS
12150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
12151 $as_echo "$ac_cv_search_shm_open" >&6; }
12152 ac_res=$ac_cv_search_shm_open
12153 if test "$ac_res" != no; then :
12154 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
12159 $as_echo_n "checking for library containing shm_unlink... " >&6; }
12160 if ${ac_cv_search_shm_unlink+:} false; then :
12161 $as_echo_n "(cached) " >&6
12162 else
12163 ac_func_search_save_LIBS=$LIBS
12164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12165 /* end confdefs.h. */
12167 /* Override any GCC internal prototype to avoid an error.
12168 Use char because int might match the return type of a GCC
12169 builtin and then its argument prototype would still apply. */
12170 #ifdef __cplusplus
12171 extern "C"
12172 #endif
12173 char shm_unlink ();
12175 main ()
12177 return shm_unlink ();
12179 return 0;
12181 _ACEOF
12182 for ac_lib in '' rt; do
12183 if test -z "$ac_lib"; then
12184 ac_res="none required"
12185 else
12186 ac_res=-l$ac_lib
12187 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12189 if ac_fn_c_try_link "$LINENO"; then :
12190 ac_cv_search_shm_unlink=$ac_res
12192 rm -f core conftest.err conftest.$ac_objext \
12193 conftest$ac_exeext
12194 if ${ac_cv_search_shm_unlink+:} false; then :
12195 break
12197 done
12198 if ${ac_cv_search_shm_unlink+:} false; then :
12200 else
12201 ac_cv_search_shm_unlink=no
12203 rm conftest.$ac_ext
12204 LIBS=$ac_func_search_save_LIBS
12206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
12207 $as_echo "$ac_cv_search_shm_unlink" >&6; }
12208 ac_res=$ac_cv_search_shm_unlink
12209 if test "$ac_res" != no; then :
12210 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
12215 $as_echo_n "checking for library containing clock_gettime... " >&6; }
12216 if ${ac_cv_search_clock_gettime+:} false; then :
12217 $as_echo_n "(cached) " >&6
12218 else
12219 ac_func_search_save_LIBS=$LIBS
12220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12221 /* end confdefs.h. */
12223 /* Override any GCC internal prototype to avoid an error.
12224 Use char because int might match the return type of a GCC
12225 builtin and then its argument prototype would still apply. */
12226 #ifdef __cplusplus
12227 extern "C"
12228 #endif
12229 char clock_gettime ();
12231 main ()
12233 return clock_gettime ();
12235 return 0;
12237 _ACEOF
12238 for ac_lib in '' rt posix4; do
12239 if test -z "$ac_lib"; then
12240 ac_res="none required"
12241 else
12242 ac_res=-l$ac_lib
12243 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12245 if ac_fn_c_try_link "$LINENO"; then :
12246 ac_cv_search_clock_gettime=$ac_res
12248 rm -f core conftest.err conftest.$ac_objext \
12249 conftest$ac_exeext
12250 if ${ac_cv_search_clock_gettime+:} false; then :
12251 break
12253 done
12254 if ${ac_cv_search_clock_gettime+:} false; then :
12256 else
12257 ac_cv_search_clock_gettime=no
12259 rm conftest.$ac_ext
12260 LIBS=$ac_func_search_save_LIBS
12262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
12263 $as_echo "$ac_cv_search_clock_gettime" >&6; }
12264 ac_res=$ac_cv_search_clock_gettime
12265 if test "$ac_res" != no; then :
12266 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12270 # Solaris:
12271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
12272 $as_echo_n "checking for library containing fdatasync... " >&6; }
12273 if ${ac_cv_search_fdatasync+:} false; then :
12274 $as_echo_n "(cached) " >&6
12275 else
12276 ac_func_search_save_LIBS=$LIBS
12277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12278 /* end confdefs.h. */
12280 /* Override any GCC internal prototype to avoid an error.
12281 Use char because int might match the return type of a GCC
12282 builtin and then its argument prototype would still apply. */
12283 #ifdef __cplusplus
12284 extern "C"
12285 #endif
12286 char fdatasync ();
12288 main ()
12290 return fdatasync ();
12292 return 0;
12294 _ACEOF
12295 for ac_lib in '' rt posix4; do
12296 if test -z "$ac_lib"; then
12297 ac_res="none required"
12298 else
12299 ac_res=-l$ac_lib
12300 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12302 if ac_fn_c_try_link "$LINENO"; then :
12303 ac_cv_search_fdatasync=$ac_res
12305 rm -f core conftest.err conftest.$ac_objext \
12306 conftest$ac_exeext
12307 if ${ac_cv_search_fdatasync+:} false; then :
12308 break
12310 done
12311 if ${ac_cv_search_fdatasync+:} false; then :
12313 else
12314 ac_cv_search_fdatasync=no
12316 rm conftest.$ac_ext
12317 LIBS=$ac_func_search_save_LIBS
12319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
12320 $as_echo "$ac_cv_search_fdatasync" >&6; }
12321 ac_res=$ac_cv_search_fdatasync
12322 if test "$ac_res" != no; then :
12323 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12327 # Cygwin:
12328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
12329 $as_echo_n "checking for library containing shmget... " >&6; }
12330 if ${ac_cv_search_shmget+:} false; then :
12331 $as_echo_n "(cached) " >&6
12332 else
12333 ac_func_search_save_LIBS=$LIBS
12334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12335 /* end confdefs.h. */
12337 /* Override any GCC internal prototype to avoid an error.
12338 Use char because int might match the return type of a GCC
12339 builtin and then its argument prototype would still apply. */
12340 #ifdef __cplusplus
12341 extern "C"
12342 #endif
12343 char shmget ();
12345 main ()
12347 return shmget ();
12349 return 0;
12351 _ACEOF
12352 for ac_lib in '' cygipc; do
12353 if test -z "$ac_lib"; then
12354 ac_res="none required"
12355 else
12356 ac_res=-l$ac_lib
12357 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12359 if ac_fn_c_try_link "$LINENO"; then :
12360 ac_cv_search_shmget=$ac_res
12362 rm -f core conftest.err conftest.$ac_objext \
12363 conftest$ac_exeext
12364 if ${ac_cv_search_shmget+:} false; then :
12365 break
12367 done
12368 if ${ac_cv_search_shmget+:} false; then :
12370 else
12371 ac_cv_search_shmget=no
12373 rm conftest.$ac_ext
12374 LIBS=$ac_func_search_save_LIBS
12376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
12377 $as_echo "$ac_cv_search_shmget" >&6; }
12378 ac_res=$ac_cv_search_shmget
12379 if test "$ac_res" != no; then :
12380 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12384 # *BSD:
12385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
12386 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
12387 if ${ac_cv_search_backtrace_symbols+:} false; then :
12388 $as_echo_n "(cached) " >&6
12389 else
12390 ac_func_search_save_LIBS=$LIBS
12391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12392 /* end confdefs.h. */
12394 /* Override any GCC internal prototype to avoid an error.
12395 Use char because int might match the return type of a GCC
12396 builtin and then its argument prototype would still apply. */
12397 #ifdef __cplusplus
12398 extern "C"
12399 #endif
12400 char backtrace_symbols ();
12402 main ()
12404 return backtrace_symbols ();
12406 return 0;
12408 _ACEOF
12409 for ac_lib in '' execinfo; do
12410 if test -z "$ac_lib"; then
12411 ac_res="none required"
12412 else
12413 ac_res=-l$ac_lib
12414 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12416 if ac_fn_c_try_link "$LINENO"; then :
12417 ac_cv_search_backtrace_symbols=$ac_res
12419 rm -f core conftest.err conftest.$ac_objext \
12420 conftest$ac_exeext
12421 if ${ac_cv_search_backtrace_symbols+:} false; then :
12422 break
12424 done
12425 if ${ac_cv_search_backtrace_symbols+:} false; then :
12427 else
12428 ac_cv_search_backtrace_symbols=no
12430 rm conftest.$ac_ext
12431 LIBS=$ac_func_search_save_LIBS
12433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
12434 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
12435 ac_res=$ac_cv_search_backtrace_symbols
12436 if test "$ac_res" != no; then :
12437 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12442 if test "$enable_thread_safety" = yes; then
12443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
12444 $as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
12445 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12446 $as_echo_n "(cached) " >&6
12447 else
12448 ac_func_search_save_LIBS=$LIBS
12449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12450 /* end confdefs.h. */
12452 /* Override any GCC internal prototype to avoid an error.
12453 Use char because int might match the return type of a GCC
12454 builtin and then its argument prototype would still apply. */
12455 #ifdef __cplusplus
12456 extern "C"
12457 #endif
12458 char pthread_barrier_wait ();
12460 main ()
12462 return pthread_barrier_wait ();
12464 return 0;
12466 _ACEOF
12467 for ac_lib in '' pthread; do
12468 if test -z "$ac_lib"; then
12469 ac_res="none required"
12470 else
12471 ac_res=-l$ac_lib
12472 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12474 if ac_fn_c_try_link "$LINENO"; then :
12475 ac_cv_search_pthread_barrier_wait=$ac_res
12477 rm -f core conftest.err conftest.$ac_objext \
12478 conftest$ac_exeext
12479 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12480 break
12482 done
12483 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12485 else
12486 ac_cv_search_pthread_barrier_wait=no
12488 rm conftest.$ac_ext
12489 LIBS=$ac_func_search_save_LIBS
12491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_barrier_wait" >&5
12492 $as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
12493 ac_res=$ac_cv_search_pthread_barrier_wait
12494 if test "$ac_res" != no; then :
12495 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12501 if test "$with_readline" = yes; then
12504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
12505 $as_echo_n "checking for library containing readline... " >&6; }
12506 if ${pgac_cv_check_readline+:} false; then :
12507 $as_echo_n "(cached) " >&6
12508 else
12509 pgac_cv_check_readline=no
12510 pgac_save_LIBS=$LIBS
12511 if test x"$with_libedit_preferred" != x"yes"
12512 then READLINE_ORDER="-lreadline -ledit"
12513 else READLINE_ORDER="-ledit -lreadline"
12515 for pgac_rllib in $READLINE_ORDER ; do
12516 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
12517 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
12518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12519 /* end confdefs.h. */
12521 /* Override any GCC internal prototype to avoid an error.
12522 Use char because int might match the return type of a GCC
12523 builtin and then its argument prototype would still apply. */
12524 #ifdef __cplusplus
12525 extern "C"
12526 #endif
12527 char readline ();
12529 main ()
12531 return readline ();
12533 return 0;
12535 _ACEOF
12536 if ac_fn_c_try_link "$LINENO"; then :
12538 # Older NetBSD and OpenBSD have a broken linker that does not
12539 # recognize dependent libraries; assume curses is needed if we didn't
12540 # find any dependency.
12541 case $host_os in
12542 netbsd* | openbsd*)
12543 if test x"$pgac_lib" = x"" ; then
12544 pgac_lib=" -lcurses"
12545 fi ;;
12546 esac
12548 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12549 break
12552 rm -f core conftest.err conftest.$ac_objext \
12553 conftest$ac_exeext conftest.$ac_ext
12554 done
12555 if test "$pgac_cv_check_readline" != no ; then
12556 break
12558 done
12559 LIBS=$pgac_save_LIBS
12562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12563 $as_echo "$pgac_cv_check_readline" >&6; }
12564 if test "$pgac_cv_check_readline" != no ; then
12565 LIBS="$pgac_cv_check_readline $LIBS"
12567 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12572 if test x"$pgac_cv_check_readline" = x"no"; then
12573 as_fn_error $? "readline library not found
12574 If you have readline already installed, see config.log for details on the
12575 failure. It is possible the compiler isn't looking in the proper directory.
12576 Use --without-readline to disable readline support." "$LINENO" 5
12580 if test "$with_zlib" = yes; then
12581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12582 $as_echo_n "checking for inflate in -lz... " >&6; }
12583 if ${ac_cv_lib_z_inflate+:} false; then :
12584 $as_echo_n "(cached) " >&6
12585 else
12586 ac_check_lib_save_LIBS=$LIBS
12587 LIBS="-lz $LIBS"
12588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12589 /* end confdefs.h. */
12591 /* Override any GCC internal prototype to avoid an error.
12592 Use char because int might match the return type of a GCC
12593 builtin and then its argument prototype would still apply. */
12594 #ifdef __cplusplus
12595 extern "C"
12596 #endif
12597 char inflate ();
12599 main ()
12601 return inflate ();
12603 return 0;
12605 _ACEOF
12606 if ac_fn_c_try_link "$LINENO"; then :
12607 ac_cv_lib_z_inflate=yes
12608 else
12609 ac_cv_lib_z_inflate=no
12611 rm -f core conftest.err conftest.$ac_objext \
12612 conftest$ac_exeext conftest.$ac_ext
12613 LIBS=$ac_check_lib_save_LIBS
12615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12616 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12617 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12618 cat >>confdefs.h <<_ACEOF
12619 #define HAVE_LIBZ 1
12620 _ACEOF
12622 LIBS="-lz $LIBS"
12624 else
12625 as_fn_error $? "zlib library not found
12626 If you have zlib 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-zlib to disable zlib support." "$LINENO" 5
12633 if test "$enable_spinlocks" = yes; then
12635 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
12637 else
12638 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12639 *** Not using spinlocks will cause poor performance." >&5
12640 $as_echo "$as_me: WARNING:
12641 *** Not using spinlocks will cause poor performance." >&2;}
12644 if test "$enable_atomics" = yes; then
12646 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
12648 else
12649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12650 *** Not using atomic operations will cause poor performance." >&5
12651 $as_echo "$as_me: WARNING:
12652 *** Not using atomic operations will cause poor performance." >&2;}
12655 if test "$with_gssapi" = yes ; then
12656 if test "$PORTNAME" != "win32"; then
12657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
12658 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
12659 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12660 $as_echo_n "(cached) " >&6
12661 else
12662 ac_func_search_save_LIBS=$LIBS
12663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12664 /* end confdefs.h. */
12666 /* Override any GCC internal prototype to avoid an error.
12667 Use char because int might match the return type of a GCC
12668 builtin and then its argument prototype would still apply. */
12669 #ifdef __cplusplus
12670 extern "C"
12671 #endif
12672 char gss_init_sec_context ();
12674 main ()
12676 return gss_init_sec_context ();
12678 return 0;
12680 _ACEOF
12681 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12682 if test -z "$ac_lib"; then
12683 ac_res="none required"
12684 else
12685 ac_res=-l$ac_lib
12686 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12688 if ac_fn_c_try_link "$LINENO"; then :
12689 ac_cv_search_gss_init_sec_context=$ac_res
12691 rm -f core conftest.err conftest.$ac_objext \
12692 conftest$ac_exeext
12693 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12694 break
12696 done
12697 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12699 else
12700 ac_cv_search_gss_init_sec_context=no
12702 rm conftest.$ac_ext
12703 LIBS=$ac_func_search_save_LIBS
12705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
12706 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
12707 ac_res=$ac_cv_search_gss_init_sec_context
12708 if test "$ac_res" != no; then :
12709 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12711 else
12712 as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
12715 else
12716 LIBS="$LIBS -lgssapi32"
12721 # SSL Library
12723 # There is currently only one supported SSL/TLS library: OpenSSL.
12728 # Check whether --with-ssl was given.
12729 if test "${with_ssl+set}" = set; then :
12730 withval=$with_ssl;
12731 case $withval in
12732 yes)
12733 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12736 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12741 esac
12746 if test x"$with_ssl" = x"" ; then
12747 with_ssl=no
12752 # Check whether --with-openssl was given.
12753 if test "${with_openssl+set}" = set; then :
12754 withval=$with_openssl;
12755 case $withval in
12756 yes)
12763 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12765 esac
12767 else
12768 with_openssl=no
12773 if test "$with_openssl" = yes ; then
12774 with_ssl=openssl
12777 if test "$with_ssl" = openssl ; then
12778 # Minimum required OpenSSL version is 1.0.1
12780 $as_echo "#define OPENSSL_API_COMPAT 0x10001000L" >>confdefs.h
12782 if test "$PORTNAME" != "win32"; then
12783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12784 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12785 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12786 $as_echo_n "(cached) " >&6
12787 else
12788 ac_check_lib_save_LIBS=$LIBS
12789 LIBS="-lcrypto $LIBS"
12790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12791 /* end confdefs.h. */
12793 /* Override any GCC internal prototype to avoid an error.
12794 Use char because int might match the return type of a GCC
12795 builtin and then its argument prototype would still apply. */
12796 #ifdef __cplusplus
12797 extern "C"
12798 #endif
12799 char CRYPTO_new_ex_data ();
12801 main ()
12803 return CRYPTO_new_ex_data ();
12805 return 0;
12807 _ACEOF
12808 if ac_fn_c_try_link "$LINENO"; then :
12809 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12810 else
12811 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12813 rm -f core conftest.err conftest.$ac_objext \
12814 conftest$ac_exeext conftest.$ac_ext
12815 LIBS=$ac_check_lib_save_LIBS
12817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12818 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12819 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12820 cat >>confdefs.h <<_ACEOF
12821 #define HAVE_LIBCRYPTO 1
12822 _ACEOF
12824 LIBS="-lcrypto $LIBS"
12826 else
12827 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12831 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12832 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12833 $as_echo_n "(cached) " >&6
12834 else
12835 ac_check_lib_save_LIBS=$LIBS
12836 LIBS="-lssl $LIBS"
12837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12838 /* end confdefs.h. */
12840 /* Override any GCC internal prototype to avoid an error.
12841 Use char because int might match the return type of a GCC
12842 builtin and then its argument prototype would still apply. */
12843 #ifdef __cplusplus
12844 extern "C"
12845 #endif
12846 char SSL_new ();
12848 main ()
12850 return SSL_new ();
12852 return 0;
12854 _ACEOF
12855 if ac_fn_c_try_link "$LINENO"; then :
12856 ac_cv_lib_ssl_SSL_new=yes
12857 else
12858 ac_cv_lib_ssl_SSL_new=no
12860 rm -f core conftest.err conftest.$ac_objext \
12861 conftest$ac_exeext conftest.$ac_ext
12862 LIBS=$ac_check_lib_save_LIBS
12864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12865 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12866 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12867 cat >>confdefs.h <<_ACEOF
12868 #define HAVE_LIBSSL 1
12869 _ACEOF
12871 LIBS="-lssl $LIBS"
12873 else
12874 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12877 else
12878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12879 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12880 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12881 $as_echo_n "(cached) " >&6
12882 else
12883 ac_func_search_save_LIBS=$LIBS
12884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12885 /* end confdefs.h. */
12887 /* Override any GCC internal prototype to avoid an error.
12888 Use char because int might match the return type of a GCC
12889 builtin and then its argument prototype would still apply. */
12890 #ifdef __cplusplus
12891 extern "C"
12892 #endif
12893 char CRYPTO_new_ex_data ();
12895 main ()
12897 return CRYPTO_new_ex_data ();
12899 return 0;
12901 _ACEOF
12902 for ac_lib in '' eay32 crypto; do
12903 if test -z "$ac_lib"; then
12904 ac_res="none required"
12905 else
12906 ac_res=-l$ac_lib
12907 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12909 if ac_fn_c_try_link "$LINENO"; then :
12910 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12912 rm -f core conftest.err conftest.$ac_objext \
12913 conftest$ac_exeext
12914 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12915 break
12917 done
12918 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12920 else
12921 ac_cv_search_CRYPTO_new_ex_data=no
12923 rm conftest.$ac_ext
12924 LIBS=$ac_func_search_save_LIBS
12926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12927 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12928 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12929 if test "$ac_res" != no; then :
12930 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12932 else
12933 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12937 $as_echo_n "checking for library containing SSL_new... " >&6; }
12938 if ${ac_cv_search_SSL_new+:} false; then :
12939 $as_echo_n "(cached) " >&6
12940 else
12941 ac_func_search_save_LIBS=$LIBS
12942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12943 /* end confdefs.h. */
12945 /* Override any GCC internal prototype to avoid an error.
12946 Use char because int might match the return type of a GCC
12947 builtin and then its argument prototype would still apply. */
12948 #ifdef __cplusplus
12949 extern "C"
12950 #endif
12951 char SSL_new ();
12953 main ()
12955 return SSL_new ();
12957 return 0;
12959 _ACEOF
12960 for ac_lib in '' ssleay32 ssl; do
12961 if test -z "$ac_lib"; then
12962 ac_res="none required"
12963 else
12964 ac_res=-l$ac_lib
12965 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12967 if ac_fn_c_try_link "$LINENO"; then :
12968 ac_cv_search_SSL_new=$ac_res
12970 rm -f core conftest.err conftest.$ac_objext \
12971 conftest$ac_exeext
12972 if ${ac_cv_search_SSL_new+:} false; then :
12973 break
12975 done
12976 if ${ac_cv_search_SSL_new+:} false; then :
12978 else
12979 ac_cv_search_SSL_new=no
12981 rm conftest.$ac_ext
12982 LIBS=$ac_func_search_save_LIBS
12984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12985 $as_echo "$ac_cv_search_SSL_new" >&6; }
12986 ac_res=$ac_cv_search_SSL_new
12987 if test "$ac_res" != no; then :
12988 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12990 else
12991 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12995 # Function introduced in OpenSSL 1.0.2.
12996 for ac_func in X509_get_signature_nid
12997 do :
12998 ac_fn_c_check_func "$LINENO" "X509_get_signature_nid" "ac_cv_func_X509_get_signature_nid"
12999 if test "x$ac_cv_func_X509_get_signature_nid" = xyes; then :
13000 cat >>confdefs.h <<_ACEOF
13001 #define HAVE_X509_GET_SIGNATURE_NID 1
13002 _ACEOF
13005 done
13007 # Functions introduced in OpenSSL 1.1.0. We used to check for
13008 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
13009 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
13010 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
13011 # functions.
13012 for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free
13013 do :
13014 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13015 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13016 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13017 cat >>confdefs.h <<_ACEOF
13018 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13019 _ACEOF
13022 done
13024 # OpenSSL versions before 1.1.0 required setting callback functions, for
13025 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
13026 # function was removed.
13027 for ac_func in CRYPTO_lock
13028 do :
13029 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
13030 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
13031 cat >>confdefs.h <<_ACEOF
13032 #define HAVE_CRYPTO_LOCK 1
13033 _ACEOF
13036 done
13039 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
13041 elif test "$with_ssl" != no ; then
13042 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
13046 if test "$with_pam" = yes ; then
13047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
13048 $as_echo_n "checking for pam_start in -lpam... " >&6; }
13049 if ${ac_cv_lib_pam_pam_start+:} false; then :
13050 $as_echo_n "(cached) " >&6
13051 else
13052 ac_check_lib_save_LIBS=$LIBS
13053 LIBS="-lpam $LIBS"
13054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13055 /* end confdefs.h. */
13057 /* Override any GCC internal prototype to avoid an error.
13058 Use char because int might match the return type of a GCC
13059 builtin and then its argument prototype would still apply. */
13060 #ifdef __cplusplus
13061 extern "C"
13062 #endif
13063 char pam_start ();
13065 main ()
13067 return pam_start ();
13069 return 0;
13071 _ACEOF
13072 if ac_fn_c_try_link "$LINENO"; then :
13073 ac_cv_lib_pam_pam_start=yes
13074 else
13075 ac_cv_lib_pam_pam_start=no
13077 rm -f core conftest.err conftest.$ac_objext \
13078 conftest$ac_exeext conftest.$ac_ext
13079 LIBS=$ac_check_lib_save_LIBS
13081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
13082 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
13083 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
13084 cat >>confdefs.h <<_ACEOF
13085 #define HAVE_LIBPAM 1
13086 _ACEOF
13088 LIBS="-lpam $LIBS"
13090 else
13091 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
13096 if test "$with_libxml" = yes ; then
13097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
13098 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
13099 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
13100 $as_echo_n "(cached) " >&6
13101 else
13102 ac_check_lib_save_LIBS=$LIBS
13103 LIBS="-lxml2 $LIBS"
13104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13105 /* end confdefs.h. */
13107 /* Override any GCC internal prototype to avoid an error.
13108 Use char because int might match the return type of a GCC
13109 builtin and then its argument prototype would still apply. */
13110 #ifdef __cplusplus
13111 extern "C"
13112 #endif
13113 char xmlSaveToBuffer ();
13115 main ()
13117 return xmlSaveToBuffer ();
13119 return 0;
13121 _ACEOF
13122 if ac_fn_c_try_link "$LINENO"; then :
13123 ac_cv_lib_xml2_xmlSaveToBuffer=yes
13124 else
13125 ac_cv_lib_xml2_xmlSaveToBuffer=no
13127 rm -f core conftest.err conftest.$ac_objext \
13128 conftest$ac_exeext conftest.$ac_ext
13129 LIBS=$ac_check_lib_save_LIBS
13131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
13132 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
13133 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
13134 cat >>confdefs.h <<_ACEOF
13135 #define HAVE_LIBXML2 1
13136 _ACEOF
13138 LIBS="-lxml2 $LIBS"
13140 else
13141 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
13146 if test "$with_libxslt" = yes ; then
13147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
13148 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
13149 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
13150 $as_echo_n "(cached) " >&6
13151 else
13152 ac_check_lib_save_LIBS=$LIBS
13153 LIBS="-lxslt $LIBS"
13154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13155 /* end confdefs.h. */
13157 /* Override any GCC internal prototype to avoid an error.
13158 Use char because int might match the return type of a GCC
13159 builtin and then its argument prototype would still apply. */
13160 #ifdef __cplusplus
13161 extern "C"
13162 #endif
13163 char xsltCleanupGlobals ();
13165 main ()
13167 return xsltCleanupGlobals ();
13169 return 0;
13171 _ACEOF
13172 if ac_fn_c_try_link "$LINENO"; then :
13173 ac_cv_lib_xslt_xsltCleanupGlobals=yes
13174 else
13175 ac_cv_lib_xslt_xsltCleanupGlobals=no
13177 rm -f core conftest.err conftest.$ac_objext \
13178 conftest$ac_exeext conftest.$ac_ext
13179 LIBS=$ac_check_lib_save_LIBS
13181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
13182 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
13183 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
13184 cat >>confdefs.h <<_ACEOF
13185 #define HAVE_LIBXSLT 1
13186 _ACEOF
13188 LIBS="-lxslt $LIBS"
13190 else
13191 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
13196 if test "$with_lz4" = yes ; then
13197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
13198 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
13199 if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
13200 $as_echo_n "(cached) " >&6
13201 else
13202 ac_check_lib_save_LIBS=$LIBS
13203 LIBS="-llz4 $LIBS"
13204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13205 /* end confdefs.h. */
13207 /* Override any GCC internal prototype to avoid an error.
13208 Use char because int might match the return type of a GCC
13209 builtin and then its argument prototype would still apply. */
13210 #ifdef __cplusplus
13211 extern "C"
13212 #endif
13213 char LZ4_compress_default ();
13215 main ()
13217 return LZ4_compress_default ();
13219 return 0;
13221 _ACEOF
13222 if ac_fn_c_try_link "$LINENO"; then :
13223 ac_cv_lib_lz4_LZ4_compress_default=yes
13224 else
13225 ac_cv_lib_lz4_LZ4_compress_default=no
13227 rm -f core conftest.err conftest.$ac_objext \
13228 conftest$ac_exeext conftest.$ac_ext
13229 LIBS=$ac_check_lib_save_LIBS
13231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5
13232 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
13233 if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
13234 cat >>confdefs.h <<_ACEOF
13235 #define HAVE_LIBLZ4 1
13236 _ACEOF
13238 LIBS="-llz4 $LIBS"
13240 else
13241 as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
13246 if test "$with_zstd" = yes ; then
13247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5
13248 $as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; }
13249 if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then :
13250 $as_echo_n "(cached) " >&6
13251 else
13252 ac_check_lib_save_LIBS=$LIBS
13253 LIBS="-lzstd $LIBS"
13254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13255 /* end confdefs.h. */
13257 /* Override any GCC internal prototype to avoid an error.
13258 Use char because int might match the return type of a GCC
13259 builtin and then its argument prototype would still apply. */
13260 #ifdef __cplusplus
13261 extern "C"
13262 #endif
13263 char ZSTD_compress ();
13265 main ()
13267 return ZSTD_compress ();
13269 return 0;
13271 _ACEOF
13272 if ac_fn_c_try_link "$LINENO"; then :
13273 ac_cv_lib_zstd_ZSTD_compress=yes
13274 else
13275 ac_cv_lib_zstd_ZSTD_compress=no
13277 rm -f core conftest.err conftest.$ac_objext \
13278 conftest$ac_exeext conftest.$ac_ext
13279 LIBS=$ac_check_lib_save_LIBS
13281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5
13282 $as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; }
13283 if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then :
13284 cat >>confdefs.h <<_ACEOF
13285 #define HAVE_LIBZSTD 1
13286 _ACEOF
13288 LIBS="-lzstd $LIBS"
13290 else
13291 as_fn_error $? "library 'zstd' is required for ZSTD support" "$LINENO" 5
13296 # Note: We can test for libldap_r only after we know PTHREAD_LIBS;
13297 # also, on AIX, we may need to have openssl in LIBS for this step.
13298 if test "$with_ldap" = yes ; then
13299 _LIBS="$LIBS"
13300 if test "$PORTNAME" != "win32"; then
13301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
13302 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
13303 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
13304 $as_echo_n "(cached) " >&6
13305 else
13306 ac_check_lib_save_LIBS=$LIBS
13307 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
13308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13309 /* end confdefs.h. */
13311 /* Override any GCC internal prototype to avoid an error.
13312 Use char because int might match the return type of a GCC
13313 builtin and then its argument prototype would still apply. */
13314 #ifdef __cplusplus
13315 extern "C"
13316 #endif
13317 char ldap_bind ();
13319 main ()
13321 return ldap_bind ();
13323 return 0;
13325 _ACEOF
13326 if ac_fn_c_try_link "$LINENO"; then :
13327 ac_cv_lib_ldap_ldap_bind=yes
13328 else
13329 ac_cv_lib_ldap_ldap_bind=no
13331 rm -f core conftest.err conftest.$ac_objext \
13332 conftest$ac_exeext conftest.$ac_ext
13333 LIBS=$ac_check_lib_save_LIBS
13335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
13336 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
13337 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
13338 cat >>confdefs.h <<_ACEOF
13339 #define HAVE_LIBLDAP 1
13340 _ACEOF
13342 LIBS="-lldap $LIBS"
13344 else
13345 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
13348 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
13349 # This test is carried out against libldap.
13350 for ac_func in ldap_initialize
13351 do :
13352 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
13353 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
13354 cat >>confdefs.h <<_ACEOF
13355 #define HAVE_LDAP_INITIALIZE 1
13356 _ACEOF
13359 done
13361 # The separate ldap_r library only exists in OpenLDAP < 2.5, and if we
13362 # have 2.5 or later, we shouldn't even probe for ldap_r (we might find a
13363 # library from a separate OpenLDAP installation). The most reliable
13364 # way to check that is to check for a function introduced in 2.5.
13365 ac_fn_c_check_func "$LINENO" "ldap_verify_credentials" "ac_cv_func_ldap_verify_credentials"
13366 if test "x$ac_cv_func_ldap_verify_credentials" = xyes; then :
13367 thread_safe_libldap=yes
13368 else
13369 thread_safe_libldap=no
13372 if test "$enable_thread_safety" = yes -a "$thread_safe_libldap" = no; then
13373 # Use ldap_r for FE if available, else assume ldap is thread-safe.
13374 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
13375 LIBS="$_LIBS"
13376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
13377 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
13378 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
13379 $as_echo_n "(cached) " >&6
13380 else
13381 ac_check_lib_save_LIBS=$LIBS
13382 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
13383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13384 /* end confdefs.h. */
13386 /* Override any GCC internal prototype to avoid an error.
13387 Use char because int might match the return type of a GCC
13388 builtin and then its argument prototype would still apply. */
13389 #ifdef __cplusplus
13390 extern "C"
13391 #endif
13392 char ldap_bind ();
13394 main ()
13396 return ldap_bind ();
13398 return 0;
13400 _ACEOF
13401 if ac_fn_c_try_link "$LINENO"; then :
13402 ac_cv_lib_ldap_r_ldap_bind=yes
13403 else
13404 ac_cv_lib_ldap_r_ldap_bind=no
13406 rm -f core conftest.err conftest.$ac_objext \
13407 conftest$ac_exeext conftest.$ac_ext
13408 LIBS=$ac_check_lib_save_LIBS
13410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
13411 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
13412 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
13413 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
13414 else
13415 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13418 else
13419 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13421 else
13422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
13423 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
13424 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
13425 $as_echo_n "(cached) " >&6
13426 else
13427 ac_check_lib_save_LIBS=$LIBS
13428 LIBS="-lwldap32 $LIBS"
13429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13430 /* end confdefs.h. */
13432 /* Override any GCC internal prototype to avoid an error.
13433 Use char because int might match the return type of a GCC
13434 builtin and then its argument prototype would still apply. */
13435 #ifdef __cplusplus
13436 extern "C"
13437 #endif
13438 char ldap_bind ();
13440 main ()
13442 return ldap_bind ();
13444 return 0;
13446 _ACEOF
13447 if ac_fn_c_try_link "$LINENO"; then :
13448 ac_cv_lib_wldap32_ldap_bind=yes
13449 else
13450 ac_cv_lib_wldap32_ldap_bind=no
13452 rm -f core conftest.err conftest.$ac_objext \
13453 conftest$ac_exeext conftest.$ac_ext
13454 LIBS=$ac_check_lib_save_LIBS
13456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
13457 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
13458 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
13459 cat >>confdefs.h <<_ACEOF
13460 #define HAVE_LIBWLDAP32 1
13461 _ACEOF
13463 LIBS="-lwldap32 $LIBS"
13465 else
13466 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13469 LDAP_LIBS_FE="-lwldap32"
13470 LDAP_LIBS_BE="-lwldap32"
13472 LIBS="$_LIBS"
13477 # for contrib/sepgsql
13478 if test "$with_selinux" = yes; then
13479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
13480 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
13481 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
13482 $as_echo_n "(cached) " >&6
13483 else
13484 ac_check_lib_save_LIBS=$LIBS
13485 LIBS="-lselinux $LIBS"
13486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13487 /* end confdefs.h. */
13489 /* Override any GCC internal prototype to avoid an error.
13490 Use char because int might match the return type of a GCC
13491 builtin and then its argument prototype would still apply. */
13492 #ifdef __cplusplus
13493 extern "C"
13494 #endif
13495 char security_compute_create_name ();
13497 main ()
13499 return security_compute_create_name ();
13501 return 0;
13503 _ACEOF
13504 if ac_fn_c_try_link "$LINENO"; then :
13505 ac_cv_lib_selinux_security_compute_create_name=yes
13506 else
13507 ac_cv_lib_selinux_security_compute_create_name=no
13509 rm -f core conftest.err conftest.$ac_objext \
13510 conftest$ac_exeext conftest.$ac_ext
13511 LIBS=$ac_check_lib_save_LIBS
13513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
13514 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
13515 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
13516 cat >>confdefs.h <<_ACEOF
13517 #define HAVE_LIBSELINUX 1
13518 _ACEOF
13520 LIBS="-lselinux $LIBS"
13522 else
13523 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
13528 # for contrib/uuid-ossp
13529 if test "$with_uuid" = bsd ; then
13530 # On BSD, the UUID functions are in libc
13531 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
13532 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
13533 UUID_LIBS=""
13534 else
13535 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
13538 elif test "$with_uuid" = e2fs ; then
13539 # On macOS, the UUID functions are in libc
13540 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
13541 if test "x$ac_cv_func_uuid_generate" = xyes; then :
13542 UUID_LIBS=""
13543 else
13544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
13545 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
13546 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
13547 $as_echo_n "(cached) " >&6
13548 else
13549 ac_check_lib_save_LIBS=$LIBS
13550 LIBS="-luuid $LIBS"
13551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13552 /* end confdefs.h. */
13554 /* Override any GCC internal prototype to avoid an error.
13555 Use char because int might match the return type of a GCC
13556 builtin and then its argument prototype would still apply. */
13557 #ifdef __cplusplus
13558 extern "C"
13559 #endif
13560 char uuid_generate ();
13562 main ()
13564 return uuid_generate ();
13566 return 0;
13568 _ACEOF
13569 if ac_fn_c_try_link "$LINENO"; then :
13570 ac_cv_lib_uuid_uuid_generate=yes
13571 else
13572 ac_cv_lib_uuid_uuid_generate=no
13574 rm -f core conftest.err conftest.$ac_objext \
13575 conftest$ac_exeext conftest.$ac_ext
13576 LIBS=$ac_check_lib_save_LIBS
13578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13579 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13580 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13581 UUID_LIBS="-luuid"
13582 else
13583 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13588 elif test "$with_uuid" = ossp ; then
13589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13590 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13591 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13592 $as_echo_n "(cached) " >&6
13593 else
13594 ac_check_lib_save_LIBS=$LIBS
13595 LIBS="-lossp-uuid $LIBS"
13596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13597 /* end confdefs.h. */
13599 /* Override any GCC internal prototype to avoid an error.
13600 Use char because int might match the return type of a GCC
13601 builtin and then its argument prototype would still apply. */
13602 #ifdef __cplusplus
13603 extern "C"
13604 #endif
13605 char uuid_export ();
13607 main ()
13609 return uuid_export ();
13611 return 0;
13613 _ACEOF
13614 if ac_fn_c_try_link "$LINENO"; then :
13615 ac_cv_lib_ossp_uuid_uuid_export=yes
13616 else
13617 ac_cv_lib_ossp_uuid_uuid_export=no
13619 rm -f core conftest.err conftest.$ac_objext \
13620 conftest$ac_exeext conftest.$ac_ext
13621 LIBS=$ac_check_lib_save_LIBS
13623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13624 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13625 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13626 UUID_LIBS="-lossp-uuid"
13627 else
13628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13629 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13630 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13631 $as_echo_n "(cached) " >&6
13632 else
13633 ac_check_lib_save_LIBS=$LIBS
13634 LIBS="-luuid $LIBS"
13635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13636 /* end confdefs.h. */
13638 /* Override any GCC internal prototype to avoid an error.
13639 Use char because int might match the return type of a GCC
13640 builtin and then its argument prototype would still apply. */
13641 #ifdef __cplusplus
13642 extern "C"
13643 #endif
13644 char uuid_export ();
13646 main ()
13648 return uuid_export ();
13650 return 0;
13652 _ACEOF
13653 if ac_fn_c_try_link "$LINENO"; then :
13654 ac_cv_lib_uuid_uuid_export=yes
13655 else
13656 ac_cv_lib_uuid_uuid_export=no
13658 rm -f core conftest.err conftest.$ac_objext \
13659 conftest$ac_exeext conftest.$ac_ext
13660 LIBS=$ac_check_lib_save_LIBS
13662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13663 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13664 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13665 UUID_LIBS="-luuid"
13666 else
13667 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13677 ## Header files
13680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13681 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13682 if ${ac_cv_header_stdbool_h+:} false; then :
13683 $as_echo_n "(cached) " >&6
13684 else
13685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13686 /* end confdefs.h. */
13688 #include <stdbool.h>
13689 #ifndef bool
13690 "error: bool is not defined"
13691 #endif
13692 #ifndef false
13693 "error: false is not defined"
13694 #endif
13695 #if false
13696 "error: false is not 0"
13697 #endif
13698 #ifndef true
13699 "error: true is not defined"
13700 #endif
13701 #if true != 1
13702 "error: true is not 1"
13703 #endif
13704 #ifndef __bool_true_false_are_defined
13705 "error: __bool_true_false_are_defined is not defined"
13706 #endif
13708 struct s { _Bool s: 1; _Bool t; } s;
13710 char a[true == 1 ? 1 : -1];
13711 char b[false == 0 ? 1 : -1];
13712 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13713 char d[(bool) 0.5 == true ? 1 : -1];
13714 /* See body of main program for 'e'. */
13715 char f[(_Bool) 0.0 == false ? 1 : -1];
13716 char g[true];
13717 char h[sizeof (_Bool)];
13718 char i[sizeof s.t];
13719 enum { j = false, k = true, l = false * true, m = true * 256 };
13720 /* The following fails for
13721 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13722 _Bool n[m];
13723 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13724 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13725 /* Catch a bug in an HP-UX C compiler. See
13726 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13727 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13729 _Bool q = true;
13730 _Bool *pq = &q;
13733 main ()
13736 bool e = &s;
13737 *pq |= q;
13738 *pq |= ! q;
13739 /* Refer to every declared value, to avoid compiler optimizations. */
13740 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13741 + !m + !n + !o + !p + !q + !pq);
13744 return 0;
13746 _ACEOF
13747 if ac_fn_c_try_compile "$LINENO"; then :
13748 ac_cv_header_stdbool_h=yes
13749 else
13750 ac_cv_header_stdbool_h=no
13752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13755 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13756 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13757 if test "x$ac_cv_type__Bool" = xyes; then :
13759 cat >>confdefs.h <<_ACEOF
13760 #define HAVE__BOOL 1
13761 _ACEOF
13767 if test $ac_cv_header_stdbool_h = yes; then
13769 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13774 for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h sys/epoll.h sys/event.h sys/personality.h sys/prctl.h sys/procctl.h sys/signalfd.h sys/ucred.h termios.h ucred.h
13775 do :
13776 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13777 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13778 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13779 cat >>confdefs.h <<_ACEOF
13780 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13781 _ACEOF
13785 done
13788 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13789 for ac_header in readline/readline.h
13790 do :
13791 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13792 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13793 cat >>confdefs.h <<_ACEOF
13794 #define HAVE_READLINE_READLINE_H 1
13795 _ACEOF
13797 else
13798 for ac_header in readline.h
13799 do :
13800 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13801 if test "x$ac_cv_header_readline_h" = xyes; then :
13802 cat >>confdefs.h <<_ACEOF
13803 #define HAVE_READLINE_H 1
13804 _ACEOF
13806 else
13807 as_fn_error $? "readline header not found
13808 If you have readline already installed, see config.log for details on the
13809 failure. It is possible the compiler isn't looking in the proper directory.
13810 Use --without-readline to disable readline support." "$LINENO" 5
13813 done
13817 done
13819 for ac_header in readline/history.h
13820 do :
13821 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13822 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13823 cat >>confdefs.h <<_ACEOF
13824 #define HAVE_READLINE_HISTORY_H 1
13825 _ACEOF
13827 else
13828 for ac_header in history.h
13829 do :
13830 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13831 if test "x$ac_cv_header_history_h" = xyes; then :
13832 cat >>confdefs.h <<_ACEOF
13833 #define HAVE_HISTORY_H 1
13834 _ACEOF
13836 else
13837 as_fn_error $? "history header not found
13838 If you have readline already installed, see config.log for details on the
13839 failure. It is possible the compiler isn't looking in the proper directory.
13840 Use --without-readline to disable readline support." "$LINENO" 5
13843 done
13847 done
13851 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13852 # Some installations of libedit usurp /usr/include/readline/, which seems
13853 # bad practice, since in combined installations readline will have its headers
13854 # there. We might have to resort to AC_EGREP checks to make sure we found
13855 # the proper header...
13856 for ac_header in editline/readline.h
13857 do :
13858 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13859 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13860 cat >>confdefs.h <<_ACEOF
13861 #define HAVE_EDITLINE_READLINE_H 1
13862 _ACEOF
13864 else
13865 for ac_header in readline.h
13866 do :
13867 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13868 if test "x$ac_cv_header_readline_h" = xyes; then :
13869 cat >>confdefs.h <<_ACEOF
13870 #define HAVE_READLINE_H 1
13871 _ACEOF
13873 else
13874 for ac_header in readline/readline.h
13875 do :
13876 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13877 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13878 cat >>confdefs.h <<_ACEOF
13879 #define HAVE_READLINE_READLINE_H 1
13880 _ACEOF
13882 else
13883 as_fn_error $? "readline header not found
13884 If you have libedit already installed, see config.log for details on the
13885 failure. It is possible the compiler isn't looking in the proper directory.
13886 Use --without-readline to disable libedit support." "$LINENO" 5
13889 done
13893 done
13897 done
13899 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13900 # not be there at all. Hence, don't complain if not found. We must check
13901 # though, since in yet other versions it is an independent header.
13902 for ac_header in editline/history.h
13903 do :
13904 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13905 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13906 cat >>confdefs.h <<_ACEOF
13907 #define HAVE_EDITLINE_HISTORY_H 1
13908 _ACEOF
13910 else
13911 for ac_header in history.h
13912 do :
13913 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13914 if test "x$ac_cv_header_history_h" = xyes; then :
13915 cat >>confdefs.h <<_ACEOF
13916 #define HAVE_HISTORY_H 1
13917 _ACEOF
13919 else
13920 for ac_header in readline/history.h
13921 do :
13922 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13923 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13924 cat >>confdefs.h <<_ACEOF
13925 #define HAVE_READLINE_HISTORY_H 1
13926 _ACEOF
13930 done
13934 done
13938 done
13942 if test "$with_zlib" = yes; then
13943 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13944 if test "x$ac_cv_header_zlib_h" = xyes; then :
13946 else
13947 as_fn_error $? "zlib header not found
13948 If you have zlib already installed, see config.log for details on the
13949 failure. It is possible the compiler isn't looking in the proper directory.
13950 Use --without-zlib to disable zlib support." "$LINENO" 5
13956 if test -z "$LZ4"; then
13957 for ac_prog in lz4
13959 # Extract the first word of "$ac_prog", so it can be a program name with args.
13960 set dummy $ac_prog; ac_word=$2
13961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13962 $as_echo_n "checking for $ac_word... " >&6; }
13963 if ${ac_cv_path_LZ4+:} false; then :
13964 $as_echo_n "(cached) " >&6
13965 else
13966 case $LZ4 in
13967 [\\/]* | ?:[\\/]*)
13968 ac_cv_path_LZ4="$LZ4" # Let the user override the test with a path.
13971 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13972 for as_dir in $PATH
13974 IFS=$as_save_IFS
13975 test -z "$as_dir" && as_dir=.
13976 for ac_exec_ext in '' $ac_executable_extensions; do
13977 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13978 ac_cv_path_LZ4="$as_dir/$ac_word$ac_exec_ext"
13979 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13980 break 2
13982 done
13983 done
13984 IFS=$as_save_IFS
13987 esac
13989 LZ4=$ac_cv_path_LZ4
13990 if test -n "$LZ4"; then
13991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13992 $as_echo "$LZ4" >&6; }
13993 else
13994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13995 $as_echo "no" >&6; }
13999 test -n "$LZ4" && break
14000 done
14002 else
14003 # Report the value of LZ4 in configure's output in all cases.
14004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4" >&5
14005 $as_echo_n "checking for LZ4... " >&6; }
14006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
14007 $as_echo "$LZ4" >&6; }
14010 if test "$with_lz4" = yes; then
14011 ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
14012 if test "x$ac_cv_header_lz4_h" = xyes; then :
14014 else
14015 as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
14021 if test -z "$ZSTD"; then
14022 for ac_prog in zstd
14024 # Extract the first word of "$ac_prog", so it can be a program name with args.
14025 set dummy $ac_prog; ac_word=$2
14026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14027 $as_echo_n "checking for $ac_word... " >&6; }
14028 if ${ac_cv_path_ZSTD+:} false; then :
14029 $as_echo_n "(cached) " >&6
14030 else
14031 case $ZSTD in
14032 [\\/]* | ?:[\\/]*)
14033 ac_cv_path_ZSTD="$ZSTD" # Let the user override the test with a path.
14036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14037 for as_dir in $PATH
14039 IFS=$as_save_IFS
14040 test -z "$as_dir" && as_dir=.
14041 for ac_exec_ext in '' $ac_executable_extensions; do
14042 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14043 ac_cv_path_ZSTD="$as_dir/$ac_word$ac_exec_ext"
14044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14045 break 2
14047 done
14048 done
14049 IFS=$as_save_IFS
14052 esac
14054 ZSTD=$ac_cv_path_ZSTD
14055 if test -n "$ZSTD"; then
14056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
14057 $as_echo "$ZSTD" >&6; }
14058 else
14059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14060 $as_echo "no" >&6; }
14064 test -n "$ZSTD" && break
14065 done
14067 else
14068 # Report the value of ZSTD in configure's output in all cases.
14069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD" >&5
14070 $as_echo_n "checking for ZSTD... " >&6; }
14071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
14072 $as_echo "$ZSTD" >&6; }
14075 if test "$with_zstd" = yes; then
14076 ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default"
14077 if test "x$ac_cv_header_zstd_h" = xyes; then :
14079 else
14080 as_fn_error $? "zstd.h header file is required for ZSTD" "$LINENO" 5
14086 if test "$with_gssapi" = yes ; then
14087 for ac_header in gssapi/gssapi.h
14088 do :
14089 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
14090 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
14091 cat >>confdefs.h <<_ACEOF
14092 #define HAVE_GSSAPI_GSSAPI_H 1
14093 _ACEOF
14095 else
14096 for ac_header in gssapi.h
14097 do :
14098 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
14099 if test "x$ac_cv_header_gssapi_h" = xyes; then :
14100 cat >>confdefs.h <<_ACEOF
14101 #define HAVE_GSSAPI_H 1
14102 _ACEOF
14104 else
14105 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
14108 done
14112 done
14116 if test -z "$OPENSSL"; then
14117 for ac_prog in openssl
14119 # Extract the first word of "$ac_prog", so it can be a program name with args.
14120 set dummy $ac_prog; ac_word=$2
14121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14122 $as_echo_n "checking for $ac_word... " >&6; }
14123 if ${ac_cv_path_OPENSSL+:} false; then :
14124 $as_echo_n "(cached) " >&6
14125 else
14126 case $OPENSSL in
14127 [\\/]* | ?:[\\/]*)
14128 ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a path.
14131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14132 for as_dir in $PATH
14134 IFS=$as_save_IFS
14135 test -z "$as_dir" && as_dir=.
14136 for ac_exec_ext in '' $ac_executable_extensions; do
14137 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14138 ac_cv_path_OPENSSL="$as_dir/$ac_word$ac_exec_ext"
14139 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14140 break 2
14142 done
14143 done
14144 IFS=$as_save_IFS
14147 esac
14149 OPENSSL=$ac_cv_path_OPENSSL
14150 if test -n "$OPENSSL"; then
14151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
14152 $as_echo "$OPENSSL" >&6; }
14153 else
14154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14155 $as_echo "no" >&6; }
14159 test -n "$OPENSSL" && break
14160 done
14162 else
14163 # Report the value of OPENSSL in configure's output in all cases.
14164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
14165 $as_echo_n "checking for OPENSSL... " >&6; }
14166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
14167 $as_echo "$OPENSSL" >&6; }
14170 if test "$with_ssl" = openssl ; then
14171 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
14172 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
14174 else
14175 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
14179 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
14180 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
14182 else
14183 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
14189 if test "$with_pam" = yes ; then
14190 for ac_header in security/pam_appl.h
14191 do :
14192 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
14193 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
14194 cat >>confdefs.h <<_ACEOF
14195 #define HAVE_SECURITY_PAM_APPL_H 1
14196 _ACEOF
14198 else
14199 for ac_header in pam/pam_appl.h
14200 do :
14201 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
14202 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
14203 cat >>confdefs.h <<_ACEOF
14204 #define HAVE_PAM_PAM_APPL_H 1
14205 _ACEOF
14207 else
14208 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
14211 done
14215 done
14219 if test "$with_bsd_auth" = yes ; then
14220 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
14221 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
14223 else
14224 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
14230 if test "$with_systemd" = yes ; then
14231 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
14232 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
14234 else
14235 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
14241 if test "$with_libxml" = yes ; then
14242 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
14243 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
14245 else
14246 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
14252 if test "$with_libxslt" = yes ; then
14253 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
14254 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
14256 else
14257 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
14263 if test "$with_ldap" = yes ; then
14264 if test "$PORTNAME" != "win32"; then
14265 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
14266 if test "x$ac_cv_header_ldap_h" = xyes; then :
14268 else
14269 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
14273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
14274 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
14275 if ${pgac_cv_ldap_safe+:} false; then :
14276 $as_echo_n "(cached) " >&6
14277 else
14278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14279 /* end confdefs.h. */
14280 #include <ldap.h>
14281 #if !defined(LDAP_VENDOR_VERSION) || \
14282 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
14283 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
14284 choke me
14285 #endif
14287 main ()
14291 return 0;
14293 _ACEOF
14294 if ac_fn_c_try_compile "$LINENO"; then :
14295 pgac_cv_ldap_safe=yes
14296 else
14297 pgac_cv_ldap_safe=no
14299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
14302 $as_echo "$pgac_cv_ldap_safe" >&6; }
14304 if test "$pgac_cv_ldap_safe" != yes; then
14305 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14306 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14307 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14308 *** also uses LDAP will crash on exit." >&5
14309 $as_echo "$as_me: WARNING:
14310 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14311 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14312 *** also uses LDAP will crash on exit." >&2;}
14314 else
14315 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
14316 #include <windows.h>
14319 if test "x$ac_cv_header_winldap_h" = xyes; then :
14321 else
14322 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
14329 if test "$with_bonjour" = yes ; then
14330 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
14331 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
14333 else
14334 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
14340 # for contrib/uuid-ossp
14341 if test "$with_uuid" = bsd ; then
14342 for ac_header in uuid.h
14343 do :
14344 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14345 if test "x$ac_cv_header_uuid_h" = xyes; then :
14346 cat >>confdefs.h <<_ACEOF
14347 #define HAVE_UUID_H 1
14348 _ACEOF
14349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14350 /* end confdefs.h. */
14351 #include <uuid.h>
14353 _ACEOF
14354 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14355 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
14357 else
14358 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
14360 rm -f conftest*
14362 else
14363 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
14366 done
14368 elif test "$with_uuid" = e2fs ; then
14369 for ac_header in uuid/uuid.h
14370 do :
14371 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
14372 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
14373 cat >>confdefs.h <<_ACEOF
14374 #define HAVE_UUID_UUID_H 1
14375 _ACEOF
14376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14377 /* end confdefs.h. */
14378 #include <uuid/uuid.h>
14380 _ACEOF
14381 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14382 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14384 else
14385 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
14387 rm -f conftest*
14389 else
14390 for ac_header in uuid.h
14391 do :
14392 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14393 if test "x$ac_cv_header_uuid_h" = xyes; then :
14394 cat >>confdefs.h <<_ACEOF
14395 #define HAVE_UUID_H 1
14396 _ACEOF
14397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14398 /* end confdefs.h. */
14399 #include <uuid.h>
14401 _ACEOF
14402 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14403 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14405 else
14406 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
14408 rm -f conftest*
14410 else
14411 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
14414 done
14418 done
14420 elif test "$with_uuid" = ossp ; then
14421 for ac_header in ossp/uuid.h
14422 do :
14423 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
14424 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
14425 cat >>confdefs.h <<_ACEOF
14426 #define HAVE_OSSP_UUID_H 1
14427 _ACEOF
14428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14429 /* end confdefs.h. */
14430 #include <ossp/uuid.h>
14432 _ACEOF
14433 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14434 $EGREP "uuid_export" >/dev/null 2>&1; then :
14436 else
14437 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
14439 rm -f conftest*
14441 else
14442 for ac_header in uuid.h
14443 do :
14444 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14445 if test "x$ac_cv_header_uuid_h" = xyes; then :
14446 cat >>confdefs.h <<_ACEOF
14447 #define HAVE_UUID_H 1
14448 _ACEOF
14449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14450 /* end confdefs.h. */
14451 #include <uuid.h>
14453 _ACEOF
14454 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14455 $EGREP "uuid_export" >/dev/null 2>&1; then :
14457 else
14458 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
14460 rm -f conftest*
14462 else
14463 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
14466 done
14470 done
14474 if test "$PORTNAME" = "win32" ; then
14475 for ac_header in crtdefs.h
14476 do :
14477 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
14478 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
14479 cat >>confdefs.h <<_ACEOF
14480 #define HAVE_CRTDEFS_H 1
14481 _ACEOF
14485 done
14490 ## Types, structures, compiler characteristics
14493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14494 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14495 if ${ac_cv_c_bigendian+:} false; then :
14496 $as_echo_n "(cached) " >&6
14497 else
14498 ac_cv_c_bigendian=unknown
14499 # See if we're dealing with a universal compiler.
14500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14501 /* end confdefs.h. */
14502 #ifndef __APPLE_CC__
14503 not a universal capable compiler
14504 #endif
14505 typedef int dummy;
14507 _ACEOF
14508 if ac_fn_c_try_compile "$LINENO"; then :
14510 # Check for potential -arch flags. It is not universal unless
14511 # there are at least two -arch flags with different values.
14512 ac_arch=
14513 ac_prev=
14514 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14515 if test -n "$ac_prev"; then
14516 case $ac_word in
14517 i?86 | x86_64 | ppc | ppc64)
14518 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14519 ac_arch=$ac_word
14520 else
14521 ac_cv_c_bigendian=universal
14522 break
14525 esac
14526 ac_prev=
14527 elif test "x$ac_word" = "x-arch"; then
14528 ac_prev=arch
14530 done
14532 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14533 if test $ac_cv_c_bigendian = unknown; then
14534 # See if sys/param.h defines the BYTE_ORDER macro.
14535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14536 /* end confdefs.h. */
14537 #include <sys/types.h>
14538 #include <sys/param.h>
14541 main ()
14543 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14544 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14545 && LITTLE_ENDIAN)
14546 bogus endian macros
14547 #endif
14550 return 0;
14552 _ACEOF
14553 if ac_fn_c_try_compile "$LINENO"; then :
14554 # It does; now see whether it defined to BIG_ENDIAN or not.
14555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14556 /* end confdefs.h. */
14557 #include <sys/types.h>
14558 #include <sys/param.h>
14561 main ()
14563 #if BYTE_ORDER != BIG_ENDIAN
14564 not big endian
14565 #endif
14568 return 0;
14570 _ACEOF
14571 if ac_fn_c_try_compile "$LINENO"; then :
14572 ac_cv_c_bigendian=yes
14573 else
14574 ac_cv_c_bigendian=no
14576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14580 if test $ac_cv_c_bigendian = unknown; then
14581 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14583 /* end confdefs.h. */
14584 #include <limits.h>
14587 main ()
14589 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14590 bogus endian macros
14591 #endif
14594 return 0;
14596 _ACEOF
14597 if ac_fn_c_try_compile "$LINENO"; then :
14598 # It does; now see whether it defined to _BIG_ENDIAN or not.
14599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14600 /* end confdefs.h. */
14601 #include <limits.h>
14604 main ()
14606 #ifndef _BIG_ENDIAN
14607 not big endian
14608 #endif
14611 return 0;
14613 _ACEOF
14614 if ac_fn_c_try_compile "$LINENO"; then :
14615 ac_cv_c_bigendian=yes
14616 else
14617 ac_cv_c_bigendian=no
14619 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14623 if test $ac_cv_c_bigendian = unknown; then
14624 # Compile a test program.
14625 if test "$cross_compiling" = yes; then :
14626 # Try to guess by grepping values from an object file.
14627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14628 /* end confdefs.h. */
14629 short int ascii_mm[] =
14630 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14631 short int ascii_ii[] =
14632 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14633 int use_ascii (int i) {
14634 return ascii_mm[i] + ascii_ii[i];
14636 short int ebcdic_ii[] =
14637 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14638 short int ebcdic_mm[] =
14639 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14640 int use_ebcdic (int i) {
14641 return ebcdic_mm[i] + ebcdic_ii[i];
14643 extern int foo;
14646 main ()
14648 return use_ascii (foo) == use_ebcdic (foo);
14650 return 0;
14652 _ACEOF
14653 if ac_fn_c_try_compile "$LINENO"; then :
14654 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14655 ac_cv_c_bigendian=yes
14657 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14658 if test "$ac_cv_c_bigendian" = unknown; then
14659 ac_cv_c_bigendian=no
14660 else
14661 # finding both strings is unlikely to happen, but who knows?
14662 ac_cv_c_bigendian=unknown
14666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14667 else
14668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14669 /* end confdefs.h. */
14670 $ac_includes_default
14672 main ()
14675 /* Are we little or big endian? From Harbison&Steele. */
14676 union
14678 long int l;
14679 char c[sizeof (long int)];
14680 } u;
14681 u.l = 1;
14682 return u.c[sizeof (long int) - 1] == 1;
14685 return 0;
14687 _ACEOF
14688 if ac_fn_c_try_run "$LINENO"; then :
14689 ac_cv_c_bigendian=no
14690 else
14691 ac_cv_c_bigendian=yes
14693 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14694 conftest.$ac_objext conftest.beam conftest.$ac_ext
14699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14700 $as_echo "$ac_cv_c_bigendian" >&6; }
14701 case $ac_cv_c_bigendian in #(
14702 yes)
14703 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14704 ;; #(
14706 ;; #(
14707 universal)
14709 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14711 ;; #(
14713 as_fn_error $? "unknown endianness
14714 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14715 esac
14717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14718 $as_echo_n "checking for inline... " >&6; }
14719 if ${ac_cv_c_inline+:} false; then :
14720 $as_echo_n "(cached) " >&6
14721 else
14722 ac_cv_c_inline=no
14723 for ac_kw in inline __inline__ __inline; do
14724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14725 /* end confdefs.h. */
14726 #ifndef __cplusplus
14727 typedef int foo_t;
14728 static $ac_kw foo_t static_foo () {return 0; }
14729 $ac_kw foo_t foo () {return 0; }
14730 #endif
14732 _ACEOF
14733 if ac_fn_c_try_compile "$LINENO"; then :
14734 ac_cv_c_inline=$ac_kw
14736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14737 test "$ac_cv_c_inline" != no && break
14738 done
14741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14742 $as_echo "$ac_cv_c_inline" >&6; }
14744 case $ac_cv_c_inline in
14745 inline | yes) ;;
14747 case $ac_cv_c_inline in
14748 no) ac_val=;;
14749 *) ac_val=$ac_cv_c_inline;;
14750 esac
14751 cat >>confdefs.h <<_ACEOF
14752 #ifndef __cplusplus
14753 #define inline $ac_val
14754 #endif
14755 _ACEOF
14757 esac
14759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14760 $as_echo_n "checking for printf format archetype... " >&6; }
14761 if ${pgac_cv_printf_archetype+:} false; then :
14762 $as_echo_n "(cached) " >&6
14763 else
14764 pgac_cv_printf_archetype=gnu_printf
14765 ac_save_c_werror_flag=$ac_c_werror_flag
14766 ac_c_werror_flag=yes
14767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14768 /* end confdefs.h. */
14769 extern void pgac_write(int ignore, const char *fmt,...)
14770 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14772 main ()
14774 pgac_write(0, "error %s: %m", "foo");
14776 return 0;
14778 _ACEOF
14779 if ac_fn_c_try_compile "$LINENO"; then :
14780 ac_archetype_ok=yes
14781 else
14782 ac_archetype_ok=no
14784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14785 ac_c_werror_flag=$ac_save_c_werror_flag
14787 if [ "$ac_archetype_ok" = no ]; then
14788 pgac_cv_printf_archetype=__syslog__
14789 ac_save_c_werror_flag=$ac_c_werror_flag
14790 ac_c_werror_flag=yes
14791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14792 /* end confdefs.h. */
14793 extern void pgac_write(int ignore, const char *fmt,...)
14794 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14796 main ()
14798 pgac_write(0, "error %s: %m", "foo");
14800 return 0;
14802 _ACEOF
14803 if ac_fn_c_try_compile "$LINENO"; then :
14804 ac_archetype_ok=yes
14805 else
14806 ac_archetype_ok=no
14808 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14809 ac_c_werror_flag=$ac_save_c_werror_flag
14811 if [ "$ac_archetype_ok" = no ]; then
14812 pgac_cv_printf_archetype=printf
14816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14817 $as_echo "$pgac_cv_printf_archetype" >&6; }
14819 cat >>confdefs.h <<_ACEOF
14820 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14821 _ACEOF
14824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14825 $as_echo_n "checking for _Static_assert... " >&6; }
14826 if ${pgac_cv__static_assert+:} false; then :
14827 $as_echo_n "(cached) " >&6
14828 else
14829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14830 /* end confdefs.h. */
14833 main ()
14835 ({ _Static_assert(1, "foo"); })
14837 return 0;
14839 _ACEOF
14840 if ac_fn_c_try_link "$LINENO"; then :
14841 pgac_cv__static_assert=yes
14842 else
14843 pgac_cv__static_assert=no
14845 rm -f core conftest.err conftest.$ac_objext \
14846 conftest$ac_exeext conftest.$ac_ext
14848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14849 $as_echo "$pgac_cv__static_assert" >&6; }
14850 if test x"$pgac_cv__static_assert" = xyes ; then
14852 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14856 $as_echo_n "checking for typeof... " >&6; }
14857 if ${pgac_cv_c_typeof+:} false; then :
14858 $as_echo_n "(cached) " >&6
14859 else
14860 pgac_cv_c_typeof=no
14861 for pgac_kw in typeof __typeof__ decltype; do
14862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14863 /* end confdefs.h. */
14866 main ()
14868 int x = 0;
14869 $pgac_kw(x) y;
14870 y = x;
14871 return y;
14873 return 0;
14875 _ACEOF
14876 if ac_fn_c_try_compile "$LINENO"; then :
14877 pgac_cv_c_typeof=$pgac_kw
14879 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14880 test "$pgac_cv_c_typeof" != no && break
14881 done
14883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14884 $as_echo "$pgac_cv_c_typeof" >&6; }
14885 if test "$pgac_cv_c_typeof" != no; then
14887 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14889 if test "$pgac_cv_c_typeof" != typeof; then
14891 cat >>confdefs.h <<_ACEOF
14892 #define typeof $pgac_cv_c_typeof
14893 _ACEOF
14897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14898 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14899 if ${pgac_cv__types_compatible+:} false; then :
14900 $as_echo_n "(cached) " >&6
14901 else
14902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14903 /* end confdefs.h. */
14906 main ()
14908 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14910 return 0;
14912 _ACEOF
14913 if ac_fn_c_try_compile "$LINENO"; then :
14914 pgac_cv__types_compatible=yes
14915 else
14916 pgac_cv__types_compatible=no
14918 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14921 $as_echo "$pgac_cv__types_compatible" >&6; }
14922 if test x"$pgac_cv__types_compatible" = xyes ; then
14924 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14928 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14929 if ${pgac_cv__builtin_constant_p+:} false; then :
14930 $as_echo_n "(cached) " >&6
14931 else
14932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14933 /* end confdefs.h. */
14934 static int x;
14935 static int y[__builtin_constant_p(x) ? x : 1];
14936 static int z[__builtin_constant_p("string literal") ? 1 : x];
14939 _ACEOF
14940 if ac_fn_c_try_compile "$LINENO"; then :
14941 pgac_cv__builtin_constant_p=yes
14942 else
14943 pgac_cv__builtin_constant_p=no
14945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14948 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14949 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14951 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14955 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14956 if ${pgac_cv__builtin_unreachable+:} false; then :
14957 $as_echo_n "(cached) " >&6
14958 else
14959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14960 /* end confdefs.h. */
14963 main ()
14965 __builtin_unreachable();
14967 return 0;
14969 _ACEOF
14970 if ac_fn_c_try_link "$LINENO"; then :
14971 pgac_cv__builtin_unreachable=yes
14972 else
14973 pgac_cv__builtin_unreachable=no
14975 rm -f core conftest.err conftest.$ac_objext \
14976 conftest$ac_exeext conftest.$ac_ext
14978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14979 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14980 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14982 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14986 $as_echo_n "checking for computed goto support... " >&6; }
14987 if ${pgac_cv_computed_goto+:} false; then :
14988 $as_echo_n "(cached) " >&6
14989 else
14990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14991 /* end confdefs.h. */
14994 main ()
14996 void *labeladdrs[] = {&&my_label};
14997 goto *labeladdrs[0];
14998 my_label:
14999 return 1;
15002 return 0;
15004 _ACEOF
15005 if ac_fn_c_try_compile "$LINENO"; then :
15006 pgac_cv_computed_goto=yes
15007 else
15008 pgac_cv_computed_goto=no
15010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
15013 $as_echo "$pgac_cv_computed_goto" >&6; }
15014 if test x"$pgac_cv_computed_goto" = xyes ; then
15016 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
15019 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
15020 #include <time.h>
15023 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
15025 cat >>confdefs.h <<_ACEOF
15026 #define HAVE_STRUCT_TM_TM_ZONE 1
15027 _ACEOF
15033 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
15034 #include <sys/ipc.h>
15035 #include <sys/sem.h>
15038 if test "x$ac_cv_type_union_semun" = xyes; then :
15040 cat >>confdefs.h <<_ACEOF
15041 #define HAVE_UNION_SEMUN 1
15042 _ACEOF
15047 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/socket.h>
15049 if test "x$ac_cv_type_socklen_t" = xyes; then :
15051 cat >>confdefs.h <<_ACEOF
15052 #define HAVE_SOCKLEN_T 1
15053 _ACEOF
15058 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
15059 #include <sys/socket.h>
15062 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
15064 cat >>confdefs.h <<_ACEOF
15065 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
15066 _ACEOF
15072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
15073 $as_echo_n "checking for locale_t... " >&6; }
15074 if ${pgac_cv_type_locale_t+:} false; then :
15075 $as_echo_n "(cached) " >&6
15076 else
15077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15078 /* end confdefs.h. */
15079 #include <locale.h>
15080 locale_t x;
15082 main ()
15086 return 0;
15088 _ACEOF
15089 if ac_fn_c_try_compile "$LINENO"; then :
15090 pgac_cv_type_locale_t=yes
15091 else
15092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15093 /* end confdefs.h. */
15094 #include <xlocale.h>
15095 locale_t x;
15097 main ()
15101 return 0;
15103 _ACEOF
15104 if ac_fn_c_try_compile "$LINENO"; then :
15105 pgac_cv_type_locale_t='yes (in xlocale.h)'
15106 else
15107 pgac_cv_type_locale_t=no
15109 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15111 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
15114 $as_echo "$pgac_cv_type_locale_t" >&6; }
15115 if test "$pgac_cv_type_locale_t" != no; then
15117 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
15120 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
15122 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
15126 # MSVC doesn't cope well with defining restrict to __restrict, the
15127 # spelling it understands, because it conflicts with
15128 # __declspec(restrict). Therefore we define pg_restrict to the
15129 # appropriate definition, which presumably won't conflict.
15131 # Allow platforms with buggy compilers to force restrict to not be
15132 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
15133 # template.
15134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
15135 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
15136 if ${ac_cv_c_restrict+:} false; then :
15137 $as_echo_n "(cached) " >&6
15138 else
15139 ac_cv_c_restrict=no
15140 # The order here caters to the fact that C++ does not require restrict.
15141 for ac_kw in __restrict __restrict__ _Restrict restrict; do
15142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15143 /* end confdefs.h. */
15144 typedef int * int_ptr;
15145 int foo (int_ptr $ac_kw ip) {
15146 return ip[0];
15149 main ()
15151 int s[1];
15152 int * $ac_kw t = s;
15153 t[0] = 0;
15154 return foo(t)
15156 return 0;
15158 _ACEOF
15159 if ac_fn_c_try_compile "$LINENO"; then :
15160 ac_cv_c_restrict=$ac_kw
15162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15163 test "$ac_cv_c_restrict" != no && break
15164 done
15167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
15168 $as_echo "$ac_cv_c_restrict" >&6; }
15170 case $ac_cv_c_restrict in
15171 restrict) ;;
15172 no) $as_echo "#define restrict /**/" >>confdefs.h
15174 *) cat >>confdefs.h <<_ACEOF
15175 #define restrict $ac_cv_c_restrict
15176 _ACEOF
15178 esac
15180 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
15181 pg_restrict=""
15182 else
15183 pg_restrict="$ac_cv_c_restrict"
15186 cat >>confdefs.h <<_ACEOF
15187 #define pg_restrict $pg_restrict
15188 _ACEOF
15191 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
15192 #include <sys/param.h>
15193 #ifdef HAVE_SYS_UCRED_H
15194 #include <sys/ucred.h>
15195 #endif
15197 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
15199 cat >>confdefs.h <<_ACEOF
15200 #define HAVE_STRUCT_CMSGCRED 1
15201 _ACEOF
15207 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
15208 #include <getopt.h>
15209 #endif
15211 if test "x$ac_cv_type_struct_option" = xyes; then :
15213 cat >>confdefs.h <<_ACEOF
15214 #define HAVE_STRUCT_OPTION 1
15215 _ACEOF
15221 if test "$with_zlib" = yes; then
15222 # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
15223 # did not). While we could work around the lack of z_streamp, it
15224 # seems unwise to encourage people to use such old zlib versions...
15225 ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
15227 if test "x$ac_cv_type_z_streamp" = xyes; then :
15229 else
15230 as_fn_error $? "zlib version is too old
15231 Use --without-zlib to disable zlib support." "$LINENO" 5
15236 case $host_cpu in
15237 x86_64)
15238 # On x86_64, check if we can compile a popcntq instruction
15239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
15240 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
15241 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
15242 $as_echo_n "(cached) " >&6
15243 else
15244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15245 /* end confdefs.h. */
15248 main ()
15250 long long x = 1; long long r;
15251 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
15253 return 0;
15255 _ACEOF
15256 if ac_fn_c_try_compile "$LINENO"; then :
15257 pgac_cv_have_x86_64_popcntq=yes
15258 else
15259 pgac_cv_have_x86_64_popcntq=no
15261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
15264 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
15265 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
15267 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
15271 ppc*|powerpc*)
15272 # On PPC, check if compiler accepts "i"(x) when __builtin_constant_p(x).
15273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
15274 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
15275 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
15276 $as_echo_n "(cached) " >&6
15277 else
15278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15279 /* end confdefs.h. */
15280 static inline int
15281 addi(int ra, int si)
15283 int res = 0;
15284 if (__builtin_constant_p(si))
15285 __asm__ __volatile__(
15286 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
15287 return res;
15289 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
15291 main ()
15295 return 0;
15297 _ACEOF
15298 if ac_fn_c_try_compile "$LINENO"; then :
15299 pgac_cv_have_i_constraint__builtin_constant_p=yes
15300 else
15301 pgac_cv_have_i_constraint__builtin_constant_p=no
15303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
15306 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
15307 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
15309 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
15313 esac
15315 # Check largefile support. You might think this is a system service not a
15316 # compiler characteristic, but you'd be wrong. We must check this before
15317 # probing existence of related functions such as fseeko, since the largefile
15318 # defines can affect what is generated for that.
15319 if test "$PORTNAME" != "win32"; then
15320 # Check whether --enable-largefile was given.
15321 if test "${enable_largefile+set}" = set; then :
15322 enableval=$enable_largefile;
15325 if test "$enable_largefile" != no; then
15327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15328 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15329 if ${ac_cv_sys_largefile_CC+:} false; then :
15330 $as_echo_n "(cached) " >&6
15331 else
15332 ac_cv_sys_largefile_CC=no
15333 if test "$GCC" != yes; then
15334 ac_save_CC=$CC
15335 while :; do
15336 # IRIX 6.2 and later do not support large files by default,
15337 # so use the C compiler's -n32 option if that helps.
15338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15339 /* end confdefs.h. */
15340 #include <sys/types.h>
15341 /* Check that off_t can represent 2**63 - 1 correctly.
15342 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15343 since some C++ compilers masquerading as C compilers
15344 incorrectly reject 9223372036854775807. */
15345 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15346 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15347 && LARGE_OFF_T % 2147483647 == 1)
15348 ? 1 : -1];
15350 main ()
15354 return 0;
15356 _ACEOF
15357 if ac_fn_c_try_compile "$LINENO"; then :
15358 break
15360 rm -f core conftest.err conftest.$ac_objext
15361 CC="$CC -n32"
15362 if ac_fn_c_try_compile "$LINENO"; then :
15363 ac_cv_sys_largefile_CC=' -n32'; break
15365 rm -f core conftest.err conftest.$ac_objext
15366 break
15367 done
15368 CC=$ac_save_CC
15369 rm -f conftest.$ac_ext
15372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15373 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15374 if test "$ac_cv_sys_largefile_CC" != no; then
15375 CC=$CC$ac_cv_sys_largefile_CC
15378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15379 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15380 if ${ac_cv_sys_file_offset_bits+:} false; then :
15381 $as_echo_n "(cached) " >&6
15382 else
15383 while :; do
15384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15385 /* end confdefs.h. */
15386 #include <sys/types.h>
15387 /* Check that off_t can represent 2**63 - 1 correctly.
15388 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15389 since some C++ compilers masquerading as C compilers
15390 incorrectly reject 9223372036854775807. */
15391 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15392 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15393 && LARGE_OFF_T % 2147483647 == 1)
15394 ? 1 : -1];
15396 main ()
15400 return 0;
15402 _ACEOF
15403 if ac_fn_c_try_compile "$LINENO"; then :
15404 ac_cv_sys_file_offset_bits=no; break
15406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15408 /* end confdefs.h. */
15409 #define _FILE_OFFSET_BITS 64
15410 #include <sys/types.h>
15411 /* Check that off_t can represent 2**63 - 1 correctly.
15412 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15413 since some C++ compilers masquerading as C compilers
15414 incorrectly reject 9223372036854775807. */
15415 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15416 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15417 && LARGE_OFF_T % 2147483647 == 1)
15418 ? 1 : -1];
15420 main ()
15424 return 0;
15426 _ACEOF
15427 if ac_fn_c_try_compile "$LINENO"; then :
15428 ac_cv_sys_file_offset_bits=64; break
15430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15431 ac_cv_sys_file_offset_bits=unknown
15432 break
15433 done
15435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15436 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15437 case $ac_cv_sys_file_offset_bits in #(
15438 no | unknown) ;;
15440 cat >>confdefs.h <<_ACEOF
15441 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15442 _ACEOF
15444 esac
15445 rm -rf conftest*
15446 if test $ac_cv_sys_file_offset_bits = unknown; then
15447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15448 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15449 if ${ac_cv_sys_large_files+:} false; then :
15450 $as_echo_n "(cached) " >&6
15451 else
15452 while :; do
15453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15454 /* end confdefs.h. */
15455 #include <sys/types.h>
15456 /* Check that off_t can represent 2**63 - 1 correctly.
15457 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15458 since some C++ compilers masquerading as C compilers
15459 incorrectly reject 9223372036854775807. */
15460 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15461 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15462 && LARGE_OFF_T % 2147483647 == 1)
15463 ? 1 : -1];
15465 main ()
15469 return 0;
15471 _ACEOF
15472 if ac_fn_c_try_compile "$LINENO"; then :
15473 ac_cv_sys_large_files=no; break
15475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15477 /* end confdefs.h. */
15478 #define _LARGE_FILES 1
15479 #include <sys/types.h>
15480 /* Check that off_t can represent 2**63 - 1 correctly.
15481 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15482 since some C++ compilers masquerading as C compilers
15483 incorrectly reject 9223372036854775807. */
15484 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15485 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15486 && LARGE_OFF_T % 2147483647 == 1)
15487 ? 1 : -1];
15489 main ()
15493 return 0;
15495 _ACEOF
15496 if ac_fn_c_try_compile "$LINENO"; then :
15497 ac_cv_sys_large_files=1; break
15499 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15500 ac_cv_sys_large_files=unknown
15501 break
15502 done
15504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15505 $as_echo "$ac_cv_sys_large_files" >&6; }
15506 case $ac_cv_sys_large_files in #(
15507 no | unknown) ;;
15509 cat >>confdefs.h <<_ACEOF
15510 #define _LARGE_FILES $ac_cv_sys_large_files
15511 _ACEOF
15513 esac
15514 rm -rf conftest*
15523 # The cast to long int works around a bug in the HP C Compiler
15524 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15525 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15526 # This bug is HP SR number 8606223364.
15527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15528 $as_echo_n "checking size of off_t... " >&6; }
15529 if ${ac_cv_sizeof_off_t+:} false; then :
15530 $as_echo_n "(cached) " >&6
15531 else
15532 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
15534 else
15535 if test "$ac_cv_type_off_t" = yes; then
15536 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15537 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15538 as_fn_error 77 "cannot compute sizeof (off_t)
15539 See \`config.log' for more details" "$LINENO" 5; }
15540 else
15541 ac_cv_sizeof_off_t=0
15546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15547 $as_echo "$ac_cv_sizeof_off_t" >&6; }
15551 cat >>confdefs.h <<_ACEOF
15552 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15553 _ACEOF
15557 # If we don't have largefile support, can't handle segsize >= 2GB.
15558 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
15559 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15562 # The cast to long int works around a bug in the HP C Compiler
15563 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15564 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15565 # This bug is HP SR number 8606223364.
15566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
15567 $as_echo_n "checking size of bool... " >&6; }
15568 if ${ac_cv_sizeof_bool+:} false; then :
15569 $as_echo_n "(cached) " >&6
15570 else
15571 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
15572 #include <stdbool.h>
15573 #endif
15574 "; then :
15576 else
15577 if test "$ac_cv_type_bool" = yes; then
15578 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15579 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15580 as_fn_error 77 "cannot compute sizeof (bool)
15581 See \`config.log' for more details" "$LINENO" 5; }
15582 else
15583 ac_cv_sizeof_bool=0
15588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15589 $as_echo "$ac_cv_sizeof_bool" >&6; }
15593 cat >>confdefs.h <<_ACEOF
15594 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15595 _ACEOF
15599 if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
15601 $as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
15607 ## Functions, global variables
15610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15611 $as_echo_n "checking for int timezone... " >&6; }
15612 if ${pgac_cv_var_int_timezone+:} false; then :
15613 $as_echo_n "(cached) " >&6
15614 else
15615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15616 /* end confdefs.h. */
15617 #include <time.h>
15618 int res;
15620 main ()
15622 #ifndef __CYGWIN__
15623 res = timezone / 60;
15624 #else
15625 res = _timezone / 60;
15626 #endif
15628 return 0;
15630 _ACEOF
15631 if ac_fn_c_try_link "$LINENO"; then :
15632 pgac_cv_var_int_timezone=yes
15633 else
15634 pgac_cv_var_int_timezone=no
15636 rm -f core conftest.err conftest.$ac_objext \
15637 conftest$ac_exeext conftest.$ac_ext
15639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15640 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15641 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15643 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15647 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15648 if ${pgac_cv_func_wcstombs_l+:} false; then :
15649 $as_echo_n "(cached) " >&6
15650 else
15651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15652 /* end confdefs.h. */
15653 #include <stdlib.h>
15654 #include <locale.h>
15656 main ()
15658 #ifndef wcstombs_l
15659 (void) wcstombs_l;
15660 #endif
15662 return 0;
15664 _ACEOF
15665 if ac_fn_c_try_compile "$LINENO"; then :
15666 pgac_cv_func_wcstombs_l='yes'
15667 else
15668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15669 /* end confdefs.h. */
15670 #include <stdlib.h>
15671 #include <locale.h>
15672 #include <xlocale.h>
15674 main ()
15676 #ifndef wcstombs_l
15677 (void) wcstombs_l;
15678 #endif
15680 return 0;
15682 _ACEOF
15683 if ac_fn_c_try_compile "$LINENO"; then :
15684 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15685 else
15686 pgac_cv_func_wcstombs_l='no'
15688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15693 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15694 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15696 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15700 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15701 # symbols that that library has no business exposing to the world. Pending
15702 # acquisition of a clue by those developers, ignore libedit (including its
15703 # possible alias of libreadline) while checking for everything else.
15704 LIBS_including_readline="$LIBS"
15705 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15707 for ac_func in backtrace_symbols copyfile getifaddrs getpeerucred inet_pton kqueue mbstowcs_l memset_s posix_fallocate ppoll pthread_is_threaded_np setproctitle setproctitle_fast strchrnul strsignal syncfs sync_file_range uselocale wcstombs_l
15708 do :
15709 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15710 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15711 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15712 cat >>confdefs.h <<_ACEOF
15713 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15714 _ACEOF
15717 done
15720 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15722 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15723 if ${pgac_cv__builtin_bswap16+:} false; then :
15724 $as_echo_n "(cached) " >&6
15725 else
15726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15727 /* end confdefs.h. */
15730 call__builtin_bswap16(int x)
15732 return __builtin_bswap16(x);
15735 main ()
15739 return 0;
15741 _ACEOF
15742 if ac_fn_c_try_link "$LINENO"; then :
15743 pgac_cv__builtin_bswap16=yes
15744 else
15745 pgac_cv__builtin_bswap16=no
15747 rm -f core conftest.err conftest.$ac_objext \
15748 conftest$ac_exeext conftest.$ac_ext
15750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15751 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15752 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15754 cat >>confdefs.h <<_ACEOF
15755 #define HAVE__BUILTIN_BSWAP16 1
15756 _ACEOF
15759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15760 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15761 if ${pgac_cv__builtin_bswap32+:} false; then :
15762 $as_echo_n "(cached) " >&6
15763 else
15764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15765 /* end confdefs.h. */
15768 call__builtin_bswap32(int x)
15770 return __builtin_bswap32(x);
15773 main ()
15777 return 0;
15779 _ACEOF
15780 if ac_fn_c_try_link "$LINENO"; then :
15781 pgac_cv__builtin_bswap32=yes
15782 else
15783 pgac_cv__builtin_bswap32=no
15785 rm -f core conftest.err conftest.$ac_objext \
15786 conftest$ac_exeext conftest.$ac_ext
15788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15789 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15790 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15792 cat >>confdefs.h <<_ACEOF
15793 #define HAVE__BUILTIN_BSWAP32 1
15794 _ACEOF
15797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15798 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15799 if ${pgac_cv__builtin_bswap64+:} false; then :
15800 $as_echo_n "(cached) " >&6
15801 else
15802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15803 /* end confdefs.h. */
15806 call__builtin_bswap64(long int x)
15808 return __builtin_bswap64(x);
15811 main ()
15815 return 0;
15817 _ACEOF
15818 if ac_fn_c_try_link "$LINENO"; then :
15819 pgac_cv__builtin_bswap64=yes
15820 else
15821 pgac_cv__builtin_bswap64=no
15823 rm -f core conftest.err conftest.$ac_objext \
15824 conftest$ac_exeext conftest.$ac_ext
15826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15827 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15828 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15830 cat >>confdefs.h <<_ACEOF
15831 #define HAVE__BUILTIN_BSWAP64 1
15832 _ACEOF
15835 # We assume that we needn't test all widths of these explicitly:
15836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15837 $as_echo_n "checking for __builtin_clz... " >&6; }
15838 if ${pgac_cv__builtin_clz+:} false; then :
15839 $as_echo_n "(cached) " >&6
15840 else
15841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15842 /* end confdefs.h. */
15845 call__builtin_clz(unsigned int x)
15847 return __builtin_clz(x);
15850 main ()
15854 return 0;
15856 _ACEOF
15857 if ac_fn_c_try_link "$LINENO"; then :
15858 pgac_cv__builtin_clz=yes
15859 else
15860 pgac_cv__builtin_clz=no
15862 rm -f core conftest.err conftest.$ac_objext \
15863 conftest$ac_exeext conftest.$ac_ext
15865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15866 $as_echo "$pgac_cv__builtin_clz" >&6; }
15867 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15869 cat >>confdefs.h <<_ACEOF
15870 #define HAVE__BUILTIN_CLZ 1
15871 _ACEOF
15874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15875 $as_echo_n "checking for __builtin_ctz... " >&6; }
15876 if ${pgac_cv__builtin_ctz+:} false; then :
15877 $as_echo_n "(cached) " >&6
15878 else
15879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15880 /* end confdefs.h. */
15883 call__builtin_ctz(unsigned int x)
15885 return __builtin_ctz(x);
15888 main ()
15892 return 0;
15894 _ACEOF
15895 if ac_fn_c_try_link "$LINENO"; then :
15896 pgac_cv__builtin_ctz=yes
15897 else
15898 pgac_cv__builtin_ctz=no
15900 rm -f core conftest.err conftest.$ac_objext \
15901 conftest$ac_exeext conftest.$ac_ext
15903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15904 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15905 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15907 cat >>confdefs.h <<_ACEOF
15908 #define HAVE__BUILTIN_CTZ 1
15909 _ACEOF
15912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15913 $as_echo_n "checking for __builtin_popcount... " >&6; }
15914 if ${pgac_cv__builtin_popcount+:} false; then :
15915 $as_echo_n "(cached) " >&6
15916 else
15917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15918 /* end confdefs.h. */
15921 call__builtin_popcount(unsigned int x)
15923 return __builtin_popcount(x);
15926 main ()
15930 return 0;
15932 _ACEOF
15933 if ac_fn_c_try_link "$LINENO"; then :
15934 pgac_cv__builtin_popcount=yes
15935 else
15936 pgac_cv__builtin_popcount=no
15938 rm -f core conftest.err conftest.$ac_objext \
15939 conftest$ac_exeext conftest.$ac_ext
15941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15942 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15943 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15945 cat >>confdefs.h <<_ACEOF
15946 #define HAVE__BUILTIN_POPCOUNT 1
15947 _ACEOF
15950 # __builtin_frame_address may draw a diagnostic for non-constant argument,
15951 # so it needs a different test function.
15952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
15953 $as_echo_n "checking for __builtin_frame_address... " >&6; }
15954 if ${pgac_cv__builtin_frame_address+:} false; then :
15955 $as_echo_n "(cached) " >&6
15956 else
15957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15958 /* end confdefs.h. */
15960 void *
15961 call__builtin_frame_address(void)
15963 return __builtin_frame_address(0);
15966 main ()
15970 return 0;
15972 _ACEOF
15973 if ac_fn_c_try_link "$LINENO"; then :
15974 pgac_cv__builtin_frame_address=yes
15975 else
15976 pgac_cv__builtin_frame_address=no
15978 rm -f core conftest.err conftest.$ac_objext \
15979 conftest$ac_exeext conftest.$ac_ext
15981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5
15982 $as_echo "$pgac_cv__builtin_frame_address" >&6; }
15983 if test x"${pgac_cv__builtin_frame_address}" = xyes ; then
15985 cat >>confdefs.h <<_ACEOF
15986 #define HAVE__BUILTIN_FRAME_ADDRESS 1
15987 _ACEOF
15991 # We require 64-bit fseeko() to be available, but run this check anyway
15992 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
15993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15994 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15995 if ${ac_cv_sys_largefile_source+:} false; then :
15996 $as_echo_n "(cached) " >&6
15997 else
15998 while :; do
15999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16000 /* end confdefs.h. */
16001 #include <sys/types.h> /* for off_t */
16002 #include <stdio.h>
16004 main ()
16006 int (*fp) (FILE *, off_t, int) = fseeko;
16007 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
16009 return 0;
16011 _ACEOF
16012 if ac_fn_c_try_link "$LINENO"; then :
16013 ac_cv_sys_largefile_source=no; break
16015 rm -f core conftest.err conftest.$ac_objext \
16016 conftest$ac_exeext conftest.$ac_ext
16017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16018 /* end confdefs.h. */
16019 #define _LARGEFILE_SOURCE 1
16020 #include <sys/types.h> /* for off_t */
16021 #include <stdio.h>
16023 main ()
16025 int (*fp) (FILE *, off_t, int) = fseeko;
16026 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
16028 return 0;
16030 _ACEOF
16031 if ac_fn_c_try_link "$LINENO"; then :
16032 ac_cv_sys_largefile_source=1; break
16034 rm -f core conftest.err conftest.$ac_objext \
16035 conftest$ac_exeext conftest.$ac_ext
16036 ac_cv_sys_largefile_source=unknown
16037 break
16038 done
16040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
16041 $as_echo "$ac_cv_sys_largefile_source" >&6; }
16042 case $ac_cv_sys_largefile_source in #(
16043 no | unknown) ;;
16045 cat >>confdefs.h <<_ACEOF
16046 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16047 _ACEOF
16049 esac
16050 rm -rf conftest*
16052 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16053 # in glibc 2.1.3, but that breaks too many other things.
16054 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16055 if test $ac_cv_sys_largefile_source != unknown; then
16057 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
16062 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
16063 # by calling it, 2009-04-02
16064 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
16065 # The Clang compiler raises a warning for an undeclared identifier that matches
16066 # a compiler builtin function. All extant Clang versions are affected, as of
16067 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
16068 # C and Objective C languages, but Clang does report an error under C++ and
16069 # Objective C++.
16071 # Passing -fno-builtin to the compiler would suppress this problem. That
16072 # strategy would have the advantage of being insensitive to stray warnings, but
16073 # it would make tests less realistic.
16074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
16075 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
16076 if ${ac_cv_c_decl_report+:} false; then :
16077 $as_echo_n "(cached) " >&6
16078 else
16079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16080 /* end confdefs.h. */
16083 main ()
16085 (void) strchr;
16087 return 0;
16089 _ACEOF
16090 if ac_fn_c_try_compile "$LINENO"; then :
16091 if test -s conftest.err; then :
16092 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
16093 # valid AC_CHECK_DECL input. No library function is consistently available
16094 # on freestanding implementations, so test against a dummy declaration.
16095 # Include always-available headers on the off chance that they somehow
16096 # elicit warnings.
16097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16098 /* end confdefs.h. */
16099 #include <float.h>
16100 #include <limits.h>
16101 #include <stdarg.h>
16102 #include <stddef.h>
16103 extern void ac_decl (int, char *);
16105 main ()
16107 #ifdef __cplusplus
16108 (void) ac_decl ((int) 0, (char *) 0);
16109 (void) ac_decl;
16110 #else
16111 (void) ac_decl;
16112 #endif
16115 return 0;
16117 _ACEOF
16118 if ac_fn_c_try_compile "$LINENO"; then :
16119 if test -s conftest.err; then :
16120 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16121 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16122 as_fn_error $? "cannot detect from compiler exit status or warnings
16123 See \`config.log' for more details" "$LINENO" 5; }
16124 else
16125 ac_cv_c_decl_report=warning
16127 else
16128 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16129 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16130 as_fn_error $? "cannot compile a simple declaration test
16131 See \`config.log' for more details" "$LINENO" 5; }
16133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16134 else
16135 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16136 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16137 as_fn_error $? "compiler does not report undeclared identifiers
16138 See \`config.log' for more details" "$LINENO" 5; }
16140 else
16141 ac_cv_c_decl_report=error
16143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
16146 $as_echo "$ac_cv_c_decl_report" >&6; }
16148 case $ac_cv_c_decl_report in
16149 warning) ac_c_decl_warn_flag=yes ;;
16150 *) ac_c_decl_warn_flag= ;;
16151 esac
16153 if test "$PORTNAME" != "solaris"; then :
16155 for ac_func in posix_fadvise
16156 do :
16157 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
16158 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
16159 cat >>confdefs.h <<_ACEOF
16160 #define HAVE_POSIX_FADVISE 1
16161 _ACEOF
16164 done
16166 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
16168 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
16169 ac_have_decl=1
16170 else
16171 ac_have_decl=0
16174 cat >>confdefs.h <<_ACEOF
16175 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
16176 _ACEOF
16179 fi # fi
16181 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
16183 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
16184 ac_have_decl=1
16185 else
16186 ac_have_decl=0
16189 cat >>confdefs.h <<_ACEOF
16190 #define HAVE_DECL_FDATASYNC $ac_have_decl
16191 _ACEOF
16193 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
16194 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
16195 ac_have_decl=1
16196 else
16197 ac_have_decl=0
16200 cat >>confdefs.h <<_ACEOF
16201 #define HAVE_DECL_STRLCAT $ac_have_decl
16202 _ACEOF
16203 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
16204 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
16205 ac_have_decl=1
16206 else
16207 ac_have_decl=0
16210 cat >>confdefs.h <<_ACEOF
16211 #define HAVE_DECL_STRLCPY $ac_have_decl
16212 _ACEOF
16213 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
16214 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
16215 ac_have_decl=1
16216 else
16217 ac_have_decl=0
16220 cat >>confdefs.h <<_ACEOF
16221 #define HAVE_DECL_STRNLEN $ac_have_decl
16222 _ACEOF
16225 # We can't use AC_REPLACE_FUNCS to replace these functions, because it
16226 # won't handle deployment target restrictions on macOS
16227 ac_fn_c_check_decl "$LINENO" "preadv" "ac_cv_have_decl_preadv" "#include <sys/uio.h>
16229 if test "x$ac_cv_have_decl_preadv" = xyes; then :
16230 ac_have_decl=1
16231 else
16232 ac_have_decl=0
16235 cat >>confdefs.h <<_ACEOF
16236 #define HAVE_DECL_PREADV $ac_have_decl
16237 _ACEOF
16238 if test $ac_have_decl = 1; then :
16240 else
16241 case " $LIBOBJS " in
16242 *" preadv.$ac_objext "* ) ;;
16243 *) LIBOBJS="$LIBOBJS preadv.$ac_objext"
16245 esac
16249 ac_fn_c_check_decl "$LINENO" "pwritev" "ac_cv_have_decl_pwritev" "#include <sys/uio.h>
16251 if test "x$ac_cv_have_decl_pwritev" = xyes; then :
16252 ac_have_decl=1
16253 else
16254 ac_have_decl=0
16257 cat >>confdefs.h <<_ACEOF
16258 #define HAVE_DECL_PWRITEV $ac_have_decl
16259 _ACEOF
16260 if test $ac_have_decl = 1; then :
16262 else
16263 case " $LIBOBJS " in
16264 *" pwritev.$ac_objext "* ) ;;
16265 *) LIBOBJS="$LIBOBJS pwritev.$ac_objext"
16267 esac
16272 # This is probably only present on macOS, but may as well check always
16273 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
16275 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
16276 ac_have_decl=1
16277 else
16278 ac_have_decl=0
16281 cat >>confdefs.h <<_ACEOF
16282 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
16283 _ACEOF
16286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
16287 $as_echo_n "checking for PS_STRINGS... " >&6; }
16288 if ${pgac_cv_var_PS_STRINGS+:} false; then :
16289 $as_echo_n "(cached) " >&6
16290 else
16291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16292 /* end confdefs.h. */
16293 #include <machine/vmparam.h>
16294 #include <sys/exec.h>
16297 main ()
16299 PS_STRINGS->ps_nargvstr = 1;
16300 PS_STRINGS->ps_argvstr = "foo";
16302 return 0;
16304 _ACEOF
16305 if ac_fn_c_try_link "$LINENO"; then :
16306 pgac_cv_var_PS_STRINGS=yes
16307 else
16308 pgac_cv_var_PS_STRINGS=no
16310 rm -f core conftest.err conftest.$ac_objext \
16311 conftest$ac_exeext conftest.$ac_ext
16313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
16314 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
16315 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
16317 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
16321 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
16322 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
16323 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
16325 else
16326 case " $LIBOBJS " in
16327 *" explicit_bzero.$ac_objext "* ) ;;
16328 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
16330 esac
16334 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
16335 if test "x$ac_cv_func_getopt" = xyes; then :
16336 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
16338 else
16339 case " $LIBOBJS " in
16340 *" getopt.$ac_objext "* ) ;;
16341 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16343 esac
16347 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
16348 if test "x$ac_cv_func_getpeereid" = xyes; then :
16349 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16351 else
16352 case " $LIBOBJS " in
16353 *" getpeereid.$ac_objext "* ) ;;
16354 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
16356 esac
16360 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
16361 if test "x$ac_cv_func_inet_aton" = xyes; then :
16362 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
16364 else
16365 case " $LIBOBJS " in
16366 *" inet_aton.$ac_objext "* ) ;;
16367 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
16369 esac
16373 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
16374 if test "x$ac_cv_func_mkdtemp" = xyes; then :
16375 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
16377 else
16378 case " $LIBOBJS " in
16379 *" mkdtemp.$ac_objext "* ) ;;
16380 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
16382 esac
16386 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
16387 if test "x$ac_cv_func_strlcat" = xyes; then :
16388 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
16390 else
16391 case " $LIBOBJS " in
16392 *" strlcat.$ac_objext "* ) ;;
16393 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
16395 esac
16399 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
16400 if test "x$ac_cv_func_strlcpy" = xyes; then :
16401 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
16403 else
16404 case " $LIBOBJS " in
16405 *" strlcpy.$ac_objext "* ) ;;
16406 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
16408 esac
16412 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
16413 if test "x$ac_cv_func_strnlen" = xyes; then :
16414 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
16416 else
16417 case " $LIBOBJS " in
16418 *" strnlen.$ac_objext "* ) ;;
16419 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
16421 esac
16427 if test "$enable_thread_safety" = yes; then
16428 ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
16429 if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
16430 $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
16432 else
16433 case " $LIBOBJS " in
16434 *" pthread_barrier_wait.$ac_objext "* ) ;;
16435 *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
16437 esac
16444 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
16445 # Cygwin and (apparently, based on test results) Mingw both
16446 # have a broken strtof(), so substitute its implementation.
16447 # That's not a perfect fix, since it doesn't avoid double-rounding,
16448 # but we have no better options.
16449 case " $LIBOBJS " in
16450 *" strtof.$ac_objext "* ) ;;
16451 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16453 esac
16455 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
16456 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
16459 # Similarly, use system's getopt_long() only if system provides struct option.
16460 if test x"$ac_cv_type_struct_option" = xyes ; then
16461 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
16462 if test "x$ac_cv_func_getopt_long" = xyes; then :
16463 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
16465 else
16466 case " $LIBOBJS " in
16467 *" getopt_long.$ac_objext "* ) ;;
16468 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16470 esac
16475 else
16476 case " $LIBOBJS " in
16477 *" getopt_long.$ac_objext "* ) ;;
16478 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16480 esac
16484 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
16485 # (i.e., allow '-' as a flag character), so use our version on those platforms.
16486 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
16487 case " $LIBOBJS " in
16488 *" getopt.$ac_objext "* ) ;;
16489 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16491 esac
16495 # mingw has adopted a GNU-centric interpretation of optind/optreset,
16496 # so always use our version on Windows.
16497 if test "$PORTNAME" = "win32"; then
16498 case " $LIBOBJS " in
16499 *" getopt.$ac_objext "* ) ;;
16500 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16502 esac
16504 case " $LIBOBJS " in
16505 *" getopt_long.$ac_objext "* ) ;;
16506 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16508 esac
16512 # Win32 (really MinGW) support
16513 if test "$PORTNAME" = "win32"; then
16514 for ac_func in _configthreadlocale
16515 do :
16516 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16517 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16518 cat >>confdefs.h <<_ACEOF
16519 #define HAVE__CONFIGTHREADLOCALE 1
16520 _ACEOF
16523 done
16525 case " $LIBOBJS " in
16526 *" dirmod.$ac_objext "* ) ;;
16527 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16529 esac
16531 case " $LIBOBJS " in
16532 *" kill.$ac_objext "* ) ;;
16533 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16535 esac
16537 case " $LIBOBJS " in
16538 *" open.$ac_objext "* ) ;;
16539 *) LIBOBJS="$LIBOBJS open.$ac_objext"
16541 esac
16543 case " $LIBOBJS " in
16544 *" system.$ac_objext "* ) ;;
16545 *) LIBOBJS="$LIBOBJS system.$ac_objext"
16547 esac
16549 case " $LIBOBJS " in
16550 *" win32dlopen.$ac_objext "* ) ;;
16551 *) LIBOBJS="$LIBOBJS win32dlopen.$ac_objext"
16553 esac
16555 case " $LIBOBJS " in
16556 *" win32env.$ac_objext "* ) ;;
16557 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16559 esac
16561 case " $LIBOBJS " in
16562 *" win32error.$ac_objext "* ) ;;
16563 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16565 esac
16567 case " $LIBOBJS " in
16568 *" win32fdatasync.$ac_objext "* ) ;;
16569 *) LIBOBJS="$LIBOBJS win32fdatasync.$ac_objext"
16571 esac
16573 case " $LIBOBJS " in
16574 *" win32getrusage.$ac_objext "* ) ;;
16575 *) LIBOBJS="$LIBOBJS win32getrusage.$ac_objext"
16577 esac
16579 case " $LIBOBJS " in
16580 *" win32link.$ac_objext "* ) ;;
16581 *) LIBOBJS="$LIBOBJS win32link.$ac_objext"
16583 esac
16585 case " $LIBOBJS " in
16586 *" win32ntdll.$ac_objext "* ) ;;
16587 *) LIBOBJS="$LIBOBJS win32ntdll.$ac_objext"
16589 esac
16591 case " $LIBOBJS " in
16592 *" win32pread.$ac_objext "* ) ;;
16593 *) LIBOBJS="$LIBOBJS win32pread.$ac_objext"
16595 esac
16597 case " $LIBOBJS " in
16598 *" win32pwrite.$ac_objext "* ) ;;
16599 *) LIBOBJS="$LIBOBJS win32pwrite.$ac_objext"
16601 esac
16603 case " $LIBOBJS " in
16604 *" win32security.$ac_objext "* ) ;;
16605 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16607 esac
16609 case " $LIBOBJS " in
16610 *" win32setlocale.$ac_objext "* ) ;;
16611 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16613 esac
16615 case " $LIBOBJS " in
16616 *" win32stat.$ac_objext "* ) ;;
16617 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
16619 esac
16622 # Cygwin needs only a bit of that
16623 if test "$PORTNAME" = "cygwin"; then
16624 case " $LIBOBJS " in
16625 *" dirmod.$ac_objext "* ) ;;
16626 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16628 esac
16632 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16633 if test "x$ac_cv_func_syslog" = xyes; then :
16634 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16635 if test "x$ac_cv_header_syslog_h" = xyes; then :
16637 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16646 $as_echo_n "checking for opterr... " >&6; }
16647 if ${pgac_cv_var_int_opterr+:} false; then :
16648 $as_echo_n "(cached) " >&6
16649 else
16650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16651 /* end confdefs.h. */
16652 #include <unistd.h>
16654 main ()
16656 extern int opterr; opterr = 1;
16658 return 0;
16660 _ACEOF
16661 if ac_fn_c_try_link "$LINENO"; then :
16662 pgac_cv_var_int_opterr=yes
16663 else
16664 pgac_cv_var_int_opterr=no
16666 rm -f core conftest.err conftest.$ac_objext \
16667 conftest$ac_exeext conftest.$ac_ext
16669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16670 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16671 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16673 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16678 $as_echo_n "checking for optreset... " >&6; }
16679 if ${pgac_cv_var_int_optreset+:} false; then :
16680 $as_echo_n "(cached) " >&6
16681 else
16682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16683 /* end confdefs.h. */
16684 #include <unistd.h>
16686 main ()
16688 extern int optreset; optreset = 1;
16690 return 0;
16692 _ACEOF
16693 if ac_fn_c_try_link "$LINENO"; then :
16694 pgac_cv_var_int_optreset=yes
16695 else
16696 pgac_cv_var_int_optreset=no
16698 rm -f core conftest.err conftest.$ac_objext \
16699 conftest$ac_exeext conftest.$ac_ext
16701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16702 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16703 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16705 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16709 if test "$with_icu" = yes; then
16710 ac_save_CPPFLAGS=$CPPFLAGS
16711 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16713 # Verify we have ICU's header files
16714 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16715 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16717 else
16718 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16723 CPPFLAGS=$ac_save_CPPFLAGS
16726 if test "$with_llvm" = yes; then
16728 # Check which functionality is present
16729 SAVE_CPPFLAGS="$CPPFLAGS"
16730 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16731 ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16733 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16734 ac_have_decl=1
16735 else
16736 ac_have_decl=0
16739 cat >>confdefs.h <<_ACEOF
16740 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16741 _ACEOF
16743 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16745 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16746 ac_have_decl=1
16747 else
16748 ac_have_decl=0
16751 cat >>confdefs.h <<_ACEOF
16752 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16753 _ACEOF
16754 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16756 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16757 ac_have_decl=1
16758 else
16759 ac_have_decl=0
16762 cat >>confdefs.h <<_ACEOF
16763 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16764 _ACEOF
16766 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16768 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16769 ac_have_decl=1
16770 else
16771 ac_have_decl=0
16774 cat >>confdefs.h <<_ACEOF
16775 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16776 _ACEOF
16777 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16779 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16780 ac_have_decl=1
16781 else
16782 ac_have_decl=0
16785 cat >>confdefs.h <<_ACEOF
16786 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16787 _ACEOF
16789 CPPFLAGS="$SAVE_CPPFLAGS"
16793 # Lastly, restore full LIBS list and check for readline/libedit symbols
16794 LIBS="$LIBS_including_readline"
16796 if test "$with_readline" = yes; then
16797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
16798 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
16799 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
16800 $as_echo_n "(cached) " >&6
16801 else
16802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16803 /* end confdefs.h. */
16804 #include <stdio.h>
16805 #if defined(HAVE_READLINE_READLINE_H)
16806 #include <readline/readline.h>
16807 #elif defined(HAVE_EDITLINE_READLINE_H)
16808 #include <editline/readline.h>
16809 #elif defined(HAVE_READLINE_H)
16810 #include <readline.h>
16811 #endif
16814 main ()
16816 rl_completion_suppress_quote = 1;
16818 return 0;
16820 _ACEOF
16821 if ac_fn_c_try_link "$LINENO"; then :
16822 pgac_cv_var_rl_completion_suppress_quote=yes
16823 else
16824 pgac_cv_var_rl_completion_suppress_quote=no
16826 rm -f core conftest.err conftest.$ac_objext \
16827 conftest$ac_exeext conftest.$ac_ext
16829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
16830 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
16831 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
16833 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
16836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
16837 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
16838 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
16839 $as_echo_n "(cached) " >&6
16840 else
16841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16842 /* end confdefs.h. */
16843 #include <stdio.h>
16844 #if defined(HAVE_READLINE_READLINE_H)
16845 #include <readline/readline.h>
16846 #elif defined(HAVE_EDITLINE_READLINE_H)
16847 #include <editline/readline.h>
16848 #elif defined(HAVE_READLINE_H)
16849 #include <readline.h>
16850 #endif
16853 main ()
16855 rl_filename_quote_characters = "x";
16857 return 0;
16859 _ACEOF
16860 if ac_fn_c_try_link "$LINENO"; then :
16861 pgac_cv_var_rl_filename_quote_characters=yes
16862 else
16863 pgac_cv_var_rl_filename_quote_characters=no
16865 rm -f core conftest.err conftest.$ac_objext \
16866 conftest$ac_exeext conftest.$ac_ext
16868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
16869 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
16870 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
16872 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
16875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
16876 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
16877 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
16878 $as_echo_n "(cached) " >&6
16879 else
16880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16881 /* end confdefs.h. */
16882 #include <stdio.h>
16883 #if defined(HAVE_READLINE_READLINE_H)
16884 #include <readline/readline.h>
16885 #elif defined(HAVE_EDITLINE_READLINE_H)
16886 #include <editline/readline.h>
16887 #elif defined(HAVE_READLINE_H)
16888 #include <readline.h>
16889 #endif
16892 main ()
16894 rl_filename_quoting_function = 0;
16896 return 0;
16898 _ACEOF
16899 if ac_fn_c_try_link "$LINENO"; then :
16900 pgac_cv_var_rl_filename_quoting_function=yes
16901 else
16902 pgac_cv_var_rl_filename_quoting_function=no
16904 rm -f core conftest.err conftest.$ac_objext \
16905 conftest$ac_exeext conftest.$ac_ext
16907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
16908 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
16909 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
16911 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
16915 for ac_func in append_history history_truncate_file rl_completion_matches rl_filename_completion_function rl_reset_screen_size rl_variable_bind
16916 do :
16917 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16918 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16919 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16920 cat >>confdefs.h <<_ACEOF
16921 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16922 _ACEOF
16925 done
16930 # This test makes sure that run tests work at all. Sometimes a shared
16931 # library is found by the linker, but the runtime linker can't find it.
16932 # This check should come after all modifications of compiler or linker
16933 # variables, and before any other run tests.
16934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16935 $as_echo_n "checking test program... " >&6; }
16936 if test "$cross_compiling" = yes; then :
16937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16938 $as_echo "cross-compiling" >&6; }
16939 else
16940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16941 /* end confdefs.h. */
16942 int main() { return 0; }
16943 _ACEOF
16944 if ac_fn_c_try_run "$LINENO"; then :
16945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16946 $as_echo "ok" >&6; }
16947 else
16948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16949 $as_echo "failed" >&6; }
16950 as_fn_error $? "
16951 Could not execute a simple test program. This may be a problem
16952 related to locating shared libraries. Check the file 'config.log'
16953 for the exact reason." "$LINENO" 5
16955 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16956 conftest.$ac_objext conftest.beam conftest.$ac_ext
16960 # --------------------
16961 # Run tests below here
16962 # --------------------
16965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16966 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16967 if ${pgac_cv_type_long_int_64+:} false; then :
16968 $as_echo_n "(cached) " >&6
16969 else
16970 if test "$cross_compiling" = yes; then :
16971 # If cross-compiling, check the size reported by the compiler and
16972 # trust that the arithmetic works.
16973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16974 /* end confdefs.h. */
16977 main ()
16979 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16980 test_array [0] = 0;
16981 return test_array [0];
16984 return 0;
16986 _ACEOF
16987 if ac_fn_c_try_compile "$LINENO"; then :
16988 pgac_cv_type_long_int_64=yes
16989 else
16990 pgac_cv_type_long_int_64=no
16992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16993 else
16994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16995 /* end confdefs.h. */
16996 typedef long int ac_int64;
16999 * These are globals to discourage the compiler from folding all the
17000 * arithmetic tests down to compile-time constants.
17002 ac_int64 a = 20000001;
17003 ac_int64 b = 40000005;
17005 int does_int64_work()
17007 ac_int64 c,d;
17009 if (sizeof(ac_int64) != 8)
17010 return 0; /* definitely not the right size */
17012 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17013 c = a * b;
17014 d = (c + b) / b;
17015 if (d != a+1)
17016 return 0;
17017 return 1;
17021 main() {
17022 return (! does_int64_work());
17024 _ACEOF
17025 if ac_fn_c_try_run "$LINENO"; then :
17026 pgac_cv_type_long_int_64=yes
17027 else
17028 pgac_cv_type_long_int_64=no
17030 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17031 conftest.$ac_objext conftest.beam conftest.$ac_ext
17035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
17036 $as_echo "$pgac_cv_type_long_int_64" >&6; }
17038 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17039 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17041 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
17046 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
17047 pg_int64_type="long int"
17048 else
17049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
17050 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
17051 if ${pgac_cv_type_long_long_int_64+:} false; then :
17052 $as_echo_n "(cached) " >&6
17053 else
17054 if test "$cross_compiling" = yes; then :
17055 # If cross-compiling, check the size reported by the compiler and
17056 # trust that the arithmetic works.
17057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17058 /* end confdefs.h. */
17061 main ()
17063 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17064 test_array [0] = 0;
17065 return test_array [0];
17068 return 0;
17070 _ACEOF
17071 if ac_fn_c_try_compile "$LINENO"; then :
17072 pgac_cv_type_long_long_int_64=yes
17073 else
17074 pgac_cv_type_long_long_int_64=no
17076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17077 else
17078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17079 /* end confdefs.h. */
17080 typedef long long int ac_int64;
17083 * These are globals to discourage the compiler from folding all the
17084 * arithmetic tests down to compile-time constants.
17086 ac_int64 a = 20000001;
17087 ac_int64 b = 40000005;
17089 int does_int64_work()
17091 ac_int64 c,d;
17093 if (sizeof(ac_int64) != 8)
17094 return 0; /* definitely not the right size */
17096 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17097 c = a * b;
17098 d = (c + b) / b;
17099 if (d != a+1)
17100 return 0;
17101 return 1;
17105 main() {
17106 return (! does_int64_work());
17108 _ACEOF
17109 if ac_fn_c_try_run "$LINENO"; then :
17110 pgac_cv_type_long_long_int_64=yes
17111 else
17112 pgac_cv_type_long_long_int_64=no
17114 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17115 conftest.$ac_objext conftest.beam conftest.$ac_ext
17119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
17120 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
17122 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17123 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17125 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
17129 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17130 pg_int64_type="long long int"
17131 else
17132 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
17137 cat >>confdefs.h <<_ACEOF
17138 #define PG_INT64_TYPE $pg_int64_type
17139 _ACEOF
17142 # Select the printf length modifier that goes with that, too.
17143 if test x"$pg_int64_type" = x"long long int" ; then
17144 INT64_MODIFIER='"ll"'
17145 else
17146 INT64_MODIFIER='"l"'
17150 cat >>confdefs.h <<_ACEOF
17151 #define INT64_MODIFIER $INT64_MODIFIER
17152 _ACEOF
17155 # has to be down here, rather than with the other builtins, because
17156 # the test uses PG_INT64_TYPE.
17157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
17158 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
17159 if ${pgac_cv__builtin_op_overflow+:} false; then :
17160 $as_echo_n "(cached) " >&6
17161 else
17162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17163 /* end confdefs.h. */
17165 PG_INT64_TYPE a = 1;
17166 PG_INT64_TYPE b = 1;
17167 PG_INT64_TYPE result;
17168 int oflo;
17171 main ()
17173 oflo = __builtin_mul_overflow(a, b, &result);
17175 return 0;
17177 _ACEOF
17178 if ac_fn_c_try_link "$LINENO"; then :
17179 pgac_cv__builtin_op_overflow=yes
17180 else
17181 pgac_cv__builtin_op_overflow=no
17183 rm -f core conftest.err conftest.$ac_objext \
17184 conftest$ac_exeext conftest.$ac_ext
17186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
17187 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
17188 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
17190 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
17194 # Check size of void *, size_t (enables tweaks for > 32bit address space)
17195 # The cast to long int works around a bug in the HP C Compiler
17196 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17197 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17198 # This bug is HP SR number 8606223364.
17199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
17200 $as_echo_n "checking size of void *... " >&6; }
17201 if ${ac_cv_sizeof_void_p+:} false; then :
17202 $as_echo_n "(cached) " >&6
17203 else
17204 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
17206 else
17207 if test "$ac_cv_type_void_p" = yes; then
17208 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17209 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17210 as_fn_error 77 "cannot compute sizeof (void *)
17211 See \`config.log' for more details" "$LINENO" 5; }
17212 else
17213 ac_cv_sizeof_void_p=0
17218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
17219 $as_echo "$ac_cv_sizeof_void_p" >&6; }
17223 cat >>confdefs.h <<_ACEOF
17224 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
17225 _ACEOF
17228 # The cast to long int works around a bug in the HP C Compiler
17229 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17230 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17231 # This bug is HP SR number 8606223364.
17232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
17233 $as_echo_n "checking size of size_t... " >&6; }
17234 if ${ac_cv_sizeof_size_t+:} false; then :
17235 $as_echo_n "(cached) " >&6
17236 else
17237 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
17239 else
17240 if test "$ac_cv_type_size_t" = yes; then
17241 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17242 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17243 as_fn_error 77 "cannot compute sizeof (size_t)
17244 See \`config.log' for more details" "$LINENO" 5; }
17245 else
17246 ac_cv_sizeof_size_t=0
17251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
17252 $as_echo "$ac_cv_sizeof_size_t" >&6; }
17256 cat >>confdefs.h <<_ACEOF
17257 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
17258 _ACEOF
17261 # The cast to long int works around a bug in the HP C Compiler
17262 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17263 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17264 # This bug is HP SR number 8606223364.
17265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
17266 $as_echo_n "checking size of long... " >&6; }
17267 if ${ac_cv_sizeof_long+:} false; then :
17268 $as_echo_n "(cached) " >&6
17269 else
17270 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
17272 else
17273 if test "$ac_cv_type_long" = yes; then
17274 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17275 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17276 as_fn_error 77 "cannot compute sizeof (long)
17277 See \`config.log' for more details" "$LINENO" 5; }
17278 else
17279 ac_cv_sizeof_long=0
17284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
17285 $as_echo "$ac_cv_sizeof_long" >&6; }
17289 cat >>confdefs.h <<_ACEOF
17290 #define SIZEOF_LONG $ac_cv_sizeof_long
17291 _ACEOF
17295 # Determine memory alignment requirements for the basic C data types.
17297 # The cast to long int works around a bug in the HP C Compiler,
17298 # see AC_CHECK_SIZEOF for more information.
17299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
17300 $as_echo_n "checking alignment of short... " >&6; }
17301 if ${ac_cv_alignof_short+:} false; then :
17302 $as_echo_n "(cached) " >&6
17303 else
17304 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
17305 #ifndef offsetof
17306 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17307 #endif
17308 typedef struct { char x; short y; } ac__type_alignof_;"; then :
17310 else
17311 if test "$ac_cv_type_short" = yes; then
17312 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17313 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17314 as_fn_error 77 "cannot compute alignment of short
17315 See \`config.log' for more details" "$LINENO" 5; }
17316 else
17317 ac_cv_alignof_short=0
17322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
17323 $as_echo "$ac_cv_alignof_short" >&6; }
17327 cat >>confdefs.h <<_ACEOF
17328 #define ALIGNOF_SHORT $ac_cv_alignof_short
17329 _ACEOF
17332 # The cast to long int works around a bug in the HP C Compiler,
17333 # see AC_CHECK_SIZEOF for more information.
17334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
17335 $as_echo_n "checking alignment of int... " >&6; }
17336 if ${ac_cv_alignof_int+:} false; then :
17337 $as_echo_n "(cached) " >&6
17338 else
17339 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
17340 #ifndef offsetof
17341 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17342 #endif
17343 typedef struct { char x; int y; } ac__type_alignof_;"; then :
17345 else
17346 if test "$ac_cv_type_int" = yes; then
17347 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17348 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17349 as_fn_error 77 "cannot compute alignment of int
17350 See \`config.log' for more details" "$LINENO" 5; }
17351 else
17352 ac_cv_alignof_int=0
17357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
17358 $as_echo "$ac_cv_alignof_int" >&6; }
17362 cat >>confdefs.h <<_ACEOF
17363 #define ALIGNOF_INT $ac_cv_alignof_int
17364 _ACEOF
17367 # The cast to long int works around a bug in the HP C Compiler,
17368 # see AC_CHECK_SIZEOF for more information.
17369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17370 $as_echo_n "checking alignment of long... " >&6; }
17371 if ${ac_cv_alignof_long+:} false; then :
17372 $as_echo_n "(cached) " >&6
17373 else
17374 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
17375 #ifndef offsetof
17376 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17377 #endif
17378 typedef struct { char x; long y; } ac__type_alignof_;"; then :
17380 else
17381 if test "$ac_cv_type_long" = yes; then
17382 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17383 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17384 as_fn_error 77 "cannot compute alignment of long
17385 See \`config.log' for more details" "$LINENO" 5; }
17386 else
17387 ac_cv_alignof_long=0
17392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17393 $as_echo "$ac_cv_alignof_long" >&6; }
17397 cat >>confdefs.h <<_ACEOF
17398 #define ALIGNOF_LONG $ac_cv_alignof_long
17399 _ACEOF
17402 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17403 # The cast to long int works around a bug in the HP C Compiler,
17404 # see AC_CHECK_SIZEOF for more information.
17405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
17406 $as_echo_n "checking alignment of long long int... " >&6; }
17407 if ${ac_cv_alignof_long_long_int+:} false; then :
17408 $as_echo_n "(cached) " >&6
17409 else
17410 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
17411 #ifndef offsetof
17412 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17413 #endif
17414 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
17416 else
17417 if test "$ac_cv_type_long_long_int" = yes; then
17418 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17419 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17420 as_fn_error 77 "cannot compute alignment of long long int
17421 See \`config.log' for more details" "$LINENO" 5; }
17422 else
17423 ac_cv_alignof_long_long_int=0
17428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
17429 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
17433 cat >>confdefs.h <<_ACEOF
17434 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
17435 _ACEOF
17439 # The cast to long int works around a bug in the HP C Compiler,
17440 # see AC_CHECK_SIZEOF for more information.
17441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
17442 $as_echo_n "checking alignment of double... " >&6; }
17443 if ${ac_cv_alignof_double+:} false; then :
17444 $as_echo_n "(cached) " >&6
17445 else
17446 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
17447 #ifndef offsetof
17448 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17449 #endif
17450 typedef struct { char x; double y; } ac__type_alignof_;"; then :
17452 else
17453 if test "$ac_cv_type_double" = yes; then
17454 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17455 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17456 as_fn_error 77 "cannot compute alignment of double
17457 See \`config.log' for more details" "$LINENO" 5; }
17458 else
17459 ac_cv_alignof_double=0
17464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17465 $as_echo "$ac_cv_alignof_double" >&6; }
17469 cat >>confdefs.h <<_ACEOF
17470 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
17471 _ACEOF
17475 # Compute maximum alignment of any basic type.
17476 # We assume long's alignment is at least as strong as char, short, or int;
17477 # but we must check long long (if it is being used for int64) and double.
17478 # Note that we intentionally do not consider any types wider than 64 bits,
17479 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17480 # for disk and memory space.
17482 MAX_ALIGNOF=$ac_cv_alignof_long
17483 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17484 MAX_ALIGNOF=$ac_cv_alignof_double
17486 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17487 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17490 cat >>confdefs.h <<_ACEOF
17491 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17492 _ACEOF
17496 # Some platforms predefine the types int8, int16, etc. Only check
17497 # a (hopefully) representative subset.
17498 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17500 if test "x$ac_cv_type_int8" = xyes; then :
17502 cat >>confdefs.h <<_ACEOF
17503 #define HAVE_INT8 1
17504 _ACEOF
17508 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17510 if test "x$ac_cv_type_uint8" = xyes; then :
17512 cat >>confdefs.h <<_ACEOF
17513 #define HAVE_UINT8 1
17514 _ACEOF
17518 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17520 if test "x$ac_cv_type_int64" = xyes; then :
17522 cat >>confdefs.h <<_ACEOF
17523 #define HAVE_INT64 1
17524 _ACEOF
17528 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17530 if test "x$ac_cv_type_uint64" = xyes; then :
17532 cat >>confdefs.h <<_ACEOF
17533 #define HAVE_UINT64 1
17534 _ACEOF
17540 # Some compilers offer a 128-bit integer scalar type.
17541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17542 $as_echo_n "checking for __int128... " >&6; }
17543 if ${pgac_cv__128bit_int+:} false; then :
17544 $as_echo_n "(cached) " >&6
17545 else
17546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17547 /* end confdefs.h. */
17550 * We don't actually run this test, just link it to verify that any support
17551 * functions needed for __int128 are present.
17553 * These are globals to discourage the compiler from folding all the
17554 * arithmetic tests down to compile-time constants. We do not have
17555 * convenient support for 128bit literals at this point...
17557 __int128 a = 48828125;
17558 __int128 b = 97656250;
17561 main ()
17564 __int128 c,d;
17565 a = (a << 12) + 1; /* 200000000001 */
17566 b = (b << 12) + 5; /* 400000000005 */
17567 /* try the most relevant arithmetic ops */
17568 c = a * b;
17569 d = (c + b) / b;
17570 /* must use the results, else compiler may optimize arithmetic away */
17571 if (d != a+1)
17572 return 1;
17575 return 0;
17577 _ACEOF
17578 if ac_fn_c_try_link "$LINENO"; then :
17579 pgac_cv__128bit_int=yes
17580 else
17581 pgac_cv__128bit_int=no
17583 rm -f core conftest.err conftest.$ac_objext \
17584 conftest$ac_exeext conftest.$ac_ext
17586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17587 $as_echo "$pgac_cv__128bit_int" >&6; }
17588 if test x"$pgac_cv__128bit_int" = xyes ; then
17589 # Use of non-default alignment with __int128 tickles bugs in some compilers.
17590 # If not cross-compiling, we can test for bugs and disable use of __int128
17591 # with buggy compilers. If cross-compiling, hope for the best.
17592 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17594 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17595 if ${pgac_cv__128bit_int_bug+:} false; then :
17596 $as_echo_n "(cached) " >&6
17597 else
17598 if test "$cross_compiling" = yes; then :
17599 pgac_cv__128bit_int_bug="assuming ok"
17600 else
17601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17602 /* end confdefs.h. */
17604 /* This must match the corresponding code in c.h: */
17605 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17606 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17607 #elif defined(_MSC_VER)
17608 #define pg_attribute_aligned(a) __declspec(align(a))
17609 #endif
17610 typedef __int128 int128a
17611 #if defined(pg_attribute_aligned)
17612 pg_attribute_aligned(8)
17613 #endif
17615 int128a holder;
17616 void pass_by_val(void *buffer, int128a par) { holder = par; }
17619 main ()
17622 long int i64 = 97656225L << 12;
17623 int128a q;
17624 pass_by_val(main, (int128a) i64);
17625 q = (int128a) i64;
17626 if (q != holder)
17627 return 1;
17630 return 0;
17632 _ACEOF
17633 if ac_fn_c_try_run "$LINENO"; then :
17634 pgac_cv__128bit_int_bug=ok
17635 else
17636 pgac_cv__128bit_int_bug=broken
17638 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17639 conftest.$ac_objext conftest.beam conftest.$ac_ext
17643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17644 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17645 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17647 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17649 # The cast to long int works around a bug in the HP C Compiler,
17650 # see AC_CHECK_SIZEOF for more information.
17651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17652 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17653 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17654 $as_echo_n "(cached) " >&6
17655 else
17656 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
17657 #ifndef offsetof
17658 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17659 #endif
17660 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17662 else
17663 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17664 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17665 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17666 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17667 See \`config.log' for more details" "$LINENO" 5; }
17668 else
17669 ac_cv_alignof_PG_INT128_TYPE=0
17674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17675 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17679 cat >>confdefs.h <<_ACEOF
17680 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17681 _ACEOF
17687 # Check for various atomic operations now that we have checked how to declare
17688 # 64bit integers.
17689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17690 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17691 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17692 $as_echo_n "(cached) " >&6
17693 else
17694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17695 /* end confdefs.h. */
17698 main ()
17700 char lock = 0;
17701 __sync_lock_test_and_set(&lock, 1);
17702 __sync_lock_release(&lock);
17704 return 0;
17706 _ACEOF
17707 if ac_fn_c_try_link "$LINENO"; then :
17708 pgac_cv_gcc_sync_char_tas="yes"
17709 else
17710 pgac_cv_gcc_sync_char_tas="no"
17712 rm -f core conftest.err conftest.$ac_objext \
17713 conftest$ac_exeext conftest.$ac_ext
17715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17716 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17717 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17719 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17723 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17724 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17725 $as_echo_n "(cached) " >&6
17726 else
17727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17728 /* end confdefs.h. */
17731 main ()
17733 int lock = 0;
17734 __sync_lock_test_and_set(&lock, 1);
17735 __sync_lock_release(&lock);
17737 return 0;
17739 _ACEOF
17740 if ac_fn_c_try_link "$LINENO"; then :
17741 pgac_cv_gcc_sync_int32_tas="yes"
17742 else
17743 pgac_cv_gcc_sync_int32_tas="no"
17745 rm -f core conftest.err conftest.$ac_objext \
17746 conftest$ac_exeext conftest.$ac_ext
17748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17749 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17750 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17752 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17756 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17757 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17758 $as_echo_n "(cached) " >&6
17759 else
17760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17761 /* end confdefs.h. */
17764 main ()
17766 int val = 0;
17767 __sync_val_compare_and_swap(&val, 0, 37);
17769 return 0;
17771 _ACEOF
17772 if ac_fn_c_try_link "$LINENO"; then :
17773 pgac_cv_gcc_sync_int32_cas="yes"
17774 else
17775 pgac_cv_gcc_sync_int32_cas="no"
17777 rm -f core conftest.err conftest.$ac_objext \
17778 conftest$ac_exeext conftest.$ac_ext
17780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17781 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17782 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17784 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17788 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17789 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17790 $as_echo_n "(cached) " >&6
17791 else
17792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17793 /* end confdefs.h. */
17796 main ()
17798 PG_INT64_TYPE lock = 0;
17799 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17801 return 0;
17803 _ACEOF
17804 if ac_fn_c_try_link "$LINENO"; then :
17805 pgac_cv_gcc_sync_int64_cas="yes"
17806 else
17807 pgac_cv_gcc_sync_int64_cas="no"
17809 rm -f core conftest.err conftest.$ac_objext \
17810 conftest$ac_exeext conftest.$ac_ext
17812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17813 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17814 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17816 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17820 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17821 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17822 $as_echo_n "(cached) " >&6
17823 else
17824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17825 /* end confdefs.h. */
17828 main ()
17830 int val = 0;
17831 int expect = 0;
17832 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17834 return 0;
17836 _ACEOF
17837 if ac_fn_c_try_link "$LINENO"; then :
17838 pgac_cv_gcc_atomic_int32_cas="yes"
17839 else
17840 pgac_cv_gcc_atomic_int32_cas="no"
17842 rm -f core conftest.err conftest.$ac_objext \
17843 conftest$ac_exeext conftest.$ac_ext
17845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17846 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17847 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17849 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17853 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17854 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17855 $as_echo_n "(cached) " >&6
17856 else
17857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17858 /* end confdefs.h. */
17861 main ()
17863 PG_INT64_TYPE val = 0;
17864 PG_INT64_TYPE expect = 0;
17865 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17867 return 0;
17869 _ACEOF
17870 if ac_fn_c_try_link "$LINENO"; then :
17871 pgac_cv_gcc_atomic_int64_cas="yes"
17872 else
17873 pgac_cv_gcc_atomic_int64_cas="no"
17875 rm -f core conftest.err conftest.$ac_objext \
17876 conftest$ac_exeext conftest.$ac_ext
17878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17879 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17880 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17882 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17887 # Check for x86 cpuid instruction
17888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17889 $as_echo_n "checking for __get_cpuid... " >&6; }
17890 if ${pgac_cv__get_cpuid+:} false; then :
17891 $as_echo_n "(cached) " >&6
17892 else
17893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17894 /* end confdefs.h. */
17895 #include <cpuid.h>
17897 main ()
17899 unsigned int exx[4] = {0, 0, 0, 0};
17900 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17903 return 0;
17905 _ACEOF
17906 if ac_fn_c_try_link "$LINENO"; then :
17907 pgac_cv__get_cpuid="yes"
17908 else
17909 pgac_cv__get_cpuid="no"
17911 rm -f core conftest.err conftest.$ac_objext \
17912 conftest$ac_exeext conftest.$ac_ext
17914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17915 $as_echo "$pgac_cv__get_cpuid" >&6; }
17916 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17918 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17923 $as_echo_n "checking for __cpuid... " >&6; }
17924 if ${pgac_cv__cpuid+:} false; then :
17925 $as_echo_n "(cached) " >&6
17926 else
17927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17928 /* end confdefs.h. */
17929 #include <intrin.h>
17931 main ()
17933 unsigned int exx[4] = {0, 0, 0, 0};
17934 __get_cpuid(exx[0], 1);
17937 return 0;
17939 _ACEOF
17940 if ac_fn_c_try_link "$LINENO"; then :
17941 pgac_cv__cpuid="yes"
17942 else
17943 pgac_cv__cpuid="no"
17945 rm -f core conftest.err conftest.$ac_objext \
17946 conftest$ac_exeext conftest.$ac_ext
17948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17949 $as_echo "$pgac_cv__cpuid" >&6; }
17950 if test x"$pgac_cv__cpuid" = x"yes"; then
17952 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17956 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17958 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17959 # with the default compiler flags. If not, check if adding the -msse4.2
17960 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17962 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17963 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17964 $as_echo_n "(cached) " >&6
17965 else
17966 pgac_save_CFLAGS=$CFLAGS
17967 CFLAGS="$pgac_save_CFLAGS "
17968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17969 /* end confdefs.h. */
17970 #include <nmmintrin.h>
17972 main ()
17974 unsigned int crc = 0;
17975 crc = _mm_crc32_u8(crc, 0);
17976 crc = _mm_crc32_u32(crc, 0);
17977 /* return computed value, to prevent the above being optimized away */
17978 return crc == 0;
17980 return 0;
17982 _ACEOF
17983 if ac_fn_c_try_link "$LINENO"; then :
17984 pgac_cv_sse42_crc32_intrinsics_=yes
17985 else
17986 pgac_cv_sse42_crc32_intrinsics_=no
17988 rm -f core conftest.err conftest.$ac_objext \
17989 conftest$ac_exeext conftest.$ac_ext
17990 CFLAGS="$pgac_save_CFLAGS"
17992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17993 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17994 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17995 CFLAGS_SSE42=""
17996 pgac_sse42_crc32_intrinsics=yes
17999 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
18000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
18001 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
18002 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
18003 $as_echo_n "(cached) " >&6
18004 else
18005 pgac_save_CFLAGS=$CFLAGS
18006 CFLAGS="$pgac_save_CFLAGS -msse4.2"
18007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18008 /* end confdefs.h. */
18009 #include <nmmintrin.h>
18011 main ()
18013 unsigned int crc = 0;
18014 crc = _mm_crc32_u8(crc, 0);
18015 crc = _mm_crc32_u32(crc, 0);
18016 /* return computed value, to prevent the above being optimized away */
18017 return crc == 0;
18019 return 0;
18021 _ACEOF
18022 if ac_fn_c_try_link "$LINENO"; then :
18023 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
18024 else
18025 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
18027 rm -f core conftest.err conftest.$ac_objext \
18028 conftest$ac_exeext conftest.$ac_ext
18029 CFLAGS="$pgac_save_CFLAGS"
18031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
18032 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
18033 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
18034 CFLAGS_SSE42="-msse4.2"
18035 pgac_sse42_crc32_intrinsics=yes
18041 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
18042 # define __SSE4_2__ in that case.
18043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18044 /* end confdefs.h. */
18047 main ()
18050 #ifndef __SSE4_2__
18051 #error __SSE4_2__ not defined
18052 #endif
18055 return 0;
18057 _ACEOF
18058 if ac_fn_c_try_compile "$LINENO"; then :
18059 SSE4_2_TARGETED=1
18061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18063 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
18065 # First check if __crc32c* intrinsics can be used with the default compiler
18066 # flags. If not, check if adding -march=armv8-a+crc flag helps.
18067 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
18068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
18069 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
18070 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
18071 $as_echo_n "(cached) " >&6
18072 else
18073 pgac_save_CFLAGS=$CFLAGS
18074 CFLAGS="$pgac_save_CFLAGS "
18075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18076 /* end confdefs.h. */
18077 #include <arm_acle.h>
18079 main ()
18081 unsigned int crc = 0;
18082 crc = __crc32cb(crc, 0);
18083 crc = __crc32ch(crc, 0);
18084 crc = __crc32cw(crc, 0);
18085 crc = __crc32cd(crc, 0);
18086 /* return computed value, to prevent the above being optimized away */
18087 return crc == 0;
18089 return 0;
18091 _ACEOF
18092 if ac_fn_c_try_link "$LINENO"; then :
18093 pgac_cv_armv8_crc32c_intrinsics_=yes
18094 else
18095 pgac_cv_armv8_crc32c_intrinsics_=no
18097 rm -f core conftest.err conftest.$ac_objext \
18098 conftest$ac_exeext conftest.$ac_ext
18099 CFLAGS="$pgac_save_CFLAGS"
18101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
18102 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
18103 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
18104 CFLAGS_ARMV8_CRC32C=""
18105 pgac_armv8_crc32c_intrinsics=yes
18108 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
18109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
18110 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
18111 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
18112 $as_echo_n "(cached) " >&6
18113 else
18114 pgac_save_CFLAGS=$CFLAGS
18115 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
18116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18117 /* end confdefs.h. */
18118 #include <arm_acle.h>
18120 main ()
18122 unsigned int crc = 0;
18123 crc = __crc32cb(crc, 0);
18124 crc = __crc32ch(crc, 0);
18125 crc = __crc32cw(crc, 0);
18126 crc = __crc32cd(crc, 0);
18127 /* return computed value, to prevent the above being optimized away */
18128 return crc == 0;
18130 return 0;
18132 _ACEOF
18133 if ac_fn_c_try_link "$LINENO"; then :
18134 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
18135 else
18136 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
18138 rm -f core conftest.err conftest.$ac_objext \
18139 conftest$ac_exeext conftest.$ac_ext
18140 CFLAGS="$pgac_save_CFLAGS"
18142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
18143 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
18144 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
18145 CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
18146 pgac_armv8_crc32c_intrinsics=yes
18152 # Select CRC-32C implementation.
18154 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
18155 # use the special CRC instructions for calculating CRC-32C. If we're not
18156 # targeting such a processor, but we can nevertheless produce code that uses
18157 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
18158 # implementations and select which one to use at runtime, depending on whether
18159 # SSE 4.2 is supported by the processor we're running on.
18161 # Similarly, if we are targeting an ARM processor that has the CRC
18162 # instructions that are part of the ARMv8 CRC Extension, use them. And if
18163 # we're not targeting such a processor, but can nevertheless produce code that
18164 # uses the CRC instructions, compile both, and select at runtime.
18166 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
18167 # in the template or configure command line.
18168 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
18169 # Use Intel SSE 4.2 if available.
18170 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
18171 USE_SSE42_CRC32C=1
18172 else
18173 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
18174 # the runtime check.
18175 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
18176 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
18177 else
18178 # Use ARM CRC Extension if available.
18179 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
18180 USE_ARMV8_CRC32C=1
18181 else
18182 # ARM CRC Extension, with runtime check?
18183 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
18184 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
18185 else
18186 # fall back to slicing-by-8 algorithm, which doesn't require any
18187 # special CPU support.
18188 USE_SLICING_BY_8_CRC32C=1
18195 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
18196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
18197 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
18198 if test x"$USE_SSE42_CRC32C" = x"1"; then
18200 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
18202 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
18203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
18204 $as_echo "SSE 4.2" >&6; }
18205 else
18206 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18208 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18210 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
18211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
18212 $as_echo "SSE 4.2 with runtime check" >&6; }
18213 else
18214 if test x"$USE_ARMV8_CRC32C" = x"1"; then
18216 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
18218 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
18219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
18220 $as_echo "ARMv8 CRC instructions" >&6; }
18221 else
18222 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18224 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18226 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
18227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
18228 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
18229 else
18231 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
18233 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
18234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
18235 $as_echo "slicing-by-8" >&6; }
18243 # Select semaphore implementation type.
18244 if test "$PORTNAME" != "win32"; then
18245 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
18246 # Need sem_open for this
18247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
18248 $as_echo_n "checking for library containing sem_open... " >&6; }
18249 if ${ac_cv_search_sem_open+:} false; then :
18250 $as_echo_n "(cached) " >&6
18251 else
18252 ac_func_search_save_LIBS=$LIBS
18253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18254 /* end confdefs.h. */
18256 /* Override any GCC internal prototype to avoid an error.
18257 Use char because int might match the return type of a GCC
18258 builtin and then its argument prototype would still apply. */
18259 #ifdef __cplusplus
18260 extern "C"
18261 #endif
18262 char sem_open ();
18264 main ()
18266 return sem_open ();
18268 return 0;
18270 _ACEOF
18271 for ac_lib in '' rt pthread; do
18272 if test -z "$ac_lib"; then
18273 ac_res="none required"
18274 else
18275 ac_res=-l$ac_lib
18276 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18278 if ac_fn_c_try_link "$LINENO"; then :
18279 ac_cv_search_sem_open=$ac_res
18281 rm -f core conftest.err conftest.$ac_objext \
18282 conftest$ac_exeext
18283 if ${ac_cv_search_sem_open+:} false; then :
18284 break
18286 done
18287 if ${ac_cv_search_sem_open+:} false; then :
18289 else
18290 ac_cv_search_sem_open=no
18292 rm conftest.$ac_ext
18293 LIBS=$ac_func_search_save_LIBS
18295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18296 $as_echo "$ac_cv_search_sem_open" >&6; }
18297 ac_res=$ac_cv_search_sem_open
18298 if test "$ac_res" != no; then :
18299 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18300 USE_NAMED_POSIX_SEMAPHORES=1
18304 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18305 # Need sem_init for this
18306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18307 $as_echo_n "checking for library containing sem_init... " >&6; }
18308 if ${ac_cv_search_sem_init+:} false; then :
18309 $as_echo_n "(cached) " >&6
18310 else
18311 ac_func_search_save_LIBS=$LIBS
18312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18313 /* end confdefs.h. */
18315 /* Override any GCC internal prototype to avoid an error.
18316 Use char because int might match the return type of a GCC
18317 builtin and then its argument prototype would still apply. */
18318 #ifdef __cplusplus
18319 extern "C"
18320 #endif
18321 char sem_init ();
18323 main ()
18325 return sem_init ();
18327 return 0;
18329 _ACEOF
18330 for ac_lib in '' rt pthread; do
18331 if test -z "$ac_lib"; then
18332 ac_res="none required"
18333 else
18334 ac_res=-l$ac_lib
18335 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18337 if ac_fn_c_try_link "$LINENO"; then :
18338 ac_cv_search_sem_init=$ac_res
18340 rm -f core conftest.err conftest.$ac_objext \
18341 conftest$ac_exeext
18342 if ${ac_cv_search_sem_init+:} false; then :
18343 break
18345 done
18346 if ${ac_cv_search_sem_init+:} false; then :
18348 else
18349 ac_cv_search_sem_init=no
18351 rm conftest.$ac_ext
18352 LIBS=$ac_func_search_save_LIBS
18354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18355 $as_echo "$ac_cv_search_sem_init" >&6; }
18356 ac_res=$ac_cv_search_sem_init
18357 if test "$ac_res" != no; then :
18358 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18359 USE_UNNAMED_POSIX_SEMAPHORES=1
18363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18364 $as_echo_n "checking which semaphore API to use... " >&6; }
18365 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18367 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18369 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18370 sematype="named POSIX"
18371 else
18372 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18374 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18376 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18377 sematype="unnamed POSIX"
18378 else
18380 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18382 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18383 sematype="System V"
18386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18387 $as_echo "$sematype" >&6; }
18388 else
18390 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18392 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18396 # Select shared-memory implementation type.
18397 if test "$PORTNAME" != "win32"; then
18399 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18401 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18402 else
18404 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18406 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18409 # Select random number source. If a TLS library is used then it will be the
18410 # first choice, else the native platform sources (Windows API or /dev/urandom)
18411 # will be used.
18412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18413 $as_echo_n "checking which random number source to use... " >&6; }
18414 if test x"$with_ssl" = x"openssl" ; then
18415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18416 $as_echo "OpenSSL" >&6; }
18417 elif test x"$PORTNAME" = x"win32" ; then
18418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18419 $as_echo "Windows native" >&6; }
18420 elif test x"$cross_compiling" = x"yes"; then
18421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming /dev/urandom" >&5
18422 $as_echo "assuming /dev/urandom" >&6; }
18423 else
18424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18425 $as_echo "/dev/urandom" >&6; }
18426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18427 $as_echo_n "checking for /dev/urandom... " >&6; }
18428 if ${ac_cv_file__dev_urandom+:} false; then :
18429 $as_echo_n "(cached) " >&6
18430 else
18431 test "$cross_compiling" = yes &&
18432 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18433 if test -r "/dev/urandom"; then
18434 ac_cv_file__dev_urandom=yes
18435 else
18436 ac_cv_file__dev_urandom=no
18439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18440 $as_echo "$ac_cv_file__dev_urandom" >&6; }
18441 if test "x$ac_cv_file__dev_urandom" = xyes; then :
18446 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
18447 as_fn_error $? "
18448 no source of strong random numbers was found
18449 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
18453 # If not set in template file, set bytes to use libc memset()
18454 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18455 MEMSET_LOOP_LIMIT=1024
18458 cat >>confdefs.h <<_ACEOF
18459 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18460 _ACEOF
18464 if test "$enable_nls" = yes ; then
18466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18467 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18468 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18469 $as_echo_n "(cached) " >&6
18470 else
18471 ac_func_search_save_LIBS=$LIBS
18472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18473 /* end confdefs.h. */
18475 /* Override any GCC internal prototype to avoid an error.
18476 Use char because int might match the return type of a GCC
18477 builtin and then its argument prototype would still apply. */
18478 #ifdef __cplusplus
18479 extern "C"
18480 #endif
18481 char bind_textdomain_codeset ();
18483 main ()
18485 return bind_textdomain_codeset ();
18487 return 0;
18489 _ACEOF
18490 for ac_lib in '' intl; do
18491 if test -z "$ac_lib"; then
18492 ac_res="none required"
18493 else
18494 ac_res=-l$ac_lib
18495 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18497 if ac_fn_c_try_link "$LINENO"; then :
18498 ac_cv_search_bind_textdomain_codeset=$ac_res
18500 rm -f core conftest.err conftest.$ac_objext \
18501 conftest$ac_exeext
18502 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18503 break
18505 done
18506 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18508 else
18509 ac_cv_search_bind_textdomain_codeset=no
18511 rm conftest.$ac_ext
18512 LIBS=$ac_func_search_save_LIBS
18514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18515 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18516 ac_res=$ac_cv_search_bind_textdomain_codeset
18517 if test "$ac_res" != no; then :
18518 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18520 else
18521 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18524 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18525 if test "x$ac_cv_header_libintl_h" = xyes; then :
18527 else
18528 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18532 if test -z "$MSGFMT"; then
18533 for ac_prog in msgfmt
18535 # Extract the first word of "$ac_prog", so it can be a program name with args.
18536 set dummy $ac_prog; ac_word=$2
18537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18538 $as_echo_n "checking for $ac_word... " >&6; }
18539 if ${ac_cv_path_MSGFMT+:} false; then :
18540 $as_echo_n "(cached) " >&6
18541 else
18542 case $MSGFMT in
18543 [\\/]* | ?:[\\/]*)
18544 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18547 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18548 for as_dir in $PATH
18550 IFS=$as_save_IFS
18551 test -z "$as_dir" && as_dir=.
18552 for ac_exec_ext in '' $ac_executable_extensions; do
18553 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18554 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18555 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18556 break 2
18558 done
18559 done
18560 IFS=$as_save_IFS
18563 esac
18565 MSGFMT=$ac_cv_path_MSGFMT
18566 if test -n "$MSGFMT"; then
18567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18568 $as_echo "$MSGFMT" >&6; }
18569 else
18570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18571 $as_echo "no" >&6; }
18575 test -n "$MSGFMT" && break
18576 done
18578 else
18579 # Report the value of MSGFMT in configure's output in all cases.
18580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18581 $as_echo_n "checking for MSGFMT... " >&6; }
18582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18583 $as_echo "$MSGFMT" >&6; }
18586 if test -z "$MSGFMT"; then
18587 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18590 $as_echo_n "checking for msgfmt flags... " >&6; }
18591 if ${pgac_cv_msgfmt_flags+:} false; then :
18592 $as_echo_n "(cached) " >&6
18593 else
18594 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18595 pgac_cv_msgfmt_flags=-c
18598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18599 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18600 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18602 if test -z "$MSGMERGE"; then
18603 for ac_prog in msgmerge
18605 # Extract the first word of "$ac_prog", so it can be a program name with args.
18606 set dummy $ac_prog; ac_word=$2
18607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18608 $as_echo_n "checking for $ac_word... " >&6; }
18609 if ${ac_cv_path_MSGMERGE+:} false; then :
18610 $as_echo_n "(cached) " >&6
18611 else
18612 case $MSGMERGE in
18613 [\\/]* | ?:[\\/]*)
18614 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18617 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18618 for as_dir in $PATH
18620 IFS=$as_save_IFS
18621 test -z "$as_dir" && as_dir=.
18622 for ac_exec_ext in '' $ac_executable_extensions; do
18623 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18624 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18625 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18626 break 2
18628 done
18629 done
18630 IFS=$as_save_IFS
18633 esac
18635 MSGMERGE=$ac_cv_path_MSGMERGE
18636 if test -n "$MSGMERGE"; then
18637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18638 $as_echo "$MSGMERGE" >&6; }
18639 else
18640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18641 $as_echo "no" >&6; }
18645 test -n "$MSGMERGE" && break
18646 done
18648 else
18649 # Report the value of MSGMERGE in configure's output in all cases.
18650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18651 $as_echo_n "checking for MSGMERGE... " >&6; }
18652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18653 $as_echo "$MSGMERGE" >&6; }
18656 if test -z "$XGETTEXT"; then
18657 for ac_prog in xgettext
18659 # Extract the first word of "$ac_prog", so it can be a program name with args.
18660 set dummy $ac_prog; ac_word=$2
18661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18662 $as_echo_n "checking for $ac_word... " >&6; }
18663 if ${ac_cv_path_XGETTEXT+:} false; then :
18664 $as_echo_n "(cached) " >&6
18665 else
18666 case $XGETTEXT in
18667 [\\/]* | ?:[\\/]*)
18668 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18672 for as_dir in $PATH
18674 IFS=$as_save_IFS
18675 test -z "$as_dir" && as_dir=.
18676 for ac_exec_ext in '' $ac_executable_extensions; do
18677 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18678 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18679 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18680 break 2
18682 done
18683 done
18684 IFS=$as_save_IFS
18687 esac
18689 XGETTEXT=$ac_cv_path_XGETTEXT
18690 if test -n "$XGETTEXT"; then
18691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18692 $as_echo "$XGETTEXT" >&6; }
18693 else
18694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18695 $as_echo "no" >&6; }
18699 test -n "$XGETTEXT" && break
18700 done
18702 else
18703 # Report the value of XGETTEXT in configure's output in all cases.
18704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18705 $as_echo_n "checking for XGETTEXT... " >&6; }
18706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18707 $as_echo "$XGETTEXT" >&6; }
18713 # Check for Tcl configuration script tclConfig.sh
18714 if test "$with_tcl" = yes; then
18715 if test -z "$TCLSH"; then
18716 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18718 # Extract the first word of "$ac_prog", so it can be a program name with args.
18719 set dummy $ac_prog; ac_word=$2
18720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18721 $as_echo_n "checking for $ac_word... " >&6; }
18722 if ${ac_cv_path_TCLSH+:} false; then :
18723 $as_echo_n "(cached) " >&6
18724 else
18725 case $TCLSH in
18726 [\\/]* | ?:[\\/]*)
18727 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18730 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18731 for as_dir in $PATH
18733 IFS=$as_save_IFS
18734 test -z "$as_dir" && as_dir=.
18735 for ac_exec_ext in '' $ac_executable_extensions; do
18736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18737 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18738 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18739 break 2
18741 done
18742 done
18743 IFS=$as_save_IFS
18746 esac
18748 TCLSH=$ac_cv_path_TCLSH
18749 if test -n "$TCLSH"; then
18750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18751 $as_echo "$TCLSH" >&6; }
18752 else
18753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18754 $as_echo "no" >&6; }
18758 test -n "$TCLSH" && break
18759 done
18761 else
18762 # Report the value of TCLSH in configure's output in all cases.
18763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18764 $as_echo_n "checking for TCLSH... " >&6; }
18765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18766 $as_echo "$TCLSH" >&6; }
18769 if test x"$TCLSH" = x""; then
18770 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18774 $as_echo_n "checking for tclConfig.sh... " >&6; }
18775 # Let user override test
18776 if test -z "$TCL_CONFIG_SH"; then
18777 pgac_test_dirs="$with_tclconfig"
18779 set X $pgac_test_dirs; shift
18780 if test $# -eq 0; then
18781 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18782 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18783 # On newer macOS, $auto_path frequently doesn't include the place
18784 # where tclConfig.sh actually lives. Append that to the end, so as not
18785 # to break cases where a non-default Tcl installation is being used.
18786 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18787 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18789 set X $pgac_test_dirs; shift
18792 for pgac_dir do
18793 if test -r "$pgac_dir/tclConfig.sh"; then
18794 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18795 break
18797 done
18800 if test -z "$TCL_CONFIG_SH"; then
18801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18802 $as_echo "no" >&6; }
18803 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18804 else
18805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18806 $as_echo "$TCL_CONFIG_SH" >&6; }
18811 . "$TCL_CONFIG_SH"
18812 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18813 eval TCL_LIBS=\"$TCL_LIBS\"
18814 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18815 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18817 if test "$TCL_SHARED_BUILD" != 1; then
18818 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18819 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18821 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18822 ac_save_CPPFLAGS=$CPPFLAGS
18823 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18824 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18825 if test "x$ac_cv_header_tcl_h" = xyes; then :
18827 else
18828 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18832 CPPFLAGS=$ac_save_CPPFLAGS
18835 # check for <perl.h>
18836 if test "$with_perl" = yes; then
18837 ac_save_CPPFLAGS=$CPPFLAGS
18838 CPPFLAGS="$CPPFLAGS $perl_includespec"
18839 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18841 if test "x$ac_cv_header_perl_h" = xyes; then :
18843 else
18844 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18848 # While we're at it, check that we can link to libperl.
18849 # On most platforms, if perl.h is there then libperl.so will be too, but at
18850 # this writing Debian packages them separately. There is no known reason to
18851 # waste cycles on separate probes for the Tcl or Python libraries, though.
18852 # On some Red Hat platforms, the link attempt can fail if we don't use
18853 # CFLAGS_SL while building the test program.
18854 ac_save_CFLAGS=$CFLAGS
18855 CFLAGS="$CFLAGS $CFLAGS_SL"
18856 pgac_save_LIBS=$LIBS
18857 LIBS="$perl_embed_ldflags"
18858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18859 $as_echo_n "checking for libperl... " >&6; }
18860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18861 /* end confdefs.h. */
18863 #include <EXTERN.h>
18864 #include <perl.h>
18867 main ()
18869 perl_alloc();
18871 return 0;
18873 _ACEOF
18874 if ac_fn_c_try_link "$LINENO"; then :
18875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18876 $as_echo "yes" >&6; }
18877 else
18878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18879 $as_echo "no" >&6; }
18880 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18882 rm -f core conftest.err conftest.$ac_objext \
18883 conftest$ac_exeext conftest.$ac_ext
18884 LIBS=$pgac_save_LIBS
18885 CFLAGS=$ac_save_CFLAGS
18886 CPPFLAGS=$ac_save_CPPFLAGS
18889 # check for <Python.h>
18890 if test "$with_python" = yes; then
18891 ac_save_CPPFLAGS=$CPPFLAGS
18892 CPPFLAGS="$python_includespec $CPPFLAGS"
18893 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18894 if test "x$ac_cv_header_Python_h" = xyes; then :
18896 else
18897 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18901 CPPFLAGS=$ac_save_CPPFLAGS
18905 # Check for documentation-building tools
18907 if test -z "$XMLLINT"; then
18908 for ac_prog in xmllint
18910 # Extract the first word of "$ac_prog", so it can be a program name with args.
18911 set dummy $ac_prog; ac_word=$2
18912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18913 $as_echo_n "checking for $ac_word... " >&6; }
18914 if ${ac_cv_path_XMLLINT+:} false; then :
18915 $as_echo_n "(cached) " >&6
18916 else
18917 case $XMLLINT in
18918 [\\/]* | ?:[\\/]*)
18919 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18923 for as_dir in $PATH
18925 IFS=$as_save_IFS
18926 test -z "$as_dir" && as_dir=.
18927 for ac_exec_ext in '' $ac_executable_extensions; do
18928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18929 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18931 break 2
18933 done
18934 done
18935 IFS=$as_save_IFS
18938 esac
18940 XMLLINT=$ac_cv_path_XMLLINT
18941 if test -n "$XMLLINT"; then
18942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18943 $as_echo "$XMLLINT" >&6; }
18944 else
18945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18946 $as_echo "no" >&6; }
18950 test -n "$XMLLINT" && break
18951 done
18953 else
18954 # Report the value of XMLLINT in configure's output in all cases.
18955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18956 $as_echo_n "checking for XMLLINT... " >&6; }
18957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18958 $as_echo "$XMLLINT" >&6; }
18961 if test -z "$XSLTPROC"; then
18962 for ac_prog in xsltproc
18964 # Extract the first word of "$ac_prog", so it can be a program name with args.
18965 set dummy $ac_prog; ac_word=$2
18966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18967 $as_echo_n "checking for $ac_word... " >&6; }
18968 if ${ac_cv_path_XSLTPROC+:} false; then :
18969 $as_echo_n "(cached) " >&6
18970 else
18971 case $XSLTPROC in
18972 [\\/]* | ?:[\\/]*)
18973 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18976 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18977 for as_dir in $PATH
18979 IFS=$as_save_IFS
18980 test -z "$as_dir" && as_dir=.
18981 for ac_exec_ext in '' $ac_executable_extensions; do
18982 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18983 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18984 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18985 break 2
18987 done
18988 done
18989 IFS=$as_save_IFS
18992 esac
18994 XSLTPROC=$ac_cv_path_XSLTPROC
18995 if test -n "$XSLTPROC"; then
18996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18997 $as_echo "$XSLTPROC" >&6; }
18998 else
18999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19000 $as_echo "no" >&6; }
19004 test -n "$XSLTPROC" && break
19005 done
19007 else
19008 # Report the value of XSLTPROC in configure's output in all cases.
19009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
19010 $as_echo_n "checking for XSLTPROC... " >&6; }
19011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19012 $as_echo "$XSLTPROC" >&6; }
19015 if test -z "$FOP"; then
19016 for ac_prog in fop
19018 # Extract the first word of "$ac_prog", so it can be a program name with args.
19019 set dummy $ac_prog; ac_word=$2
19020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19021 $as_echo_n "checking for $ac_word... " >&6; }
19022 if ${ac_cv_path_FOP+:} false; then :
19023 $as_echo_n "(cached) " >&6
19024 else
19025 case $FOP in
19026 [\\/]* | ?:[\\/]*)
19027 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
19030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19031 for as_dir in $PATH
19033 IFS=$as_save_IFS
19034 test -z "$as_dir" && as_dir=.
19035 for ac_exec_ext in '' $ac_executable_extensions; do
19036 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19037 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
19038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19039 break 2
19041 done
19042 done
19043 IFS=$as_save_IFS
19046 esac
19048 FOP=$ac_cv_path_FOP
19049 if test -n "$FOP"; then
19050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19051 $as_echo "$FOP" >&6; }
19052 else
19053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19054 $as_echo "no" >&6; }
19058 test -n "$FOP" && break
19059 done
19061 else
19062 # Report the value of FOP in configure's output in all cases.
19063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
19064 $as_echo_n "checking for FOP... " >&6; }
19065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19066 $as_echo "$FOP" >&6; }
19069 if test -z "$DBTOEPUB"; then
19070 for ac_prog in dbtoepub
19072 # Extract the first word of "$ac_prog", so it can be a program name with args.
19073 set dummy $ac_prog; ac_word=$2
19074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19075 $as_echo_n "checking for $ac_word... " >&6; }
19076 if ${ac_cv_path_DBTOEPUB+:} false; then :
19077 $as_echo_n "(cached) " >&6
19078 else
19079 case $DBTOEPUB in
19080 [\\/]* | ?:[\\/]*)
19081 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
19084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19085 for as_dir in $PATH
19087 IFS=$as_save_IFS
19088 test -z "$as_dir" && as_dir=.
19089 for ac_exec_ext in '' $ac_executable_extensions; do
19090 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19091 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
19092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19093 break 2
19095 done
19096 done
19097 IFS=$as_save_IFS
19100 esac
19102 DBTOEPUB=$ac_cv_path_DBTOEPUB
19103 if test -n "$DBTOEPUB"; then
19104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19105 $as_echo "$DBTOEPUB" >&6; }
19106 else
19107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19108 $as_echo "no" >&6; }
19112 test -n "$DBTOEPUB" && break
19113 done
19115 else
19116 # Report the value of DBTOEPUB in configure's output in all cases.
19117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
19118 $as_echo_n "checking for DBTOEPUB... " >&6; }
19119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19120 $as_echo "$DBTOEPUB" >&6; }
19125 # Check for test tools
19127 if test "$enable_tap_tests" = yes; then
19128 # Make sure we know where prove is.
19129 if test -z "$PROVE"; then
19130 for ac_prog in prove
19132 # Extract the first word of "$ac_prog", so it can be a program name with args.
19133 set dummy $ac_prog; ac_word=$2
19134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19135 $as_echo_n "checking for $ac_word... " >&6; }
19136 if ${ac_cv_path_PROVE+:} false; then :
19137 $as_echo_n "(cached) " >&6
19138 else
19139 case $PROVE in
19140 [\\/]* | ?:[\\/]*)
19141 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
19144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19145 for as_dir in $PATH
19147 IFS=$as_save_IFS
19148 test -z "$as_dir" && as_dir=.
19149 for ac_exec_ext in '' $ac_executable_extensions; do
19150 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19151 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
19152 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19153 break 2
19155 done
19156 done
19157 IFS=$as_save_IFS
19160 esac
19162 PROVE=$ac_cv_path_PROVE
19163 if test -n "$PROVE"; then
19164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19165 $as_echo "$PROVE" >&6; }
19166 else
19167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19168 $as_echo "no" >&6; }
19172 test -n "$PROVE" && break
19173 done
19175 else
19176 # Report the value of PROVE in configure's output in all cases.
19177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
19178 $as_echo_n "checking for PROVE... " >&6; }
19179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19180 $as_echo "$PROVE" >&6; }
19183 if test -z "$PROVE"; then
19184 as_fn_error $? "prove not found" "$LINENO" 5
19186 # Check for necessary Perl modules. You might think we should use
19187 # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
19188 # installation than perl, eg on MSys, so we have to check using prove.
19189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
19190 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
19191 __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__
19192 modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
19193 if test $? -eq 0; then
19194 # log the module version details, but don't show them interactively
19195 echo "$modulestderr" >&5
19196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19197 $as_echo "yes" >&6; }
19198 else
19199 # on failure, though, show the results to the user
19200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modulestderr" >&5
19201 $as_echo "$modulestderr" >&6; }
19202 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
19206 # If compiler will take -Wl,--as-needed (or various platform-specific
19207 # spellings thereof) then add that to LDFLAGS. This is much easier than
19208 # trying to filter LIBS to the minimum for each executable.
19209 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
19210 # libreadline; therefore we postpone testing it until we know what library
19211 # dependencies readline has. The test code will try to link with $LIBS.
19212 if test "$with_readline" = yes; then
19213 link_test_func=readline
19214 else
19215 link_test_func=exit
19218 if test "$PORTNAME" = "darwin"; then
19219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
19220 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
19221 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
19222 $as_echo_n "(cached) " >&6
19223 else
19224 pgac_save_LDFLAGS=$LDFLAGS
19225 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19226 if test "$cross_compiling" = yes; then :
19227 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
19228 else
19229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19230 /* end confdefs.h. */
19231 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19233 main ()
19237 return 0;
19239 _ACEOF
19240 if ac_fn_c_try_run "$LINENO"; then :
19241 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
19242 else
19243 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
19245 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19246 conftest.$ac_objext conftest.beam conftest.$ac_ext
19249 LDFLAGS="$pgac_save_LDFLAGS"
19251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
19252 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
19253 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
19254 LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
19257 elif test "$PORTNAME" = "openbsd"; then
19258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
19259 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
19260 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
19261 $as_echo_n "(cached) " >&6
19262 else
19263 pgac_save_LDFLAGS=$LDFLAGS
19264 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19265 if test "$cross_compiling" = yes; then :
19266 pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
19267 else
19268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19269 /* end confdefs.h. */
19270 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19272 main ()
19276 return 0;
19278 _ACEOF
19279 if ac_fn_c_try_run "$LINENO"; then :
19280 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
19281 else
19282 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
19284 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19285 conftest.$ac_objext conftest.beam conftest.$ac_ext
19288 LDFLAGS="$pgac_save_LDFLAGS"
19290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
19291 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
19292 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
19293 LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
19296 else
19297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
19298 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
19299 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
19300 $as_echo_n "(cached) " >&6
19301 else
19302 pgac_save_LDFLAGS=$LDFLAGS
19303 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19304 if test "$cross_compiling" = yes; then :
19305 pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
19306 else
19307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19308 /* end confdefs.h. */
19309 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19311 main ()
19315 return 0;
19317 _ACEOF
19318 if ac_fn_c_try_run "$LINENO"; then :
19319 pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
19320 else
19321 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
19323 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19324 conftest.$ac_objext conftest.beam conftest.$ac_ext
19327 LDFLAGS="$pgac_save_LDFLAGS"
19329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
19330 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
19331 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
19332 LDFLAGS="$LDFLAGS -Wl,--as-needed"
19337 # Create compiler version string
19338 if test x"$GCC" = x"yes" ; then
19339 cc_string=`${CC} --version | sed q`
19340 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19341 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19342 cc_string=`${CC} -V 2>&1 | sed q`
19343 else
19344 cc_string=$CC
19348 cat >>confdefs.h <<_ACEOF
19349 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19350 _ACEOF
19353 # Supply a numeric version string for use by 3rd party add-ons
19354 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19355 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
19356 $AWK '{printf "%d%04d", $1, $2}'`"
19358 cat >>confdefs.h <<_ACEOF
19359 #define PG_VERSION_NUM $PG_VERSION_NUM
19360 _ACEOF
19364 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19365 # literally, so that it's possible to override it at build time using
19366 # a command like "make ... PG_SYSROOT=path". This has to be done after
19367 # we've finished all configure checks that depend on CPPFLAGS.
19368 # The same for LDFLAGS, too.
19369 if test x"$PG_SYSROOT" != x; then
19370 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19371 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19376 # Begin output steps
19378 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19379 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19380 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19381 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19382 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19383 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19384 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19385 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19386 # Currently only used when LLVM is used
19387 if test "$with_llvm" = yes ; then
19388 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19389 $as_echo "$as_me: using CXX=$CXX" >&6;}
19390 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19391 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19392 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19393 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19394 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19395 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19396 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19397 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19400 # prepare build tree if outside source tree
19401 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19402 # Note 2: /bin/pwd might be better than shell's built-in at getting
19403 # a symlink-free name.
19404 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19405 vpath_build=no
19406 else
19407 vpath_build=yes
19408 if test "$no_create" != yes; then
19409 $as_echo_n "preparing build tree... " >&6
19410 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19411 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19412 || as_fn_error $? "failed" "$LINENO" 5
19413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19414 $as_echo "done" >&6; }
19420 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19423 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}"
19426 if test "$PORTNAME" = "win32"; then
19427 ac_config_commands="$ac_config_commands check_win32_symlinks"
19431 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19434 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19437 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19440 cat >confcache <<\_ACEOF
19441 # This file is a shell script that caches the results of configure
19442 # tests run on this system so they can be shared between configure
19443 # scripts and configure runs, see configure's option --config-cache.
19444 # It is not useful on other systems. If it contains results you don't
19445 # want to keep, you may remove or edit it.
19447 # config.status only pays attention to the cache file if you give it
19448 # the --recheck option to rerun configure.
19450 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19451 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19452 # following values.
19454 _ACEOF
19456 # The following way of writing the cache mishandles newlines in values,
19457 # but we know of no workaround that is simple, portable, and efficient.
19458 # So, we kill variables containing newlines.
19459 # Ultrix sh set writes to stderr and can't be redirected directly,
19460 # and sets the high bit in the cache file unless we assign to the vars.
19462 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19463 eval ac_val=\$$ac_var
19464 case $ac_val in #(
19465 *${as_nl}*)
19466 case $ac_var in #(
19467 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19468 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19469 esac
19470 case $ac_var in #(
19471 _ | IFS | as_nl) ;; #(
19472 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19473 *) { eval $ac_var=; unset $ac_var;} ;;
19474 esac ;;
19475 esac
19476 done
19478 (set) 2>&1 |
19479 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19480 *${as_nl}ac_space=\ *)
19481 # `set' does not quote correctly, so add quotes: double-quote
19482 # substitution turns \\\\ into \\, and sed turns \\ into \.
19483 sed -n \
19484 "s/'/'\\\\''/g;
19485 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19486 ;; #(
19488 # `set' quotes correctly as required by POSIX, so do not add quotes.
19489 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19491 esac |
19492 sort
19494 sed '
19495 /^ac_cv_env_/b end
19496 t clear
19497 :clear
19498 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19499 t end
19500 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19501 :end' >>confcache
19502 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19503 if test -w "$cache_file"; then
19504 if test "x$cache_file" != "x/dev/null"; then
19505 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19506 $as_echo "$as_me: updating cache $cache_file" >&6;}
19507 if test ! -f "$cache_file" || test -h "$cache_file"; then
19508 cat confcache >"$cache_file"
19509 else
19510 case $cache_file in #(
19511 */* | ?:*)
19512 mv -f confcache "$cache_file"$$ &&
19513 mv -f "$cache_file"$$ "$cache_file" ;; #(
19515 mv -f confcache "$cache_file" ;;
19516 esac
19519 else
19520 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19521 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19524 rm -f confcache
19526 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19527 # Let make expand exec_prefix.
19528 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19530 DEFS=-DHAVE_CONFIG_H
19532 ac_libobjs=
19533 ac_ltlibobjs=
19535 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19536 # 1. Remove the extension, and $U if already installed.
19537 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19538 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19539 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19540 # will be set to the directory where LIBOBJS objects are built.
19541 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19542 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19543 done
19544 LIBOBJS=$ac_libobjs
19546 LTLIBOBJS=$ac_ltlibobjs
19551 : "${CONFIG_STATUS=./config.status}"
19552 ac_write_fail=0
19553 ac_clean_files_save=$ac_clean_files
19554 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19555 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19556 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19557 as_write_fail=0
19558 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19559 #! $SHELL
19560 # Generated by $as_me.
19561 # Run this file to recreate the current configuration.
19562 # Compiler output produced by configure, useful for debugging
19563 # configure, is in config.log if it exists.
19565 debug=false
19566 ac_cs_recheck=false
19567 ac_cs_silent=false
19569 SHELL=\${CONFIG_SHELL-$SHELL}
19570 export SHELL
19571 _ASEOF
19572 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19573 ## -------------------- ##
19574 ## M4sh Initialization. ##
19575 ## -------------------- ##
19577 # Be more Bourne compatible
19578 DUALCASE=1; export DUALCASE # for MKS sh
19579 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19580 emulate sh
19581 NULLCMD=:
19582 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19583 # is contrary to our usage. Disable this feature.
19584 alias -g '${1+"$@"}'='"$@"'
19585 setopt NO_GLOB_SUBST
19586 else
19587 case `(set -o) 2>/dev/null` in #(
19588 *posix*) :
19589 set -o posix ;; #(
19590 *) :
19592 esac
19596 as_nl='
19598 export as_nl
19599 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19600 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19601 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19602 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19603 # Prefer a ksh shell builtin over an external printf program on Solaris,
19604 # but without wasting forks for bash or zsh.
19605 if test -z "$BASH_VERSION$ZSH_VERSION" \
19606 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19607 as_echo='print -r --'
19608 as_echo_n='print -rn --'
19609 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19610 as_echo='printf %s\n'
19611 as_echo_n='printf %s'
19612 else
19613 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19614 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19615 as_echo_n='/usr/ucb/echo -n'
19616 else
19617 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19618 as_echo_n_body='eval
19619 arg=$1;
19620 case $arg in #(
19621 *"$as_nl"*)
19622 expr "X$arg" : "X\\(.*\\)$as_nl";
19623 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19624 esac;
19625 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19627 export as_echo_n_body
19628 as_echo_n='sh -c $as_echo_n_body as_echo'
19630 export as_echo_body
19631 as_echo='sh -c $as_echo_body as_echo'
19634 # The user is always right.
19635 if test "${PATH_SEPARATOR+set}" != set; then
19636 PATH_SEPARATOR=:
19637 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19638 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19639 PATH_SEPARATOR=';'
19644 # IFS
19645 # We need space, tab and new line, in precisely that order. Quoting is
19646 # there to prevent editors from complaining about space-tab.
19647 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19648 # splitting by setting IFS to empty value.)
19649 IFS=" "" $as_nl"
19651 # Find who we are. Look in the path if we contain no directory separator.
19652 as_myself=
19653 case $0 in #((
19654 *[\\/]* ) as_myself=$0 ;;
19655 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19656 for as_dir in $PATH
19658 IFS=$as_save_IFS
19659 test -z "$as_dir" && as_dir=.
19660 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19661 done
19662 IFS=$as_save_IFS
19665 esac
19666 # We did not find ourselves, most probably we were run as `sh COMMAND'
19667 # in which case we are not to be found in the path.
19668 if test "x$as_myself" = x; then
19669 as_myself=$0
19671 if test ! -f "$as_myself"; then
19672 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19673 exit 1
19676 # Unset variables that we do not need and which cause bugs (e.g. in
19677 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19678 # suppresses any "Segmentation fault" message there. '((' could
19679 # trigger a bug in pdksh 5.2.14.
19680 for as_var in BASH_ENV ENV MAIL MAILPATH
19681 do eval test x\${$as_var+set} = xset \
19682 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19683 done
19684 PS1='$ '
19685 PS2='> '
19686 PS4='+ '
19688 # NLS nuisances.
19689 LC_ALL=C
19690 export LC_ALL
19691 LANGUAGE=C
19692 export LANGUAGE
19694 # CDPATH.
19695 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19698 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19699 # ----------------------------------------
19700 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19701 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19702 # script with STATUS, using 1 if that was 0.
19703 as_fn_error ()
19705 as_status=$1; test $as_status -eq 0 && as_status=1
19706 if test "$4"; then
19707 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19708 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19710 $as_echo "$as_me: error: $2" >&2
19711 as_fn_exit $as_status
19712 } # as_fn_error
19715 # as_fn_set_status STATUS
19716 # -----------------------
19717 # Set $? to STATUS, without forking.
19718 as_fn_set_status ()
19720 return $1
19721 } # as_fn_set_status
19723 # as_fn_exit STATUS
19724 # -----------------
19725 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19726 as_fn_exit ()
19728 set +e
19729 as_fn_set_status $1
19730 exit $1
19731 } # as_fn_exit
19733 # as_fn_unset VAR
19734 # ---------------
19735 # Portably unset VAR.
19736 as_fn_unset ()
19738 { eval $1=; unset $1;}
19740 as_unset=as_fn_unset
19741 # as_fn_append VAR VALUE
19742 # ----------------------
19743 # Append the text in VALUE to the end of the definition contained in VAR. Take
19744 # advantage of any shell optimizations that allow amortized linear growth over
19745 # repeated appends, instead of the typical quadratic growth present in naive
19746 # implementations.
19747 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19748 eval 'as_fn_append ()
19750 eval $1+=\$2
19752 else
19753 as_fn_append ()
19755 eval $1=\$$1\$2
19757 fi # as_fn_append
19759 # as_fn_arith ARG...
19760 # ------------------
19761 # Perform arithmetic evaluation on the ARGs, and store the result in the
19762 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19763 # must be portable across $(()) and expr.
19764 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19765 eval 'as_fn_arith ()
19767 as_val=$(( $* ))
19769 else
19770 as_fn_arith ()
19772 as_val=`expr "$@" || test $? -eq 1`
19774 fi # as_fn_arith
19777 if expr a : '\(a\)' >/dev/null 2>&1 &&
19778 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19779 as_expr=expr
19780 else
19781 as_expr=false
19784 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19785 as_basename=basename
19786 else
19787 as_basename=false
19790 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19791 as_dirname=dirname
19792 else
19793 as_dirname=false
19796 as_me=`$as_basename -- "$0" ||
19797 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19798 X"$0" : 'X\(//\)$' \| \
19799 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19800 $as_echo X/"$0" |
19801 sed '/^.*\/\([^/][^/]*\)\/*$/{
19802 s//\1/
19805 /^X\/\(\/\/\)$/{
19806 s//\1/
19809 /^X\/\(\/\).*/{
19810 s//\1/
19813 s/.*/./; q'`
19815 # Avoid depending upon Character Ranges.
19816 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19817 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19818 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19819 as_cr_digits='0123456789'
19820 as_cr_alnum=$as_cr_Letters$as_cr_digits
19822 ECHO_C= ECHO_N= ECHO_T=
19823 case `echo -n x` in #(((((
19824 -n*)
19825 case `echo 'xy\c'` in
19826 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19827 xy) ECHO_C='\c';;
19828 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19829 ECHO_T=' ';;
19830 esac;;
19832 ECHO_N='-n';;
19833 esac
19835 rm -f conf$$ conf$$.exe conf$$.file
19836 if test -d conf$$.dir; then
19837 rm -f conf$$.dir/conf$$.file
19838 else
19839 rm -f conf$$.dir
19840 mkdir conf$$.dir 2>/dev/null
19842 if (echo >conf$$.file) 2>/dev/null; then
19843 if ln -s conf$$.file conf$$ 2>/dev/null; then
19844 as_ln_s='ln -s'
19845 # ... but there are two gotchas:
19846 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19847 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19848 # In both cases, we have to default to `cp -pR'.
19849 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19850 as_ln_s='cp -pR'
19851 elif ln conf$$.file conf$$ 2>/dev/null; then
19852 as_ln_s=ln
19853 else
19854 as_ln_s='cp -pR'
19856 else
19857 as_ln_s='cp -pR'
19859 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19860 rmdir conf$$.dir 2>/dev/null
19863 # as_fn_mkdir_p
19864 # -------------
19865 # Create "$as_dir" as a directory, including parents if necessary.
19866 as_fn_mkdir_p ()
19869 case $as_dir in #(
19870 -*) as_dir=./$as_dir;;
19871 esac
19872 test -d "$as_dir" || eval $as_mkdir_p || {
19873 as_dirs=
19874 while :; do
19875 case $as_dir in #(
19876 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19877 *) as_qdir=$as_dir;;
19878 esac
19879 as_dirs="'$as_qdir' $as_dirs"
19880 as_dir=`$as_dirname -- "$as_dir" ||
19881 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19882 X"$as_dir" : 'X\(//\)[^/]' \| \
19883 X"$as_dir" : 'X\(//\)$' \| \
19884 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19885 $as_echo X"$as_dir" |
19886 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19887 s//\1/
19890 /^X\(\/\/\)[^/].*/{
19891 s//\1/
19894 /^X\(\/\/\)$/{
19895 s//\1/
19898 /^X\(\/\).*/{
19899 s//\1/
19902 s/.*/./; q'`
19903 test -d "$as_dir" && break
19904 done
19905 test -z "$as_dirs" || eval "mkdir $as_dirs"
19906 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19909 } # as_fn_mkdir_p
19910 if mkdir -p . 2>/dev/null; then
19911 as_mkdir_p='mkdir -p "$as_dir"'
19912 else
19913 test -d ./-p && rmdir ./-p
19914 as_mkdir_p=false
19918 # as_fn_executable_p FILE
19919 # -----------------------
19920 # Test if FILE is an executable regular file.
19921 as_fn_executable_p ()
19923 test -f "$1" && test -x "$1"
19924 } # as_fn_executable_p
19925 as_test_x='test -x'
19926 as_executable_p=as_fn_executable_p
19928 # Sed expression to map a string onto a valid CPP name.
19929 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19931 # Sed expression to map a string onto a valid variable name.
19932 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19935 exec 6>&1
19936 ## ----------------------------------- ##
19937 ## Main body of $CONFIG_STATUS script. ##
19938 ## ----------------------------------- ##
19939 _ASEOF
19940 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19942 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19943 # Save the log message, to keep $0 and so on meaningful, and to
19944 # report actual input values of CONFIG_FILES etc. instead of their
19945 # values after options handling.
19946 ac_log="
19947 This file was extended by PostgreSQL $as_me 16devel, which was
19948 generated by GNU Autoconf 2.69. Invocation command line was
19950 CONFIG_FILES = $CONFIG_FILES
19951 CONFIG_HEADERS = $CONFIG_HEADERS
19952 CONFIG_LINKS = $CONFIG_LINKS
19953 CONFIG_COMMANDS = $CONFIG_COMMANDS
19954 $ $0 $@
19956 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19959 _ACEOF
19961 case $ac_config_files in *"
19962 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19963 esac
19965 case $ac_config_headers in *"
19966 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19967 esac
19970 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19971 # Files that config.status was made for.
19972 config_files="$ac_config_files"
19973 config_headers="$ac_config_headers"
19974 config_links="$ac_config_links"
19975 config_commands="$ac_config_commands"
19977 _ACEOF
19979 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19980 ac_cs_usage="\
19981 \`$as_me' instantiates files and other configuration actions
19982 from templates according to the current configuration. Unless the files
19983 and actions are specified as TAGs, all are instantiated by default.
19985 Usage: $0 [OPTION]... [TAG]...
19987 -h, --help print this help, then exit
19988 -V, --version print version number and configuration settings, then exit
19989 --config print configuration, then exit
19990 -q, --quiet, --silent
19991 do not print progress messages
19992 -d, --debug don't remove temporary files
19993 --recheck update $as_me by reconfiguring in the same conditions
19994 --file=FILE[:TEMPLATE]
19995 instantiate the configuration file FILE
19996 --header=FILE[:TEMPLATE]
19997 instantiate the configuration header FILE
19999 Configuration files:
20000 $config_files
20002 Configuration headers:
20003 $config_headers
20005 Configuration links:
20006 $config_links
20008 Configuration commands:
20009 $config_commands
20011 Report bugs to <pgsql-bugs@lists.postgresql.org>.
20012 PostgreSQL home page: <https://www.postgresql.org/>."
20014 _ACEOF
20015 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20016 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20017 ac_cs_version="\\
20018 PostgreSQL config.status 16devel
20019 configured by $0, generated by GNU Autoconf 2.69,
20020 with options \\"\$ac_cs_config\\"
20022 Copyright (C) 2012 Free Software Foundation, Inc.
20023 This config.status script is free software; the Free Software Foundation
20024 gives unlimited permission to copy, distribute and modify it."
20026 ac_pwd='$ac_pwd'
20027 srcdir='$srcdir'
20028 INSTALL='$INSTALL'
20029 MKDIR_P='$MKDIR_P'
20030 AWK='$AWK'
20031 test -n "\$AWK" || AWK=awk
20032 _ACEOF
20034 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20035 # The default lists apply if the user does not specify any file.
20036 ac_need_defaults=:
20037 while test $# != 0
20039 case $1 in
20040 --*=?*)
20041 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20042 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20043 ac_shift=:
20045 --*=)
20046 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20047 ac_optarg=
20048 ac_shift=:
20051 ac_option=$1
20052 ac_optarg=$2
20053 ac_shift=shift
20055 esac
20057 case $ac_option in
20058 # Handling of the options.
20059 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20060 ac_cs_recheck=: ;;
20061 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20062 $as_echo "$ac_cs_version"; exit ;;
20063 --config | --confi | --conf | --con | --co | --c )
20064 $as_echo "$ac_cs_config"; exit ;;
20065 --debug | --debu | --deb | --de | --d | -d )
20066 debug=: ;;
20067 --file | --fil | --fi | --f )
20068 $ac_shift
20069 case $ac_optarg in
20070 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20071 '') as_fn_error $? "missing file argument" ;;
20072 esac
20073 as_fn_append CONFIG_FILES " '$ac_optarg'"
20074 ac_need_defaults=false;;
20075 --header | --heade | --head | --hea )
20076 $ac_shift
20077 case $ac_optarg in
20078 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20079 esac
20080 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20081 ac_need_defaults=false;;
20082 --he | --h)
20083 # Conflict between --help and --header
20084 as_fn_error $? "ambiguous option: \`$1'
20085 Try \`$0 --help' for more information.";;
20086 --help | --hel | -h )
20087 $as_echo "$ac_cs_usage"; exit ;;
20088 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20089 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20090 ac_cs_silent=: ;;
20092 # This is an error.
20093 -*) as_fn_error $? "unrecognized option: \`$1'
20094 Try \`$0 --help' for more information." ;;
20096 *) as_fn_append ac_config_targets " $1"
20097 ac_need_defaults=false ;;
20099 esac
20100 shift
20101 done
20103 ac_configure_extra_args=
20105 if $ac_cs_silent; then
20106 exec 6>/dev/null
20107 ac_configure_extra_args="$ac_configure_extra_args --silent"
20110 _ACEOF
20111 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20112 if \$ac_cs_recheck; then
20113 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20114 shift
20115 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20116 CONFIG_SHELL='$SHELL'
20117 export CONFIG_SHELL
20118 exec "\$@"
20121 _ACEOF
20122 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20123 exec 5>>config.log
20125 echo
20126 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20127 ## Running $as_me. ##
20128 _ASBOX
20129 $as_echo "$ac_log"
20130 } >&5
20132 _ACEOF
20133 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20134 _ACEOF
20136 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20138 # Handling of arguments.
20139 for ac_config_target in $ac_config_targets
20141 case $ac_config_target in
20142 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
20143 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
20144 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
20145 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
20146 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
20147 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
20148 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
20149 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
20150 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
20151 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
20152 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
20154 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20155 esac
20156 done
20159 # If the user did not use the arguments to specify the items to instantiate,
20160 # then the envvar interface is used. Set only those that are not.
20161 # We use the long form for the default assignment because of an extremely
20162 # bizarre bug on SunOS 4.1.3.
20163 if $ac_need_defaults; then
20164 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20165 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20166 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20167 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20170 # Have a temporary directory for convenience. Make it in the build tree
20171 # simply because there is no reason against having it here, and in addition,
20172 # creating and moving files from /tmp can sometimes cause problems.
20173 # Hook for its removal unless debugging.
20174 # Note that there is a small window in which the directory will not be cleaned:
20175 # after its creation but before its name has been assigned to `$tmp'.
20176 $debug ||
20178 tmp= ac_tmp=
20179 trap 'exit_status=$?
20180 : "${ac_tmp:=$tmp}"
20181 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20183 trap 'as_fn_exit 1' 1 2 13 15
20185 # Create a (secure) tmp directory for tmp files.
20188 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20189 test -d "$tmp"
20190 } ||
20192 tmp=./conf$$-$RANDOM
20193 (umask 077 && mkdir "$tmp")
20194 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20195 ac_tmp=$tmp
20197 # Set up the scripts for CONFIG_FILES section.
20198 # No need to generate them if there are no CONFIG_FILES.
20199 # This happens for instance with `./config.status config.h'.
20200 if test -n "$CONFIG_FILES"; then
20203 ac_cr=`echo X | tr X '\015'`
20204 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20205 # But we know of no other shell where ac_cr would be empty at this
20206 # point, so we can use a bashism as a fallback.
20207 if test "x$ac_cr" = x; then
20208 eval ac_cr=\$\'\\r\'
20210 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20211 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20212 ac_cs_awk_cr='\\r'
20213 else
20214 ac_cs_awk_cr=$ac_cr
20217 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20218 _ACEOF
20222 echo "cat >conf$$subs.awk <<_ACEOF" &&
20223 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20224 echo "_ACEOF"
20225 } >conf$$subs.sh ||
20226 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20227 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20228 ac_delim='%!_!# '
20229 for ac_last_try in false false false false false :; do
20230 . ./conf$$subs.sh ||
20231 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20233 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20234 if test $ac_delim_n = $ac_delim_num; then
20235 break
20236 elif $ac_last_try; then
20237 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20238 else
20239 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20241 done
20242 rm -f conf$$subs.sh
20244 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20245 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20246 _ACEOF
20247 sed -n '
20249 s/^/S["/; s/!.*/"]=/
20252 s/^[^!]*!//
20253 :repl
20254 t repl
20255 s/'"$ac_delim"'$//
20256 t delim
20259 s/\(.\{148\}\)..*/\1/
20260 t more1
20261 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20264 b repl
20265 :more1
20266 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20269 s/.\{148\}//
20270 t nl
20271 :delim
20273 s/\(.\{148\}\)..*/\1/
20274 t more2
20275 s/["\\]/\\&/g; s/^/"/; s/$/"/
20278 :more2
20279 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20282 s/.\{148\}//
20283 t delim
20284 ' <conf$$subs.awk | sed '
20285 /^[^""]/{
20287 s/\n//
20289 ' >>$CONFIG_STATUS || ac_write_fail=1
20290 rm -f conf$$subs.awk
20291 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20292 _ACAWK
20293 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20294 for (key in S) S_is_set[key] = 1
20295 FS = "\a"
20299 line = $ 0
20300 nfields = split(line, field, "@")
20301 substed = 0
20302 len = length(field[1])
20303 for (i = 2; i < nfields; i++) {
20304 key = field[i]
20305 keylen = length(key)
20306 if (S_is_set[key]) {
20307 value = S[key]
20308 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20309 len += length(value) + length(field[++i])
20310 substed = 1
20311 } else
20312 len += 1 + keylen
20315 print line
20318 _ACAWK
20319 _ACEOF
20320 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20321 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20322 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20323 else
20325 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20326 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20327 _ACEOF
20329 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20330 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20331 # trailing colons and then remove the whole line if VPATH becomes empty
20332 # (actually we leave an empty line to preserve line numbers).
20333 if test "x$srcdir" = x.; then
20334 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20336 s///
20337 s/^/:/
20338 s/[ ]*$/:/
20339 s/:\$(srcdir):/:/g
20340 s/:\${srcdir}:/:/g
20341 s/:@srcdir@:/:/g
20342 s/^:*//
20343 s/:*$//
20345 s/\(=[ ]*\).*/\1/
20347 s/\n//
20348 s/^[^=]*=[ ]*$//
20352 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20353 fi # test -n "$CONFIG_FILES"
20355 # Set up the scripts for CONFIG_HEADERS section.
20356 # No need to generate them if there are no CONFIG_HEADERS.
20357 # This happens for instance with `./config.status Makefile'.
20358 if test -n "$CONFIG_HEADERS"; then
20359 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20360 BEGIN {
20361 _ACEOF
20363 # Transform confdefs.h into an awk script `defines.awk', embedded as
20364 # here-document in config.status, that substitutes the proper values into
20365 # config.h.in to produce config.h.
20367 # Create a delimiter string that does not exist in confdefs.h, to ease
20368 # handling of long lines.
20369 ac_delim='%!_!# '
20370 for ac_last_try in false false :; do
20371 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20372 if test -z "$ac_tt"; then
20373 break
20374 elif $ac_last_try; then
20375 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20376 else
20377 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20379 done
20381 # For the awk script, D is an array of macro values keyed by name,
20382 # likewise P contains macro parameters if any. Preserve backslash
20383 # newline sequences.
20385 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20386 sed -n '
20387 s/.\{148\}/&'"$ac_delim"'/g
20388 t rset
20389 :rset
20390 s/^[ ]*#[ ]*define[ ][ ]*/ /
20391 t def
20393 :def
20394 s/\\$//
20395 t bsnl
20396 s/["\\]/\\&/g
20397 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20398 D["\1"]=" \3"/p
20399 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20401 :bsnl
20402 s/["\\]/\\&/g
20403 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20404 D["\1"]=" \3\\\\\\n"\\/p
20405 t cont
20406 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20407 t cont
20409 :cont
20411 s/.\{148\}/&'"$ac_delim"'/g
20412 t clear
20413 :clear
20414 s/\\$//
20415 t bsnlc
20416 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20418 :bsnlc
20419 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20420 b cont
20421 ' <confdefs.h | sed '
20422 s/'"$ac_delim"'/"\\\
20423 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20425 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20426 for (key in D) D_is_set[key] = 1
20427 FS = "\a"
20429 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20430 line = \$ 0
20431 split(line, arg, " ")
20432 if (arg[1] == "#") {
20433 defundef = arg[2]
20434 mac1 = arg[3]
20435 } else {
20436 defundef = substr(arg[1], 2)
20437 mac1 = arg[2]
20439 split(mac1, mac2, "(") #)
20440 macro = mac2[1]
20441 prefix = substr(line, 1, index(line, defundef) - 1)
20442 if (D_is_set[macro]) {
20443 # Preserve the white space surrounding the "#".
20444 print prefix "define", macro P[macro] D[macro]
20445 next
20446 } else {
20447 # Replace #undef with comments. This is necessary, for example,
20448 # in the case of _POSIX_SOURCE, which is predefined and required
20449 # on some systems where configure will not decide to define it.
20450 if (defundef == "undef") {
20451 print "/*", prefix defundef, macro, "*/"
20452 next
20456 { print }
20457 _ACAWK
20458 _ACEOF
20459 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20460 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20461 fi # test -n "$CONFIG_HEADERS"
20464 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20465 shift
20466 for ac_tag
20468 case $ac_tag in
20469 :[FHLC]) ac_mode=$ac_tag; continue;;
20470 esac
20471 case $ac_mode$ac_tag in
20472 :[FHL]*:*);;
20473 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20474 :[FH]-) ac_tag=-:-;;
20475 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20476 esac
20477 ac_save_IFS=$IFS
20478 IFS=:
20479 set x $ac_tag
20480 IFS=$ac_save_IFS
20481 shift
20482 ac_file=$1
20483 shift
20485 case $ac_mode in
20486 :L) ac_source=$1;;
20487 :[FH])
20488 ac_file_inputs=
20489 for ac_f
20491 case $ac_f in
20492 -) ac_f="$ac_tmp/stdin";;
20493 *) # Look for the file first in the build tree, then in the source tree
20494 # (if the path is not absolute). The absolute path cannot be DOS-style,
20495 # because $ac_f cannot contain `:'.
20496 test -f "$ac_f" ||
20497 case $ac_f in
20498 [\\/$]*) false;;
20499 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20500 esac ||
20501 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20502 esac
20503 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20504 as_fn_append ac_file_inputs " '$ac_f'"
20505 done
20507 # Let's still pretend it is `configure' which instantiates (i.e., don't
20508 # use $as_me), people would be surprised to read:
20509 # /* config.h. Generated by config.status. */
20510 configure_input='Generated from '`
20511 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20512 `' by configure.'
20513 if test x"$ac_file" != x-; then
20514 configure_input="$ac_file. $configure_input"
20515 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20516 $as_echo "$as_me: creating $ac_file" >&6;}
20518 # Neutralize special characters interpreted by sed in replacement strings.
20519 case $configure_input in #(
20520 *\&* | *\|* | *\\* )
20521 ac_sed_conf_input=`$as_echo "$configure_input" |
20522 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20523 *) ac_sed_conf_input=$configure_input;;
20524 esac
20526 case $ac_tag in
20527 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20528 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20529 esac
20531 esac
20533 ac_dir=`$as_dirname -- "$ac_file" ||
20534 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20535 X"$ac_file" : 'X\(//\)[^/]' \| \
20536 X"$ac_file" : 'X\(//\)$' \| \
20537 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20538 $as_echo X"$ac_file" |
20539 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20540 s//\1/
20543 /^X\(\/\/\)[^/].*/{
20544 s//\1/
20547 /^X\(\/\/\)$/{
20548 s//\1/
20551 /^X\(\/\).*/{
20552 s//\1/
20555 s/.*/./; q'`
20556 as_dir="$ac_dir"; as_fn_mkdir_p
20557 ac_builddir=.
20559 case "$ac_dir" in
20560 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20562 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20563 # A ".." for each directory in $ac_dir_suffix.
20564 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20565 case $ac_top_builddir_sub in
20566 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20567 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20568 esac ;;
20569 esac
20570 ac_abs_top_builddir=$ac_pwd
20571 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20572 # for backward compatibility:
20573 ac_top_builddir=$ac_top_build_prefix
20575 case $srcdir in
20576 .) # We are building in place.
20577 ac_srcdir=.
20578 ac_top_srcdir=$ac_top_builddir_sub
20579 ac_abs_top_srcdir=$ac_pwd ;;
20580 [\\/]* | ?:[\\/]* ) # Absolute name.
20581 ac_srcdir=$srcdir$ac_dir_suffix;
20582 ac_top_srcdir=$srcdir
20583 ac_abs_top_srcdir=$srcdir ;;
20584 *) # Relative name.
20585 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20586 ac_top_srcdir=$ac_top_build_prefix$srcdir
20587 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20588 esac
20589 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20592 case $ac_mode in
20595 # CONFIG_FILE
20598 case $INSTALL in
20599 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20600 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20601 esac
20602 ac_MKDIR_P=$MKDIR_P
20603 case $MKDIR_P in
20604 [\\/$]* | ?:[\\/]* ) ;;
20605 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20606 esac
20607 _ACEOF
20609 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20610 # If the template does not know about datarootdir, expand it.
20611 # FIXME: This hack should be removed a few years after 2.60.
20612 ac_datarootdir_hack=; ac_datarootdir_seen=
20613 ac_sed_dataroot='
20614 /datarootdir/ {
20618 /@datadir@/p
20619 /@docdir@/p
20620 /@infodir@/p
20621 /@localedir@/p
20622 /@mandir@/p'
20623 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20624 *datarootdir*) ac_datarootdir_seen=yes;;
20625 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20626 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20627 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20628 _ACEOF
20629 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20630 ac_datarootdir_hack='
20631 s&@datadir@&$datadir&g
20632 s&@docdir@&$docdir&g
20633 s&@infodir@&$infodir&g
20634 s&@localedir@&$localedir&g
20635 s&@mandir@&$mandir&g
20636 s&\\\${datarootdir}&$datarootdir&g' ;;
20637 esac
20638 _ACEOF
20640 # Neutralize VPATH when `$srcdir' = `.'.
20641 # Shell code in configure.ac might set extrasub.
20642 # FIXME: do we really want to maintain this feature?
20643 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20644 ac_sed_extra="$ac_vpsub
20645 $extrasub
20646 _ACEOF
20647 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20649 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20650 s|@configure_input@|$ac_sed_conf_input|;t t
20651 s&@top_builddir@&$ac_top_builddir_sub&;t t
20652 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20653 s&@srcdir@&$ac_srcdir&;t t
20654 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20655 s&@top_srcdir@&$ac_top_srcdir&;t t
20656 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20657 s&@builddir@&$ac_builddir&;t t
20658 s&@abs_builddir@&$ac_abs_builddir&;t t
20659 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20660 s&@INSTALL@&$ac_INSTALL&;t t
20661 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20662 $ac_datarootdir_hack
20664 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20665 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20667 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20668 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20669 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20670 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20671 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20672 which seems to be undefined. Please make sure it is defined" >&5
20673 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20674 which seems to be undefined. Please make sure it is defined" >&2;}
20676 rm -f "$ac_tmp/stdin"
20677 case $ac_file in
20678 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20679 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20680 esac \
20681 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20685 # CONFIG_HEADER
20687 if test x"$ac_file" != x-; then
20689 $as_echo "/* $configure_input */" \
20690 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20691 } >"$ac_tmp/config.h" \
20692 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20693 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20694 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20695 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20696 else
20697 rm -f "$ac_file"
20698 mv "$ac_tmp/config.h" "$ac_file" \
20699 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20701 else
20702 $as_echo "/* $configure_input */" \
20703 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20704 || as_fn_error $? "could not create -" "$LINENO" 5
20709 # CONFIG_LINK
20712 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20714 else
20715 # Prefer the file from the source tree if names are identical.
20716 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20717 ac_source=$srcdir/$ac_source
20720 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20721 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20723 if test ! -r "$ac_source"; then
20724 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20726 rm -f "$ac_file"
20728 # Try a relative symlink, then a hard link, then a copy.
20729 case $ac_source in
20730 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20731 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20732 esac
20733 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20734 ln "$ac_source" "$ac_file" 2>/dev/null ||
20735 cp -p "$ac_source" "$ac_file" ||
20736 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20739 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20740 $as_echo "$as_me: executing $ac_file commands" >&6;}
20742 esac
20745 case $ac_file$ac_mode in
20746 "check_win32_symlinks":C)
20747 # Links sometimes fail undetected on Mingw -
20748 # so here we detect it and warn the user
20749 for FILE in $CONFIG_LINKS
20751 # test -e works for symlinks in the MinGW console
20752 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20753 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20754 done
20756 "src/include/pg_config.h":H)
20757 # Update timestamp for pg_config.h (see Makefile.global)
20758 echo >src/include/stamp-h
20760 "src/include/pg_config_ext.h":H)
20761 # Update timestamp for pg_config_ext.h (see Makefile.global)
20762 echo >src/include/stamp-ext-h
20764 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20766 esac
20767 done # for ac_tag
20770 as_fn_exit 0
20771 _ACEOF
20772 ac_clean_files=$ac_clean_files_save
20774 test $ac_write_fail = 0 ||
20775 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20778 # configure is writing to config.log, and then calls config.status.
20779 # config.status does its own redirection, appending to config.log.
20780 # Unfortunately, on DOS this fails, as config.log is still kept open
20781 # by configure, so config.status won't be able to write to it; its
20782 # output is simply discarded. So we exec the FD to /dev/null,
20783 # effectively closing config.log, so it can be properly (re)opened and
20784 # appended to by config.status. When coming back to configure, we
20785 # need to make the FD available again.
20786 if test "$no_create" != yes; then
20787 ac_cs_success=:
20788 ac_config_status_args=
20789 test "$silent" = yes &&
20790 ac_config_status_args="$ac_config_status_args --quiet"
20791 exec 5>/dev/null
20792 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20793 exec 5>>config.log
20794 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20795 # would make configure fail if this is the last instruction.
20796 $ac_cs_success || as_fn_exit 1
20798 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20799 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20800 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20804 # Ensure that any meson build directories would reconfigure and see that
20805 # there's a conflicting in-tree build and can error out.
20806 if test "$vpath_build"="no"; then
20807 touch meson.build