Make libpqsrv_cancel's return const char *, not char *
[pgsql.git] / configure
blob36feeafbb23a6ead538c446803ade19dac431493
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 17devel.
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-2024, 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='17devel'
586 PACKAGE_STRING='PostgreSQL 17devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
588 PACKAGE_URL='https://www.postgresql.org/'
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 # include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 # include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_SYSROOT
631 PG_VERSION_NUM
632 LDFLAGS_EX_BE
633 PROVE
634 DBTOEPUB
636 XSLTPROC
637 XMLLINT
638 TCL_SHARED_BUILD
639 TCL_LIB_SPEC
640 TCL_LIBS
641 TCL_INCLUDE_SPEC
642 TCL_CONFIG_SH
643 TCLSH
644 XGETTEXT
645 MSGMERGE
646 MSGFMT_FLAGS
647 MSGFMT
648 PG_CRC32C_OBJS
649 CFLAGS_CRC
650 LIBOBJS
651 OPENSSL
652 ZSTD
654 UUID_LIBS
655 LDAP_LIBS_BE
656 LDAP_LIBS_FE
657 with_ssl
658 PTHREAD_CFLAGS
659 PTHREAD_LIBS
660 PTHREAD_CC
661 ax_pthread_config
662 EGREP
663 GREP
666 python_additional_libs
667 python_libspec
668 python_libdir
669 python_includespec
670 python_version
671 python_majorversion
672 PYTHON
673 perl_embed_ldflags
674 perl_embed_ccflags
675 perl_includespec
676 perl_useshrplib
677 perl_privlibexp
678 perl_archlibexp
679 PERL
680 FLEXFLAGS
681 FLEX
682 BISONFLAGS
683 BISON
684 MKDIR_P
685 LN_S
687 install_bin
688 INSTALL_DATA
689 INSTALL_SCRIPT
690 INSTALL_PROGRAM
691 WINDRES
693 STRIP_SHARED_LIB
694 STRIP_STATIC_LIB
695 STRIP
696 LDFLAGS_SL
697 LDFLAGS_EX
698 ZSTD_LIBS
699 ZSTD_CFLAGS
700 with_zstd
701 LZ4_LIBS
702 LZ4_CFLAGS
703 with_lz4
704 with_zlib
705 with_system_tzdata
706 with_libxslt
707 XML2_LIBS
708 XML2_CFLAGS
709 XML2_CONFIG
710 with_libxml
711 with_uuid
712 with_readline
713 with_systemd
714 with_selinux
715 with_ldap
716 with_krb_srvnam
717 krb_srvtab
718 with_gssapi
719 with_python
720 with_perl
721 with_tcl
722 ICU_LIBS
723 ICU_CFLAGS
724 with_icu
725 INCLUDES
726 autodepend
727 PKG_CONFIG_LIBDIR
728 PKG_CONFIG_PATH
729 PKG_CONFIG
730 DLSUFFIX
734 CFLAGS_SL
735 BITCODE_CXXFLAGS
736 BITCODE_CFLAGS
737 CXXFLAGS_SL_MODULE
738 CFLAGS_SL_MODULE
739 CFLAGS_VECTORIZE
740 CFLAGS_UNROLL_LOOPS
741 PERMIT_DECLARATION_AFTER_STATEMENT
742 LLVM_BINPATH
743 LLVM_CXXFLAGS
744 LLVM_CFLAGS
745 LLVM_CPPFLAGS
746 LLVM_LIBS
747 CLANG
748 LLVM_CONFIG
750 with_llvm
751 SUN_STUDIO_CC
752 ac_ct_CXX
753 CXXFLAGS
755 OBJEXT
756 EXEEXT
757 ac_ct_CC
758 CPPFLAGS
759 LDFLAGS
760 CFLAGS
762 enable_injection_points
763 enable_tap_tests
764 enable_dtrace
765 DTRACEFLAGS
766 DTRACE
767 enable_coverage
768 GENHTML
769 LCOV
770 GCOV
771 enable_debug
772 enable_rpath
773 default_port
774 WANTED_LANGUAGES
775 enable_nls
776 PORTNAME
777 host_os
778 host_vendor
779 host_cpu
780 host
781 build_os
782 build_vendor
783 build_cpu
784 build
785 PG_MAJORVERSION
786 target_alias
787 host_alias
788 build_alias
789 LIBS
790 ECHO_T
791 ECHO_N
792 ECHO_C
793 DEFS
794 mandir
795 localedir
796 libdir
797 psdir
798 pdfdir
799 dvidir
800 htmldir
801 infodir
802 docdir
803 oldincludedir
804 includedir
805 localstatedir
806 sharedstatedir
807 sysconfdir
808 datadir
809 datarootdir
810 libexecdir
811 sbindir
812 bindir
813 program_transform_name
814 prefix
815 exec_prefix
816 PACKAGE_URL
817 PACKAGE_BUGREPORT
818 PACKAGE_STRING
819 PACKAGE_VERSION
820 PACKAGE_TARNAME
821 PACKAGE_NAME
822 PATH_SEPARATOR
823 SHELL'
824 ac_subst_files=''
825 ac_user_opts='
826 enable_option_checking
827 with_extra_version
828 with_template
829 with_includes
830 with_libraries
831 with_libs
832 enable_integer_datetimes
833 enable_nls
834 with_pgport
835 enable_rpath
836 enable_spinlocks
837 enable_atomics
838 enable_debug
839 enable_profiling
840 enable_coverage
841 enable_dtrace
842 enable_tap_tests
843 enable_injection_points
844 with_blocksize
845 with_segsize
846 with_segsize_blocks
847 with_wal_blocksize
848 with_llvm
849 enable_depend
850 enable_cassert
851 with_icu
852 with_tcl
853 with_tclconfig
854 with_perl
855 with_python
856 with_gssapi
857 with_krb_srvnam
858 with_pam
859 with_bsd_auth
860 with_ldap
861 with_bonjour
862 with_selinux
863 with_systemd
864 with_readline
865 with_libedit_preferred
866 with_uuid
867 with_ossp_uuid
868 with_libxml
869 with_libxslt
870 with_system_tzdata
871 with_zlib
872 with_lz4
873 with_zstd
874 with_ssl
875 with_openssl
876 enable_largefile
878 ac_precious_vars='build_alias
879 host_alias
880 target_alias
882 CFLAGS
883 LDFLAGS
884 LIBS
885 CPPFLAGS
887 CXXFLAGS
889 LLVM_CONFIG
890 CLANG
892 PKG_CONFIG
893 PKG_CONFIG_PATH
894 PKG_CONFIG_LIBDIR
895 ICU_CFLAGS
896 ICU_LIBS
897 XML2_CONFIG
898 XML2_CFLAGS
899 XML2_LIBS
900 LZ4_CFLAGS
901 LZ4_LIBS
902 ZSTD_CFLAGS
903 ZSTD_LIBS
904 LDFLAGS_EX
905 LDFLAGS_SL
906 PERL
907 PYTHON
908 MSGFMT
909 TCLSH'
912 # Initialize some variables set by options.
913 ac_init_help=
914 ac_init_version=false
915 ac_unrecognized_opts=
916 ac_unrecognized_sep=
917 # The variables have the same names as the options, with
918 # dashes changed to underlines.
919 cache_file=/dev/null
920 exec_prefix=NONE
921 no_create=
922 no_recursion=
923 prefix=NONE
924 program_prefix=NONE
925 program_suffix=NONE
926 program_transform_name=s,x,x,
927 silent=
928 site=
929 srcdir=
930 verbose=
931 x_includes=NONE
932 x_libraries=NONE
934 # Installation directory options.
935 # These are left unexpanded so users can "make install exec_prefix=/foo"
936 # and all the variables that are supposed to be based on exec_prefix
937 # by default will actually change.
938 # Use braces instead of parens because sh, perl, etc. also accept them.
939 # (The list follows the same order as the GNU Coding Standards.)
940 bindir='${exec_prefix}/bin'
941 sbindir='${exec_prefix}/sbin'
942 libexecdir='${exec_prefix}/libexec'
943 datarootdir='${prefix}/share'
944 datadir='${datarootdir}'
945 sysconfdir='${prefix}/etc'
946 sharedstatedir='${prefix}/com'
947 localstatedir='${prefix}/var'
948 includedir='${prefix}/include'
949 oldincludedir='/usr/include'
950 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
951 infodir='${datarootdir}/info'
952 htmldir='${docdir}'
953 dvidir='${docdir}'
954 pdfdir='${docdir}'
955 psdir='${docdir}'
956 libdir='${exec_prefix}/lib'
957 localedir='${datarootdir}/locale'
958 mandir='${datarootdir}/man'
960 ac_prev=
961 ac_dashdash=
962 for ac_option
964 # If the previous option needs an argument, assign it.
965 if test -n "$ac_prev"; then
966 eval $ac_prev=\$ac_option
967 ac_prev=
968 continue
971 case $ac_option in
972 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
973 *=) ac_optarg= ;;
974 *) ac_optarg=yes ;;
975 esac
977 # Accept the important Cygnus configure options, so we can diagnose typos.
979 case $ac_dashdash$ac_option in
981 ac_dashdash=yes ;;
983 -bindir | --bindir | --bindi | --bind | --bin | --bi)
984 ac_prev=bindir ;;
985 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
986 bindir=$ac_optarg ;;
988 -build | --build | --buil | --bui | --bu)
989 ac_prev=build_alias ;;
990 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
991 build_alias=$ac_optarg ;;
993 -cache-file | --cache-file | --cache-fil | --cache-fi \
994 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
995 ac_prev=cache_file ;;
996 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
997 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
998 cache_file=$ac_optarg ;;
1000 --config-cache | -C)
1001 cache_file=config.cache ;;
1003 -datadir | --datadir | --datadi | --datad)
1004 ac_prev=datadir ;;
1005 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1006 datadir=$ac_optarg ;;
1008 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1009 | --dataroo | --dataro | --datar)
1010 ac_prev=datarootdir ;;
1011 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1012 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1013 datarootdir=$ac_optarg ;;
1015 -disable-* | --disable-*)
1016 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1017 # Reject names that are not valid shell variable names.
1018 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1019 as_fn_error $? "invalid feature name: $ac_useropt"
1020 ac_useropt_orig=$ac_useropt
1021 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1022 case $ac_user_opts in
1024 "enable_$ac_useropt"
1025 "*) ;;
1026 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1027 ac_unrecognized_sep=', ';;
1028 esac
1029 eval enable_$ac_useropt=no ;;
1031 -docdir | --docdir | --docdi | --doc | --do)
1032 ac_prev=docdir ;;
1033 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1034 docdir=$ac_optarg ;;
1036 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1037 ac_prev=dvidir ;;
1038 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1039 dvidir=$ac_optarg ;;
1041 -enable-* | --enable-*)
1042 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1043 # Reject names that are not valid shell variable names.
1044 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1045 as_fn_error $? "invalid feature name: $ac_useropt"
1046 ac_useropt_orig=$ac_useropt
1047 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1048 case $ac_user_opts in
1050 "enable_$ac_useropt"
1051 "*) ;;
1052 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1053 ac_unrecognized_sep=', ';;
1054 esac
1055 eval enable_$ac_useropt=\$ac_optarg ;;
1057 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1058 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1059 | --exec | --exe | --ex)
1060 ac_prev=exec_prefix ;;
1061 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1062 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1063 | --exec=* | --exe=* | --ex=*)
1064 exec_prefix=$ac_optarg ;;
1066 -gas | --gas | --ga | --g)
1067 # Obsolete; use --with-gas.
1068 with_gas=yes ;;
1070 -help | --help | --hel | --he | -h)
1071 ac_init_help=long ;;
1072 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1073 ac_init_help=recursive ;;
1074 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1075 ac_init_help=short ;;
1077 -host | --host | --hos | --ho)
1078 ac_prev=host_alias ;;
1079 -host=* | --host=* | --hos=* | --ho=*)
1080 host_alias=$ac_optarg ;;
1082 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1083 ac_prev=htmldir ;;
1084 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1085 | --ht=*)
1086 htmldir=$ac_optarg ;;
1088 -includedir | --includedir | --includedi | --included | --include \
1089 | --includ | --inclu | --incl | --inc)
1090 ac_prev=includedir ;;
1091 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1092 | --includ=* | --inclu=* | --incl=* | --inc=*)
1093 includedir=$ac_optarg ;;
1095 -infodir | --infodir | --infodi | --infod | --info | --inf)
1096 ac_prev=infodir ;;
1097 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1098 infodir=$ac_optarg ;;
1100 -libdir | --libdir | --libdi | --libd)
1101 ac_prev=libdir ;;
1102 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1103 libdir=$ac_optarg ;;
1105 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1106 | --libexe | --libex | --libe)
1107 ac_prev=libexecdir ;;
1108 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1109 | --libexe=* | --libex=* | --libe=*)
1110 libexecdir=$ac_optarg ;;
1112 -localedir | --localedir | --localedi | --localed | --locale)
1113 ac_prev=localedir ;;
1114 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1115 localedir=$ac_optarg ;;
1117 -localstatedir | --localstatedir | --localstatedi | --localstated \
1118 | --localstate | --localstat | --localsta | --localst | --locals)
1119 ac_prev=localstatedir ;;
1120 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1121 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1122 localstatedir=$ac_optarg ;;
1124 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1125 ac_prev=mandir ;;
1126 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1127 mandir=$ac_optarg ;;
1129 -nfp | --nfp | --nf)
1130 # Obsolete; use --without-fp.
1131 with_fp=no ;;
1133 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1134 | --no-cr | --no-c | -n)
1135 no_create=yes ;;
1137 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1138 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1139 no_recursion=yes ;;
1141 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1142 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1143 | --oldin | --oldi | --old | --ol | --o)
1144 ac_prev=oldincludedir ;;
1145 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1146 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1147 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1148 oldincludedir=$ac_optarg ;;
1150 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1151 ac_prev=prefix ;;
1152 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1153 prefix=$ac_optarg ;;
1155 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1156 | --program-pre | --program-pr | --program-p)
1157 ac_prev=program_prefix ;;
1158 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1159 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1160 program_prefix=$ac_optarg ;;
1162 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1163 | --program-suf | --program-su | --program-s)
1164 ac_prev=program_suffix ;;
1165 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1166 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1167 program_suffix=$ac_optarg ;;
1169 -program-transform-name | --program-transform-name \
1170 | --program-transform-nam | --program-transform-na \
1171 | --program-transform-n | --program-transform- \
1172 | --program-transform | --program-transfor \
1173 | --program-transfo | --program-transf \
1174 | --program-trans | --program-tran \
1175 | --progr-tra | --program-tr | --program-t)
1176 ac_prev=program_transform_name ;;
1177 -program-transform-name=* | --program-transform-name=* \
1178 | --program-transform-nam=* | --program-transform-na=* \
1179 | --program-transform-n=* | --program-transform-=* \
1180 | --program-transform=* | --program-transfor=* \
1181 | --program-transfo=* | --program-transf=* \
1182 | --program-trans=* | --program-tran=* \
1183 | --progr-tra=* | --program-tr=* | --program-t=*)
1184 program_transform_name=$ac_optarg ;;
1186 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1187 ac_prev=pdfdir ;;
1188 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1189 pdfdir=$ac_optarg ;;
1191 -psdir | --psdir | --psdi | --psd | --ps)
1192 ac_prev=psdir ;;
1193 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1194 psdir=$ac_optarg ;;
1196 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1197 | -silent | --silent | --silen | --sile | --sil)
1198 silent=yes ;;
1200 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1201 ac_prev=sbindir ;;
1202 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1203 | --sbi=* | --sb=*)
1204 sbindir=$ac_optarg ;;
1206 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1207 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1208 | --sharedst | --shareds | --shared | --share | --shar \
1209 | --sha | --sh)
1210 ac_prev=sharedstatedir ;;
1211 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1212 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1213 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1214 | --sha=* | --sh=*)
1215 sharedstatedir=$ac_optarg ;;
1217 -site | --site | --sit)
1218 ac_prev=site ;;
1219 -site=* | --site=* | --sit=*)
1220 site=$ac_optarg ;;
1222 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1223 ac_prev=srcdir ;;
1224 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1225 srcdir=$ac_optarg ;;
1227 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1228 | --syscon | --sysco | --sysc | --sys | --sy)
1229 ac_prev=sysconfdir ;;
1230 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1231 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1232 sysconfdir=$ac_optarg ;;
1234 -target | --target | --targe | --targ | --tar | --ta | --t)
1235 ac_prev=target_alias ;;
1236 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1237 target_alias=$ac_optarg ;;
1239 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1240 verbose=yes ;;
1242 -version | --version | --versio | --versi | --vers | -V)
1243 ac_init_version=: ;;
1245 -with-* | --with-*)
1246 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1247 # Reject names that are not valid shell variable names.
1248 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1249 as_fn_error $? "invalid package name: $ac_useropt"
1250 ac_useropt_orig=$ac_useropt
1251 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1252 case $ac_user_opts in
1254 "with_$ac_useropt"
1255 "*) ;;
1256 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1257 ac_unrecognized_sep=', ';;
1258 esac
1259 eval with_$ac_useropt=\$ac_optarg ;;
1261 -without-* | --without-*)
1262 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1263 # Reject names that are not valid shell variable names.
1264 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1265 as_fn_error $? "invalid package name: $ac_useropt"
1266 ac_useropt_orig=$ac_useropt
1267 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1268 case $ac_user_opts in
1270 "with_$ac_useropt"
1271 "*) ;;
1272 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1273 ac_unrecognized_sep=', ';;
1274 esac
1275 eval with_$ac_useropt=no ;;
1277 --x)
1278 # Obsolete; use --with-x.
1279 with_x=yes ;;
1281 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1282 | --x-incl | --x-inc | --x-in | --x-i)
1283 ac_prev=x_includes ;;
1284 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1285 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1286 x_includes=$ac_optarg ;;
1288 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1289 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1290 ac_prev=x_libraries ;;
1291 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1292 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1293 x_libraries=$ac_optarg ;;
1295 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1296 Try \`$0 --help' for more information"
1299 *=*)
1300 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1301 # Reject names that are not valid shell variable names.
1302 case $ac_envvar in #(
1303 '' | [0-9]* | *[!_$as_cr_alnum]* )
1304 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1305 esac
1306 eval $ac_envvar=\$ac_optarg
1307 export $ac_envvar ;;
1310 # FIXME: should be removed in autoconf 3.0.
1311 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1312 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1313 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1314 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1317 esac
1318 done
1320 if test -n "$ac_prev"; then
1321 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1322 as_fn_error $? "missing argument to $ac_option"
1325 if test -n "$ac_unrecognized_opts"; then
1326 case $enable_option_checking in
1327 no) ;;
1328 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1329 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1330 esac
1333 # Check all directory arguments for consistency.
1334 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1335 datadir sysconfdir sharedstatedir localstatedir includedir \
1336 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1337 libdir localedir mandir
1339 eval ac_val=\$$ac_var
1340 # Remove trailing slashes.
1341 case $ac_val in
1342 */ )
1343 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1344 eval $ac_var=\$ac_val;;
1345 esac
1346 # Be sure to have absolute directory names.
1347 case $ac_val in
1348 [\\/$]* | ?:[\\/]* ) continue;;
1349 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1350 esac
1351 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1352 done
1354 # There might be people who depend on the old broken behavior: `$host'
1355 # used to hold the argument of --host etc.
1356 # FIXME: To remove some day.
1357 build=$build_alias
1358 host=$host_alias
1359 target=$target_alias
1361 # FIXME: To remove some day.
1362 if test "x$host_alias" != x; then
1363 if test "x$build_alias" = x; then
1364 cross_compiling=maybe
1365 elif test "x$build_alias" != "x$host_alias"; then
1366 cross_compiling=yes
1370 ac_tool_prefix=
1371 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1373 test "$silent" = yes && exec 6>/dev/null
1376 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1377 ac_ls_di=`ls -di .` &&
1378 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1379 as_fn_error $? "working directory cannot be determined"
1380 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1381 as_fn_error $? "pwd does not report name of working directory"
1384 # Find the source files, if location was not specified.
1385 if test -z "$srcdir"; then
1386 ac_srcdir_defaulted=yes
1387 # Try the directory containing this script, then the parent directory.
1388 ac_confdir=`$as_dirname -- "$as_myself" ||
1389 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1390 X"$as_myself" : 'X\(//\)[^/]' \| \
1391 X"$as_myself" : 'X\(//\)$' \| \
1392 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1393 $as_echo X"$as_myself" |
1394 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1395 s//\1/
1398 /^X\(\/\/\)[^/].*/{
1399 s//\1/
1402 /^X\(\/\/\)$/{
1403 s//\1/
1406 /^X\(\/\).*/{
1407 s//\1/
1410 s/.*/./; q'`
1411 srcdir=$ac_confdir
1412 if test ! -r "$srcdir/$ac_unique_file"; then
1413 srcdir=..
1415 else
1416 ac_srcdir_defaulted=no
1418 if test ! -r "$srcdir/$ac_unique_file"; then
1419 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1420 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1422 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1423 ac_abs_confdir=`(
1424 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1425 pwd)`
1426 # When building in place, set srcdir=.
1427 if test "$ac_abs_confdir" = "$ac_pwd"; then
1428 srcdir=.
1430 # Remove unnecessary trailing slashes from srcdir.
1431 # Double slashes in file names in object file debugging info
1432 # mess up M-x gdb in Emacs.
1433 case $srcdir in
1434 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1435 esac
1436 for ac_var in $ac_precious_vars; do
1437 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1438 eval ac_env_${ac_var}_value=\$${ac_var}
1439 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1440 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1441 done
1444 # Report the --help message.
1446 if test "$ac_init_help" = "long"; then
1447 # Omit some internal or obsolete options to make the list less imposing.
1448 # This message is too long to be a string in the A/UX 3.1 sh.
1449 cat <<_ACEOF
1450 \`configure' configures PostgreSQL 17devel to adapt to many kinds of systems.
1452 Usage: $0 [OPTION]... [VAR=VALUE]...
1454 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1455 VAR=VALUE. See below for descriptions of some of the useful variables.
1457 Defaults for the options are specified in brackets.
1459 Configuration:
1460 -h, --help display this help and exit
1461 --help=short display options specific to this package
1462 --help=recursive display the short help of all the included packages
1463 -V, --version display version information and exit
1464 -q, --quiet, --silent do not print \`checking ...' messages
1465 --cache-file=FILE cache test results in FILE [disabled]
1466 -C, --config-cache alias for \`--cache-file=config.cache'
1467 -n, --no-create do not create output files
1468 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1470 Installation directories:
1471 --prefix=PREFIX install architecture-independent files in PREFIX
1472 [$ac_default_prefix]
1473 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1474 [PREFIX]
1476 By default, \`make install' will install all the files in
1477 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1478 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1479 for instance \`--prefix=\$HOME'.
1481 For better control, use the options below.
1483 Fine tuning of the installation directories:
1484 --bindir=DIR user executables [EPREFIX/bin]
1485 --sbindir=DIR system admin executables [EPREFIX/sbin]
1486 --libexecdir=DIR program executables [EPREFIX/libexec]
1487 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1488 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1489 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1490 --libdir=DIR object code libraries [EPREFIX/lib]
1491 --includedir=DIR C header files [PREFIX/include]
1492 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1493 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1494 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1495 --infodir=DIR info documentation [DATAROOTDIR/info]
1496 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1497 --mandir=DIR man documentation [DATAROOTDIR/man]
1498 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1499 --htmldir=DIR html documentation [DOCDIR]
1500 --dvidir=DIR dvi documentation [DOCDIR]
1501 --pdfdir=DIR pdf documentation [DOCDIR]
1502 --psdir=DIR ps documentation [DOCDIR]
1503 _ACEOF
1505 cat <<\_ACEOF
1507 System types:
1508 --build=BUILD configure for building on BUILD [guessed]
1509 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1510 _ACEOF
1513 if test -n "$ac_init_help"; then
1514 case $ac_init_help in
1515 short | recursive ) echo "Configuration of PostgreSQL 17devel:";;
1516 esac
1517 cat <<\_ACEOF
1519 Optional Features:
1520 --disable-option-checking ignore unrecognized --enable/--with options
1521 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1522 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1523 --disable-integer-datetimes
1524 obsolete option, no longer supported
1525 --enable-nls[=LANGUAGES]
1526 enable Native Language Support
1527 --disable-rpath do not embed shared library search path in
1528 executables
1529 --disable-spinlocks do not use spinlocks
1530 --disable-atomics do not use atomic operations
1531 --enable-debug build with debugging symbols (-g)
1532 --enable-profiling build with profiling enabled
1533 --enable-coverage build with coverage testing instrumentation
1534 --enable-dtrace build with DTrace support
1535 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1536 --enable-injection-points
1537 enable injection points (for testing)
1538 --enable-depend turn on automatic dependency tracking
1539 --enable-cassert enable assertion checks (for debugging)
1540 --disable-largefile omit support for large files
1542 Optional Packages:
1543 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1544 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1545 --with-extra-version=STRING
1546 append STRING to version
1547 --with-template=NAME override operating system template
1548 --with-includes=DIRS look for additional header files in DIRS
1549 --with-libraries=DIRS look for additional libraries in DIRS
1550 --with-libs=DIRS alternative spelling of --with-libraries
1551 --with-pgport=PORTNUM set default port number [5432]
1552 --with-blocksize=BLOCKSIZE
1553 set table block size in kB [8]
1554 --with-segsize=SEGSIZE set table segment size in GB [1]
1555 --with-segsize-blocks=SEGSIZE_BLOCKS
1556 set table segment size in blocks [0]
1557 --with-wal-blocksize=BLOCKSIZE
1558 set WAL block size in kB [8]
1559 --with-llvm build with LLVM based JIT support
1560 --without-icu build without ICU support
1561 --with-tcl build Tcl modules (PL/Tcl)
1562 --with-tclconfig=DIR tclConfig.sh is in DIR
1563 --with-perl build Perl modules (PL/Perl)
1564 --with-python build Python modules (PL/Python)
1565 --with-gssapi build with GSSAPI support
1566 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1567 [postgres]
1568 --with-pam build with PAM support
1569 --with-bsd-auth build with BSD Authentication support
1570 --with-ldap build with LDAP support
1571 --with-bonjour build with Bonjour support
1572 --with-selinux build with SELinux support
1573 --with-systemd build with systemd support
1574 --without-readline do not use GNU Readline nor BSD Libedit for editing
1575 --with-libedit-preferred
1576 prefer BSD Libedit over GNU Readline
1577 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1578 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1579 --with-libxml build with XML support
1580 --with-libxslt use XSLT support when building contrib/xml2
1581 --with-system-tzdata=DIR
1582 use system time zone data in DIR
1583 --without-zlib do not use Zlib
1584 --with-lz4 build with LZ4 support
1585 --with-zstd build with ZSTD support
1586 --with-ssl=LIB use LIB for SSL/TLS support (openssl)
1587 --with-openssl obsolete spelling of --with-ssl=openssl
1589 Some influential environment variables:
1590 CC C compiler command
1591 CFLAGS C compiler flags
1592 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1593 nonstandard directory <lib dir>
1594 LIBS libraries to pass to the linker, e.g. -l<library>
1595 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1596 you have headers in a nonstandard directory <include dir>
1597 CXX C++ compiler command
1598 CXXFLAGS C++ compiler flags
1599 LLVM_CONFIG path to llvm-config command
1600 CLANG path to clang compiler to generate bitcode
1601 CPP C preprocessor
1602 PKG_CONFIG path to pkg-config utility
1603 PKG_CONFIG_PATH
1604 directories to add to pkg-config's search path
1605 PKG_CONFIG_LIBDIR
1606 path overriding pkg-config's built-in search path
1607 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1608 ICU_LIBS linker flags for ICU, overriding pkg-config
1609 XML2_CONFIG path to xml2-config utility
1610 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1611 XML2_LIBS linker flags for XML2, overriding pkg-config
1612 LZ4_CFLAGS C compiler flags for LZ4, overriding pkg-config
1613 LZ4_LIBS linker flags for LZ4, overriding pkg-config
1614 ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
1615 ZSTD_LIBS linker flags for ZSTD, overriding pkg-config
1616 LDFLAGS_EX extra linker flags for linking executables only
1617 LDFLAGS_SL extra linker flags for linking shared libraries only
1618 PERL Perl program
1619 PYTHON Python program
1620 MSGFMT msgfmt program for NLS
1621 TCLSH Tcl interpreter program (tclsh)
1623 Use these variables to override the choices made by `configure' or to help
1624 it to find libraries and programs with nonstandard names/locations.
1626 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1627 PostgreSQL home page: <https://www.postgresql.org/>.
1628 _ACEOF
1629 ac_status=$?
1632 if test "$ac_init_help" = "recursive"; then
1633 # If there are subdirs, report their specific --help.
1634 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1635 test -d "$ac_dir" ||
1636 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1637 continue
1638 ac_builddir=.
1640 case "$ac_dir" in
1641 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1643 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1644 # A ".." for each directory in $ac_dir_suffix.
1645 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1646 case $ac_top_builddir_sub in
1647 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1648 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1649 esac ;;
1650 esac
1651 ac_abs_top_builddir=$ac_pwd
1652 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1653 # for backward compatibility:
1654 ac_top_builddir=$ac_top_build_prefix
1656 case $srcdir in
1657 .) # We are building in place.
1658 ac_srcdir=.
1659 ac_top_srcdir=$ac_top_builddir_sub
1660 ac_abs_top_srcdir=$ac_pwd ;;
1661 [\\/]* | ?:[\\/]* ) # Absolute name.
1662 ac_srcdir=$srcdir$ac_dir_suffix;
1663 ac_top_srcdir=$srcdir
1664 ac_abs_top_srcdir=$srcdir ;;
1665 *) # Relative name.
1666 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1667 ac_top_srcdir=$ac_top_build_prefix$srcdir
1668 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1669 esac
1670 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1672 cd "$ac_dir" || { ac_status=$?; continue; }
1673 # Check for guested configure.
1674 if test -f "$ac_srcdir/configure.gnu"; then
1675 echo &&
1676 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1677 elif test -f "$ac_srcdir/configure"; then
1678 echo &&
1679 $SHELL "$ac_srcdir/configure" --help=recursive
1680 else
1681 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1682 fi || ac_status=$?
1683 cd "$ac_pwd" || { ac_status=$?; break; }
1684 done
1687 test -n "$ac_init_help" && exit $ac_status
1688 if $ac_init_version; then
1689 cat <<\_ACEOF
1690 PostgreSQL configure 17devel
1691 generated by GNU Autoconf 2.69
1693 Copyright (C) 2012 Free Software Foundation, Inc.
1694 This configure script is free software; the Free Software Foundation
1695 gives unlimited permission to copy, distribute and modify it.
1697 Copyright (c) 1996-2024, PostgreSQL Global Development Group
1698 _ACEOF
1699 exit
1702 ## ------------------------ ##
1703 ## Autoconf initialization. ##
1704 ## ------------------------ ##
1706 # ac_fn_c_try_compile LINENO
1707 # --------------------------
1708 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1709 ac_fn_c_try_compile ()
1711 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1712 rm -f conftest.$ac_objext
1713 if { { ac_try="$ac_compile"
1714 case "(($ac_try" in
1715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1716 *) ac_try_echo=$ac_try;;
1717 esac
1718 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1719 $as_echo "$ac_try_echo"; } >&5
1720 (eval "$ac_compile") 2>conftest.err
1721 ac_status=$?
1722 if test -s conftest.err; then
1723 grep -v '^ *+' conftest.err >conftest.er1
1724 cat conftest.er1 >&5
1725 mv -f conftest.er1 conftest.err
1727 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1728 test $ac_status = 0; } && {
1729 test -z "$ac_c_werror_flag" ||
1730 test ! -s conftest.err
1731 } && test -s conftest.$ac_objext; then :
1732 ac_retval=0
1733 else
1734 $as_echo "$as_me: failed program was:" >&5
1735 sed 's/^/| /' conftest.$ac_ext >&5
1737 ac_retval=1
1739 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1740 as_fn_set_status $ac_retval
1742 } # ac_fn_c_try_compile
1744 # ac_fn_cxx_try_compile LINENO
1745 # ----------------------------
1746 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1747 ac_fn_cxx_try_compile ()
1749 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1750 rm -f conftest.$ac_objext
1751 if { { ac_try="$ac_compile"
1752 case "(($ac_try" in
1753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1754 *) ac_try_echo=$ac_try;;
1755 esac
1756 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1757 $as_echo "$ac_try_echo"; } >&5
1758 (eval "$ac_compile") 2>conftest.err
1759 ac_status=$?
1760 if test -s conftest.err; then
1761 grep -v '^ *+' conftest.err >conftest.er1
1762 cat conftest.er1 >&5
1763 mv -f conftest.er1 conftest.err
1765 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1766 test $ac_status = 0; } && {
1767 test -z "$ac_cxx_werror_flag" ||
1768 test ! -s conftest.err
1769 } && test -s conftest.$ac_objext; then :
1770 ac_retval=0
1771 else
1772 $as_echo "$as_me: failed program was:" >&5
1773 sed 's/^/| /' conftest.$ac_ext >&5
1775 ac_retval=1
1777 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1778 as_fn_set_status $ac_retval
1780 } # ac_fn_cxx_try_compile
1782 # ac_fn_c_try_link LINENO
1783 # -----------------------
1784 # Try to link conftest.$ac_ext, and return whether this succeeded.
1785 ac_fn_c_try_link ()
1787 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1788 rm -f conftest.$ac_objext conftest$ac_exeext
1789 if { { ac_try="$ac_link"
1790 case "(($ac_try" in
1791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1792 *) ac_try_echo=$ac_try;;
1793 esac
1794 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1795 $as_echo "$ac_try_echo"; } >&5
1796 (eval "$ac_link") 2>conftest.err
1797 ac_status=$?
1798 if test -s conftest.err; then
1799 grep -v '^ *+' conftest.err >conftest.er1
1800 cat conftest.er1 >&5
1801 mv -f conftest.er1 conftest.err
1803 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1804 test $ac_status = 0; } && {
1805 test -z "$ac_c_werror_flag" ||
1806 test ! -s conftest.err
1807 } && test -s conftest$ac_exeext && {
1808 test "$cross_compiling" = yes ||
1809 test -x conftest$ac_exeext
1810 }; then :
1811 ac_retval=0
1812 else
1813 $as_echo "$as_me: failed program was:" >&5
1814 sed 's/^/| /' conftest.$ac_ext >&5
1816 ac_retval=1
1818 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1819 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1820 # interfere with the next link command; also delete a directory that is
1821 # left behind by Apple's compiler. We do this before executing the actions.
1822 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1823 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1824 as_fn_set_status $ac_retval
1826 } # ac_fn_c_try_link
1828 # ac_fn_c_try_cpp LINENO
1829 # ----------------------
1830 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1831 ac_fn_c_try_cpp ()
1833 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1834 if { { ac_try="$ac_cpp conftest.$ac_ext"
1835 case "(($ac_try" in
1836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1837 *) ac_try_echo=$ac_try;;
1838 esac
1839 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1840 $as_echo "$ac_try_echo"; } >&5
1841 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1842 ac_status=$?
1843 if test -s conftest.err; then
1844 grep -v '^ *+' conftest.err >conftest.er1
1845 cat conftest.er1 >&5
1846 mv -f conftest.er1 conftest.err
1848 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1849 test $ac_status = 0; } > conftest.i && {
1850 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1851 test ! -s conftest.err
1852 }; then :
1853 ac_retval=0
1854 else
1855 $as_echo "$as_me: failed program was:" >&5
1856 sed 's/^/| /' conftest.$ac_ext >&5
1858 ac_retval=1
1860 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1861 as_fn_set_status $ac_retval
1863 } # ac_fn_c_try_cpp
1865 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1866 # -------------------------------------------------------
1867 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1868 # the include files in INCLUDES and setting the cache variable VAR
1869 # accordingly.
1870 ac_fn_c_check_header_mongrel ()
1872 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1873 if eval \${$3+:} false; then :
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1875 $as_echo_n "checking for $2... " >&6; }
1876 if eval \${$3+:} false; then :
1877 $as_echo_n "(cached) " >&6
1879 eval ac_res=\$$3
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1881 $as_echo "$ac_res" >&6; }
1882 else
1883 # Is the header compilable?
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1885 $as_echo_n "checking $2 usability... " >&6; }
1886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1887 /* end confdefs.h. */
1889 #include <$2>
1890 _ACEOF
1891 if ac_fn_c_try_compile "$LINENO"; then :
1892 ac_header_compiler=yes
1893 else
1894 ac_header_compiler=no
1896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1898 $as_echo "$ac_header_compiler" >&6; }
1900 # Is the header present?
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1902 $as_echo_n "checking $2 presence... " >&6; }
1903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1904 /* end confdefs.h. */
1905 #include <$2>
1906 _ACEOF
1907 if ac_fn_c_try_cpp "$LINENO"; then :
1908 ac_header_preproc=yes
1909 else
1910 ac_header_preproc=no
1912 rm -f conftest.err conftest.i conftest.$ac_ext
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1914 $as_echo "$ac_header_preproc" >&6; }
1916 # So? What about this header?
1917 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1918 yes:no: )
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1920 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1922 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1924 no:yes:* )
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1926 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1928 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1930 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1932 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1934 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1935 ( $as_echo "## ---------------------------------------------- ##
1936 ## Report this to pgsql-bugs@lists.postgresql.org ##
1937 ## ---------------------------------------------- ##"
1938 ) | sed "s/^/$as_me: WARNING: /" >&2
1940 esac
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1942 $as_echo_n "checking for $2... " >&6; }
1943 if eval \${$3+:} false; then :
1944 $as_echo_n "(cached) " >&6
1945 else
1946 eval "$3=\$ac_header_compiler"
1948 eval ac_res=\$$3
1949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1950 $as_echo "$ac_res" >&6; }
1952 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1954 } # ac_fn_c_check_header_mongrel
1956 # ac_fn_c_try_run LINENO
1957 # ----------------------
1958 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1959 # that executables *can* be run.
1960 ac_fn_c_try_run ()
1962 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1963 if { { ac_try="$ac_link"
1964 case "(($ac_try" in
1965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1966 *) ac_try_echo=$ac_try;;
1967 esac
1968 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1969 $as_echo "$ac_try_echo"; } >&5
1970 (eval "$ac_link") 2>&5
1971 ac_status=$?
1972 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1973 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1974 { { case "(($ac_try" in
1975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1976 *) ac_try_echo=$ac_try;;
1977 esac
1978 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1979 $as_echo "$ac_try_echo"; } >&5
1980 (eval "$ac_try") 2>&5
1981 ac_status=$?
1982 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1983 test $ac_status = 0; }; }; then :
1984 ac_retval=0
1985 else
1986 $as_echo "$as_me: program exited with status $ac_status" >&5
1987 $as_echo "$as_me: failed program was:" >&5
1988 sed 's/^/| /' conftest.$ac_ext >&5
1990 ac_retval=$ac_status
1992 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1993 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1994 as_fn_set_status $ac_retval
1996 } # ac_fn_c_try_run
1998 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1999 # -------------------------------------------------------
2000 # Tests whether HEADER exists and can be compiled using the include files in
2001 # INCLUDES, setting the cache variable VAR accordingly.
2002 ac_fn_c_check_header_compile ()
2004 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2006 $as_echo_n "checking for $2... " >&6; }
2007 if eval \${$3+:} false; then :
2008 $as_echo_n "(cached) " >&6
2009 else
2010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2011 /* end confdefs.h. */
2013 #include <$2>
2014 _ACEOF
2015 if ac_fn_c_try_compile "$LINENO"; then :
2016 eval "$3=yes"
2017 else
2018 eval "$3=no"
2020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2022 eval ac_res=\$$3
2023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2024 $as_echo "$ac_res" >&6; }
2025 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2027 } # ac_fn_c_check_header_compile
2029 # ac_fn_c_check_func LINENO FUNC VAR
2030 # ----------------------------------
2031 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2032 ac_fn_c_check_func ()
2034 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2036 $as_echo_n "checking for $2... " >&6; }
2037 if eval \${$3+:} false; then :
2038 $as_echo_n "(cached) " >&6
2039 else
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041 /* end confdefs.h. */
2042 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2043 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2044 #define $2 innocuous_$2
2046 /* System header to define __stub macros and hopefully few prototypes,
2047 which can conflict with char $2 (); below.
2048 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2049 <limits.h> exists even on freestanding compilers. */
2051 #ifdef __STDC__
2052 # include <limits.h>
2053 #else
2054 # include <assert.h>
2055 #endif
2057 #undef $2
2059 /* Override any GCC internal prototype to avoid an error.
2060 Use char because int might match the return type of a GCC
2061 builtin and then its argument prototype would still apply. */
2062 #ifdef __cplusplus
2063 extern "C"
2064 #endif
2065 char $2 ();
2066 /* The GNU C library defines this for functions which it implements
2067 to always fail with ENOSYS. Some functions are actually named
2068 something starting with __ and the normal name is an alias. */
2069 #if defined __stub_$2 || defined __stub___$2
2070 choke me
2071 #endif
2074 main ()
2076 return $2 ();
2078 return 0;
2080 _ACEOF
2081 if ac_fn_c_try_link "$LINENO"; then :
2082 eval "$3=yes"
2083 else
2084 eval "$3=no"
2086 rm -f core conftest.err conftest.$ac_objext \
2087 conftest$ac_exeext conftest.$ac_ext
2089 eval ac_res=\$$3
2090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2091 $as_echo "$ac_res" >&6; }
2092 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2094 } # ac_fn_c_check_func
2096 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2097 # -------------------------------------------
2098 # Tests whether TYPE exists after having included INCLUDES, setting cache
2099 # variable VAR accordingly.
2100 ac_fn_c_check_type ()
2102 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2104 $as_echo_n "checking for $2... " >&6; }
2105 if eval \${$3+:} false; then :
2106 $as_echo_n "(cached) " >&6
2107 else
2108 eval "$3=no"
2109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110 /* end confdefs.h. */
2113 main ()
2115 if (sizeof ($2))
2116 return 0;
2118 return 0;
2120 _ACEOF
2121 if ac_fn_c_try_compile "$LINENO"; then :
2122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123 /* end confdefs.h. */
2126 main ()
2128 if (sizeof (($2)))
2129 return 0;
2131 return 0;
2133 _ACEOF
2134 if ac_fn_c_try_compile "$LINENO"; then :
2136 else
2137 eval "$3=yes"
2139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143 eval ac_res=\$$3
2144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2145 $as_echo "$ac_res" >&6; }
2146 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2148 } # ac_fn_c_check_type
2150 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2151 # ----------------------------------------------------
2152 # Tries to find if the field MEMBER exists in type AGGR, after including
2153 # INCLUDES, setting cache variable VAR accordingly.
2154 ac_fn_c_check_member ()
2156 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2158 $as_echo_n "checking for $2.$3... " >&6; }
2159 if eval \${$4+:} false; then :
2160 $as_echo_n "(cached) " >&6
2161 else
2162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2163 /* end confdefs.h. */
2166 main ()
2168 static $2 ac_aggr;
2169 if (ac_aggr.$3)
2170 return 0;
2172 return 0;
2174 _ACEOF
2175 if ac_fn_c_try_compile "$LINENO"; then :
2176 eval "$4=yes"
2177 else
2178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2179 /* end confdefs.h. */
2182 main ()
2184 static $2 ac_aggr;
2185 if (sizeof ac_aggr.$3)
2186 return 0;
2188 return 0;
2190 _ACEOF
2191 if ac_fn_c_try_compile "$LINENO"; then :
2192 eval "$4=yes"
2193 else
2194 eval "$4=no"
2196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2200 eval ac_res=\$$4
2201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2202 $as_echo "$ac_res" >&6; }
2203 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2205 } # ac_fn_c_check_member
2207 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2208 # --------------------------------------------
2209 # Tries to find the compile-time value of EXPR in a program that includes
2210 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2211 # computed
2212 ac_fn_c_compute_int ()
2214 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2215 if test "$cross_compiling" = yes; then
2216 # Depending upon the size, compute the lo and hi bounds.
2217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2218 /* end confdefs.h. */
2221 main ()
2223 static int test_array [1 - 2 * !(($2) >= 0)];
2224 test_array [0] = 0;
2225 return test_array [0];
2228 return 0;
2230 _ACEOF
2231 if ac_fn_c_try_compile "$LINENO"; then :
2232 ac_lo=0 ac_mid=0
2233 while :; do
2234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2235 /* end confdefs.h. */
2238 main ()
2240 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2241 test_array [0] = 0;
2242 return test_array [0];
2245 return 0;
2247 _ACEOF
2248 if ac_fn_c_try_compile "$LINENO"; then :
2249 ac_hi=$ac_mid; break
2250 else
2251 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2252 if test $ac_lo -le $ac_mid; then
2253 ac_lo= ac_hi=
2254 break
2256 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2259 done
2260 else
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262 /* end confdefs.h. */
2265 main ()
2267 static int test_array [1 - 2 * !(($2) < 0)];
2268 test_array [0] = 0;
2269 return test_array [0];
2272 return 0;
2274 _ACEOF
2275 if ac_fn_c_try_compile "$LINENO"; then :
2276 ac_hi=-1 ac_mid=-1
2277 while :; do
2278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2279 /* end confdefs.h. */
2282 main ()
2284 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2285 test_array [0] = 0;
2286 return test_array [0];
2289 return 0;
2291 _ACEOF
2292 if ac_fn_c_try_compile "$LINENO"; then :
2293 ac_lo=$ac_mid; break
2294 else
2295 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2296 if test $ac_mid -le $ac_hi; then
2297 ac_lo= ac_hi=
2298 break
2300 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2303 done
2304 else
2305 ac_lo= ac_hi=
2307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2310 # Binary search between lo and hi bounds.
2311 while test "x$ac_lo" != "x$ac_hi"; do
2312 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2314 /* end confdefs.h. */
2317 main ()
2319 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2320 test_array [0] = 0;
2321 return test_array [0];
2324 return 0;
2326 _ACEOF
2327 if ac_fn_c_try_compile "$LINENO"; then :
2328 ac_hi=$ac_mid
2329 else
2330 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333 done
2334 case $ac_lo in #((
2335 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2336 '') ac_retval=1 ;;
2337 esac
2338 else
2339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2340 /* end confdefs.h. */
2342 static long int longval () { return $2; }
2343 static unsigned long int ulongval () { return $2; }
2344 #include <stdio.h>
2345 #include <stdlib.h>
2347 main ()
2350 FILE *f = fopen ("conftest.val", "w");
2351 if (! f)
2352 return 1;
2353 if (($2) < 0)
2355 long int i = longval ();
2356 if (i != ($2))
2357 return 1;
2358 fprintf (f, "%ld", i);
2360 else
2362 unsigned long int i = ulongval ();
2363 if (i != ($2))
2364 return 1;
2365 fprintf (f, "%lu", i);
2367 /* Do not output a trailing newline, as this causes \r\n confusion
2368 on some platforms. */
2369 return ferror (f) || fclose (f) != 0;
2372 return 0;
2374 _ACEOF
2375 if ac_fn_c_try_run "$LINENO"; then :
2376 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2377 else
2378 ac_retval=1
2380 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2381 conftest.$ac_objext conftest.beam conftest.$ac_ext
2382 rm -f conftest.val
2385 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2386 as_fn_set_status $ac_retval
2388 } # ac_fn_c_compute_int
2390 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2391 # ---------------------------------------------
2392 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2393 # accordingly.
2394 ac_fn_c_check_decl ()
2396 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2397 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2398 as_decl_name=`echo $2|sed 's/ *(.*//'`
2399 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2401 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2402 if eval \${$3+:} false; then :
2403 $as_echo_n "(cached) " >&6
2404 else
2405 ac_save_werror_flag=$ac_c_werror_flag
2406 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2408 /* end confdefs.h. */
2411 main ()
2413 #ifndef $as_decl_name
2414 #ifdef __cplusplus
2415 (void) $as_decl_use;
2416 #else
2417 (void) $as_decl_name;
2418 #endif
2419 #endif
2422 return 0;
2424 _ACEOF
2425 if ac_fn_c_try_compile "$LINENO"; then :
2426 eval "$3=yes"
2427 else
2428 eval "$3=no"
2430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2431 ac_c_werror_flag=$ac_save_werror_flag
2433 eval ac_res=\$$3
2434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2435 $as_echo "$ac_res" >&6; }
2436 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2438 } # ac_fn_c_check_decl
2439 cat >config.log <<_ACEOF
2440 This file contains any messages produced by compilers while
2441 running configure, to aid debugging if configure makes a mistake.
2443 It was created by PostgreSQL $as_me 17devel, which was
2444 generated by GNU Autoconf 2.69. Invocation command line was
2446 $ $0 $@
2448 _ACEOF
2449 exec 5>>config.log
2451 cat <<_ASUNAME
2452 ## --------- ##
2453 ## Platform. ##
2454 ## --------- ##
2456 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2457 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2458 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2459 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2460 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2462 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2463 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2465 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2466 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2467 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2468 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2469 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2470 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2471 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2473 _ASUNAME
2475 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2476 for as_dir in $PATH
2478 IFS=$as_save_IFS
2479 test -z "$as_dir" && as_dir=.
2480 $as_echo "PATH: $as_dir"
2481 done
2482 IFS=$as_save_IFS
2484 } >&5
2486 cat >&5 <<_ACEOF
2489 ## ----------- ##
2490 ## Core tests. ##
2491 ## ----------- ##
2493 _ACEOF
2496 # Keep a trace of the command line.
2497 # Strip out --no-create and --no-recursion so they do not pile up.
2498 # Strip out --silent because we don't want to record it for future runs.
2499 # Also quote any args containing shell meta-characters.
2500 # Make two passes to allow for proper duplicate-argument suppression.
2501 ac_configure_args=
2502 ac_configure_args0=
2503 ac_configure_args1=
2504 ac_must_keep_next=false
2505 for ac_pass in 1 2
2507 for ac_arg
2509 case $ac_arg in
2510 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2511 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2512 | -silent | --silent | --silen | --sile | --sil)
2513 continue ;;
2514 *\'*)
2515 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2516 esac
2517 case $ac_pass in
2518 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2520 as_fn_append ac_configure_args1 " '$ac_arg'"
2521 if test $ac_must_keep_next = true; then
2522 ac_must_keep_next=false # Got value, back to normal.
2523 else
2524 case $ac_arg in
2525 *=* | --config-cache | -C | -disable-* | --disable-* \
2526 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2527 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2528 | -with-* | --with-* | -without-* | --without-* | --x)
2529 case "$ac_configure_args0 " in
2530 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2531 esac
2533 -* ) ac_must_keep_next=true ;;
2534 esac
2536 as_fn_append ac_configure_args " '$ac_arg'"
2538 esac
2539 done
2540 done
2541 { ac_configure_args0=; unset ac_configure_args0;}
2542 { ac_configure_args1=; unset ac_configure_args1;}
2544 # When interrupted or exit'd, cleanup temporary files, and complete
2545 # config.log. We remove comments because anyway the quotes in there
2546 # would cause problems or look ugly.
2547 # WARNING: Use '\'' to represent an apostrophe within the trap.
2548 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2549 trap 'exit_status=$?
2550 # Save into config.log some information that might help in debugging.
2552 echo
2554 $as_echo "## ---------------- ##
2555 ## Cache variables. ##
2556 ## ---------------- ##"
2557 echo
2558 # The following way of writing the cache mishandles newlines in values,
2560 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2561 eval ac_val=\$$ac_var
2562 case $ac_val in #(
2563 *${as_nl}*)
2564 case $ac_var in #(
2565 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2566 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2567 esac
2568 case $ac_var in #(
2569 _ | IFS | as_nl) ;; #(
2570 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2571 *) { eval $ac_var=; unset $ac_var;} ;;
2572 esac ;;
2573 esac
2574 done
2575 (set) 2>&1 |
2576 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2577 *${as_nl}ac_space=\ *)
2578 sed -n \
2579 "s/'\''/'\''\\\\'\'''\''/g;
2580 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2581 ;; #(
2583 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2585 esac |
2586 sort
2588 echo
2590 $as_echo "## ----------------- ##
2591 ## Output variables. ##
2592 ## ----------------- ##"
2593 echo
2594 for ac_var in $ac_subst_vars
2596 eval ac_val=\$$ac_var
2597 case $ac_val in
2598 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2599 esac
2600 $as_echo "$ac_var='\''$ac_val'\''"
2601 done | sort
2602 echo
2604 if test -n "$ac_subst_files"; then
2605 $as_echo "## ------------------- ##
2606 ## File substitutions. ##
2607 ## ------------------- ##"
2608 echo
2609 for ac_var in $ac_subst_files
2611 eval ac_val=\$$ac_var
2612 case $ac_val in
2613 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2614 esac
2615 $as_echo "$ac_var='\''$ac_val'\''"
2616 done | sort
2617 echo
2620 if test -s confdefs.h; then
2621 $as_echo "## ----------- ##
2622 ## confdefs.h. ##
2623 ## ----------- ##"
2624 echo
2625 cat confdefs.h
2626 echo
2628 test "$ac_signal" != 0 &&
2629 $as_echo "$as_me: caught signal $ac_signal"
2630 $as_echo "$as_me: exit $exit_status"
2631 } >&5
2632 rm -f core *.core core.conftest.* &&
2633 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2634 exit $exit_status
2636 for ac_signal in 1 2 13 15; do
2637 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2638 done
2639 ac_signal=0
2641 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2642 rm -f -r conftest* confdefs.h
2644 $as_echo "/* confdefs.h */" > confdefs.h
2646 # Predefined preprocessor variables.
2648 cat >>confdefs.h <<_ACEOF
2649 #define PACKAGE_NAME "$PACKAGE_NAME"
2650 _ACEOF
2652 cat >>confdefs.h <<_ACEOF
2653 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2654 _ACEOF
2656 cat >>confdefs.h <<_ACEOF
2657 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2658 _ACEOF
2660 cat >>confdefs.h <<_ACEOF
2661 #define PACKAGE_STRING "$PACKAGE_STRING"
2662 _ACEOF
2664 cat >>confdefs.h <<_ACEOF
2665 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2666 _ACEOF
2668 cat >>confdefs.h <<_ACEOF
2669 #define PACKAGE_URL "$PACKAGE_URL"
2670 _ACEOF
2673 # Let the site file select an alternate cache file if it wants to.
2674 # Prefer an explicitly selected file to automatically selected ones.
2675 ac_site_file1=NONE
2676 ac_site_file2=NONE
2677 if test -n "$CONFIG_SITE"; then
2678 # We do not want a PATH search for config.site.
2679 case $CONFIG_SITE in #((
2680 -*) ac_site_file1=./$CONFIG_SITE;;
2681 */*) ac_site_file1=$CONFIG_SITE;;
2682 *) ac_site_file1=./$CONFIG_SITE;;
2683 esac
2684 elif test "x$prefix" != xNONE; then
2685 ac_site_file1=$prefix/share/config.site
2686 ac_site_file2=$prefix/etc/config.site
2687 else
2688 ac_site_file1=$ac_default_prefix/share/config.site
2689 ac_site_file2=$ac_default_prefix/etc/config.site
2691 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2693 test "x$ac_site_file" = xNONE && continue
2694 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2695 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2696 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2697 sed 's/^/| /' "$ac_site_file" >&5
2698 . "$ac_site_file" \
2699 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2700 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2701 as_fn_error $? "failed to load site script $ac_site_file
2702 See \`config.log' for more details" "$LINENO" 5; }
2704 done
2706 if test -r "$cache_file"; then
2707 # Some versions of bash will fail to source /dev/null (special files
2708 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2709 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2710 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2711 $as_echo "$as_me: loading cache $cache_file" >&6;}
2712 case $cache_file in
2713 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2714 *) . "./$cache_file";;
2715 esac
2717 else
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2719 $as_echo "$as_me: creating cache $cache_file" >&6;}
2720 >$cache_file
2723 # Check that the precious variables saved in the cache have kept the same
2724 # value.
2725 ac_cache_corrupted=false
2726 for ac_var in $ac_precious_vars; do
2727 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2728 eval ac_new_set=\$ac_env_${ac_var}_set
2729 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2730 eval ac_new_val=\$ac_env_${ac_var}_value
2731 case $ac_old_set,$ac_new_set in
2732 set,)
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2734 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2735 ac_cache_corrupted=: ;;
2736 ,set)
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2738 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2739 ac_cache_corrupted=: ;;
2740 ,);;
2742 if test "x$ac_old_val" != "x$ac_new_val"; then
2743 # differences in whitespace do not lead to failure.
2744 ac_old_val_w=`echo x $ac_old_val`
2745 ac_new_val_w=`echo x $ac_new_val`
2746 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2748 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2749 ac_cache_corrupted=:
2750 else
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2752 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2753 eval $ac_var=\$ac_old_val
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2756 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2758 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2759 fi;;
2760 esac
2761 # Pass precious variables to config.status.
2762 if test "$ac_new_set" = set; then
2763 case $ac_new_val in
2764 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2765 *) ac_arg=$ac_var=$ac_new_val ;;
2766 esac
2767 case " $ac_configure_args " in
2768 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2769 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2770 esac
2772 done
2773 if $ac_cache_corrupted; then
2774 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2775 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2776 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2777 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2778 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2780 ## -------------------- ##
2781 ## Main body of script. ##
2782 ## -------------------- ##
2784 ac_ext=c
2785 ac_cpp='$CPP $CPPFLAGS'
2786 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2787 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2788 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2795 ac_aux_dir=
2796 for ac_dir in config "$srcdir"/config; do
2797 if test -f "$ac_dir/install-sh"; then
2798 ac_aux_dir=$ac_dir
2799 ac_install_sh="$ac_aux_dir/install-sh -c"
2800 break
2801 elif test -f "$ac_dir/install.sh"; then
2802 ac_aux_dir=$ac_dir
2803 ac_install_sh="$ac_aux_dir/install.sh -c"
2804 break
2805 elif test -f "$ac_dir/shtool"; then
2806 ac_aux_dir=$ac_dir
2807 ac_install_sh="$ac_aux_dir/shtool install -c"
2808 break
2810 done
2811 if test -z "$ac_aux_dir"; then
2812 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2815 # These three variables are undocumented and unsupported,
2816 # and are intended to be withdrawn in a future Autoconf release.
2817 # They can cause serious problems if a builder's source tree is in a directory
2818 # whose full name contains unusual characters.
2819 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2820 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2821 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2826 cat >>confdefs.h <<_ACEOF
2827 #define CONFIGURE_ARGS "$ac_configure_args"
2828 _ACEOF
2831 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2832 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2833 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2836 cat >>confdefs.h <<_ACEOF
2837 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2838 _ACEOF
2841 cat >>confdefs.h <<_ACEOF
2842 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2843 _ACEOF
2846 cat >>confdefs.h <<_ACEOF
2847 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2848 _ACEOF
2854 # Check whether --with-extra-version was given.
2855 if test "${with_extra_version+set}" = set; then :
2856 withval=$with_extra_version;
2857 case $withval in
2858 yes)
2859 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2862 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2865 PG_VERSION="$PACKAGE_VERSION$withval"
2867 esac
2869 else
2870 PG_VERSION="$PACKAGE_VERSION"
2875 cat >>confdefs.h <<_ACEOF
2876 #define PG_VERSION "$PG_VERSION"
2877 _ACEOF
2880 # Make sure we can run config.sub.
2881 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2882 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2885 $as_echo_n "checking build system type... " >&6; }
2886 if ${ac_cv_build+:} false; then :
2887 $as_echo_n "(cached) " >&6
2888 else
2889 ac_build_alias=$build_alias
2890 test "x$ac_build_alias" = x &&
2891 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2892 test "x$ac_build_alias" = x &&
2893 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2894 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2895 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2899 $as_echo "$ac_cv_build" >&6; }
2900 case $ac_cv_build in
2901 *-*-*) ;;
2902 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2903 esac
2904 build=$ac_cv_build
2905 ac_save_IFS=$IFS; IFS='-'
2906 set x $ac_cv_build
2907 shift
2908 build_cpu=$1
2909 build_vendor=$2
2910 shift; shift
2911 # Remember, the first character of IFS is used to create $*,
2912 # except with old shells:
2913 build_os=$*
2914 IFS=$ac_save_IFS
2915 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2919 $as_echo_n "checking host system type... " >&6; }
2920 if ${ac_cv_host+:} false; then :
2921 $as_echo_n "(cached) " >&6
2922 else
2923 if test "x$host_alias" = x; then
2924 ac_cv_host=$ac_cv_build
2925 else
2926 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2927 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2932 $as_echo "$ac_cv_host" >&6; }
2933 case $ac_cv_host in
2934 *-*-*) ;;
2935 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2936 esac
2937 host=$ac_cv_host
2938 ac_save_IFS=$IFS; IFS='-'
2939 set x $ac_cv_host
2940 shift
2941 host_cpu=$1
2942 host_vendor=$2
2943 shift; shift
2944 # Remember, the first character of IFS is used to create $*,
2945 # except with old shells:
2946 host_os=$*
2947 IFS=$ac_save_IFS
2948 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2952 template=
2953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2954 $as_echo_n "checking which template to use... " >&6; }
2959 # Check whether --with-template was given.
2960 if test "${with_template+set}" = set; then :
2961 withval=$with_template;
2962 case $withval in
2963 yes)
2964 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2967 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2971 case $withval in
2972 list) echo; ls "$srcdir/src/template"; exit;;
2973 *) if test -f "$srcdir/src/template/$with_template" ; then
2974 template=$withval
2975 else
2976 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2977 fi;;
2978 esac
2981 esac
2983 else
2985 # --with-template not given
2987 case $host_os in
2988 cygwin*|msys*) template=cygwin ;;
2989 darwin*) template=darwin ;;
2990 dragonfly*) template=netbsd ;;
2991 freebsd*) template=freebsd ;;
2992 linux*|gnu*|k*bsd*-gnu)
2993 template=linux ;;
2994 mingw*) template=win32 ;;
2995 netbsd*) template=netbsd ;;
2996 openbsd*) template=openbsd ;;
2997 solaris*) template=solaris ;;
2998 esac
3000 if test x"$template" = x"" ; then
3001 as_fn_error $? "
3002 *******************************************************************
3003 PostgreSQL has apparently not been ported to your platform yet.
3004 To try a manual configuration, look into the src/template directory
3005 for a similar platform and use the '--with-template=' option.
3007 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
3008 rectifying this. Include the above 'checking host system type...'
3009 line.
3010 *******************************************************************
3011 " "$LINENO" 5
3019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3020 $as_echo "$template" >&6; }
3022 PORTNAME=$template
3025 # Initialize default assumption that we do not need separate assembly code
3026 # for TAS (test-and-set). This can be overridden by the template file
3027 # when it's executed.
3028 need_tas=no
3029 tas_file=dummy.s
3031 # Default, works for most platforms, override in template file if needed
3032 DLSUFFIX=".so"
3037 ## Command line options
3041 # Add non-standard directories to the include path
3046 # Check whether --with-includes was given.
3047 if test "${with_includes+set}" = set; then :
3048 withval=$with_includes;
3049 case $withval in
3050 yes)
3051 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3054 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3059 esac
3067 # Add non-standard directories to the library search path
3072 # Check whether --with-libraries was given.
3073 if test "${with_libraries+set}" = set; then :
3074 withval=$with_libraries;
3075 case $withval in
3076 yes)
3077 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3080 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3083 LIBRARY_DIRS=$withval
3085 esac
3094 # Check whether --with-libs was given.
3095 if test "${with_libs+set}" = set; then :
3096 withval=$with_libs;
3097 case $withval in
3098 yes)
3099 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3102 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3105 LIBRARY_DIRS=$withval
3107 esac
3115 # 64-bit integer date/time storage is now the only option, but to avoid
3116 # unnecessary breakage of build scripts, continue to accept an explicit
3117 # "--enable-integer-datetimes" switch.
3121 # Check whether --enable-integer-datetimes was given.
3122 if test "${enable_integer_datetimes+set}" = set; then :
3123 enableval=$enable_integer_datetimes;
3124 case $enableval in
3125 yes)
3129 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3132 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3134 esac
3136 else
3137 enable_integer_datetimes=yes
3145 # NLS
3147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3148 $as_echo_n "checking whether NLS is wanted... " >&6; }
3151 # Check whether --enable-nls was given.
3152 if test "${enable_nls+set}" = set; then :
3153 enableval=$enable_nls;
3154 case $enableval in
3155 yes)
3162 enable_nls=yes
3163 WANTED_LANGUAGES=$enableval
3165 esac
3167 else
3168 enable_nls=no
3173 if test "$enable_nls" = yes; then
3175 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3180 $as_echo "$enable_nls" >&6; }
3185 # Default port number (--with-pgport), default 5432
3187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3188 $as_echo_n "checking for default port number... " >&6; }
3192 # Check whether --with-pgport was given.
3193 if test "${with_pgport+set}" = set; then :
3194 withval=$with_pgport;
3195 case $withval in
3196 yes)
3197 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3200 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3203 default_port=$withval
3205 esac
3207 else
3208 default_port=5432
3212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3213 $as_echo "$default_port" >&6; }
3214 # Need both of these because some places want an integer and some a string
3216 cat >>confdefs.h <<_ACEOF
3217 #define DEF_PGPORT ${default_port}
3218 _ACEOF
3221 cat >>confdefs.h <<_ACEOF
3222 #define DEF_PGPORT_STR "${default_port}"
3223 _ACEOF
3227 # It's worth validating port; you can get very confusing errors otherwise
3228 if test x"$default_port" = x""; then
3229 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3230 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3231 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3232 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3233 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3234 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3235 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3239 # '-rpath'-like feature can be disabled
3243 # Check whether --enable-rpath was given.
3244 if test "${enable_rpath+set}" = set; then :
3245 enableval=$enable_rpath;
3246 case $enableval in
3247 yes)
3254 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3256 esac
3258 else
3259 enable_rpath=yes
3267 # Spinlocks
3271 # Check whether --enable-spinlocks was given.
3272 if test "${enable_spinlocks+set}" = set; then :
3273 enableval=$enable_spinlocks;
3274 case $enableval in
3275 yes)
3282 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3284 esac
3286 else
3287 enable_spinlocks=yes
3294 # Atomic operations
3298 # Check whether --enable-atomics was given.
3299 if test "${enable_atomics+set}" = set; then :
3300 enableval=$enable_atomics;
3301 case $enableval in
3302 yes)
3309 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3311 esac
3313 else
3314 enable_atomics=yes
3321 # --enable-debug adds -g to compiler flags
3325 # Check whether --enable-debug was given.
3326 if test "${enable_debug+set}" = set; then :
3327 enableval=$enable_debug;
3328 case $enableval in
3329 yes)
3336 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3338 esac
3340 else
3341 enable_debug=no
3349 # --enable-profiling enables gcc profiling
3353 # Check whether --enable-profiling was given.
3354 if test "${enable_profiling+set}" = set; then :
3355 enableval=$enable_profiling;
3356 case $enableval in
3357 yes)
3364 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3366 esac
3368 else
3369 enable_profiling=no
3376 # --enable-coverage enables generation of code coverage metrics with gcov
3380 # Check whether --enable-coverage was given.
3381 if test "${enable_coverage+set}" = set; then :
3382 enableval=$enable_coverage;
3383 case $enableval in
3384 yes)
3385 if test -z "$GCOV"; then
3386 for ac_prog in gcov
3388 # Extract the first word of "$ac_prog", so it can be a program name with args.
3389 set dummy $ac_prog; ac_word=$2
3390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3391 $as_echo_n "checking for $ac_word... " >&6; }
3392 if ${ac_cv_path_GCOV+:} false; then :
3393 $as_echo_n "(cached) " >&6
3394 else
3395 case $GCOV in
3396 [\\/]* | ?:[\\/]*)
3397 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3400 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3401 for as_dir in $PATH
3403 IFS=$as_save_IFS
3404 test -z "$as_dir" && as_dir=.
3405 for ac_exec_ext in '' $ac_executable_extensions; do
3406 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3407 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3408 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3409 break 2
3411 done
3412 done
3413 IFS=$as_save_IFS
3416 esac
3418 GCOV=$ac_cv_path_GCOV
3419 if test -n "$GCOV"; then
3420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3421 $as_echo "$GCOV" >&6; }
3422 else
3423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3424 $as_echo "no" >&6; }
3428 test -n "$GCOV" && break
3429 done
3431 else
3432 # Report the value of GCOV in configure's output in all cases.
3433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3434 $as_echo_n "checking for GCOV... " >&6; }
3435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3436 $as_echo "$GCOV" >&6; }
3439 if test -z "$GCOV"; then
3440 as_fn_error $? "gcov not found" "$LINENO" 5
3442 if test -z "$LCOV"; then
3443 for ac_prog in lcov
3445 # Extract the first word of "$ac_prog", so it can be a program name with args.
3446 set dummy $ac_prog; ac_word=$2
3447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3448 $as_echo_n "checking for $ac_word... " >&6; }
3449 if ${ac_cv_path_LCOV+:} false; then :
3450 $as_echo_n "(cached) " >&6
3451 else
3452 case $LCOV in
3453 [\\/]* | ?:[\\/]*)
3454 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3457 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3458 for as_dir in $PATH
3460 IFS=$as_save_IFS
3461 test -z "$as_dir" && as_dir=.
3462 for ac_exec_ext in '' $ac_executable_extensions; do
3463 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3464 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3465 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3466 break 2
3468 done
3469 done
3470 IFS=$as_save_IFS
3473 esac
3475 LCOV=$ac_cv_path_LCOV
3476 if test -n "$LCOV"; then
3477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3478 $as_echo "$LCOV" >&6; }
3479 else
3480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3481 $as_echo "no" >&6; }
3485 test -n "$LCOV" && break
3486 done
3488 else
3489 # Report the value of LCOV in configure's output in all cases.
3490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3491 $as_echo_n "checking for LCOV... " >&6; }
3492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3493 $as_echo "$LCOV" >&6; }
3496 if test -z "$LCOV"; then
3497 as_fn_error $? "lcov not found" "$LINENO" 5
3499 if test -z "$GENHTML"; then
3500 for ac_prog in genhtml
3502 # Extract the first word of "$ac_prog", so it can be a program name with args.
3503 set dummy $ac_prog; ac_word=$2
3504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3505 $as_echo_n "checking for $ac_word... " >&6; }
3506 if ${ac_cv_path_GENHTML+:} false; then :
3507 $as_echo_n "(cached) " >&6
3508 else
3509 case $GENHTML in
3510 [\\/]* | ?:[\\/]*)
3511 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3514 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3515 for as_dir in $PATH
3517 IFS=$as_save_IFS
3518 test -z "$as_dir" && as_dir=.
3519 for ac_exec_ext in '' $ac_executable_extensions; do
3520 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3521 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3522 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3523 break 2
3525 done
3526 done
3527 IFS=$as_save_IFS
3530 esac
3532 GENHTML=$ac_cv_path_GENHTML
3533 if test -n "$GENHTML"; then
3534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3535 $as_echo "$GENHTML" >&6; }
3536 else
3537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3538 $as_echo "no" >&6; }
3542 test -n "$GENHTML" && break
3543 done
3545 else
3546 # Report the value of GENHTML in configure's output in all cases.
3547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3548 $as_echo_n "checking for GENHTML... " >&6; }
3549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3550 $as_echo "$GENHTML" >&6; }
3553 if test -z "$GENHTML"; then
3554 as_fn_error $? "genhtml not found" "$LINENO" 5
3561 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3563 esac
3565 else
3566 enable_coverage=no
3574 # DTrace
3578 # Check whether --enable-dtrace was given.
3579 if test "${enable_dtrace+set}" = set; then :
3580 enableval=$enable_dtrace;
3581 case $enableval in
3582 yes)
3583 if test -z "$DTRACE"; then
3584 for ac_prog in dtrace
3586 # Extract the first word of "$ac_prog", so it can be a program name with args.
3587 set dummy $ac_prog; ac_word=$2
3588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3589 $as_echo_n "checking for $ac_word... " >&6; }
3590 if ${ac_cv_path_DTRACE+:} false; then :
3591 $as_echo_n "(cached) " >&6
3592 else
3593 case $DTRACE in
3594 [\\/]* | ?:[\\/]*)
3595 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3598 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3599 for as_dir in $PATH
3601 IFS=$as_save_IFS
3602 test -z "$as_dir" && as_dir=.
3603 for ac_exec_ext in '' $ac_executable_extensions; do
3604 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3605 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3606 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3607 break 2
3609 done
3610 done
3611 IFS=$as_save_IFS
3614 esac
3616 DTRACE=$ac_cv_path_DTRACE
3617 if test -n "$DTRACE"; then
3618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3619 $as_echo "$DTRACE" >&6; }
3620 else
3621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3622 $as_echo "no" >&6; }
3626 test -n "$DTRACE" && break
3627 done
3629 else
3630 # Report the value of DTRACE in configure's output in all cases.
3631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3632 $as_echo_n "checking for DTRACE... " >&6; }
3633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3634 $as_echo "$DTRACE" >&6; }
3637 if test -z "$DTRACE"; then
3638 as_fn_error $? "dtrace not found" "$LINENO" 5
3646 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3648 esac
3650 else
3651 enable_dtrace=no
3659 # TAP tests
3663 # Check whether --enable-tap-tests was given.
3664 if test "${enable_tap_tests+set}" = set; then :
3665 enableval=$enable_tap_tests;
3666 case $enableval in
3667 yes)
3674 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3676 esac
3678 else
3679 enable_tap_tests=no
3687 # Injection points
3691 # Check whether --enable-injection-points was given.
3692 if test "${enable_injection_points+set}" = set; then :
3693 enableval=$enable_injection_points;
3694 case $enableval in
3695 yes)
3697 $as_echo "#define USE_INJECTION_POINTS 1" >>confdefs.h
3704 as_fn_error $? "no argument expected for --enable-injection-points option" "$LINENO" 5
3706 esac
3708 else
3709 enable_injection_points=no
3717 # Block size
3719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3720 $as_echo_n "checking for block size... " >&6; }
3724 # Check whether --with-blocksize was given.
3725 if test "${with_blocksize+set}" = set; then :
3726 withval=$with_blocksize;
3727 case $withval in
3728 yes)
3729 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3732 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3735 blocksize=$withval
3737 esac
3739 else
3740 blocksize=8
3744 case ${blocksize} in
3745 1) BLCKSZ=1024;;
3746 2) BLCKSZ=2048;;
3747 4) BLCKSZ=4096;;
3748 8) BLCKSZ=8192;;
3749 16) BLCKSZ=16384;;
3750 32) BLCKSZ=32768;;
3751 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3752 esac
3753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3754 $as_echo "${blocksize}kB" >&6; }
3757 cat >>confdefs.h <<_ACEOF
3758 #define BLCKSZ ${BLCKSZ}
3759 _ACEOF
3763 # Relation segment size
3768 # Check whether --with-segsize was given.
3769 if test "${with_segsize+set}" = set; then :
3770 withval=$with_segsize;
3771 case $withval in
3772 yes)
3773 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3776 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3779 segsize=$withval
3781 esac
3783 else
3784 segsize=1
3791 # Check whether --with-segsize-blocks was given.
3792 if test "${with_segsize_blocks+set}" = set; then :
3793 withval=$with_segsize_blocks;
3794 case $withval in
3795 yes)
3796 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3799 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3802 segsize_blocks=$withval
3804 esac
3806 else
3807 segsize_blocks=0
3812 # If --with-segsize-blocks is non-zero, it is used, --with-segsize
3813 # otherwise. segsize-blocks is only really useful for developers wanting to
3814 # test segment related code. Warn if both are used.
3815 if test $segsize_blocks -ne 0 -a $segsize -ne 1; then
3816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&5
3817 $as_echo "$as_me: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&2;}
3820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3821 $as_echo_n "checking for segment size... " >&6; }
3822 if test $segsize_blocks -eq 0; then
3823 # this expression is set up to avoid unnecessary integer overflow
3824 # blocksize is already guaranteed to be a factor of 1024
3825 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3826 test $? -eq 0 || exit 1
3827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3828 $as_echo "${segsize}GB" >&6; }
3829 else
3830 RELSEG_SIZE=$segsize_blocks
3831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${RELSEG_SIZE} blocks" >&5
3832 $as_echo "${RELSEG_SIZE} blocks" >&6; }
3836 cat >>confdefs.h <<_ACEOF
3837 #define RELSEG_SIZE ${RELSEG_SIZE}
3838 _ACEOF
3842 # WAL block size
3844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3845 $as_echo_n "checking for WAL block size... " >&6; }
3849 # Check whether --with-wal-blocksize was given.
3850 if test "${with_wal_blocksize+set}" = set; then :
3851 withval=$with_wal_blocksize;
3852 case $withval in
3853 yes)
3854 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3857 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3860 wal_blocksize=$withval
3862 esac
3864 else
3865 wal_blocksize=8
3869 case ${wal_blocksize} in
3870 1) XLOG_BLCKSZ=1024;;
3871 2) XLOG_BLCKSZ=2048;;
3872 4) XLOG_BLCKSZ=4096;;
3873 8) XLOG_BLCKSZ=8192;;
3874 16) XLOG_BLCKSZ=16384;;
3875 32) XLOG_BLCKSZ=32768;;
3876 64) XLOG_BLCKSZ=65536;;
3877 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3878 esac
3879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3880 $as_echo "${wal_blocksize}kB" >&6; }
3883 cat >>confdefs.h <<_ACEOF
3884 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3885 _ACEOF
3889 # C compiler
3892 # If you don't specify a list of compilers to test, the AC_PROG_CC and
3893 # AC_PROG_CXX macros test for a long list of unsupported compilers.
3894 pgac_cc_list="gcc cc"
3895 pgac_cxx_list="g++ c++"
3897 ac_ext=c
3898 ac_cpp='$CPP $CPPFLAGS'
3899 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3900 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3901 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3902 if test -n "$ac_tool_prefix"; then
3903 for ac_prog in $pgac_cc_list
3905 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3906 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3908 $as_echo_n "checking for $ac_word... " >&6; }
3909 if ${ac_cv_prog_CC+:} false; then :
3910 $as_echo_n "(cached) " >&6
3911 else
3912 if test -n "$CC"; then
3913 ac_cv_prog_CC="$CC" # Let the user override the test.
3914 else
3915 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3916 for as_dir in $PATH
3918 IFS=$as_save_IFS
3919 test -z "$as_dir" && as_dir=.
3920 for ac_exec_ext in '' $ac_executable_extensions; do
3921 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3922 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3923 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3924 break 2
3926 done
3927 done
3928 IFS=$as_save_IFS
3932 CC=$ac_cv_prog_CC
3933 if test -n "$CC"; then
3934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3935 $as_echo "$CC" >&6; }
3936 else
3937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3938 $as_echo "no" >&6; }
3942 test -n "$CC" && break
3943 done
3945 if test -z "$CC"; then
3946 ac_ct_CC=$CC
3947 for ac_prog in $pgac_cc_list
3949 # Extract the first word of "$ac_prog", so it can be a program name with args.
3950 set dummy $ac_prog; ac_word=$2
3951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3952 $as_echo_n "checking for $ac_word... " >&6; }
3953 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3954 $as_echo_n "(cached) " >&6
3955 else
3956 if test -n "$ac_ct_CC"; then
3957 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3958 else
3959 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3960 for as_dir in $PATH
3962 IFS=$as_save_IFS
3963 test -z "$as_dir" && as_dir=.
3964 for ac_exec_ext in '' $ac_executable_extensions; do
3965 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3966 ac_cv_prog_ac_ct_CC="$ac_prog"
3967 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3968 break 2
3970 done
3971 done
3972 IFS=$as_save_IFS
3976 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3977 if test -n "$ac_ct_CC"; then
3978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3979 $as_echo "$ac_ct_CC" >&6; }
3980 else
3981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3982 $as_echo "no" >&6; }
3986 test -n "$ac_ct_CC" && break
3987 done
3989 if test "x$ac_ct_CC" = x; then
3990 CC=""
3991 else
3992 case $cross_compiling:$ac_tool_warned in
3993 yes:)
3994 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3995 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3996 ac_tool_warned=yes ;;
3997 esac
3998 CC=$ac_ct_CC
4003 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4004 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4005 as_fn_error $? "no acceptable C compiler found in \$PATH
4006 See \`config.log' for more details" "$LINENO" 5; }
4008 # Provide some information about the compiler.
4009 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4010 set X $ac_compile
4011 ac_compiler=$2
4012 for ac_option in --version -v -V -qversion; do
4013 { { ac_try="$ac_compiler $ac_option >&5"
4014 case "(($ac_try" in
4015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4016 *) ac_try_echo=$ac_try;;
4017 esac
4018 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4019 $as_echo "$ac_try_echo"; } >&5
4020 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4021 ac_status=$?
4022 if test -s conftest.err; then
4023 sed '10a\
4024 ... rest of stderr output deleted ...
4025 10q' conftest.err >conftest.er1
4026 cat conftest.er1 >&5
4028 rm -f conftest.er1 conftest.err
4029 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4030 test $ac_status = 0; }
4031 done
4033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4034 /* end confdefs.h. */
4037 main ()
4041 return 0;
4043 _ACEOF
4044 ac_clean_files_save=$ac_clean_files
4045 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4046 # Try to create an executable without -o first, disregard a.out.
4047 # It will help us diagnose broken compilers, and finding out an intuition
4048 # of exeext.
4049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4050 $as_echo_n "checking whether the C compiler works... " >&6; }
4051 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4053 # The possible output files:
4054 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4056 ac_rmfiles=
4057 for ac_file in $ac_files
4059 case $ac_file in
4060 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4061 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4062 esac
4063 done
4064 rm -f $ac_rmfiles
4066 if { { ac_try="$ac_link_default"
4067 case "(($ac_try" in
4068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4069 *) ac_try_echo=$ac_try;;
4070 esac
4071 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4072 $as_echo "$ac_try_echo"; } >&5
4073 (eval "$ac_link_default") 2>&5
4074 ac_status=$?
4075 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4076 test $ac_status = 0; }; then :
4077 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4078 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4079 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4080 # so that the user can short-circuit this test for compilers unknown to
4081 # Autoconf.
4082 for ac_file in $ac_files ''
4084 test -f "$ac_file" || continue
4085 case $ac_file in
4086 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4088 [ab].out )
4089 # We found the default executable, but exeext='' is most
4090 # certainly right.
4091 break;;
4092 *.* )
4093 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4094 then :; else
4095 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4097 # We set ac_cv_exeext here because the later test for it is not
4098 # safe: cross compilers may not add the suffix if given an `-o'
4099 # argument, so we may need to know it at that point already.
4100 # Even if this section looks crufty: it has the advantage of
4101 # actually working.
4102 break;;
4104 break;;
4105 esac
4106 done
4107 test "$ac_cv_exeext" = no && ac_cv_exeext=
4109 else
4110 ac_file=''
4112 if test -z "$ac_file"; then :
4113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4114 $as_echo "no" >&6; }
4115 $as_echo "$as_me: failed program was:" >&5
4116 sed 's/^/| /' conftest.$ac_ext >&5
4118 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4119 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4120 as_fn_error 77 "C compiler cannot create executables
4121 See \`config.log' for more details" "$LINENO" 5; }
4122 else
4123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4124 $as_echo "yes" >&6; }
4126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4127 $as_echo_n "checking for C compiler default output file name... " >&6; }
4128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4129 $as_echo "$ac_file" >&6; }
4130 ac_exeext=$ac_cv_exeext
4132 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4133 ac_clean_files=$ac_clean_files_save
4134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4135 $as_echo_n "checking for suffix of executables... " >&6; }
4136 if { { ac_try="$ac_link"
4137 case "(($ac_try" in
4138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4139 *) ac_try_echo=$ac_try;;
4140 esac
4141 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4142 $as_echo "$ac_try_echo"; } >&5
4143 (eval "$ac_link") 2>&5
4144 ac_status=$?
4145 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4146 test $ac_status = 0; }; then :
4147 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4148 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4149 # work properly (i.e., refer to `conftest.exe'), while it won't with
4150 # `rm'.
4151 for ac_file in conftest.exe conftest conftest.*; do
4152 test -f "$ac_file" || continue
4153 case $ac_file in
4154 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4155 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4156 break;;
4157 * ) break;;
4158 esac
4159 done
4160 else
4161 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4162 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4163 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4164 See \`config.log' for more details" "$LINENO" 5; }
4166 rm -f conftest conftest$ac_cv_exeext
4167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4168 $as_echo "$ac_cv_exeext" >&6; }
4170 rm -f conftest.$ac_ext
4171 EXEEXT=$ac_cv_exeext
4172 ac_exeext=$EXEEXT
4173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4174 /* end confdefs.h. */
4175 #include <stdio.h>
4177 main ()
4179 FILE *f = fopen ("conftest.out", "w");
4180 return ferror (f) || fclose (f) != 0;
4183 return 0;
4185 _ACEOF
4186 ac_clean_files="$ac_clean_files conftest.out"
4187 # Check that the compiler produces executables we can run. If not, either
4188 # the compiler is broken, or we cross compile.
4189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4190 $as_echo_n "checking whether we are cross compiling... " >&6; }
4191 if test "$cross_compiling" != yes; then
4192 { { ac_try="$ac_link"
4193 case "(($ac_try" in
4194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4195 *) ac_try_echo=$ac_try;;
4196 esac
4197 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4198 $as_echo "$ac_try_echo"; } >&5
4199 (eval "$ac_link") 2>&5
4200 ac_status=$?
4201 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4202 test $ac_status = 0; }
4203 if { ac_try='./conftest$ac_cv_exeext'
4204 { { case "(($ac_try" in
4205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4206 *) ac_try_echo=$ac_try;;
4207 esac
4208 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4209 $as_echo "$ac_try_echo"; } >&5
4210 (eval "$ac_try") 2>&5
4211 ac_status=$?
4212 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4213 test $ac_status = 0; }; }; then
4214 cross_compiling=no
4215 else
4216 if test "$cross_compiling" = maybe; then
4217 cross_compiling=yes
4218 else
4219 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4220 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4221 as_fn_error $? "cannot run C compiled programs.
4222 If you meant to cross compile, use \`--host'.
4223 See \`config.log' for more details" "$LINENO" 5; }
4227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4228 $as_echo "$cross_compiling" >&6; }
4230 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4231 ac_clean_files=$ac_clean_files_save
4232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4233 $as_echo_n "checking for suffix of object files... " >&6; }
4234 if ${ac_cv_objext+:} false; then :
4235 $as_echo_n "(cached) " >&6
4236 else
4237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4238 /* end confdefs.h. */
4241 main ()
4245 return 0;
4247 _ACEOF
4248 rm -f conftest.o conftest.obj
4249 if { { ac_try="$ac_compile"
4250 case "(($ac_try" in
4251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4252 *) ac_try_echo=$ac_try;;
4253 esac
4254 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4255 $as_echo "$ac_try_echo"; } >&5
4256 (eval "$ac_compile") 2>&5
4257 ac_status=$?
4258 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4259 test $ac_status = 0; }; then :
4260 for ac_file in conftest.o conftest.obj conftest.*; do
4261 test -f "$ac_file" || continue;
4262 case $ac_file in
4263 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4264 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4265 break;;
4266 esac
4267 done
4268 else
4269 $as_echo "$as_me: failed program was:" >&5
4270 sed 's/^/| /' conftest.$ac_ext >&5
4272 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4273 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4274 as_fn_error $? "cannot compute suffix of object files: cannot compile
4275 See \`config.log' for more details" "$LINENO" 5; }
4277 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4280 $as_echo "$ac_cv_objext" >&6; }
4281 OBJEXT=$ac_cv_objext
4282 ac_objext=$OBJEXT
4283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4284 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4285 if ${ac_cv_c_compiler_gnu+:} false; then :
4286 $as_echo_n "(cached) " >&6
4287 else
4288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4289 /* end confdefs.h. */
4292 main ()
4294 #ifndef __GNUC__
4295 choke me
4296 #endif
4299 return 0;
4301 _ACEOF
4302 if ac_fn_c_try_compile "$LINENO"; then :
4303 ac_compiler_gnu=yes
4304 else
4305 ac_compiler_gnu=no
4307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4308 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4312 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4313 if test $ac_compiler_gnu = yes; then
4314 GCC=yes
4315 else
4316 GCC=
4318 ac_test_CFLAGS=${CFLAGS+set}
4319 ac_save_CFLAGS=$CFLAGS
4320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4321 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4322 if ${ac_cv_prog_cc_g+:} false; then :
4323 $as_echo_n "(cached) " >&6
4324 else
4325 ac_save_c_werror_flag=$ac_c_werror_flag
4326 ac_c_werror_flag=yes
4327 ac_cv_prog_cc_g=no
4328 CFLAGS="-g"
4329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4330 /* end confdefs.h. */
4333 main ()
4337 return 0;
4339 _ACEOF
4340 if ac_fn_c_try_compile "$LINENO"; then :
4341 ac_cv_prog_cc_g=yes
4342 else
4343 CFLAGS=""
4344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4345 /* end confdefs.h. */
4348 main ()
4352 return 0;
4354 _ACEOF
4355 if ac_fn_c_try_compile "$LINENO"; then :
4357 else
4358 ac_c_werror_flag=$ac_save_c_werror_flag
4359 CFLAGS="-g"
4360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4361 /* end confdefs.h. */
4364 main ()
4368 return 0;
4370 _ACEOF
4371 if ac_fn_c_try_compile "$LINENO"; then :
4372 ac_cv_prog_cc_g=yes
4374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4379 ac_c_werror_flag=$ac_save_c_werror_flag
4381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4382 $as_echo "$ac_cv_prog_cc_g" >&6; }
4383 if test "$ac_test_CFLAGS" = set; then
4384 CFLAGS=$ac_save_CFLAGS
4385 elif test $ac_cv_prog_cc_g = yes; then
4386 if test "$GCC" = yes; then
4387 CFLAGS="-g -O2"
4388 else
4389 CFLAGS="-g"
4391 else
4392 if test "$GCC" = yes; then
4393 CFLAGS="-O2"
4394 else
4395 CFLAGS=
4398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4399 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4400 if ${ac_cv_prog_cc_c89+:} false; then :
4401 $as_echo_n "(cached) " >&6
4402 else
4403 ac_cv_prog_cc_c89=no
4404 ac_save_CC=$CC
4405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4406 /* end confdefs.h. */
4407 #include <stdarg.h>
4408 #include <stdio.h>
4409 struct stat;
4410 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4411 struct buf { int x; };
4412 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4413 static char *e (p, i)
4414 char **p;
4415 int i;
4417 return p[i];
4419 static char *f (char * (*g) (char **, int), char **p, ...)
4421 char *s;
4422 va_list v;
4423 va_start (v,p);
4424 s = g (p, va_arg (v,int));
4425 va_end (v);
4426 return s;
4429 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4430 function prototypes and stuff, but not '\xHH' hex character constants.
4431 These don't provoke an error unfortunately, instead are silently treated
4432 as 'x'. The following induces an error, until -std is added to get
4433 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4434 array size at least. It's necessary to write '\x00'==0 to get something
4435 that's true only with -std. */
4436 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4438 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4439 inside strings and character constants. */
4440 #define FOO(x) 'x'
4441 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4443 int test (int i, double x);
4444 struct s1 {int (*f) (int a);};
4445 struct s2 {int (*f) (double a);};
4446 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4447 int argc;
4448 char **argv;
4450 main ()
4452 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4454 return 0;
4456 _ACEOF
4457 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4458 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4460 CC="$ac_save_CC $ac_arg"
4461 if ac_fn_c_try_compile "$LINENO"; then :
4462 ac_cv_prog_cc_c89=$ac_arg
4464 rm -f core conftest.err conftest.$ac_objext
4465 test "x$ac_cv_prog_cc_c89" != "xno" && break
4466 done
4467 rm -f conftest.$ac_ext
4468 CC=$ac_save_CC
4471 # AC_CACHE_VAL
4472 case "x$ac_cv_prog_cc_c89" in
4474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4475 $as_echo "none needed" >&6; } ;;
4476 xno)
4477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4478 $as_echo "unsupported" >&6; } ;;
4480 CC="$CC $ac_cv_prog_cc_c89"
4481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4482 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4483 esac
4484 if test "x$ac_cv_prog_cc_c89" != xno; then :
4488 ac_ext=c
4489 ac_cpp='$CPP $CPPFLAGS'
4490 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4491 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4492 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4495 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4496 if ${ac_cv_prog_cc_c99+:} false; then :
4497 $as_echo_n "(cached) " >&6
4498 else
4499 ac_cv_prog_cc_c99=no
4500 ac_save_CC=$CC
4501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4502 /* end confdefs.h. */
4503 #include <stdarg.h>
4504 #include <stdbool.h>
4505 #include <stdlib.h>
4506 #include <wchar.h>
4507 #include <stdio.h>
4509 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4510 #define debug(...) fprintf (stderr, __VA_ARGS__)
4511 #define showlist(...) puts (#__VA_ARGS__)
4512 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4513 static void
4514 test_varargs_macros (void)
4516 int x = 1234;
4517 int y = 5678;
4518 debug ("Flag");
4519 debug ("X = %d\n", x);
4520 showlist (The first, second, and third items.);
4521 report (x>y, "x is %d but y is %d", x, y);
4524 // Check long long types.
4525 #define BIG64 18446744073709551615ull
4526 #define BIG32 4294967295ul
4527 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4528 #if !BIG_OK
4529 your preprocessor is broken;
4530 #endif
4531 #if BIG_OK
4532 #else
4533 your preprocessor is broken;
4534 #endif
4535 static long long int bignum = -9223372036854775807LL;
4536 static unsigned long long int ubignum = BIG64;
4538 struct incomplete_array
4540 int datasize;
4541 double data[];
4544 struct named_init {
4545 int number;
4546 const wchar_t *name;
4547 double average;
4550 typedef const char *ccp;
4552 static inline int
4553 test_restrict (ccp restrict text)
4555 // See if C++-style comments work.
4556 // Iterate through items via the restricted pointer.
4557 // Also check for declarations in for loops.
4558 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4559 continue;
4560 return 0;
4563 // Check varargs and va_copy.
4564 static void
4565 test_varargs (const char *format, ...)
4567 va_list args;
4568 va_start (args, format);
4569 va_list args_copy;
4570 va_copy (args_copy, args);
4572 const char *str;
4573 int number;
4574 float fnumber;
4576 while (*format)
4578 switch (*format++)
4580 case 's': // string
4581 str = va_arg (args_copy, const char *);
4582 break;
4583 case 'd': // int
4584 number = va_arg (args_copy, int);
4585 break;
4586 case 'f': // float
4587 fnumber = va_arg (args_copy, double);
4588 break;
4589 default:
4590 break;
4593 va_end (args_copy);
4594 va_end (args);
4598 main ()
4601 // Check bool.
4602 _Bool success = false;
4604 // Check restrict.
4605 if (test_restrict ("String literal") == 0)
4606 success = true;
4607 char *restrict newvar = "Another string";
4609 // Check varargs.
4610 test_varargs ("s, d' f .", "string", 65, 34.234);
4611 test_varargs_macros ();
4613 // Check flexible array members.
4614 struct incomplete_array *ia =
4615 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4616 ia->datasize = 10;
4617 for (int i = 0; i < ia->datasize; ++i)
4618 ia->data[i] = i * 1.234;
4620 // Check named initializers.
4621 struct named_init ni = {
4622 .number = 34,
4623 .name = L"Test wide string",
4624 .average = 543.34343,
4627 ni.number = 58;
4629 int dynamic_array[ni.number];
4630 dynamic_array[ni.number - 1] = 543;
4632 // work around unused variable warnings
4633 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4634 || dynamic_array[ni.number - 1] != 543);
4637 return 0;
4639 _ACEOF
4640 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4642 CC="$ac_save_CC $ac_arg"
4643 if ac_fn_c_try_compile "$LINENO"; then :
4644 ac_cv_prog_cc_c99=$ac_arg
4646 rm -f core conftest.err conftest.$ac_objext
4647 test "x$ac_cv_prog_cc_c99" != "xno" && break
4648 done
4649 rm -f conftest.$ac_ext
4650 CC=$ac_save_CC
4653 # AC_CACHE_VAL
4654 case "x$ac_cv_prog_cc_c99" in
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4657 $as_echo "none needed" >&6; } ;;
4658 xno)
4659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4660 $as_echo "unsupported" >&6; } ;;
4662 CC="$CC $ac_cv_prog_cc_c99"
4663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4664 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4665 esac
4666 if test "x$ac_cv_prog_cc_c99" != xno; then :
4672 # Error out if the compiler does not support C99, as the codebase
4673 # relies on that.
4674 if test "$ac_cv_prog_cc_c99" = no; then
4675 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4678 ac_ext=cpp
4679 ac_cpp='$CXXCPP $CPPFLAGS'
4680 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4681 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4682 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4683 if test -z "$CXX"; then
4684 if test -n "$CCC"; then
4685 CXX=$CCC
4686 else
4687 if test -n "$ac_tool_prefix"; then
4688 for ac_prog in $pgac_cxx_list
4690 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4691 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4693 $as_echo_n "checking for $ac_word... " >&6; }
4694 if ${ac_cv_prog_CXX+:} false; then :
4695 $as_echo_n "(cached) " >&6
4696 else
4697 if test -n "$CXX"; then
4698 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4699 else
4700 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4701 for as_dir in $PATH
4703 IFS=$as_save_IFS
4704 test -z "$as_dir" && as_dir=.
4705 for ac_exec_ext in '' $ac_executable_extensions; do
4706 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4707 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4709 break 2
4711 done
4712 done
4713 IFS=$as_save_IFS
4717 CXX=$ac_cv_prog_CXX
4718 if test -n "$CXX"; then
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4720 $as_echo "$CXX" >&6; }
4721 else
4722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4723 $as_echo "no" >&6; }
4727 test -n "$CXX" && break
4728 done
4730 if test -z "$CXX"; then
4731 ac_ct_CXX=$CXX
4732 for ac_prog in $pgac_cxx_list
4734 # Extract the first word of "$ac_prog", so it can be a program name with args.
4735 set dummy $ac_prog; ac_word=$2
4736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4737 $as_echo_n "checking for $ac_word... " >&6; }
4738 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4739 $as_echo_n "(cached) " >&6
4740 else
4741 if test -n "$ac_ct_CXX"; then
4742 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4743 else
4744 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4745 for as_dir in $PATH
4747 IFS=$as_save_IFS
4748 test -z "$as_dir" && as_dir=.
4749 for ac_exec_ext in '' $ac_executable_extensions; do
4750 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4751 ac_cv_prog_ac_ct_CXX="$ac_prog"
4752 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4753 break 2
4755 done
4756 done
4757 IFS=$as_save_IFS
4761 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4762 if test -n "$ac_ct_CXX"; then
4763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4764 $as_echo "$ac_ct_CXX" >&6; }
4765 else
4766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4767 $as_echo "no" >&6; }
4771 test -n "$ac_ct_CXX" && break
4772 done
4774 if test "x$ac_ct_CXX" = x; then
4775 CXX="g++"
4776 else
4777 case $cross_compiling:$ac_tool_warned in
4778 yes:)
4779 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4780 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4781 ac_tool_warned=yes ;;
4782 esac
4783 CXX=$ac_ct_CXX
4789 # Provide some information about the compiler.
4790 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4791 set X $ac_compile
4792 ac_compiler=$2
4793 for ac_option in --version -v -V -qversion; do
4794 { { ac_try="$ac_compiler $ac_option >&5"
4795 case "(($ac_try" in
4796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4797 *) ac_try_echo=$ac_try;;
4798 esac
4799 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4800 $as_echo "$ac_try_echo"; } >&5
4801 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4802 ac_status=$?
4803 if test -s conftest.err; then
4804 sed '10a\
4805 ... rest of stderr output deleted ...
4806 10q' conftest.err >conftest.er1
4807 cat conftest.er1 >&5
4809 rm -f conftest.er1 conftest.err
4810 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4811 test $ac_status = 0; }
4812 done
4814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4815 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4816 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4817 $as_echo_n "(cached) " >&6
4818 else
4819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4820 /* end confdefs.h. */
4823 main ()
4825 #ifndef __GNUC__
4826 choke me
4827 #endif
4830 return 0;
4832 _ACEOF
4833 if ac_fn_cxx_try_compile "$LINENO"; then :
4834 ac_compiler_gnu=yes
4835 else
4836 ac_compiler_gnu=no
4838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4839 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4843 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4844 if test $ac_compiler_gnu = yes; then
4845 GXX=yes
4846 else
4847 GXX=
4849 ac_test_CXXFLAGS=${CXXFLAGS+set}
4850 ac_save_CXXFLAGS=$CXXFLAGS
4851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4852 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4853 if ${ac_cv_prog_cxx_g+:} false; then :
4854 $as_echo_n "(cached) " >&6
4855 else
4856 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4857 ac_cxx_werror_flag=yes
4858 ac_cv_prog_cxx_g=no
4859 CXXFLAGS="-g"
4860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4861 /* end confdefs.h. */
4864 main ()
4868 return 0;
4870 _ACEOF
4871 if ac_fn_cxx_try_compile "$LINENO"; then :
4872 ac_cv_prog_cxx_g=yes
4873 else
4874 CXXFLAGS=""
4875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4876 /* end confdefs.h. */
4879 main ()
4883 return 0;
4885 _ACEOF
4886 if ac_fn_cxx_try_compile "$LINENO"; then :
4888 else
4889 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4890 CXXFLAGS="-g"
4891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4892 /* end confdefs.h. */
4895 main ()
4899 return 0;
4901 _ACEOF
4902 if ac_fn_cxx_try_compile "$LINENO"; then :
4903 ac_cv_prog_cxx_g=yes
4905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4910 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4913 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4914 if test "$ac_test_CXXFLAGS" = set; then
4915 CXXFLAGS=$ac_save_CXXFLAGS
4916 elif test $ac_cv_prog_cxx_g = yes; then
4917 if test "$GXX" = yes; then
4918 CXXFLAGS="-g -O2"
4919 else
4920 CXXFLAGS="-g"
4922 else
4923 if test "$GXX" = yes; then
4924 CXXFLAGS="-O2"
4925 else
4926 CXXFLAGS=
4929 ac_ext=c
4930 ac_cpp='$CPP $CPPFLAGS'
4931 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4932 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4933 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4936 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4937 # but has idiosyncrasies of its own. We assume icc will define
4938 # __INTEL_COMPILER regardless of CFLAGS.
4940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4941 /* end confdefs.h. */
4944 main ()
4946 #ifndef __INTEL_COMPILER
4947 choke me
4948 #endif
4950 return 0;
4952 _ACEOF
4953 if ac_fn_c_try_compile "$LINENO"; then :
4954 ICC=yes
4955 else
4956 ICC=no
4958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4960 # Check if it's Sun Studio compiler. We assume that
4961 # __SUNPRO_C will be defined for Sun Studio compilers
4962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4963 /* end confdefs.h. */
4966 main ()
4968 #ifndef __SUNPRO_C
4969 choke me
4970 #endif
4972 return 0;
4974 _ACEOF
4975 if ac_fn_c_try_compile "$LINENO"; then :
4976 SUN_STUDIO_CC=yes
4977 else
4978 SUN_STUDIO_CC=no
4980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4986 # LLVM
4988 # Checked early because subsequent tests depend on it.
4992 # Check whether --with-llvm was given.
4993 if test "${with_llvm+set}" = set; then :
4994 withval=$with_llvm;
4995 case $withval in
4996 yes)
4998 $as_echo "#define USE_LLVM 1" >>confdefs.h
5005 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
5007 esac
5009 else
5010 with_llvm=no
5016 for ac_prog in gawk mawk nawk awk
5018 # Extract the first word of "$ac_prog", so it can be a program name with args.
5019 set dummy $ac_prog; ac_word=$2
5020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5021 $as_echo_n "checking for $ac_word... " >&6; }
5022 if ${ac_cv_prog_AWK+:} false; then :
5023 $as_echo_n "(cached) " >&6
5024 else
5025 if test -n "$AWK"; then
5026 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5027 else
5028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5029 for as_dir in $PATH
5031 IFS=$as_save_IFS
5032 test -z "$as_dir" && as_dir=.
5033 for ac_exec_ext in '' $ac_executable_extensions; do
5034 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5035 ac_cv_prog_AWK="$ac_prog"
5036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5037 break 2
5039 done
5040 done
5041 IFS=$as_save_IFS
5045 AWK=$ac_cv_prog_AWK
5046 if test -n "$AWK"; then
5047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5048 $as_echo "$AWK" >&6; }
5049 else
5050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5051 $as_echo "no" >&6; }
5055 test -n "$AWK" && break
5056 done
5058 if test "$with_llvm" = yes; then :
5064 if test -z "$LLVM_CONFIG"; then
5065 for ac_prog in llvm-config llvm-config-17 llvm-config-16 llvm-config-15 llvm-config-14 llvm-config-13 llvm-config-12 llvm-config-11 llvm-config-10
5067 # Extract the first word of "$ac_prog", so it can be a program name with args.
5068 set dummy $ac_prog; ac_word=$2
5069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070 $as_echo_n "checking for $ac_word... " >&6; }
5071 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5072 $as_echo_n "(cached) " >&6
5073 else
5074 case $LLVM_CONFIG in
5075 [\\/]* | ?:[\\/]*)
5076 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5079 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5080 for as_dir in $PATH
5082 IFS=$as_save_IFS
5083 test -z "$as_dir" && as_dir=.
5084 for ac_exec_ext in '' $ac_executable_extensions; do
5085 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5086 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5087 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5088 break 2
5090 done
5091 done
5092 IFS=$as_save_IFS
5095 esac
5097 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5098 if test -n "$LLVM_CONFIG"; then
5099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5100 $as_echo "$LLVM_CONFIG" >&6; }
5101 else
5102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5103 $as_echo "no" >&6; }
5107 test -n "$LLVM_CONFIG" && break
5108 done
5110 else
5111 # Report the value of LLVM_CONFIG in configure's output in all cases.
5112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5113 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5115 $as_echo "$LLVM_CONFIG" >&6; }
5119 # no point continuing if llvm wasn't found
5120 if test -z "$LLVM_CONFIG"; then
5121 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5123 # check if detected $LLVM_CONFIG is executable
5124 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5125 if test "x$pgac_llvm_version" = "xno"; then
5126 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5128 # and whether the version is supported
5129 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 10) exit 1; else exit 0;}';then
5130 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 10 is required" "$LINENO" 5
5132 { $as_echo "$as_me:${as_lineno-$LINENO}: using llvm $pgac_llvm_version" >&5
5133 $as_echo "$as_me: using llvm $pgac_llvm_version" >&6;}
5135 # need clang to create some bitcode files
5137 if test -z "$CLANG"; then
5138 for ac_prog in clang clang-17 clang-16 clang-15 clang-14 clang-13 clang-12 clang-11 clang-10
5140 # Extract the first word of "$ac_prog", so it can be a program name with args.
5141 set dummy $ac_prog; ac_word=$2
5142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5143 $as_echo_n "checking for $ac_word... " >&6; }
5144 if ${ac_cv_path_CLANG+:} false; then :
5145 $as_echo_n "(cached) " >&6
5146 else
5147 case $CLANG in
5148 [\\/]* | ?:[\\/]*)
5149 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5152 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5153 for as_dir in $PATH
5155 IFS=$as_save_IFS
5156 test -z "$as_dir" && as_dir=.
5157 for ac_exec_ext in '' $ac_executable_extensions; do
5158 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5159 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5160 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5161 break 2
5163 done
5164 done
5165 IFS=$as_save_IFS
5168 esac
5170 CLANG=$ac_cv_path_CLANG
5171 if test -n "$CLANG"; then
5172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5173 $as_echo "$CLANG" >&6; }
5174 else
5175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5176 $as_echo "no" >&6; }
5180 test -n "$CLANG" && break
5181 done
5183 else
5184 # Report the value of CLANG in configure's output in all cases.
5185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5186 $as_echo_n "checking for CLANG... " >&6; }
5187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5188 $as_echo "$CLANG" >&6; }
5191 if test -z "$CLANG"; then
5192 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5194 # make sure clang is executable
5195 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5196 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5198 # Could check clang version, but it doesn't seem that
5199 # important. Systems with a new enough LLVM version are usually
5200 # going to have a decent clang version too. It's also not entirely
5201 # clear what the minimum version is.
5203 # Collect compiler flags necessary to build the LLVM dependent
5204 # shared library.
5205 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5206 case $pgac_option in
5207 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5208 esac
5209 done
5211 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5212 case $pgac_option in
5213 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5214 esac
5215 done
5217 # ABI influencing options, standard influencing options
5218 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5219 case $pgac_option in
5220 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5221 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5222 esac
5223 done
5225 # Look for components we're interested in, collect necessary
5226 # libs. As some components are optional, we can't just list all of
5227 # them as it'd raise an error.
5228 pgac_components='';
5229 for pgac_component in `$LLVM_CONFIG --components`; do
5230 case $pgac_component in
5231 engine) pgac_components="$pgac_components $pgac_component";;
5232 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5233 orcjit) pgac_components="$pgac_components $pgac_component";;
5234 passes) pgac_components="$pgac_components $pgac_component";;
5235 native) pgac_components="$pgac_components $pgac_component";;
5236 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5237 esac
5238 done;
5240 # And then get the libraries that need to be linked in for the
5241 # selected components. They're large libraries, we only want to
5242 # link them into the LLVM using shared library.
5243 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5244 case $pgac_option in
5245 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5246 esac
5247 done
5249 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5259 fi # fi
5262 unset CFLAGS
5263 unset CXXFLAGS
5266 # Read the template
5268 . "$srcdir/src/template/$template" || exit
5270 # C[XX]FLAGS are selected so:
5271 # If the user specifies something in the environment, that is used.
5272 # else: If the template file set something, that is used.
5273 # else: If coverage was enabled, don't set anything.
5274 # else: If the compiler is GCC, then we use -O2.
5275 # else: If the compiler is something else, then we use -O, unless debugging.
5277 if test "$ac_env_CFLAGS_set" = set; then
5278 CFLAGS=$ac_env_CFLAGS_value
5279 elif test "${CFLAGS+set}" = set; then
5280 : # (keep what template set)
5281 elif test "$enable_coverage" = yes; then
5282 : # no optimization by default
5283 elif test "$GCC" = yes; then
5284 CFLAGS="-O2"
5285 else
5286 # if the user selected debug mode, don't use -O
5287 if test "$enable_debug" != yes; then
5288 CFLAGS="-O"
5292 if test "$ac_env_CXXFLAGS_set" = set; then
5293 CXXFLAGS=$ac_env_CXXFLAGS_value
5294 elif test "${CXXFLAGS+set}" = set; then
5295 : # (keep what template set)
5296 elif test "$enable_coverage" = yes; then
5297 : # no optimization by default
5298 elif test "$GCC" = yes; then
5299 CXXFLAGS="-O2"
5300 else
5301 # if the user selected debug mode, don't use -O
5302 if test "$enable_debug" != yes; then
5303 CXXFLAGS="-O"
5307 # When generating bitcode (for inlining) we always want to use -O2
5308 # even when --enable-debug is specified. The bitcode is not going to
5309 # be used for line-by-line debugging, and JIT inlining doesn't work
5310 # without at least -O1 (otherwise clang will emit 'noinline'
5311 # attributes everywhere), which is bad for testing. Still allow the
5312 # environment to override if done explicitly.
5313 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5314 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5315 else
5316 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5318 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5319 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5320 else
5321 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5324 # C[XX]FLAGS we determined above will be added back at the end
5325 user_CFLAGS=$CFLAGS
5326 CFLAGS=""
5327 user_CXXFLAGS=$CXXFLAGS
5328 CXXFLAGS=""
5329 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5330 BITCODE_CFLAGS=""
5331 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5332 BITCODE_CXXFLAGS=""
5334 # set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5335 if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5336 CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5338 if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5339 CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5342 # Some versions of GCC support some additional useful warning flags.
5343 # Check whether they are supported, and add them to CFLAGS if so.
5344 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5345 # but has its own. Also check other compiler-specific flags here.
5347 if test "$GCC" = yes -a "$ICC" = no; then
5348 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5349 CXXFLAGS="-Wall -Wpointer-arith"
5350 # These work in some but not all gcc versions
5351 save_CFLAGS=$CFLAGS
5353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5354 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5355 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5356 $as_echo_n "(cached) " >&6
5357 else
5358 pgac_save_CFLAGS=$CFLAGS
5359 pgac_save_CC=$CC
5360 CC=${CC}
5361 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5362 ac_save_c_werror_flag=$ac_c_werror_flag
5363 ac_c_werror_flag=yes
5364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5365 /* end confdefs.h. */
5368 main ()
5372 return 0;
5374 _ACEOF
5375 if ac_fn_c_try_compile "$LINENO"; then :
5376 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5377 else
5378 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5380 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5381 ac_c_werror_flag=$ac_save_c_werror_flag
5382 CFLAGS="$pgac_save_CFLAGS"
5383 CC="$pgac_save_CC"
5385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5386 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5387 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5388 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5392 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5393 # disable it, so AC_SUBST the negative form.
5394 PERMIT_DECLARATION_AFTER_STATEMENT=
5395 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5396 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5399 # Really don't want VLAs to be used in our dialect of C
5401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5402 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5403 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5404 $as_echo_n "(cached) " >&6
5405 else
5406 pgac_save_CFLAGS=$CFLAGS
5407 pgac_save_CC=$CC
5408 CC=${CC}
5409 CFLAGS="${CFLAGS} -Werror=vla"
5410 ac_save_c_werror_flag=$ac_c_werror_flag
5411 ac_c_werror_flag=yes
5412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5413 /* end confdefs.h. */
5416 main ()
5420 return 0;
5422 _ACEOF
5423 if ac_fn_c_try_compile "$LINENO"; then :
5424 pgac_cv_prog_CC_cflags__Werror_vla=yes
5425 else
5426 pgac_cv_prog_CC_cflags__Werror_vla=no
5428 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5429 ac_c_werror_flag=$ac_save_c_werror_flag
5430 CFLAGS="$pgac_save_CFLAGS"
5431 CC="$pgac_save_CC"
5433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5434 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5435 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5436 CFLAGS="${CFLAGS} -Werror=vla"
5440 # On macOS, complain about usage of symbols newer than the deployment target
5442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS" >&5
5443 $as_echo_n "checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS... " >&6; }
5444 if ${pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new+:} false; then :
5445 $as_echo_n "(cached) " >&6
5446 else
5447 pgac_save_CFLAGS=$CFLAGS
5448 pgac_save_CC=$CC
5449 CC=${CC}
5450 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5451 ac_save_c_werror_flag=$ac_c_werror_flag
5452 ac_c_werror_flag=yes
5453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5454 /* end confdefs.h. */
5457 main ()
5461 return 0;
5463 _ACEOF
5464 if ac_fn_c_try_compile "$LINENO"; then :
5465 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=yes
5466 else
5467 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=no
5469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5470 ac_c_werror_flag=$ac_save_c_werror_flag
5471 CFLAGS="$pgac_save_CFLAGS"
5472 CC="$pgac_save_CC"
5474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&5
5475 $as_echo "$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&6; }
5476 if test x"$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" = x"yes"; then
5477 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS" >&5
5482 $as_echo_n "checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS... " >&6; }
5483 if ${pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new+:} false; then :
5484 $as_echo_n "(cached) " >&6
5485 else
5486 pgac_save_CXXFLAGS=$CXXFLAGS
5487 pgac_save_CXX=$CXX
5488 CXX=${CXX}
5489 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5490 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5491 ac_cxx_werror_flag=yes
5492 ac_ext=cpp
5493 ac_cpp='$CXXCPP $CPPFLAGS'
5494 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5495 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5496 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5499 /* end confdefs.h. */
5502 main ()
5506 return 0;
5508 _ACEOF
5509 if ac_fn_cxx_try_compile "$LINENO"; then :
5510 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=yes
5511 else
5512 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=no
5514 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5515 ac_ext=c
5516 ac_cpp='$CPP $CPPFLAGS'
5517 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5518 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5519 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5521 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5522 CXXFLAGS="$pgac_save_CXXFLAGS"
5523 CXX="$pgac_save_CXX"
5525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&5
5526 $as_echo "$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&6; }
5527 if test x"$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" = x"yes"; then
5528 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5532 # -Wvla is not applicable for C++
5534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5535 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5536 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5537 $as_echo_n "(cached) " >&6
5538 else
5539 pgac_save_CFLAGS=$CFLAGS
5540 pgac_save_CC=$CC
5541 CC=${CC}
5542 CFLAGS="${CFLAGS} -Wendif-labels"
5543 ac_save_c_werror_flag=$ac_c_werror_flag
5544 ac_c_werror_flag=yes
5545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5546 /* end confdefs.h. */
5549 main ()
5553 return 0;
5555 _ACEOF
5556 if ac_fn_c_try_compile "$LINENO"; then :
5557 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5558 else
5559 pgac_cv_prog_CC_cflags__Wendif_labels=no
5561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5562 ac_c_werror_flag=$ac_save_c_werror_flag
5563 CFLAGS="$pgac_save_CFLAGS"
5564 CC="$pgac_save_CC"
5566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5567 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5568 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5569 CFLAGS="${CFLAGS} -Wendif-labels"
5573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5574 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5575 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5576 $as_echo_n "(cached) " >&6
5577 else
5578 pgac_save_CXXFLAGS=$CXXFLAGS
5579 pgac_save_CXX=$CXX
5580 CXX=${CXX}
5581 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5582 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5583 ac_cxx_werror_flag=yes
5584 ac_ext=cpp
5585 ac_cpp='$CXXCPP $CPPFLAGS'
5586 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5587 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5588 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5591 /* end confdefs.h. */
5594 main ()
5598 return 0;
5600 _ACEOF
5601 if ac_fn_cxx_try_compile "$LINENO"; then :
5602 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5603 else
5604 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5607 ac_ext=c
5608 ac_cpp='$CPP $CPPFLAGS'
5609 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5610 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5611 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5613 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5614 CXXFLAGS="$pgac_save_CXXFLAGS"
5615 CXX="$pgac_save_CXX"
5617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5618 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5619 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5620 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5626 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5627 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5628 $as_echo_n "(cached) " >&6
5629 else
5630 pgac_save_CFLAGS=$CFLAGS
5631 pgac_save_CC=$CC
5632 CC=${CC}
5633 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5634 ac_save_c_werror_flag=$ac_c_werror_flag
5635 ac_c_werror_flag=yes
5636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5637 /* end confdefs.h. */
5640 main ()
5644 return 0;
5646 _ACEOF
5647 if ac_fn_c_try_compile "$LINENO"; then :
5648 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5649 else
5650 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5652 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5653 ac_c_werror_flag=$ac_save_c_werror_flag
5654 CFLAGS="$pgac_save_CFLAGS"
5655 CC="$pgac_save_CC"
5657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5658 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5659 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5660 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5665 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5666 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5667 $as_echo_n "(cached) " >&6
5668 else
5669 pgac_save_CXXFLAGS=$CXXFLAGS
5670 pgac_save_CXX=$CXX
5671 CXX=${CXX}
5672 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5673 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5674 ac_cxx_werror_flag=yes
5675 ac_ext=cpp
5676 ac_cpp='$CXXCPP $CPPFLAGS'
5677 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5678 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5679 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5682 /* end confdefs.h. */
5685 main ()
5689 return 0;
5691 _ACEOF
5692 if ac_fn_cxx_try_compile "$LINENO"; then :
5693 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5694 else
5695 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5698 ac_ext=c
5699 ac_cpp='$CPP $CPPFLAGS'
5700 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5701 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5702 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5704 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5705 CXXFLAGS="$pgac_save_CXXFLAGS"
5706 CXX="$pgac_save_CXX"
5708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5709 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5710 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5711 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5717 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5718 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5719 $as_echo_n "(cached) " >&6
5720 else
5721 pgac_save_CFLAGS=$CFLAGS
5722 pgac_save_CC=$CC
5723 CC=${CC}
5724 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5725 ac_save_c_werror_flag=$ac_c_werror_flag
5726 ac_c_werror_flag=yes
5727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5728 /* end confdefs.h. */
5731 main ()
5735 return 0;
5737 _ACEOF
5738 if ac_fn_c_try_compile "$LINENO"; then :
5739 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5740 else
5741 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5743 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5744 ac_c_werror_flag=$ac_save_c_werror_flag
5745 CFLAGS="$pgac_save_CFLAGS"
5746 CC="$pgac_save_CC"
5748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5749 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5750 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5751 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5756 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5757 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5758 $as_echo_n "(cached) " >&6
5759 else
5760 pgac_save_CXXFLAGS=$CXXFLAGS
5761 pgac_save_CXX=$CXX
5762 CXX=${CXX}
5763 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5764 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5765 ac_cxx_werror_flag=yes
5766 ac_ext=cpp
5767 ac_cpp='$CXXCPP $CPPFLAGS'
5768 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5769 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5770 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5773 /* end confdefs.h. */
5776 main ()
5780 return 0;
5782 _ACEOF
5783 if ac_fn_cxx_try_compile "$LINENO"; then :
5784 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5785 else
5786 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5789 ac_ext=c
5790 ac_cpp='$CPP $CPPFLAGS'
5791 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5792 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5793 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5795 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5796 CXXFLAGS="$pgac_save_CXXFLAGS"
5797 CXX="$pgac_save_CXX"
5799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5800 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5801 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5802 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5808 $as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5809 if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5810 $as_echo_n "(cached) " >&6
5811 else
5812 pgac_save_CFLAGS=$CFLAGS
5813 pgac_save_CC=$CC
5814 CC=${CC}
5815 CFLAGS="${CFLAGS} -Wcast-function-type"
5816 ac_save_c_werror_flag=$ac_c_werror_flag
5817 ac_c_werror_flag=yes
5818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5819 /* end confdefs.h. */
5822 main ()
5826 return 0;
5828 _ACEOF
5829 if ac_fn_c_try_compile "$LINENO"; then :
5830 pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5831 else
5832 pgac_cv_prog_CC_cflags__Wcast_function_type=no
5834 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5835 ac_c_werror_flag=$ac_save_c_werror_flag
5836 CFLAGS="$pgac_save_CFLAGS"
5837 CC="$pgac_save_CC"
5839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5840 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5841 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5842 CFLAGS="${CFLAGS} -Wcast-function-type"
5846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5847 $as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5848 if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5849 $as_echo_n "(cached) " >&6
5850 else
5851 pgac_save_CXXFLAGS=$CXXFLAGS
5852 pgac_save_CXX=$CXX
5853 CXX=${CXX}
5854 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5855 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5856 ac_cxx_werror_flag=yes
5857 ac_ext=cpp
5858 ac_cpp='$CXXCPP $CPPFLAGS'
5859 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5860 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5861 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5864 /* end confdefs.h. */
5867 main ()
5871 return 0;
5873 _ACEOF
5874 if ac_fn_cxx_try_compile "$LINENO"; then :
5875 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5876 else
5877 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5879 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5880 ac_ext=c
5881 ac_cpp='$CPP $CPPFLAGS'
5882 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5883 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5884 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5886 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5887 CXXFLAGS="$pgac_save_CXXFLAGS"
5888 CXX="$pgac_save_CXX"
5890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5891 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5892 if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5893 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS" >&5
5899 $as_echo_n "checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS... " >&6; }
5900 if ${pgac_cv_prog_CC_cflags__Wshadow_compatible_local+:} false; then :
5901 $as_echo_n "(cached) " >&6
5902 else
5903 pgac_save_CFLAGS=$CFLAGS
5904 pgac_save_CC=$CC
5905 CC=${CC}
5906 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5907 ac_save_c_werror_flag=$ac_c_werror_flag
5908 ac_c_werror_flag=yes
5909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5910 /* end confdefs.h. */
5913 main ()
5917 return 0;
5919 _ACEOF
5920 if ac_fn_c_try_compile "$LINENO"; then :
5921 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=yes
5922 else
5923 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=no
5925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5926 ac_c_werror_flag=$ac_save_c_werror_flag
5927 CFLAGS="$pgac_save_CFLAGS"
5928 CC="$pgac_save_CC"
5930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&5
5931 $as_echo "$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&6; }
5932 if test x"$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" = x"yes"; then
5933 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS" >&5
5938 $as_echo_n "checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS... " >&6; }
5939 if ${pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local+:} false; then :
5940 $as_echo_n "(cached) " >&6
5941 else
5942 pgac_save_CXXFLAGS=$CXXFLAGS
5943 pgac_save_CXX=$CXX
5944 CXX=${CXX}
5945 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5946 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5947 ac_cxx_werror_flag=yes
5948 ac_ext=cpp
5949 ac_cpp='$CXXCPP $CPPFLAGS'
5950 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5951 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5952 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5955 /* end confdefs.h. */
5958 main ()
5962 return 0;
5964 _ACEOF
5965 if ac_fn_cxx_try_compile "$LINENO"; then :
5966 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=yes
5967 else
5968 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=no
5970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5971 ac_ext=c
5972 ac_cpp='$CPP $CPPFLAGS'
5973 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5974 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5975 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5977 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5978 CXXFLAGS="$pgac_save_CXXFLAGS"
5979 CXX="$pgac_save_CXX"
5981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&5
5982 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&6; }
5983 if test x"$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" = x"yes"; then
5984 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5988 # This was included in -Wall/-Wformat in older GCC versions
5990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5991 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5992 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5993 $as_echo_n "(cached) " >&6
5994 else
5995 pgac_save_CFLAGS=$CFLAGS
5996 pgac_save_CC=$CC
5997 CC=${CC}
5998 CFLAGS="${CFLAGS} -Wformat-security"
5999 ac_save_c_werror_flag=$ac_c_werror_flag
6000 ac_c_werror_flag=yes
6001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6002 /* end confdefs.h. */
6005 main ()
6009 return 0;
6011 _ACEOF
6012 if ac_fn_c_try_compile "$LINENO"; then :
6013 pgac_cv_prog_CC_cflags__Wformat_security=yes
6014 else
6015 pgac_cv_prog_CC_cflags__Wformat_security=no
6017 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6018 ac_c_werror_flag=$ac_save_c_werror_flag
6019 CFLAGS="$pgac_save_CFLAGS"
6020 CC="$pgac_save_CC"
6022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
6023 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
6024 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
6025 CFLAGS="${CFLAGS} -Wformat-security"
6029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
6030 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
6031 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
6032 $as_echo_n "(cached) " >&6
6033 else
6034 pgac_save_CXXFLAGS=$CXXFLAGS
6035 pgac_save_CXX=$CXX
6036 CXX=${CXX}
6037 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6038 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6039 ac_cxx_werror_flag=yes
6040 ac_ext=cpp
6041 ac_cpp='$CXXCPP $CPPFLAGS'
6042 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6043 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6044 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6047 /* end confdefs.h. */
6050 main ()
6054 return 0;
6056 _ACEOF
6057 if ac_fn_cxx_try_compile "$LINENO"; then :
6058 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
6059 else
6060 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
6062 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6063 ac_ext=c
6064 ac_cpp='$CPP $CPPFLAGS'
6065 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6066 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6067 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6069 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6070 CXXFLAGS="$pgac_save_CXXFLAGS"
6071 CXX="$pgac_save_CXX"
6073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
6074 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
6075 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
6076 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6080 # Disable strict-aliasing rules; needed for gcc 3.3+
6082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6083 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6084 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6085 $as_echo_n "(cached) " >&6
6086 else
6087 pgac_save_CFLAGS=$CFLAGS
6088 pgac_save_CC=$CC
6089 CC=${CC}
6090 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6091 ac_save_c_werror_flag=$ac_c_werror_flag
6092 ac_c_werror_flag=yes
6093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6094 /* end confdefs.h. */
6097 main ()
6101 return 0;
6103 _ACEOF
6104 if ac_fn_c_try_compile "$LINENO"; then :
6105 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6106 else
6107 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6109 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6110 ac_c_werror_flag=$ac_save_c_werror_flag
6111 CFLAGS="$pgac_save_CFLAGS"
6112 CC="$pgac_save_CC"
6114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6115 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6116 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6117 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6122 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6123 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6124 $as_echo_n "(cached) " >&6
6125 else
6126 pgac_save_CXXFLAGS=$CXXFLAGS
6127 pgac_save_CXX=$CXX
6128 CXX=${CXX}
6129 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6130 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6131 ac_cxx_werror_flag=yes
6132 ac_ext=cpp
6133 ac_cpp='$CXXCPP $CPPFLAGS'
6134 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6135 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6136 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6139 /* end confdefs.h. */
6142 main ()
6146 return 0;
6148 _ACEOF
6149 if ac_fn_cxx_try_compile "$LINENO"; then :
6150 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6151 else
6152 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6154 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6155 ac_ext=c
6156 ac_cpp='$CPP $CPPFLAGS'
6157 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6158 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6159 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6161 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6162 CXXFLAGS="$pgac_save_CXXFLAGS"
6163 CXX="$pgac_save_CXX"
6165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6166 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6167 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6168 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6172 # Disable optimizations that assume no overflow; needed for gcc 4.3+
6174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
6175 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
6176 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
6177 $as_echo_n "(cached) " >&6
6178 else
6179 pgac_save_CFLAGS=$CFLAGS
6180 pgac_save_CC=$CC
6181 CC=${CC}
6182 CFLAGS="${CFLAGS} -fwrapv"
6183 ac_save_c_werror_flag=$ac_c_werror_flag
6184 ac_c_werror_flag=yes
6185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6186 /* end confdefs.h. */
6189 main ()
6193 return 0;
6195 _ACEOF
6196 if ac_fn_c_try_compile "$LINENO"; then :
6197 pgac_cv_prog_CC_cflags__fwrapv=yes
6198 else
6199 pgac_cv_prog_CC_cflags__fwrapv=no
6201 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6202 ac_c_werror_flag=$ac_save_c_werror_flag
6203 CFLAGS="$pgac_save_CFLAGS"
6204 CC="$pgac_save_CC"
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
6207 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
6208 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
6209 CFLAGS="${CFLAGS} -fwrapv"
6213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
6214 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
6215 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
6216 $as_echo_n "(cached) " >&6
6217 else
6218 pgac_save_CXXFLAGS=$CXXFLAGS
6219 pgac_save_CXX=$CXX
6220 CXX=${CXX}
6221 CXXFLAGS="${CXXFLAGS} -fwrapv"
6222 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6223 ac_cxx_werror_flag=yes
6224 ac_ext=cpp
6225 ac_cpp='$CXXCPP $CPPFLAGS'
6226 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6227 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6228 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6231 /* end confdefs.h. */
6234 main ()
6238 return 0;
6240 _ACEOF
6241 if ac_fn_cxx_try_compile "$LINENO"; then :
6242 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6243 else
6244 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6246 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6247 ac_ext=c
6248 ac_cpp='$CPP $CPPFLAGS'
6249 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6250 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6251 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6253 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6254 CXXFLAGS="$pgac_save_CXXFLAGS"
6255 CXX="$pgac_save_CXX"
6257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6258 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6259 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6260 CXXFLAGS="${CXXFLAGS} -fwrapv"
6264 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6267 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6268 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6269 $as_echo_n "(cached) " >&6
6270 else
6271 pgac_save_CFLAGS=$CFLAGS
6272 pgac_save_CC=$CC
6273 CC=${CC}
6274 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6275 ac_save_c_werror_flag=$ac_c_werror_flag
6276 ac_c_werror_flag=yes
6277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6278 /* end confdefs.h. */
6281 main ()
6285 return 0;
6287 _ACEOF
6288 if ac_fn_c_try_compile "$LINENO"; then :
6289 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6290 else
6291 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6294 ac_c_werror_flag=$ac_save_c_werror_flag
6295 CFLAGS="$pgac_save_CFLAGS"
6296 CC="$pgac_save_CC"
6298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6299 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6300 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6301 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6306 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6307 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6308 $as_echo_n "(cached) " >&6
6309 else
6310 pgac_save_CXXFLAGS=$CXXFLAGS
6311 pgac_save_CXX=$CXX
6312 CXX=${CXX}
6313 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6314 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6315 ac_cxx_werror_flag=yes
6316 ac_ext=cpp
6317 ac_cpp='$CXXCPP $CPPFLAGS'
6318 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6319 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6320 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6323 /* end confdefs.h. */
6326 main ()
6330 return 0;
6332 _ACEOF
6333 if ac_fn_cxx_try_compile "$LINENO"; then :
6334 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6335 else
6336 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6339 ac_ext=c
6340 ac_cpp='$CPP $CPPFLAGS'
6341 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6342 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6343 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6345 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6346 CXXFLAGS="$pgac_save_CXXFLAGS"
6347 CXX="$pgac_save_CXX"
6349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6350 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6351 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6352 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6356 # Optimization flags for specific files that benefit from loop unrolling
6357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6358 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6359 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6360 $as_echo_n "(cached) " >&6
6361 else
6362 pgac_save_CFLAGS=$CFLAGS
6363 pgac_save_CC=$CC
6364 CC=${CC}
6365 CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6366 ac_save_c_werror_flag=$ac_c_werror_flag
6367 ac_c_werror_flag=yes
6368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6369 /* end confdefs.h. */
6372 main ()
6376 return 0;
6378 _ACEOF
6379 if ac_fn_c_try_compile "$LINENO"; then :
6380 pgac_cv_prog_CC_cflags__funroll_loops=yes
6381 else
6382 pgac_cv_prog_CC_cflags__funroll_loops=no
6384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6385 ac_c_werror_flag=$ac_save_c_werror_flag
6386 CFLAGS="$pgac_save_CFLAGS"
6387 CC="$pgac_save_CC"
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6390 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6391 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6392 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6396 # Optimization flags for specific files that benefit from vectorization
6397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6398 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6399 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6400 $as_echo_n "(cached) " >&6
6401 else
6402 pgac_save_CFLAGS=$CFLAGS
6403 pgac_save_CC=$CC
6404 CC=${CC}
6405 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6406 ac_save_c_werror_flag=$ac_c_werror_flag
6407 ac_c_werror_flag=yes
6408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6409 /* end confdefs.h. */
6412 main ()
6416 return 0;
6418 _ACEOF
6419 if ac_fn_c_try_compile "$LINENO"; then :
6420 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6421 else
6422 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6425 ac_c_werror_flag=$ac_save_c_werror_flag
6426 CFLAGS="$pgac_save_CFLAGS"
6427 CC="$pgac_save_CC"
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6430 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6431 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6432 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6437 # The following tests want to suppress various unhelpful warnings by adding
6438 # -Wno-foo switches. But gcc won't complain about unrecognized -Wno-foo
6439 # switches, so we have to test for the positive form and if that works,
6440 # add the negative form. Note that tests of this form typically need to
6441 # be duplicated in the BITCODE_CFLAGS setup stanza below.
6443 # Suppress clang's unhelpful unused-command-line-argument warnings.
6444 NOT_THE_CFLAGS=""
6445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6446 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6447 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6448 $as_echo_n "(cached) " >&6
6449 else
6450 pgac_save_CFLAGS=$CFLAGS
6451 pgac_save_CC=$CC
6452 CC=${CC}
6453 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6454 ac_save_c_werror_flag=$ac_c_werror_flag
6455 ac_c_werror_flag=yes
6456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6457 /* end confdefs.h. */
6460 main ()
6464 return 0;
6466 _ACEOF
6467 if ac_fn_c_try_compile "$LINENO"; then :
6468 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6469 else
6470 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6473 ac_c_werror_flag=$ac_save_c_werror_flag
6474 CFLAGS="$pgac_save_CFLAGS"
6475 CC="$pgac_save_CC"
6477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6478 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6479 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6480 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6484 if test -n "$NOT_THE_CFLAGS"; then
6485 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6487 # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
6488 # of warnings when building plperl because of usages in the Perl headers.
6489 NOT_THE_CFLAGS=""
6490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
6491 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
6492 if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then :
6493 $as_echo_n "(cached) " >&6
6494 else
6495 pgac_save_CFLAGS=$CFLAGS
6496 pgac_save_CC=$CC
6497 CC=${CC}
6498 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6499 ac_save_c_werror_flag=$ac_c_werror_flag
6500 ac_c_werror_flag=yes
6501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6502 /* end confdefs.h. */
6505 main ()
6509 return 0;
6511 _ACEOF
6512 if ac_fn_c_try_compile "$LINENO"; then :
6513 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes
6514 else
6515 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no
6517 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6518 ac_c_werror_flag=$ac_save_c_werror_flag
6519 CFLAGS="$pgac_save_CFLAGS"
6520 CC="$pgac_save_CC"
6522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5
6523 $as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; }
6524 if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then
6525 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6529 if test -n "$NOT_THE_CFLAGS"; then
6530 CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
6532 # Similarly disable useless truncation warnings from gcc 8+
6533 NOT_THE_CFLAGS=""
6534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6535 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6536 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6537 $as_echo_n "(cached) " >&6
6538 else
6539 pgac_save_CFLAGS=$CFLAGS
6540 pgac_save_CC=$CC
6541 CC=${CC}
6542 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6543 ac_save_c_werror_flag=$ac_c_werror_flag
6544 ac_c_werror_flag=yes
6545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6546 /* end confdefs.h. */
6549 main ()
6553 return 0;
6555 _ACEOF
6556 if ac_fn_c_try_compile "$LINENO"; then :
6557 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6558 else
6559 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6562 ac_c_werror_flag=$ac_save_c_werror_flag
6563 CFLAGS="$pgac_save_CFLAGS"
6564 CC="$pgac_save_CC"
6566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6567 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6568 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6569 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6573 if test -n "$NOT_THE_CFLAGS"; then
6574 CFLAGS="$CFLAGS -Wno-format-truncation"
6576 NOT_THE_CFLAGS=""
6577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6578 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6579 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6580 $as_echo_n "(cached) " >&6
6581 else
6582 pgac_save_CFLAGS=$CFLAGS
6583 pgac_save_CC=$CC
6584 CC=${CC}
6585 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6586 ac_save_c_werror_flag=$ac_c_werror_flag
6587 ac_c_werror_flag=yes
6588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6589 /* end confdefs.h. */
6592 main ()
6596 return 0;
6598 _ACEOF
6599 if ac_fn_c_try_compile "$LINENO"; then :
6600 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6601 else
6602 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6604 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6605 ac_c_werror_flag=$ac_save_c_werror_flag
6606 CFLAGS="$pgac_save_CFLAGS"
6607 CC="$pgac_save_CC"
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6610 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6611 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6612 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6616 if test -n "$NOT_THE_CFLAGS"; then
6617 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6619 # Suppress clang 16's strict warnings about function casts
6620 NOT_THE_CFLAGS=""
6621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS" >&5
6622 $as_echo_n "checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS... " >&6; }
6623 if ${pgac_cv_prog_CC_cflags__Wcast_function_type_strict+:} false; then :
6624 $as_echo_n "(cached) " >&6
6625 else
6626 pgac_save_CFLAGS=$CFLAGS
6627 pgac_save_CC=$CC
6628 CC=${CC}
6629 CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6630 ac_save_c_werror_flag=$ac_c_werror_flag
6631 ac_c_werror_flag=yes
6632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6633 /* end confdefs.h. */
6636 main ()
6640 return 0;
6642 _ACEOF
6643 if ac_fn_c_try_compile "$LINENO"; then :
6644 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=yes
6645 else
6646 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=no
6648 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6649 ac_c_werror_flag=$ac_save_c_werror_flag
6650 CFLAGS="$pgac_save_CFLAGS"
6651 CC="$pgac_save_CC"
6653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&5
6654 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&6; }
6655 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" = x"yes"; then
6656 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6660 if test -n "$NOT_THE_CFLAGS"; then
6661 CFLAGS="$CFLAGS -Wno-cast-function-type-strict"
6663 elif test "$ICC" = yes; then
6664 # Intel's compiler has a bug/misoptimization in checking for
6665 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6668 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6669 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6670 $as_echo_n "(cached) " >&6
6671 else
6672 pgac_save_CFLAGS=$CFLAGS
6673 pgac_save_CC=$CC
6674 CC=${CC}
6675 CFLAGS="${CFLAGS} -mp1"
6676 ac_save_c_werror_flag=$ac_c_werror_flag
6677 ac_c_werror_flag=yes
6678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6679 /* end confdefs.h. */
6682 main ()
6686 return 0;
6688 _ACEOF
6689 if ac_fn_c_try_compile "$LINENO"; then :
6690 pgac_cv_prog_CC_cflags__mp1=yes
6691 else
6692 pgac_cv_prog_CC_cflags__mp1=no
6694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6695 ac_c_werror_flag=$ac_save_c_werror_flag
6696 CFLAGS="$pgac_save_CFLAGS"
6697 CC="$pgac_save_CC"
6699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6700 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6701 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6702 CFLAGS="${CFLAGS} -mp1"
6706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6707 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6708 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6709 $as_echo_n "(cached) " >&6
6710 else
6711 pgac_save_CXXFLAGS=$CXXFLAGS
6712 pgac_save_CXX=$CXX
6713 CXX=${CXX}
6714 CXXFLAGS="${CXXFLAGS} -mp1"
6715 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6716 ac_cxx_werror_flag=yes
6717 ac_ext=cpp
6718 ac_cpp='$CXXCPP $CPPFLAGS'
6719 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6720 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6721 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6724 /* end confdefs.h. */
6727 main ()
6731 return 0;
6733 _ACEOF
6734 if ac_fn_cxx_try_compile "$LINENO"; then :
6735 pgac_cv_prog_CXX_cxxflags__mp1=yes
6736 else
6737 pgac_cv_prog_CXX_cxxflags__mp1=no
6739 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6740 ac_ext=c
6741 ac_cpp='$CPP $CPPFLAGS'
6742 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6743 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6744 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6746 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6747 CXXFLAGS="$pgac_save_CXXFLAGS"
6748 CXX="$pgac_save_CXX"
6750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6751 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6752 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6753 CXXFLAGS="${CXXFLAGS} -mp1"
6757 # Make sure strict aliasing is off (though this is said to be the default)
6759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6760 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6761 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6762 $as_echo_n "(cached) " >&6
6763 else
6764 pgac_save_CFLAGS=$CFLAGS
6765 pgac_save_CC=$CC
6766 CC=${CC}
6767 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6768 ac_save_c_werror_flag=$ac_c_werror_flag
6769 ac_c_werror_flag=yes
6770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6771 /* end confdefs.h. */
6774 main ()
6778 return 0;
6780 _ACEOF
6781 if ac_fn_c_try_compile "$LINENO"; then :
6782 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6783 else
6784 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6787 ac_c_werror_flag=$ac_save_c_werror_flag
6788 CFLAGS="$pgac_save_CFLAGS"
6789 CC="$pgac_save_CC"
6791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6792 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6793 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6794 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6799 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6800 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6801 $as_echo_n "(cached) " >&6
6802 else
6803 pgac_save_CXXFLAGS=$CXXFLAGS
6804 pgac_save_CXX=$CXX
6805 CXX=${CXX}
6806 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6807 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6808 ac_cxx_werror_flag=yes
6809 ac_ext=cpp
6810 ac_cpp='$CXXCPP $CPPFLAGS'
6811 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6812 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6813 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6816 /* end confdefs.h. */
6819 main ()
6823 return 0;
6825 _ACEOF
6826 if ac_fn_cxx_try_compile "$LINENO"; then :
6827 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6828 else
6829 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6831 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6832 ac_ext=c
6833 ac_cpp='$CPP $CPPFLAGS'
6834 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6835 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6836 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6838 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6839 CXXFLAGS="$pgac_save_CXXFLAGS"
6840 CXX="$pgac_save_CXX"
6842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6843 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6844 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6845 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6851 # If the compiler knows how to hide symbols, add the switch needed for that to
6852 # CFLAGS_SL_MODULE and define HAVE_VISIBILITY_ATTRIBUTE.
6854 # This is done separately from the above because -fvisibility is supported by
6855 # quite a few different compilers, making the required repetition bothersome.
6857 # We might need to add a separate test to check if
6858 # __attribute__((visibility("hidden"))) is supported, if we encounter a
6859 # compiler that supports one of the supported variants of -fvisibility=hidden
6860 # but uses a different syntax to mark a symbol as exported.
6861 if test "$GCC" = yes -o "$SUN_STUDIO_CC" = yes ; then
6862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE" >&5
6863 $as_echo_n "checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
6864 if ${pgac_cv_prog_CC_cflags__fvisibility_hidden+:} false; then :
6865 $as_echo_n "(cached) " >&6
6866 else
6867 pgac_save_CFLAGS=$CFLAGS
6868 pgac_save_CC=$CC
6869 CC=${CC}
6870 CFLAGS="${CFLAGS_SL_MODULE} -fvisibility=hidden"
6871 ac_save_c_werror_flag=$ac_c_werror_flag
6872 ac_c_werror_flag=yes
6873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6874 /* end confdefs.h. */
6877 main ()
6881 return 0;
6883 _ACEOF
6884 if ac_fn_c_try_compile "$LINENO"; then :
6885 pgac_cv_prog_CC_cflags__fvisibility_hidden=yes
6886 else
6887 pgac_cv_prog_CC_cflags__fvisibility_hidden=no
6889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6890 ac_c_werror_flag=$ac_save_c_werror_flag
6891 CFLAGS="$pgac_save_CFLAGS"
6892 CC="$pgac_save_CC"
6894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fvisibility_hidden" >&5
6895 $as_echo "$pgac_cv_prog_CC_cflags__fvisibility_hidden" >&6; }
6896 if test x"$pgac_cv_prog_CC_cflags__fvisibility_hidden" = x"yes"; then
6897 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -fvisibility=hidden"
6901 # For C++ we additionally want -fvisibility-inlines-hidden
6902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
6903 $as_echo_n "checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
6904 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_hidden+:} false; then :
6905 $as_echo_n "(cached) " >&6
6906 else
6907 pgac_save_CXXFLAGS=$CXXFLAGS
6908 pgac_save_CXX=$CXX
6909 CXX=${CXX}
6910 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
6911 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6912 ac_cxx_werror_flag=yes
6913 ac_ext=cpp
6914 ac_cpp='$CXXCPP $CPPFLAGS'
6915 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6916 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6917 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6920 /* end confdefs.h. */
6923 main ()
6927 return 0;
6929 _ACEOF
6930 if ac_fn_cxx_try_compile "$LINENO"; then :
6931 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=yes
6932 else
6933 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=no
6935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6936 ac_ext=c
6937 ac_cpp='$CPP $CPPFLAGS'
6938 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6939 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6940 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6942 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6943 CXXFLAGS="$pgac_save_CXXFLAGS"
6944 CXX="$pgac_save_CXX"
6946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&5
6947 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&6; }
6948 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" = x"yes"; then
6949 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
6952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE" >&5
6953 $as_echo_n "checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE... " >&6; }
6954 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden+:} false; then :
6955 $as_echo_n "(cached) " >&6
6956 else
6957 pgac_save_CXXFLAGS=$CXXFLAGS
6958 pgac_save_CXX=$CXX
6959 CXX=${CXX}
6960 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
6961 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6962 ac_cxx_werror_flag=yes
6963 ac_ext=cpp
6964 ac_cpp='$CXXCPP $CPPFLAGS'
6965 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6966 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6967 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6970 /* end confdefs.h. */
6973 main ()
6977 return 0;
6979 _ACEOF
6980 if ac_fn_cxx_try_compile "$LINENO"; then :
6981 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=yes
6982 else
6983 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=no
6985 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6986 ac_ext=c
6987 ac_cpp='$CPP $CPPFLAGS'
6988 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6989 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6990 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6992 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6993 CXXFLAGS="$pgac_save_CXXFLAGS"
6994 CXX="$pgac_save_CXX"
6996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&5
6997 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&6; }
6998 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" = x"yes"; then
6999 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
7002 have_visibility_attribute=$pgac_cv_prog_CC_cflags__fvisibility_hidden
7005 if test "$have_visibility_attribute" = "yes"; then
7007 $as_echo "#define HAVE_VISIBILITY_ATTRIBUTE 1" >>confdefs.h
7016 # Determine flags used to emit bitcode for JIT inlining.
7017 # 1. We must duplicate any behaviour-changing compiler flags used above,
7018 # to keep compatibility with the compiler used for normal Postgres code.
7019 # 2. We don't bother to duplicate extra-warnings switches --- seeing a
7020 # warning in the main build is enough.
7021 # 3. But we must duplicate -Wno-warning flags, else we'll see those anyway.
7022 if test "$with_llvm" = yes ; then
7023 CLANGXX="$CLANG -xc++"
7025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
7026 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
7027 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
7028 $as_echo_n "(cached) " >&6
7029 else
7030 pgac_save_CFLAGS=$CFLAGS
7031 pgac_save_CC=$CC
7032 CC=${CLANG}
7033 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7034 ac_save_c_werror_flag=$ac_c_werror_flag
7035 ac_c_werror_flag=yes
7036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7037 /* end confdefs.h. */
7040 main ()
7044 return 0;
7046 _ACEOF
7047 if ac_fn_c_try_compile "$LINENO"; then :
7048 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
7049 else
7050 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
7052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7053 ac_c_werror_flag=$ac_save_c_werror_flag
7054 CFLAGS="$pgac_save_CFLAGS"
7055 CC="$pgac_save_CC"
7057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
7058 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
7059 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
7060 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
7064 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
7065 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
7066 $as_echo_n "(cached) " >&6
7067 else
7068 pgac_save_CXXFLAGS=$CXXFLAGS
7069 pgac_save_CXX=$CXX
7070 CXX=${CLANGXX}
7071 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7072 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7073 ac_cxx_werror_flag=yes
7074 ac_ext=cpp
7075 ac_cpp='$CXXCPP $CPPFLAGS'
7076 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7077 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7078 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7081 /* end confdefs.h. */
7084 main ()
7088 return 0;
7090 _ACEOF
7091 if ac_fn_cxx_try_compile "$LINENO"; then :
7092 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
7093 else
7094 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
7096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7097 ac_ext=c
7098 ac_cpp='$CPP $CPPFLAGS'
7099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7103 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7104 CXXFLAGS="$pgac_save_CXXFLAGS"
7105 CXX="$pgac_save_CXX"
7107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
7108 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
7109 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
7110 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
7114 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
7115 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
7116 $as_echo_n "(cached) " >&6
7117 else
7118 pgac_save_CFLAGS=$CFLAGS
7119 pgac_save_CC=$CC
7120 CC=${CLANG}
7121 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7122 ac_save_c_werror_flag=$ac_c_werror_flag
7123 ac_c_werror_flag=yes
7124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7125 /* end confdefs.h. */
7128 main ()
7132 return 0;
7134 _ACEOF
7135 if ac_fn_c_try_compile "$LINENO"; then :
7136 pgac_cv_prog_CLANG_cflags__fwrapv=yes
7137 else
7138 pgac_cv_prog_CLANG_cflags__fwrapv=no
7140 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7141 ac_c_werror_flag=$ac_save_c_werror_flag
7142 CFLAGS="$pgac_save_CFLAGS"
7143 CC="$pgac_save_CC"
7145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
7146 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
7147 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
7148 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
7152 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
7153 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
7154 $as_echo_n "(cached) " >&6
7155 else
7156 pgac_save_CXXFLAGS=$CXXFLAGS
7157 pgac_save_CXX=$CXX
7158 CXX=${CLANGXX}
7159 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7160 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7161 ac_cxx_werror_flag=yes
7162 ac_ext=cpp
7163 ac_cpp='$CXXCPP $CPPFLAGS'
7164 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7165 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7166 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7169 /* end confdefs.h. */
7172 main ()
7176 return 0;
7178 _ACEOF
7179 if ac_fn_cxx_try_compile "$LINENO"; then :
7180 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
7181 else
7182 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
7184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7185 ac_ext=c
7186 ac_cpp='$CPP $CPPFLAGS'
7187 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7188 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7189 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7191 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7192 CXXFLAGS="$pgac_save_CXXFLAGS"
7193 CXX="$pgac_save_CXX"
7195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
7196 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
7197 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
7198 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
7202 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
7203 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
7204 $as_echo_n "(cached) " >&6
7205 else
7206 pgac_save_CFLAGS=$CFLAGS
7207 pgac_save_CC=$CC
7208 CC=${CLANG}
7209 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7210 ac_save_c_werror_flag=$ac_c_werror_flag
7211 ac_c_werror_flag=yes
7212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7213 /* end confdefs.h. */
7216 main ()
7220 return 0;
7222 _ACEOF
7223 if ac_fn_c_try_compile "$LINENO"; then :
7224 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7225 else
7226 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7228 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7229 ac_c_werror_flag=$ac_save_c_werror_flag
7230 CFLAGS="$pgac_save_CFLAGS"
7231 CC="$pgac_save_CC"
7233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7234 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7235 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7236 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7240 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7241 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7242 $as_echo_n "(cached) " >&6
7243 else
7244 pgac_save_CXXFLAGS=$CXXFLAGS
7245 pgac_save_CXX=$CXX
7246 CXX=${CLANGXX}
7247 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7248 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7249 ac_cxx_werror_flag=yes
7250 ac_ext=cpp
7251 ac_cpp='$CXXCPP $CPPFLAGS'
7252 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7253 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7254 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7257 /* end confdefs.h. */
7260 main ()
7264 return 0;
7266 _ACEOF
7267 if ac_fn_cxx_try_compile "$LINENO"; then :
7268 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7269 else
7270 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7272 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7273 ac_ext=c
7274 ac_cpp='$CPP $CPPFLAGS'
7275 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7276 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7277 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7279 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7280 CXXFLAGS="$pgac_save_CXXFLAGS"
7281 CXX="$pgac_save_CXX"
7283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7284 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7285 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7286 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS" >&5
7291 $as_echo_n "checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS... " >&6; }
7292 if ${pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers+:} false; then :
7293 $as_echo_n "(cached) " >&6
7294 else
7295 pgac_save_CFLAGS=$CFLAGS
7296 pgac_save_CC=$CC
7297 CC=${CLANG}
7298 CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7299 ac_save_c_werror_flag=$ac_c_werror_flag
7300 ac_c_werror_flag=yes
7301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7302 /* end confdefs.h. */
7305 main ()
7309 return 0;
7311 _ACEOF
7312 if ac_fn_c_try_compile "$LINENO"; then :
7313 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=yes
7314 else
7315 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=no
7317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7318 ac_c_werror_flag=$ac_save_c_werror_flag
7319 CFLAGS="$pgac_save_CFLAGS"
7320 CC="$pgac_save_CC"
7322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&5
7323 $as_echo "$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&6; }
7324 if test x"$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" = x"yes"; then
7325 BITCODE_CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS" >&5
7329 $as_echo_n "checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS... " >&6; }
7330 if ${pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers+:} false; then :
7331 $as_echo_n "(cached) " >&6
7332 else
7333 pgac_save_CXXFLAGS=$CXXFLAGS
7334 pgac_save_CXX=$CXX
7335 CXX=${CLANGXX}
7336 CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7337 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7338 ac_cxx_werror_flag=yes
7339 ac_ext=cpp
7340 ac_cpp='$CXXCPP $CPPFLAGS'
7341 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7342 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7343 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7346 /* end confdefs.h. */
7349 main ()
7353 return 0;
7355 _ACEOF
7356 if ac_fn_cxx_try_compile "$LINENO"; then :
7357 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=yes
7358 else
7359 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=no
7361 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7362 ac_ext=c
7363 ac_cpp='$CPP $CPPFLAGS'
7364 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7365 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7366 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7368 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7369 CXXFLAGS="$pgac_save_CXXFLAGS"
7370 CXX="$pgac_save_CXX"
7372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&5
7373 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&6; }
7374 if test x"$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" = x"yes"; then
7375 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7379 NOT_THE_CFLAGS=""
7380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
7381 $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
7382 if ${pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument+:} false; then :
7383 $as_echo_n "(cached) " >&6
7384 else
7385 pgac_save_CFLAGS=$CFLAGS
7386 pgac_save_CC=$CC
7387 CC=${CLANG}
7388 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7389 ac_save_c_werror_flag=$ac_c_werror_flag
7390 ac_c_werror_flag=yes
7391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7392 /* end confdefs.h. */
7395 main ()
7399 return 0;
7401 _ACEOF
7402 if ac_fn_c_try_compile "$LINENO"; then :
7403 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=yes
7404 else
7405 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=no
7407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7408 ac_c_werror_flag=$ac_save_c_werror_flag
7409 CFLAGS="$pgac_save_CFLAGS"
7410 CC="$pgac_save_CC"
7412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&5
7413 $as_echo "$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&6; }
7414 if test x"$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" = x"yes"; then
7415 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7418 if test -n "$NOT_THE_CFLAGS"; then
7419 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-unused-command-line-argument"
7421 NOT_THE_CFLAGS=""
7422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
7423 $as_echo_n "checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
7424 if ${pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro+:} false; then :
7425 $as_echo_n "(cached) " >&6
7426 else
7427 pgac_save_CFLAGS=$CFLAGS
7428 pgac_save_CC=$CC
7429 CC=${CLANG}
7430 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7431 ac_save_c_werror_flag=$ac_c_werror_flag
7432 ac_c_werror_flag=yes
7433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7434 /* end confdefs.h. */
7437 main ()
7441 return 0;
7443 _ACEOF
7444 if ac_fn_c_try_compile "$LINENO"; then :
7445 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=yes
7446 else
7447 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=no
7449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7450 ac_c_werror_flag=$ac_save_c_werror_flag
7451 CFLAGS="$pgac_save_CFLAGS"
7452 CC="$pgac_save_CC"
7454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&5
7455 $as_echo "$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&6; }
7456 if test x"$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" = x"yes"; then
7457 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7460 if test -n "$NOT_THE_CFLAGS"; then
7461 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
7463 NOT_THE_CFLAGS=""
7464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
7465 $as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
7466 if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :
7467 $as_echo_n "(cached) " >&6
7468 else
7469 pgac_save_CFLAGS=$CFLAGS
7470 pgac_save_CC=$CC
7471 CC=${CLANG}
7472 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7473 ac_save_c_werror_flag=$ac_c_werror_flag
7474 ac_c_werror_flag=yes
7475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7476 /* end confdefs.h. */
7479 main ()
7483 return 0;
7485 _ACEOF
7486 if ac_fn_c_try_compile "$LINENO"; then :
7487 pgac_cv_prog_CLANG_cflags__Wformat_truncation=yes
7488 else
7489 pgac_cv_prog_CLANG_cflags__Wformat_truncation=no
7491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7492 ac_c_werror_flag=$ac_save_c_werror_flag
7493 CFLAGS="$pgac_save_CFLAGS"
7494 CC="$pgac_save_CC"
7496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&5
7497 $as_echo "$pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&6; }
7498 if test x"$pgac_cv_prog_CLANG_cflags__Wformat_truncation" = x"yes"; then
7499 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7502 if test -n "$NOT_THE_CFLAGS"; then
7503 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"
7505 NOT_THE_CFLAGS=""
7506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
7507 $as_echo_n "checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
7508 if ${pgac_cv_prog_CLANG_cflags__Wstringop_truncation+:} false; then :
7509 $as_echo_n "(cached) " >&6
7510 else
7511 pgac_save_CFLAGS=$CFLAGS
7512 pgac_save_CC=$CC
7513 CC=${CLANG}
7514 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7515 ac_save_c_werror_flag=$ac_c_werror_flag
7516 ac_c_werror_flag=yes
7517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7518 /* end confdefs.h. */
7521 main ()
7525 return 0;
7527 _ACEOF
7528 if ac_fn_c_try_compile "$LINENO"; then :
7529 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=yes
7530 else
7531 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=no
7533 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7534 ac_c_werror_flag=$ac_save_c_werror_flag
7535 CFLAGS="$pgac_save_CFLAGS"
7536 CC="$pgac_save_CC"
7538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&5
7539 $as_echo "$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&6; }
7540 if test x"$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" = x"yes"; then
7541 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7544 if test -n "$NOT_THE_CFLAGS"; then
7545 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-stringop-truncation"
7549 # supply -g if --enable-debug
7550 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7551 CFLAGS="$CFLAGS -g"
7554 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7555 CXXFLAGS="$CXXFLAGS -g"
7558 # enable code coverage if --enable-coverage
7559 if test "$enable_coverage" = yes; then
7560 if test "$GCC" = yes; then
7561 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7562 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7563 else
7564 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7568 # enable profiling if --enable-profiling
7569 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7570 if test "$GCC" = yes; then
7572 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7574 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7575 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7576 else
7577 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7581 # On Solaris, we need this #define to get POSIX-conforming versions
7582 # of many interfaces (sigwait, getpwuid_r, ...).
7583 if test "$PORTNAME" = "solaris"; then
7584 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
7587 # We already have this in Makefile.win32, but configure needs it too
7588 if test "$PORTNAME" = "win32"; then
7589 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7592 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7593 # user-specified flags (if any) at the end. This lets users override
7594 # the automatic additions.
7595 CFLAGS="$CFLAGS $user_CFLAGS"
7596 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7597 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7598 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7603 # The template file must set up CFLAGS_SL; we don't support user override
7606 # Check if the compiler still works with the final flag settings
7607 # (note, we're not checking that for CXX, which is optional)
7608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7609 $as_echo_n "checking whether the C compiler still works... " >&6; }
7610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7611 /* end confdefs.h. */
7614 main ()
7616 return 0;
7618 return 0;
7620 _ACEOF
7621 if ac_fn_c_try_link "$LINENO"; then :
7622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7623 $as_echo "yes" >&6; }
7624 else
7625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7626 $as_echo "no" >&6; }
7627 as_fn_error $? "cannot proceed" "$LINENO" 5
7629 rm -f core conftest.err conftest.$ac_objext \
7630 conftest$ac_exeext conftest.$ac_ext
7632 # Defend against gcc -ffast-math
7633 if test "$GCC" = yes; then
7634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7635 /* end confdefs.h. */
7638 main ()
7640 #ifdef __FAST_MATH__
7641 choke me
7642 #endif
7644 return 0;
7646 _ACEOF
7647 if ac_fn_c_try_compile "$LINENO"; then :
7649 else
7650 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7652 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7655 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7656 # versions of clang do not understand -fexcess-precision=standard, the use of
7657 # x87 floating point operations leads to problems like isinf possibly returning
7658 # false for a value that is infinite when converted from the 80bit register to
7659 # the 8byte memory representation.
7661 # Only perform the test if the compiler doesn't understand
7662 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7663 # automatically.
7664 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7666 /* end confdefs.h. */
7669 main ()
7672 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7673 choke me
7674 #endif
7677 return 0;
7679 _ACEOF
7680 if ac_fn_c_try_compile "$LINENO"; then :
7682 else
7683 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7688 ac_ext=c
7689 ac_cpp='$CPP $CPPFLAGS'
7690 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7691 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7692 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7694 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7695 # On Suns, sometimes $CPP names a directory.
7696 if test -n "$CPP" && test -d "$CPP"; then
7697 CPP=
7699 if test -z "$CPP"; then
7700 if ${ac_cv_prog_CPP+:} false; then :
7701 $as_echo_n "(cached) " >&6
7702 else
7703 # Double quotes because CPP needs to be expanded
7704 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7706 ac_preproc_ok=false
7707 for ac_c_preproc_warn_flag in '' yes
7709 # Use a header file that comes with gcc, so configuring glibc
7710 # with a fresh cross-compiler works.
7711 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7712 # <limits.h> exists even on freestanding compilers.
7713 # On the NeXT, cc -E runs the code through the compiler's parser,
7714 # not just through cpp. "Syntax error" is here to catch this case.
7715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7716 /* end confdefs.h. */
7717 #ifdef __STDC__
7718 # include <limits.h>
7719 #else
7720 # include <assert.h>
7721 #endif
7722 Syntax error
7723 _ACEOF
7724 if ac_fn_c_try_cpp "$LINENO"; then :
7726 else
7727 # Broken: fails on valid input.
7728 continue
7730 rm -f conftest.err conftest.i conftest.$ac_ext
7732 # OK, works on sane cases. Now check whether nonexistent headers
7733 # can be detected and how.
7734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7735 /* end confdefs.h. */
7736 #include <ac_nonexistent.h>
7737 _ACEOF
7738 if ac_fn_c_try_cpp "$LINENO"; then :
7739 # Broken: success on invalid input.
7740 continue
7741 else
7742 # Passes both tests.
7743 ac_preproc_ok=:
7744 break
7746 rm -f conftest.err conftest.i conftest.$ac_ext
7748 done
7749 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7750 rm -f conftest.i conftest.err conftest.$ac_ext
7751 if $ac_preproc_ok; then :
7752 break
7755 done
7756 ac_cv_prog_CPP=$CPP
7759 CPP=$ac_cv_prog_CPP
7760 else
7761 ac_cv_prog_CPP=$CPP
7763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7764 $as_echo "$CPP" >&6; }
7765 ac_preproc_ok=false
7766 for ac_c_preproc_warn_flag in '' yes
7768 # Use a header file that comes with gcc, so configuring glibc
7769 # with a fresh cross-compiler works.
7770 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7771 # <limits.h> exists even on freestanding compilers.
7772 # On the NeXT, cc -E runs the code through the compiler's parser,
7773 # not just through cpp. "Syntax error" is here to catch this case.
7774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7775 /* end confdefs.h. */
7776 #ifdef __STDC__
7777 # include <limits.h>
7778 #else
7779 # include <assert.h>
7780 #endif
7781 Syntax error
7782 _ACEOF
7783 if ac_fn_c_try_cpp "$LINENO"; then :
7785 else
7786 # Broken: fails on valid input.
7787 continue
7789 rm -f conftest.err conftest.i conftest.$ac_ext
7791 # OK, works on sane cases. Now check whether nonexistent headers
7792 # can be detected and how.
7793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7794 /* end confdefs.h. */
7795 #include <ac_nonexistent.h>
7796 _ACEOF
7797 if ac_fn_c_try_cpp "$LINENO"; then :
7798 # Broken: success on invalid input.
7799 continue
7800 else
7801 # Passes both tests.
7802 ac_preproc_ok=:
7803 break
7805 rm -f conftest.err conftest.i conftest.$ac_ext
7807 done
7808 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7809 rm -f conftest.i conftest.err conftest.$ac_ext
7810 if $ac_preproc_ok; then :
7812 else
7813 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7814 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7815 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7816 See \`config.log' for more details" "$LINENO" 5; }
7819 ac_ext=c
7820 ac_cpp='$CPP $CPPFLAGS'
7821 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7822 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7823 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7829 # Set up TAS assembly code if needed; the template file has now had its
7830 # chance to request this.
7832 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7835 if test "$need_tas" = yes ; then
7836 TAS=tas.o
7837 else
7838 TAS=""
7843 cat >>confdefs.h <<_ACEOF
7844 #define DLSUFFIX "$DLSUFFIX"
7845 _ACEOF
7849 # Set up pkg_config in case we need it below
7858 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7859 if test -n "$ac_tool_prefix"; then
7860 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7861 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7863 $as_echo_n "checking for $ac_word... " >&6; }
7864 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7865 $as_echo_n "(cached) " >&6
7866 else
7867 case $PKG_CONFIG in
7868 [\\/]* | ?:[\\/]*)
7869 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7872 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7873 for as_dir in $PATH
7875 IFS=$as_save_IFS
7876 test -z "$as_dir" && as_dir=.
7877 for ac_exec_ext in '' $ac_executable_extensions; do
7878 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7879 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7880 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7881 break 2
7883 done
7884 done
7885 IFS=$as_save_IFS
7888 esac
7890 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7891 if test -n "$PKG_CONFIG"; then
7892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7893 $as_echo "$PKG_CONFIG" >&6; }
7894 else
7895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7896 $as_echo "no" >&6; }
7901 if test -z "$ac_cv_path_PKG_CONFIG"; then
7902 ac_pt_PKG_CONFIG=$PKG_CONFIG
7903 # Extract the first word of "pkg-config", so it can be a program name with args.
7904 set dummy pkg-config; ac_word=$2
7905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7906 $as_echo_n "checking for $ac_word... " >&6; }
7907 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7908 $as_echo_n "(cached) " >&6
7909 else
7910 case $ac_pt_PKG_CONFIG in
7911 [\\/]* | ?:[\\/]*)
7912 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7915 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7916 for as_dir in $PATH
7918 IFS=$as_save_IFS
7919 test -z "$as_dir" && as_dir=.
7920 for ac_exec_ext in '' $ac_executable_extensions; do
7921 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7922 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7923 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7924 break 2
7926 done
7927 done
7928 IFS=$as_save_IFS
7931 esac
7933 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7934 if test -n "$ac_pt_PKG_CONFIG"; then
7935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7936 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7937 else
7938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7939 $as_echo "no" >&6; }
7942 if test "x$ac_pt_PKG_CONFIG" = x; then
7943 PKG_CONFIG=""
7944 else
7945 case $cross_compiling:$ac_tool_warned in
7946 yes:)
7947 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7948 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7949 ac_tool_warned=yes ;;
7950 esac
7951 PKG_CONFIG=$ac_pt_PKG_CONFIG
7953 else
7954 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7958 if test -n "$PKG_CONFIG"; then
7959 _pkg_min_version=0.9.0
7960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7961 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7962 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7964 $as_echo "yes" >&6; }
7965 else
7966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7967 $as_echo "no" >&6; }
7968 PKG_CONFIG=""
7973 # Automatic dependency tracking
7977 # Check whether --enable-depend was given.
7978 if test "${enable_depend+set}" = set; then :
7979 enableval=$enable_depend;
7980 case $enableval in
7981 yes)
7982 autodepend=yes
7988 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7990 esac
7992 else
7993 enable_depend=no
8002 # Enable assert checks
8006 # Check whether --enable-cassert was given.
8007 if test "${enable_cassert+set}" = set; then :
8008 enableval=$enable_cassert;
8009 case $enableval in
8010 yes)
8012 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
8019 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
8021 esac
8023 else
8024 enable_cassert=no
8032 # Include directories
8034 ac_save_IFS=$IFS
8035 IFS="${IFS}${PATH_SEPARATOR}"
8036 # SRCH_INC comes from the template file
8037 for dir in $with_includes $SRCH_INC; do
8038 if test -d "$dir"; then
8039 INCLUDES="$INCLUDES -I$dir"
8040 else
8041 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
8042 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
8044 done
8045 IFS=$ac_save_IFS
8050 # Library directories
8052 ac_save_IFS=$IFS
8053 IFS="${IFS}${PATH_SEPARATOR}"
8054 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
8055 for dir in $LIBRARY_DIRS $SRCH_LIB; do
8056 if test -d "$dir"; then
8057 LIBDIRS="$LIBDIRS -L$dir"
8058 else
8059 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
8060 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
8062 done
8063 IFS=$ac_save_IFS
8066 # ICU
8068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
8069 $as_echo_n "checking whether to build with ICU support... " >&6; }
8073 # Check whether --with-icu was given.
8074 if test "${with_icu+set}" = set; then :
8075 withval=$with_icu;
8076 case $withval in
8077 yes)
8079 $as_echo "#define USE_ICU 1" >>confdefs.h
8086 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
8088 esac
8090 else
8091 with_icu=yes
8093 $as_echo "#define USE_ICU 1" >>confdefs.h
8098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
8099 $as_echo "$with_icu" >&6; }
8102 if test "$with_icu" = yes; then
8104 pkg_failed=no
8105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
8106 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
8108 if test -n "$ICU_CFLAGS"; then
8109 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
8110 elif test -n "$PKG_CONFIG"; then
8111 if test -n "$PKG_CONFIG" && \
8112 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8113 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8114 ac_status=$?
8115 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8116 test $ac_status = 0; }; then
8117 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
8118 test "x$?" != "x0" && pkg_failed=yes
8119 else
8120 pkg_failed=yes
8122 else
8123 pkg_failed=untried
8125 if test -n "$ICU_LIBS"; then
8126 pkg_cv_ICU_LIBS="$ICU_LIBS"
8127 elif test -n "$PKG_CONFIG"; then
8128 if test -n "$PKG_CONFIG" && \
8129 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8130 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8131 ac_status=$?
8132 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8133 test $ac_status = 0; }; then
8134 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
8135 test "x$?" != "x0" && pkg_failed=yes
8136 else
8137 pkg_failed=yes
8139 else
8140 pkg_failed=untried
8145 if test $pkg_failed = yes; then
8146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8147 $as_echo "no" >&6; }
8149 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8150 _pkg_short_errors_supported=yes
8151 else
8152 _pkg_short_errors_supported=no
8154 if test $_pkg_short_errors_supported = yes; then
8155 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8156 else
8157 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8159 # Put the nasty error message in config.log where it belongs
8160 echo "$ICU_PKG_ERRORS" >&5
8162 as_fn_error $? "ICU library not found
8163 If you have ICU already installed, see config.log for details on the
8164 failure. It is possible the compiler isn't looking in the proper directory.
8165 Use --without-icu to disable ICU support." "$LINENO" 5
8166 elif test $pkg_failed = untried; then
8167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8168 $as_echo "no" >&6; }
8169 as_fn_error $? "ICU library not found
8170 If you have ICU already installed, see config.log for details on the
8171 failure. It is possible the compiler isn't looking in the proper directory.
8172 Use --without-icu to disable ICU support." "$LINENO" 5
8173 else
8174 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
8175 ICU_LIBS=$pkg_cv_ICU_LIBS
8176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8177 $as_echo "yes" >&6; }
8183 # Optionally build Tcl modules (PL/Tcl)
8185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
8186 $as_echo_n "checking whether to build with Tcl... " >&6; }
8190 # Check whether --with-tcl was given.
8191 if test "${with_tcl+set}" = set; then :
8192 withval=$with_tcl;
8193 case $withval in
8194 yes)
8201 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
8203 esac
8205 else
8206 with_tcl=no
8211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
8212 $as_echo "$with_tcl" >&6; }
8215 # We see if the path to the Tcl/Tk configuration scripts is specified.
8216 # This will override the use of tclsh to find the paths to search.
8221 # Check whether --with-tclconfig was given.
8222 if test "${with_tclconfig+set}" = set; then :
8223 withval=$with_tclconfig;
8224 case $withval in
8225 yes)
8226 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8229 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8234 esac
8241 # Optionally build Perl modules (PL/Perl)
8243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
8244 $as_echo_n "checking whether to build Perl modules... " >&6; }
8248 # Check whether --with-perl was given.
8249 if test "${with_perl+set}" = set; then :
8250 withval=$with_perl;
8251 case $withval in
8252 yes)
8259 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
8261 esac
8263 else
8264 with_perl=no
8269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
8270 $as_echo "$with_perl" >&6; }
8274 # Optionally build Python modules (PL/Python)
8276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
8277 $as_echo_n "checking whether to build Python modules... " >&6; }
8281 # Check whether --with-python was given.
8282 if test "${with_python+set}" = set; then :
8283 withval=$with_python;
8284 case $withval in
8285 yes)
8292 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
8294 esac
8296 else
8297 with_python=no
8302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8303 $as_echo "$with_python" >&6; }
8307 # GSSAPI
8309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
8310 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
8314 # Check whether --with-gssapi was given.
8315 if test "${with_gssapi+set}" = set; then :
8316 withval=$with_gssapi;
8317 case $withval in
8318 yes)
8321 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
8323 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
8330 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
8332 esac
8334 else
8335 with_gssapi=no
8340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8341 $as_echo "$with_gssapi" >&6; }
8349 # Kerberos configuration parameters
8354 # Check whether --with-krb-srvnam was given.
8355 if test "${with_krb_srvnam+set}" = set; then :
8356 withval=$with_krb_srvnam;
8357 case $withval in
8358 yes)
8359 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8362 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8367 esac
8369 else
8370 with_krb_srvnam="postgres"
8376 cat >>confdefs.h <<_ACEOF
8377 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8378 _ACEOF
8383 # PAM
8385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8386 $as_echo_n "checking whether to build with PAM support... " >&6; }
8390 # Check whether --with-pam was given.
8391 if test "${with_pam+set}" = set; then :
8392 withval=$with_pam;
8393 case $withval in
8394 yes)
8396 $as_echo "#define USE_PAM 1" >>confdefs.h
8403 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8405 esac
8407 else
8408 with_pam=no
8413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8414 $as_echo "$with_pam" >&6; }
8418 # BSD AUTH
8420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8421 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8425 # Check whether --with-bsd-auth was given.
8426 if test "${with_bsd_auth+set}" = set; then :
8427 withval=$with_bsd_auth;
8428 case $withval in
8429 yes)
8431 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8438 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8440 esac
8442 else
8443 with_bsd_auth=no
8448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8449 $as_echo "$with_bsd_auth" >&6; }
8453 # LDAP
8455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8456 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8460 # Check whether --with-ldap was given.
8461 if test "${with_ldap+set}" = set; then :
8462 withval=$with_ldap;
8463 case $withval in
8464 yes)
8466 $as_echo "#define USE_LDAP 1" >>confdefs.h
8473 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8475 esac
8477 else
8478 with_ldap=no
8483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8484 $as_echo "$with_ldap" >&6; }
8489 # Bonjour
8491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8492 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8496 # Check whether --with-bonjour was given.
8497 if test "${with_bonjour+set}" = set; then :
8498 withval=$with_bonjour;
8499 case $withval in
8500 yes)
8502 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8509 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8511 esac
8513 else
8514 with_bonjour=no
8519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8520 $as_echo "$with_bonjour" >&6; }
8524 # SELinux
8526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8527 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8531 # Check whether --with-selinux was given.
8532 if test "${with_selinux+set}" = set; then :
8533 withval=$with_selinux;
8534 case $withval in
8535 yes)
8542 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8544 esac
8546 else
8547 with_selinux=no
8553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8554 $as_echo "$with_selinux" >&6; }
8557 # Systemd
8559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8560 $as_echo_n "checking whether to build with systemd support... " >&6; }
8564 # Check whether --with-systemd was given.
8565 if test "${with_systemd+set}" = set; then :
8566 withval=$with_systemd;
8567 case $withval in
8568 yes)
8570 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8577 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8579 esac
8581 else
8582 with_systemd=no
8588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8589 $as_echo "$with_systemd" >&6; }
8592 # Readline
8597 # Check whether --with-readline was given.
8598 if test "${with_readline+set}" = set; then :
8599 withval=$with_readline;
8600 case $withval in
8601 yes)
8608 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8610 esac
8612 else
8613 with_readline=yes
8618 # readline on MinGW has problems with backslashes in psql and other bugs.
8619 # This is particularly a problem with non-US code pages.
8620 # Therefore disable its use until we understand the cause. 2004-07-20
8621 if test "$PORTNAME" = "win32"; then
8622 if test "$with_readline" = yes; then
8623 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8624 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8625 with_readline=no
8632 # Prefer libedit
8637 # Check whether --with-libedit-preferred was given.
8638 if test "${with_libedit_preferred+set}" = set; then :
8639 withval=$with_libedit_preferred;
8640 case $withval in
8641 yes)
8648 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8650 esac
8652 else
8653 with_libedit_preferred=no
8661 # UUID library
8663 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8664 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8665 # UUID library. More than one of these might be present on a given platform,
8666 # so we make the user say which one she wants.
8671 # Check whether --with-uuid was given.
8672 if test "${with_uuid+set}" = set; then :
8673 withval=$with_uuid;
8674 case $withval in
8675 yes)
8676 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8679 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8684 esac
8689 if test x"$with_uuid" = x"" ; then
8690 with_uuid=no
8695 # Check whether --with-ossp-uuid was given.
8696 if test "${with_ossp_uuid+set}" = set; then :
8697 withval=$with_ossp_uuid;
8698 case $withval in
8699 yes)
8706 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8708 esac
8710 else
8711 with_ossp_uuid=no
8716 if test "$with_ossp_uuid" = yes ; then
8717 with_uuid=ossp
8720 if test "$with_uuid" != no ; then
8721 if test "$with_uuid" = bsd ; then
8723 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8725 elif test "$with_uuid" = e2fs ; then
8727 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8729 elif test "$with_uuid" = ossp ; then
8731 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8733 else
8734 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8741 # XML
8743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
8744 $as_echo_n "checking whether to build with XML support... " >&6; }
8748 # Check whether --with-libxml was given.
8749 if test "${with_libxml+set}" = set; then :
8750 withval=$with_libxml;
8751 case $withval in
8752 yes)
8754 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8761 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8763 esac
8765 else
8766 with_libxml=no
8771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
8772 $as_echo "$with_libxml" >&6; }
8775 if test "$with_libxml" = yes ; then
8776 # Check pkg-config, then xml2-config. But for backwards compatibility,
8777 # setting XML2_CONFIG overrides pkg-config.
8778 have_libxml2_pkg_config=no
8779 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
8781 pkg_failed=no
8782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
8783 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
8785 if test -n "$XML2_CFLAGS"; then
8786 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
8787 elif test -n "$PKG_CONFIG"; then
8788 if test -n "$PKG_CONFIG" && \
8789 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8790 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8791 ac_status=$?
8792 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8793 test $ac_status = 0; }; then
8794 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
8795 test "x$?" != "x0" && pkg_failed=yes
8796 else
8797 pkg_failed=yes
8799 else
8800 pkg_failed=untried
8802 if test -n "$XML2_LIBS"; then
8803 pkg_cv_XML2_LIBS="$XML2_LIBS"
8804 elif test -n "$PKG_CONFIG"; then
8805 if test -n "$PKG_CONFIG" && \
8806 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8807 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8808 ac_status=$?
8809 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8810 test $ac_status = 0; }; then
8811 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
8812 test "x$?" != "x0" && pkg_failed=yes
8813 else
8814 pkg_failed=yes
8816 else
8817 pkg_failed=untried
8822 if test $pkg_failed = yes; then
8823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8824 $as_echo "no" >&6; }
8826 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8827 _pkg_short_errors_supported=yes
8828 else
8829 _pkg_short_errors_supported=no
8831 if test $_pkg_short_errors_supported = yes; then
8832 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8833 else
8834 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8836 # Put the nasty error message in config.log where it belongs
8837 echo "$XML2_PKG_ERRORS" >&5
8839 # do nothing
8840 elif test $pkg_failed = untried; then
8841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8842 $as_echo "no" >&6; }
8843 # do nothing
8844 else
8845 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
8846 XML2_LIBS=$pkg_cv_XML2_LIBS
8847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8848 $as_echo "yes" >&6; }
8849 have_libxml2_pkg_config=yes
8852 if test "$have_libxml2_pkg_config" = no ; then
8853 if test -z "$XML2_CONFIG"; then
8854 for ac_prog in xml2-config
8856 # Extract the first word of "$ac_prog", so it can be a program name with args.
8857 set dummy $ac_prog; ac_word=$2
8858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8859 $as_echo_n "checking for $ac_word... " >&6; }
8860 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8861 $as_echo_n "(cached) " >&6
8862 else
8863 case $XML2_CONFIG in
8864 [\\/]* | ?:[\\/]*)
8865 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8869 for as_dir in $PATH
8871 IFS=$as_save_IFS
8872 test -z "$as_dir" && as_dir=.
8873 for ac_exec_ext in '' $ac_executable_extensions; do
8874 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8875 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8876 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8877 break 2
8879 done
8880 done
8881 IFS=$as_save_IFS
8884 esac
8886 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8887 if test -n "$XML2_CONFIG"; then
8888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8889 $as_echo "$XML2_CONFIG" >&6; }
8890 else
8891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8892 $as_echo "no" >&6; }
8896 test -n "$XML2_CONFIG" && break
8897 done
8899 else
8900 # Report the value of XML2_CONFIG in configure's output in all cases.
8901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8902 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8904 $as_echo "$XML2_CONFIG" >&6; }
8907 if test -n "$XML2_CONFIG"; then
8908 XML2_CFLAGS=`$XML2_CONFIG --cflags`
8909 XML2_LIBS=`$XML2_CONFIG --libs`
8912 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
8913 for pgac_option in $XML2_CFLAGS; do
8914 case $pgac_option in
8915 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8916 esac
8917 done
8918 for pgac_option in $XML2_LIBS; do
8919 case $pgac_option in
8920 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8921 esac
8922 done
8927 # XSLT
8932 # Check whether --with-libxslt was given.
8933 if test "${with_libxslt+set}" = set; then :
8934 withval=$with_libxslt;
8935 case $withval in
8936 yes)
8938 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8945 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8947 esac
8949 else
8950 with_libxslt=no
8960 # tzdata
8965 # Check whether --with-system-tzdata was given.
8966 if test "${with_system_tzdata+set}" = set; then :
8967 withval=$with_system_tzdata;
8968 case $withval in
8969 yes)
8970 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8973 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8978 esac
8986 # Zlib
8991 # Check whether --with-zlib was given.
8992 if test "${with_zlib+set}" = set; then :
8993 withval=$with_zlib;
8994 case $withval in
8995 yes)
9002 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
9004 esac
9006 else
9007 with_zlib=yes
9015 # LZ4
9017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
9018 $as_echo_n "checking whether to build with LZ4 support... " >&6; }
9022 # Check whether --with-lz4 was given.
9023 if test "${with_lz4+set}" = set; then :
9024 withval=$with_lz4;
9025 case $withval in
9026 yes)
9028 $as_echo "#define USE_LZ4 1" >>confdefs.h
9035 as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
9037 esac
9039 else
9040 with_lz4=no
9045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
9046 $as_echo "$with_lz4" >&6; }
9049 if test "$with_lz4" = yes; then
9051 pkg_failed=no
9052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
9053 $as_echo_n "checking for liblz4... " >&6; }
9055 if test -n "$LZ4_CFLAGS"; then
9056 pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
9057 elif test -n "$PKG_CONFIG"; then
9058 if test -n "$PKG_CONFIG" && \
9059 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9060 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9061 ac_status=$?
9062 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9063 test $ac_status = 0; }; then
9064 pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
9065 test "x$?" != "x0" && pkg_failed=yes
9066 else
9067 pkg_failed=yes
9069 else
9070 pkg_failed=untried
9072 if test -n "$LZ4_LIBS"; then
9073 pkg_cv_LZ4_LIBS="$LZ4_LIBS"
9074 elif test -n "$PKG_CONFIG"; then
9075 if test -n "$PKG_CONFIG" && \
9076 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9077 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9078 ac_status=$?
9079 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9080 test $ac_status = 0; }; then
9081 pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
9082 test "x$?" != "x0" && pkg_failed=yes
9083 else
9084 pkg_failed=yes
9086 else
9087 pkg_failed=untried
9092 if test $pkg_failed = yes; then
9093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9094 $as_echo "no" >&6; }
9096 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9097 _pkg_short_errors_supported=yes
9098 else
9099 _pkg_short_errors_supported=no
9101 if test $_pkg_short_errors_supported = yes; then
9102 LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
9103 else
9104 LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
9106 # Put the nasty error message in config.log where it belongs
9107 echo "$LZ4_PKG_ERRORS" >&5
9109 as_fn_error $? "Package requirements (liblz4) were not met:
9111 $LZ4_PKG_ERRORS
9113 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9114 installed software in a non-standard prefix.
9116 Alternatively, you may set the environment variables LZ4_CFLAGS
9117 and LZ4_LIBS to avoid the need to call pkg-config.
9118 See the pkg-config man page for more details." "$LINENO" 5
9119 elif test $pkg_failed = untried; then
9120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9121 $as_echo "no" >&6; }
9122 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9123 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9124 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9125 is in your PATH or set the PKG_CONFIG environment variable to the full
9126 path to pkg-config.
9128 Alternatively, you may set the environment variables LZ4_CFLAGS
9129 and LZ4_LIBS to avoid the need to call pkg-config.
9130 See the pkg-config man page for more details.
9132 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9133 See \`config.log' for more details" "$LINENO" 5; }
9134 else
9135 LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
9136 LZ4_LIBS=$pkg_cv_LZ4_LIBS
9137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9138 $as_echo "yes" >&6; }
9141 # We only care about -I, -D, and -L switches;
9142 # note that -llz4 will be added by AC_CHECK_LIB below.
9143 for pgac_option in $LZ4_CFLAGS; do
9144 case $pgac_option in
9145 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9146 esac
9147 done
9148 for pgac_option in $LZ4_LIBS; do
9149 case $pgac_option in
9150 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9151 esac
9152 done
9156 # ZSTD
9158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ZSTD support" >&5
9159 $as_echo_n "checking whether to build with ZSTD support... " >&6; }
9163 # Check whether --with-zstd was given.
9164 if test "${with_zstd+set}" = set; then :
9165 withval=$with_zstd;
9166 case $withval in
9167 yes)
9169 $as_echo "#define USE_ZSTD 1" >>confdefs.h
9176 as_fn_error $? "no argument expected for --with-zstd option" "$LINENO" 5
9178 esac
9180 else
9181 with_zstd=no
9186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_zstd" >&5
9187 $as_echo "$with_zstd" >&6; }
9190 if test "$with_zstd" = yes; then
9192 pkg_failed=no
9193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd >= 1.4.0" >&5
9194 $as_echo_n "checking for libzstd >= 1.4.0... " >&6; }
9196 if test -n "$ZSTD_CFLAGS"; then
9197 pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
9198 elif test -n "$PKG_CONFIG"; then
9199 if test -n "$PKG_CONFIG" && \
9200 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9201 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9202 ac_status=$?
9203 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9204 test $ac_status = 0; }; then
9205 pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd >= 1.4.0" 2>/dev/null`
9206 test "x$?" != "x0" && pkg_failed=yes
9207 else
9208 pkg_failed=yes
9210 else
9211 pkg_failed=untried
9213 if test -n "$ZSTD_LIBS"; then
9214 pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
9215 elif test -n "$PKG_CONFIG"; then
9216 if test -n "$PKG_CONFIG" && \
9217 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9218 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9219 ac_status=$?
9220 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9221 test $ac_status = 0; }; then
9222 pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd >= 1.4.0" 2>/dev/null`
9223 test "x$?" != "x0" && pkg_failed=yes
9224 else
9225 pkg_failed=yes
9227 else
9228 pkg_failed=untried
9233 if test $pkg_failed = yes; then
9234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9235 $as_echo "no" >&6; }
9237 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9238 _pkg_short_errors_supported=yes
9239 else
9240 _pkg_short_errors_supported=no
9242 if test $_pkg_short_errors_supported = yes; then
9243 ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9244 else
9245 ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9247 # Put the nasty error message in config.log where it belongs
9248 echo "$ZSTD_PKG_ERRORS" >&5
9250 as_fn_error $? "Package requirements (libzstd >= 1.4.0) were not met:
9252 $ZSTD_PKG_ERRORS
9254 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9255 installed software in a non-standard prefix.
9257 Alternatively, you may set the environment variables ZSTD_CFLAGS
9258 and ZSTD_LIBS to avoid the need to call pkg-config.
9259 See the pkg-config man page for more details." "$LINENO" 5
9260 elif test $pkg_failed = untried; then
9261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9262 $as_echo "no" >&6; }
9263 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9264 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9265 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9266 is in your PATH or set the PKG_CONFIG environment variable to the full
9267 path to pkg-config.
9269 Alternatively, you may set the environment variables ZSTD_CFLAGS
9270 and ZSTD_LIBS to avoid the need to call pkg-config.
9271 See the pkg-config man page for more details.
9273 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9274 See \`config.log' for more details" "$LINENO" 5; }
9275 else
9276 ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
9277 ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
9278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9279 $as_echo "yes" >&6; }
9282 # We only care about -I, -D, and -L switches;
9283 # note that -lzstd will be added by AC_CHECK_LIB below.
9284 for pgac_option in $ZSTD_CFLAGS; do
9285 case $pgac_option in
9286 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9287 esac
9288 done
9289 for pgac_option in $ZSTD_LIBS; do
9290 case $pgac_option in
9291 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9292 esac
9293 done
9296 # Assignments
9299 CPPFLAGS="$CPPFLAGS $INCLUDES"
9300 LDFLAGS="$LDFLAGS $LIBDIRS"
9306 if test -n "$ac_tool_prefix"; then
9307 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9308 set dummy ${ac_tool_prefix}strip; ac_word=$2
9309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9310 $as_echo_n "checking for $ac_word... " >&6; }
9311 if ${ac_cv_prog_STRIP+:} false; then :
9312 $as_echo_n "(cached) " >&6
9313 else
9314 if test -n "$STRIP"; then
9315 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9316 else
9317 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9318 for as_dir in $PATH
9320 IFS=$as_save_IFS
9321 test -z "$as_dir" && as_dir=.
9322 for ac_exec_ext in '' $ac_executable_extensions; do
9323 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9324 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9325 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9326 break 2
9328 done
9329 done
9330 IFS=$as_save_IFS
9334 STRIP=$ac_cv_prog_STRIP
9335 if test -n "$STRIP"; then
9336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9337 $as_echo "$STRIP" >&6; }
9338 else
9339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9340 $as_echo "no" >&6; }
9345 if test -z "$ac_cv_prog_STRIP"; then
9346 ac_ct_STRIP=$STRIP
9347 # Extract the first word of "strip", so it can be a program name with args.
9348 set dummy strip; ac_word=$2
9349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9350 $as_echo_n "checking for $ac_word... " >&6; }
9351 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9352 $as_echo_n "(cached) " >&6
9353 else
9354 if test -n "$ac_ct_STRIP"; then
9355 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9356 else
9357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9358 for as_dir in $PATH
9360 IFS=$as_save_IFS
9361 test -z "$as_dir" && as_dir=.
9362 for ac_exec_ext in '' $ac_executable_extensions; do
9363 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9364 ac_cv_prog_ac_ct_STRIP="strip"
9365 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9366 break 2
9368 done
9369 done
9370 IFS=$as_save_IFS
9374 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9375 if test -n "$ac_ct_STRIP"; then
9376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9377 $as_echo "$ac_ct_STRIP" >&6; }
9378 else
9379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9380 $as_echo "no" >&6; }
9383 if test "x$ac_ct_STRIP" = x; then
9384 STRIP=":"
9385 else
9386 case $cross_compiling:$ac_tool_warned in
9387 yes:)
9388 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9389 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9390 ac_tool_warned=yes ;;
9391 esac
9392 STRIP=$ac_ct_STRIP
9394 else
9395 STRIP="$ac_cv_prog_STRIP"
9399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9400 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9401 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9402 STRIP_STATIC_LIB="$STRIP --strip-unneeded"
9403 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9405 $as_echo "yes" >&6; }
9406 else
9407 case $host_os in
9408 darwin*)
9409 STRIP="$STRIP -x"
9410 STRIP_STATIC_LIB=$STRIP
9411 STRIP_SHARED_LIB=$STRIP
9412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9413 $as_echo "yes" >&6; }
9416 STRIP_STATIC_LIB=:
9417 STRIP_SHARED_LIB=:
9418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9419 $as_echo "no" >&6; }
9421 esac
9426 if test -n "$ac_tool_prefix"; then
9427 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9428 set dummy ${ac_tool_prefix}ar; ac_word=$2
9429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9430 $as_echo_n "checking for $ac_word... " >&6; }
9431 if ${ac_cv_prog_AR+:} false; then :
9432 $as_echo_n "(cached) " >&6
9433 else
9434 if test -n "$AR"; then
9435 ac_cv_prog_AR="$AR" # Let the user override the test.
9436 else
9437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9438 for as_dir in $PATH
9440 IFS=$as_save_IFS
9441 test -z "$as_dir" && as_dir=.
9442 for ac_exec_ext in '' $ac_executable_extensions; do
9443 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9444 ac_cv_prog_AR="${ac_tool_prefix}ar"
9445 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9446 break 2
9448 done
9449 done
9450 IFS=$as_save_IFS
9454 AR=$ac_cv_prog_AR
9455 if test -n "$AR"; then
9456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9457 $as_echo "$AR" >&6; }
9458 else
9459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9460 $as_echo "no" >&6; }
9465 if test -z "$ac_cv_prog_AR"; then
9466 ac_ct_AR=$AR
9467 # Extract the first word of "ar", so it can be a program name with args.
9468 set dummy ar; ac_word=$2
9469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9470 $as_echo_n "checking for $ac_word... " >&6; }
9471 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9472 $as_echo_n "(cached) " >&6
9473 else
9474 if test -n "$ac_ct_AR"; then
9475 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9476 else
9477 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9478 for as_dir in $PATH
9480 IFS=$as_save_IFS
9481 test -z "$as_dir" && as_dir=.
9482 for ac_exec_ext in '' $ac_executable_extensions; do
9483 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9484 ac_cv_prog_ac_ct_AR="ar"
9485 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9486 break 2
9488 done
9489 done
9490 IFS=$as_save_IFS
9494 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9495 if test -n "$ac_ct_AR"; then
9496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9497 $as_echo "$ac_ct_AR" >&6; }
9498 else
9499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9500 $as_echo "no" >&6; }
9503 if test "x$ac_ct_AR" = x; then
9504 AR="ar"
9505 else
9506 case $cross_compiling:$ac_tool_warned in
9507 yes:)
9508 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9509 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9510 ac_tool_warned=yes ;;
9511 esac
9512 AR=$ac_ct_AR
9514 else
9515 AR="$ac_cv_prog_AR"
9518 if test "$PORTNAME" = "win32"; then
9519 if test -n "$ac_tool_prefix"; then
9520 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9521 set dummy ${ac_tool_prefix}windres; ac_word=$2
9522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9523 $as_echo_n "checking for $ac_word... " >&6; }
9524 if ${ac_cv_prog_WINDRES+:} false; then :
9525 $as_echo_n "(cached) " >&6
9526 else
9527 if test -n "$WINDRES"; then
9528 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9529 else
9530 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9531 for as_dir in $PATH
9533 IFS=$as_save_IFS
9534 test -z "$as_dir" && as_dir=.
9535 for ac_exec_ext in '' $ac_executable_extensions; do
9536 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9537 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9538 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9539 break 2
9541 done
9542 done
9543 IFS=$as_save_IFS
9547 WINDRES=$ac_cv_prog_WINDRES
9548 if test -n "$WINDRES"; then
9549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9550 $as_echo "$WINDRES" >&6; }
9551 else
9552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9553 $as_echo "no" >&6; }
9558 if test -z "$ac_cv_prog_WINDRES"; then
9559 ac_ct_WINDRES=$WINDRES
9560 # Extract the first word of "windres", so it can be a program name with args.
9561 set dummy windres; ac_word=$2
9562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9563 $as_echo_n "checking for $ac_word... " >&6; }
9564 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9565 $as_echo_n "(cached) " >&6
9566 else
9567 if test -n "$ac_ct_WINDRES"; then
9568 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9569 else
9570 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9571 for as_dir in $PATH
9573 IFS=$as_save_IFS
9574 test -z "$as_dir" && as_dir=.
9575 for ac_exec_ext in '' $ac_executable_extensions; do
9576 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9577 ac_cv_prog_ac_ct_WINDRES="windres"
9578 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9579 break 2
9581 done
9582 done
9583 IFS=$as_save_IFS
9587 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9588 if test -n "$ac_ct_WINDRES"; then
9589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9590 $as_echo "$ac_ct_WINDRES" >&6; }
9591 else
9592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9593 $as_echo "no" >&6; }
9596 if test "x$ac_ct_WINDRES" = x; then
9597 WINDRES="windres"
9598 else
9599 case $cross_compiling:$ac_tool_warned in
9600 yes:)
9601 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9602 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9603 ac_tool_warned=yes ;;
9604 esac
9605 WINDRES=$ac_ct_WINDRES
9607 else
9608 WINDRES="$ac_cv_prog_WINDRES"
9613 # Find a good install program. We prefer a C program (faster),
9614 # so one script is as good as another. But avoid the broken or
9615 # incompatible versions:
9616 # SysV /etc/install, /usr/sbin/install
9617 # SunOS /usr/etc/install
9618 # IRIX /sbin/install
9619 # AIX /bin/install
9620 # AmigaOS /C/install, which installs bootblocks on floppy discs
9621 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9622 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9623 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9624 # OS/2's system install, which has a completely different semantic
9625 # ./install, which can be erroneously created by make from ./install.sh.
9626 # Reject install programs that cannot install multiple files.
9627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9628 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9629 if test -z "$INSTALL"; then
9630 if ${ac_cv_path_install+:} false; then :
9631 $as_echo_n "(cached) " >&6
9632 else
9633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9634 for as_dir in $PATH
9636 IFS=$as_save_IFS
9637 test -z "$as_dir" && as_dir=.
9638 # Account for people who put trailing slashes in PATH elements.
9639 case $as_dir/ in #((
9640 ./ | .// | /[cC]/* | \
9641 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9642 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9643 /usr/ucb/* ) ;;
9645 # OSF1 and SCO ODT 3.0 have their own names for install.
9646 # Don't use installbsd from OSF since it installs stuff as root
9647 # by default.
9648 for ac_prog in ginstall scoinst install; do
9649 for ac_exec_ext in '' $ac_executable_extensions; do
9650 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9651 if test $ac_prog = install &&
9652 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9653 # AIX install. It has an incompatible calling convention.
9655 elif test $ac_prog = install &&
9656 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9657 # program-specific install script used by HP pwplus--don't use.
9659 else
9660 rm -rf conftest.one conftest.two conftest.dir
9661 echo one > conftest.one
9662 echo two > conftest.two
9663 mkdir conftest.dir
9664 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9665 test -s conftest.one && test -s conftest.two &&
9666 test -s conftest.dir/conftest.one &&
9667 test -s conftest.dir/conftest.two
9668 then
9669 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9670 break 3
9674 done
9675 done
9677 esac
9679 done
9680 IFS=$as_save_IFS
9682 rm -rf conftest.one conftest.two conftest.dir
9685 if test "${ac_cv_path_install+set}" = set; then
9686 INSTALL=$ac_cv_path_install
9687 else
9688 # As a last resort, use the slow shell script. Don't cache a
9689 # value for INSTALL within a source directory, because that will
9690 # break other packages using the cache if that directory is
9691 # removed, or if the value is a relative name.
9692 INSTALL=$ac_install_sh
9695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9696 $as_echo "$INSTALL" >&6; }
9698 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9699 # It thinks the first close brace ends the variable substitution.
9700 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9702 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9704 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9706 # When Autoconf chooses install-sh as install program it tries to generate
9707 # a relative path to it in each makefile where it substitutes it. This clashes
9708 # with our Makefile.global concept. This workaround helps.
9709 case $INSTALL in
9710 *install-sh*) install_bin='';;
9711 *) install_bin=$INSTALL;;
9712 esac
9715 if test -z "$TAR"; then
9716 for ac_prog in tar
9718 # Extract the first word of "$ac_prog", so it can be a program name with args.
9719 set dummy $ac_prog; ac_word=$2
9720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9721 $as_echo_n "checking for $ac_word... " >&6; }
9722 if ${ac_cv_path_TAR+:} false; then :
9723 $as_echo_n "(cached) " >&6
9724 else
9725 case $TAR in
9726 [\\/]* | ?:[\\/]*)
9727 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9730 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9731 for as_dir in $PATH
9733 IFS=$as_save_IFS
9734 test -z "$as_dir" && as_dir=.
9735 for ac_exec_ext in '' $ac_executable_extensions; do
9736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9737 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9738 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9739 break 2
9741 done
9742 done
9743 IFS=$as_save_IFS
9746 esac
9748 TAR=$ac_cv_path_TAR
9749 if test -n "$TAR"; then
9750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9751 $as_echo "$TAR" >&6; }
9752 else
9753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9754 $as_echo "no" >&6; }
9758 test -n "$TAR" && break
9759 done
9761 else
9762 # Report the value of TAR in configure's output in all cases.
9763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9764 $as_echo_n "checking for TAR... " >&6; }
9765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9766 $as_echo "$TAR" >&6; }
9769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9770 $as_echo_n "checking whether ln -s works... " >&6; }
9771 LN_S=$as_ln_s
9772 if test "$LN_S" = "ln -s"; then
9773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9774 $as_echo "yes" >&6; }
9775 else
9776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9777 $as_echo "no, using $LN_S" >&6; }
9780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9781 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9782 if test -z "$MKDIR_P"; then
9783 if ${ac_cv_path_mkdir+:} false; then :
9784 $as_echo_n "(cached) " >&6
9785 else
9786 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9787 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9789 IFS=$as_save_IFS
9790 test -z "$as_dir" && as_dir=.
9791 for ac_prog in mkdir gmkdir; do
9792 for ac_exec_ext in '' $ac_executable_extensions; do
9793 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9794 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9795 'mkdir (GNU coreutils) '* | \
9796 'mkdir (coreutils) '* | \
9797 'mkdir (fileutils) '4.1*)
9798 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9799 break 3;;
9800 esac
9801 done
9802 done
9803 done
9804 IFS=$as_save_IFS
9808 test -d ./--version && rmdir ./--version
9809 if test "${ac_cv_path_mkdir+set}" = set; then
9810 MKDIR_P="$ac_cv_path_mkdir -p"
9811 else
9812 # As a last resort, use the slow shell script. Don't cache a
9813 # value for MKDIR_P within a source directory, because that will
9814 # break other packages using the cache if that directory is
9815 # removed, or if the value is a relative name.
9816 MKDIR_P="$ac_install_sh -d"
9819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9820 $as_echo "$MKDIR_P" >&6; }
9822 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9823 # a relative path to it in each makefile where it substitutes it. This clashes
9824 # with our Makefile.global concept. This workaround helps.
9825 case $MKDIR_P in
9826 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9827 esac
9829 if test -z "$BISON"; then
9830 for ac_prog in bison
9832 # Extract the first word of "$ac_prog", so it can be a program name with args.
9833 set dummy $ac_prog; ac_word=$2
9834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9835 $as_echo_n "checking for $ac_word... " >&6; }
9836 if ${ac_cv_path_BISON+:} false; then :
9837 $as_echo_n "(cached) " >&6
9838 else
9839 case $BISON in
9840 [\\/]* | ?:[\\/]*)
9841 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9844 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9845 for as_dir in $PATH
9847 IFS=$as_save_IFS
9848 test -z "$as_dir" && as_dir=.
9849 for ac_exec_ext in '' $ac_executable_extensions; do
9850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9851 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9853 break 2
9855 done
9856 done
9857 IFS=$as_save_IFS
9860 esac
9862 BISON=$ac_cv_path_BISON
9863 if test -n "$BISON"; then
9864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9865 $as_echo "$BISON" >&6; }
9866 else
9867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9868 $as_echo "no" >&6; }
9872 test -n "$BISON" && break
9873 done
9875 else
9876 # Report the value of BISON in configure's output in all cases.
9877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9878 $as_echo_n "checking for BISON... " >&6; }
9879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9880 $as_echo "$BISON" >&6; }
9884 if test "$BISON"; then
9885 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9886 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9887 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9888 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 2.3) exit 0; else exit 1;}'
9889 then
9890 as_fn_error $? "
9891 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9892 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." "$LINENO" 5
9894 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9895 # of the now preferred %name-prefix "base_yy", but the latter
9896 # doesn't work with Bison 2.3 or less. So for now we silence the
9897 # deprecation warnings.
9898 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9899 then
9900 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9904 if test -z "$BISON"; then
9905 as_fn_error $? "bison not found" "$LINENO" 5
9909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9910 $as_echo_n "checking for flex... " >&6; }
9911 if ${pgac_cv_path_flex+:} false; then :
9912 $as_echo_n "(cached) " >&6
9913 else
9914 # Let the user override the test
9915 if test -n "$FLEX"; then
9916 pgac_cv_path_flex=$FLEX
9917 else
9918 pgac_save_IFS=$IFS
9919 IFS=$PATH_SEPARATOR
9920 for pgac_dir in $PATH; do
9921 IFS=$pgac_save_IFS
9922 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9923 pgac_dir=`pwd`
9925 for pgac_prog in flex lex; do
9926 pgac_candidate="$pgac_dir/$pgac_prog"
9927 if test -f "$pgac_candidate" \
9928 && $pgac_candidate --version </dev/null >/dev/null 2>&1
9929 then
9930 echo '%%' > conftest.l
9931 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9932 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9933 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;}'
9934 then
9935 pgac_cv_path_flex=$pgac_candidate
9936 break 2
9937 else
9938 as_fn_error $? "
9939 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9940 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." "$LINENO" 5
9944 done
9945 done
9946 rm -f conftest.l lex.yy.c
9947 : ${pgac_cv_path_flex=no}
9951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9952 $as_echo "$pgac_cv_path_flex" >&6; }
9953 if test x"$pgac_cv_path_flex" = x"no"; then
9954 as_fn_error $? "flex not found" "$LINENO" 5
9955 else
9956 FLEX=$pgac_cv_path_flex
9957 pgac_flex_version=`$FLEX --version 2>/dev/null`
9958 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9959 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9966 if test -z "$PERL"; then
9967 for ac_prog in perl
9969 # Extract the first word of "$ac_prog", so it can be a program name with args.
9970 set dummy $ac_prog; ac_word=$2
9971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9972 $as_echo_n "checking for $ac_word... " >&6; }
9973 if ${ac_cv_path_PERL+:} false; then :
9974 $as_echo_n "(cached) " >&6
9975 else
9976 case $PERL in
9977 [\\/]* | ?:[\\/]*)
9978 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9982 for as_dir in $PATH
9984 IFS=$as_save_IFS
9985 test -z "$as_dir" && as_dir=.
9986 for ac_exec_ext in '' $ac_executable_extensions; do
9987 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9988 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9990 break 2
9992 done
9993 done
9994 IFS=$as_save_IFS
9997 esac
9999 PERL=$ac_cv_path_PERL
10000 if test -n "$PERL"; then
10001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10002 $as_echo "$PERL" >&6; }
10003 else
10004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10005 $as_echo "no" >&6; }
10009 test -n "$PERL" && break
10010 done
10012 else
10013 # Report the value of PERL in configure's output in all cases.
10014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
10015 $as_echo_n "checking for PERL... " >&6; }
10016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10017 $as_echo "$PERL" >&6; }
10021 if test "$PERL"; then
10022 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'`
10023 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
10024 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
10025 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
10026 $AWK '{ if ($1 == 5 && ($2 >= 14)) exit 1; else exit 0;}'
10027 then
10028 as_fn_error $? "
10029 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10030 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." "$LINENO" 5
10034 if test -z "$PERL"; then
10035 as_fn_error $? "Perl not found" "$LINENO" 5
10038 if test "$with_perl" = yes; then
10039 if test -z "$PERL"; then
10040 as_fn_error $? "Perl not found" "$LINENO" 5
10043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
10044 $as_echo_n "checking for Perl archlibexp... " >&6; }
10045 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
10046 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
10047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
10048 $as_echo "$perl_archlibexp" >&6; }
10049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
10050 $as_echo_n "checking for Perl privlibexp... " >&6; }
10051 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
10052 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
10053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
10054 $as_echo "$perl_privlibexp" >&6; }
10055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
10056 $as_echo_n "checking for Perl useshrplib... " >&6; }
10057 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
10058 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
10059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
10060 $as_echo "$perl_useshrplib" >&6; }
10061 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
10062 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
10063 You might have to rebuild your Perl installation. Refer to the
10064 documentation for details. Use --without-perl to disable building
10065 PL/Perl." "$LINENO" 5
10067 # On most platforms, archlibexp is also where the Perl include files live ...
10068 perl_includespec="-I$perl_archlibexp/CORE"
10069 # ... but on newer macOS versions, we must use -iwithsysroot to look
10070 # under $PG_SYSROOT
10071 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
10072 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
10073 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
10077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
10078 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
10079 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10081 $as_echo "$perl_ccflags" >&6; }
10082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10083 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10084 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10086 $as_echo "$perl_embed_ccflags" >&6; }
10089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10090 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10091 if test "$PORTNAME" = "win32" ; then
10092 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10093 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10094 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10095 else
10096 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10097 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10098 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10101 else
10102 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10103 pgac_tmp2=`$PERL -MConfig -e 'print "$Config{ccdlflags} $Config{ldflags}"'`
10104 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%"`
10106 if test -z "$perl_embed_ldflags" ; then
10107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10108 $as_echo "no" >&6; }
10109 as_fn_error $? "could not determine flags for linking embedded Perl.
10110 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10111 installed." "$LINENO" 5
10112 else
10113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10114 $as_echo "$perl_embed_ldflags" >&6; }
10119 if test "$with_python" = yes; then
10120 if test -z "$PYTHON"; then
10121 for ac_prog in python3 python
10123 # Extract the first word of "$ac_prog", so it can be a program name with args.
10124 set dummy $ac_prog; ac_word=$2
10125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10126 $as_echo_n "checking for $ac_word... " >&6; }
10127 if ${ac_cv_path_PYTHON+:} false; then :
10128 $as_echo_n "(cached) " >&6
10129 else
10130 case $PYTHON in
10131 [\\/]* | ?:[\\/]*)
10132 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10135 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10136 for as_dir in $PATH
10138 IFS=$as_save_IFS
10139 test -z "$as_dir" && as_dir=.
10140 for ac_exec_ext in '' $ac_executable_extensions; do
10141 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10142 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10143 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10144 break 2
10146 done
10147 done
10148 IFS=$as_save_IFS
10151 esac
10153 PYTHON=$ac_cv_path_PYTHON
10154 if test -n "$PYTHON"; then
10155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10156 $as_echo "$PYTHON" >&6; }
10157 else
10158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10159 $as_echo "no" >&6; }
10163 test -n "$PYTHON" && break
10164 done
10166 else
10167 # Report the value of PYTHON in configure's output in all cases.
10168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10169 $as_echo_n "checking for PYTHON... " >&6; }
10170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10171 $as_echo "$PYTHON" >&6; }
10174 if test x"$PYTHON" = x""; then
10175 as_fn_error $? "Python not found" "$LINENO" 5
10179 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10180 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10181 $as_echo "$as_me: using python $python_fullversion" >&6;}
10182 # python_fullversion is typically n.n.n plus some trailing junk
10183 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10184 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10185 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10186 # Reject unsupported Python versions as soon as practical.
10187 if test "$python_majorversion" -lt 3; then
10188 as_fn_error $? "Python version $python_version is too old (version 3 or later is required)" "$LINENO" 5
10191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
10192 $as_echo_n "checking for Python sysconfig module... " >&6; }
10193 if "${PYTHON}" -c 'import sysconfig' 2>&5
10194 then
10195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10196 $as_echo "yes" >&6; }
10197 else
10198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10199 $as_echo "no" >&6; }
10200 as_fn_error $? "sysconfig module not found" "$LINENO" 5
10203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10204 $as_echo_n "checking Python configuration directory... " >&6; }
10205 python_configdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBPL'))))"`
10206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10207 $as_echo "$python_configdir" >&6; }
10209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directory" >&5
10210 $as_echo_n "checking Python include directory... " >&6; }
10211 python_includespec=`${PYTHON} -c "import sysconfig; print('-I' + sysconfig.get_config_var('INCLUDEPY'))"`
10212 if test "$PORTNAME" = win32 ; then
10213 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10216 $as_echo "$python_includespec" >&6; }
10220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10221 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10223 python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10224 python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
10226 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10227 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10228 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10229 then
10230 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10231 found_shlib=1
10232 else
10233 # Otherwise, guess the base name of the shlib.
10234 # LDVERSION was added in Python 3.2, before that use VERSION,
10235 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10236 python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
10237 if test x"${python_ldversion}" != x""; then
10238 ldlibrary="python${python_ldversion}"
10239 else
10240 python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
10241 if test x"${python_version_var}" != x""; then
10242 ldlibrary="python${python_version_var}"
10243 else
10244 ldlibrary="python${python_version}"
10247 # Search for a likely-looking file.
10248 found_shlib=0
10249 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10251 if test -e "$d/lib${ldlibrary}${DLSUFFIX}"; then
10252 python_libdir="$d"
10253 found_shlib=1
10254 break 2
10256 done
10257 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10258 # (".so.n.n") as well. However, check this only after failing to find
10259 # ".so" anywhere, because yet other platforms (Debian) put the .so
10260 # symlink in a different directory from the underlying versioned shlib.
10261 if test "$found_shlib" != 1; then
10262 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10264 for f in "$d/lib${ldlibrary}.so."* ; do
10265 if test -e "$f"; then
10266 python_libdir="$d"
10267 found_shlib=1
10268 break 2
10270 done
10271 done
10273 # As usual, Windows has its own ideas. Possible default library
10274 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10275 # and the "lib" prefix might not be there.
10276 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10277 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10279 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10280 if test -e "$f"; then
10281 python_libdir="$d"
10282 found_shlib=1
10283 break 2
10285 done
10286 done
10289 if test "$found_shlib" != 1; then
10290 as_fn_error $? "could not find shared library for Python
10291 You might have to rebuild your Python installation. Refer to the
10292 documentation for details. Use --without-python to disable building
10293 PL/Python." "$LINENO" 5
10295 python_libspec="-L${python_libdir} -l${ldlibrary}"
10297 python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10300 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10306 if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then
10307 if test -z "$ZIC"; then
10308 for ac_prog in zic
10310 # Extract the first word of "$ac_prog", so it can be a program name with args.
10311 set dummy $ac_prog; ac_word=$2
10312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10313 $as_echo_n "checking for $ac_word... " >&6; }
10314 if ${ac_cv_path_ZIC+:} false; then :
10315 $as_echo_n "(cached) " >&6
10316 else
10317 case $ZIC in
10318 [\\/]* | ?:[\\/]*)
10319 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10323 for as_dir in $PATH
10325 IFS=$as_save_IFS
10326 test -z "$as_dir" && as_dir=.
10327 for ac_exec_ext in '' $ac_executable_extensions; do
10328 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10329 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10330 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10331 break 2
10333 done
10334 done
10335 IFS=$as_save_IFS
10338 esac
10340 ZIC=$ac_cv_path_ZIC
10341 if test -n "$ZIC"; then
10342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10343 $as_echo "$ZIC" >&6; }
10344 else
10345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10346 $as_echo "no" >&6; }
10350 test -n "$ZIC" && break
10351 done
10353 else
10354 # Report the value of ZIC in configure's output in all cases.
10355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10356 $as_echo_n "checking for ZIC... " >&6; }
10357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10358 $as_echo "$ZIC" >&6; }
10361 if test -z "$ZIC"; then
10362 as_fn_error $? "
10363 When cross-compiling, either use the option --with-system-tzdata to use
10364 existing time-zone data, or set the environment variable ZIC to a zic
10365 program to use during the build." "$LINENO" 5
10370 # Pthreads
10372 # For each platform, we need to know about any special compile and link
10373 # libraries, and whether the normal C function names are thread-safe.
10374 # WIN32 doesn't need the pthread tests; it always uses threads
10376 # These tests are run before the library-tests, because linking with the
10377 # other libraries can pull in the pthread functions as a side-effect. We
10378 # want to use the -pthread or similar flags directly, and not rely on
10379 # the side-effects of linking with some other library.
10381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10382 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10383 if ${ac_cv_path_SED+:} false; then :
10384 $as_echo_n "(cached) " >&6
10385 else
10386 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10387 for ac_i in 1 2 3 4 5 6 7; do
10388 ac_script="$ac_script$as_nl$ac_script"
10389 done
10390 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10391 { ac_script=; unset ac_script;}
10392 if test -z "$SED"; then
10393 ac_path_SED_found=false
10394 # Loop through the user's path and test for each of PROGNAME-LIST
10395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10396 for as_dir in $PATH
10398 IFS=$as_save_IFS
10399 test -z "$as_dir" && as_dir=.
10400 for ac_prog in sed gsed; do
10401 for ac_exec_ext in '' $ac_executable_extensions; do
10402 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10403 as_fn_executable_p "$ac_path_SED" || continue
10404 # Check for GNU ac_path_SED and select it if it is found.
10405 # Check for GNU $ac_path_SED
10406 case `"$ac_path_SED" --version 2>&1` in
10407 *GNU*)
10408 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10410 ac_count=0
10411 $as_echo_n 0123456789 >"conftest.in"
10412 while :
10414 cat "conftest.in" "conftest.in" >"conftest.tmp"
10415 mv "conftest.tmp" "conftest.in"
10416 cp "conftest.in" "conftest.nl"
10417 $as_echo '' >> "conftest.nl"
10418 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10419 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10420 as_fn_arith $ac_count + 1 && ac_count=$as_val
10421 if test $ac_count -gt ${ac_path_SED_max-0}; then
10422 # Best one so far, save it but keep looking for a better one
10423 ac_cv_path_SED="$ac_path_SED"
10424 ac_path_SED_max=$ac_count
10426 # 10*(2^10) chars as input seems more than enough
10427 test $ac_count -gt 10 && break
10428 done
10429 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10430 esac
10432 $ac_path_SED_found && break 3
10433 done
10434 done
10435 done
10436 IFS=$as_save_IFS
10437 if test -z "$ac_cv_path_SED"; then
10438 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10440 else
10441 ac_cv_path_SED=$SED
10445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10446 $as_echo "$ac_cv_path_SED" >&6; }
10447 SED="$ac_cv_path_SED"
10448 rm -f conftest.sed
10451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10452 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10453 if ${ac_cv_path_GREP+:} false; then :
10454 $as_echo_n "(cached) " >&6
10455 else
10456 if test -z "$GREP"; then
10457 ac_path_GREP_found=false
10458 # Loop through the user's path and test for each of PROGNAME-LIST
10459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10460 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10462 IFS=$as_save_IFS
10463 test -z "$as_dir" && as_dir=.
10464 for ac_prog in grep ggrep; do
10465 for ac_exec_ext in '' $ac_executable_extensions; do
10466 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10467 as_fn_executable_p "$ac_path_GREP" || continue
10468 # Check for GNU ac_path_GREP and select it if it is found.
10469 # Check for GNU $ac_path_GREP
10470 case `"$ac_path_GREP" --version 2>&1` in
10471 *GNU*)
10472 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10474 ac_count=0
10475 $as_echo_n 0123456789 >"conftest.in"
10476 while :
10478 cat "conftest.in" "conftest.in" >"conftest.tmp"
10479 mv "conftest.tmp" "conftest.in"
10480 cp "conftest.in" "conftest.nl"
10481 $as_echo 'GREP' >> "conftest.nl"
10482 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10483 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10484 as_fn_arith $ac_count + 1 && ac_count=$as_val
10485 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10486 # Best one so far, save it but keep looking for a better one
10487 ac_cv_path_GREP="$ac_path_GREP"
10488 ac_path_GREP_max=$ac_count
10490 # 10*(2^10) chars as input seems more than enough
10491 test $ac_count -gt 10 && break
10492 done
10493 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10494 esac
10496 $ac_path_GREP_found && break 3
10497 done
10498 done
10499 done
10500 IFS=$as_save_IFS
10501 if test -z "$ac_cv_path_GREP"; then
10502 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10504 else
10505 ac_cv_path_GREP=$GREP
10509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10510 $as_echo "$ac_cv_path_GREP" >&6; }
10511 GREP="$ac_cv_path_GREP"
10514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10515 $as_echo_n "checking for egrep... " >&6; }
10516 if ${ac_cv_path_EGREP+:} false; then :
10517 $as_echo_n "(cached) " >&6
10518 else
10519 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10520 then ac_cv_path_EGREP="$GREP -E"
10521 else
10522 if test -z "$EGREP"; then
10523 ac_path_EGREP_found=false
10524 # Loop through the user's path and test for each of PROGNAME-LIST
10525 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10526 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10528 IFS=$as_save_IFS
10529 test -z "$as_dir" && as_dir=.
10530 for ac_prog in egrep; do
10531 for ac_exec_ext in '' $ac_executable_extensions; do
10532 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10533 as_fn_executable_p "$ac_path_EGREP" || continue
10534 # Check for GNU ac_path_EGREP and select it if it is found.
10535 # Check for GNU $ac_path_EGREP
10536 case `"$ac_path_EGREP" --version 2>&1` in
10537 *GNU*)
10538 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10540 ac_count=0
10541 $as_echo_n 0123456789 >"conftest.in"
10542 while :
10544 cat "conftest.in" "conftest.in" >"conftest.tmp"
10545 mv "conftest.tmp" "conftest.in"
10546 cp "conftest.in" "conftest.nl"
10547 $as_echo 'EGREP' >> "conftest.nl"
10548 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10549 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10550 as_fn_arith $ac_count + 1 && ac_count=$as_val
10551 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10552 # Best one so far, save it but keep looking for a better one
10553 ac_cv_path_EGREP="$ac_path_EGREP"
10554 ac_path_EGREP_max=$ac_count
10556 # 10*(2^10) chars as input seems more than enough
10557 test $ac_count -gt 10 && break
10558 done
10559 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10560 esac
10562 $ac_path_EGREP_found && break 3
10563 done
10564 done
10565 done
10566 IFS=$as_save_IFS
10567 if test -z "$ac_cv_path_EGREP"; then
10568 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10570 else
10571 ac_cv_path_EGREP=$EGREP
10576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10577 $as_echo "$ac_cv_path_EGREP" >&6; }
10578 EGREP="$ac_cv_path_EGREP"
10581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10582 $as_echo_n "checking for ANSI C header files... " >&6; }
10583 if ${ac_cv_header_stdc+:} false; then :
10584 $as_echo_n "(cached) " >&6
10585 else
10586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10587 /* end confdefs.h. */
10588 #include <stdlib.h>
10589 #include <stdarg.h>
10590 #include <string.h>
10591 #include <float.h>
10594 main ()
10598 return 0;
10600 _ACEOF
10601 if ac_fn_c_try_compile "$LINENO"; then :
10602 ac_cv_header_stdc=yes
10603 else
10604 ac_cv_header_stdc=no
10606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10608 if test $ac_cv_header_stdc = yes; then
10609 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10611 /* end confdefs.h. */
10612 #include <string.h>
10614 _ACEOF
10615 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10616 $EGREP "memchr" >/dev/null 2>&1; then :
10618 else
10619 ac_cv_header_stdc=no
10621 rm -f conftest*
10625 if test $ac_cv_header_stdc = yes; then
10626 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10628 /* end confdefs.h. */
10629 #include <stdlib.h>
10631 _ACEOF
10632 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10633 $EGREP "free" >/dev/null 2>&1; then :
10635 else
10636 ac_cv_header_stdc=no
10638 rm -f conftest*
10642 if test $ac_cv_header_stdc = yes; then
10643 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10644 if test "$cross_compiling" = yes; then :
10646 else
10647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10648 /* end confdefs.h. */
10649 #include <ctype.h>
10650 #include <stdlib.h>
10651 #if ((' ' & 0x0FF) == 0x020)
10652 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10653 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10654 #else
10655 # define ISLOWER(c) \
10656 (('a' <= (c) && (c) <= 'i') \
10657 || ('j' <= (c) && (c) <= 'r') \
10658 || ('s' <= (c) && (c) <= 'z'))
10659 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10660 #endif
10662 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10664 main ()
10666 int i;
10667 for (i = 0; i < 256; i++)
10668 if (XOR (islower (i), ISLOWER (i))
10669 || toupper (i) != TOUPPER (i))
10670 return 2;
10671 return 0;
10673 _ACEOF
10674 if ac_fn_c_try_run "$LINENO"; then :
10676 else
10677 ac_cv_header_stdc=no
10679 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10680 conftest.$ac_objext conftest.beam conftest.$ac_ext
10685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10686 $as_echo "$ac_cv_header_stdc" >&6; }
10687 if test $ac_cv_header_stdc = yes; then
10689 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10693 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10694 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10695 inttypes.h stdint.h unistd.h
10696 do :
10697 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10698 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10700 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10701 cat >>confdefs.h <<_ACEOF
10702 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10703 _ACEOF
10707 done
10710 if test "$PORTNAME" != "win32"; then :
10711 # then
10716 ac_ext=c
10717 ac_cpp='$CPP $CPPFLAGS'
10718 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10719 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10720 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10722 ax_pthread_ok=no
10724 # We used to check for pthread.h first, but this fails if pthread.h
10725 # requires special compiler flags (e.g. on Tru64 or Sequent).
10726 # It gets checked for in the link test anyway.
10728 # First of all, check if the user has set any of the PTHREAD_LIBS,
10729 # etcetera environment variables, and if threads linking works using
10730 # them:
10731 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10732 ax_pthread_save_CC="$CC"
10733 ax_pthread_save_CFLAGS="$CFLAGS"
10734 ax_pthread_save_LIBS="$LIBS"
10735 if test "x$PTHREAD_CC" != "x"; then :
10736 CC="$PTHREAD_CC"
10738 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10739 LIBS="$PTHREAD_LIBS $LIBS"
10740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10741 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10743 /* end confdefs.h. */
10745 /* Override any GCC internal prototype to avoid an error.
10746 Use char because int might match the return type of a GCC
10747 builtin and then its argument prototype would still apply. */
10748 #ifdef __cplusplus
10749 extern "C"
10750 #endif
10751 char pthread_join ();
10753 main ()
10755 return pthread_join ();
10757 return 0;
10759 _ACEOF
10760 if ac_fn_c_try_link "$LINENO"; then :
10761 ax_pthread_ok=yes
10763 rm -f core conftest.err conftest.$ac_objext \
10764 conftest$ac_exeext conftest.$ac_ext
10765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10766 $as_echo "$ax_pthread_ok" >&6; }
10767 if test "x$ax_pthread_ok" = "xno"; then
10768 PTHREAD_LIBS=""
10769 PTHREAD_CFLAGS=""
10771 CC="$ax_pthread_save_CC"
10772 CFLAGS="$ax_pthread_save_CFLAGS"
10773 LIBS="$ax_pthread_save_LIBS"
10776 # We must check for the threads library under a number of different
10777 # names; the ordering is very important because some systems
10778 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10779 # libraries is broken (non-POSIX).
10781 # Create a list of thread flags to try. Items starting with a "-" are
10782 # C compiler flags, and other items are library names, except for "none"
10783 # which indicates that we try without any flags at all, and "pthread-config"
10784 # which is a program returning the flags for the Pth emulation library.
10786 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10788 # The ordering *is* (sometimes) important. Some notes on the
10789 # individual items follow:
10791 # pthreads: AIX (must check this before -lpthread)
10792 # none: in case threads are in libc; should be tried before -Kthread and
10793 # other compiler flags to prevent continual compiler warnings
10794 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10795 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10796 # (Note: HP C rejects this with "bad form for `-t' option")
10797 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10798 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10799 # doesn't hurt to check since this sometimes defines pthreads and
10800 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
10801 # is present but should not be used directly; and before -mthreads,
10802 # because the compiler interprets this as "-mt" + "-hreads")
10803 # -mthreads: Mingw32/gcc, Lynx/gcc
10804 # pthread: Linux, etcetera
10805 # --thread-safe: KAI C++
10806 # pthread-config: use pthread-config program (for GNU Pth library)
10808 case $host_os in
10810 freebsd*)
10812 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10813 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10815 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10818 hpux*)
10820 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10821 # multi-threading and also sets -lpthread."
10823 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10826 openedition*)
10828 # IBM z/OS requires a feature-test macro to be defined in order to
10829 # enable POSIX threads at all, so give the user a hint if this is
10830 # not set. (We don't define these ourselves, as they can affect
10831 # other portions of the system API in unpredictable ways.)
10833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10834 /* end confdefs.h. */
10836 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10837 AX_PTHREAD_ZOS_MISSING
10838 # endif
10840 _ACEOF
10841 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10842 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10844 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10846 rm -f conftest*
10850 solaris*)
10852 # On Solaris (at least, for some versions), libc contains stubbed
10853 # (non-functional) versions of the pthreads routines, so link-based
10854 # tests will erroneously succeed. (N.B.: The stubs are missing
10855 # pthread_cleanup_push, or rather a function called by this macro,
10856 # so we could check for that, but who knows whether they'll stub
10857 # that too in a future libc.) So we'll check first for the
10858 # standard Solaris way of linking pthreads (-mt -lpthread).
10860 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10862 esac
10864 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10866 if test "x$GCC" = "xyes"; then :
10867 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10870 # The presence of a feature test macro requesting re-entrant function
10871 # definitions is, on some systems, a strong hint that pthreads support is
10872 # correctly enabled
10874 case $host_os in
10875 darwin* | hpux* | linux* | osf* | solaris*)
10876 ax_pthread_check_macro="_REENTRANT"
10879 aix*)
10880 ax_pthread_check_macro="_THREAD_SAFE"
10884 ax_pthread_check_macro="--"
10886 esac
10887 if test "x$ax_pthread_check_macro" = "x--"; then :
10888 ax_pthread_check_cond=0
10889 else
10890 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10893 # Are we compiling with Clang?
10895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10896 $as_echo_n "checking whether $CC is Clang... " >&6; }
10897 if ${ax_cv_PTHREAD_CLANG+:} false; then :
10898 $as_echo_n "(cached) " >&6
10899 else
10900 ax_cv_PTHREAD_CLANG=no
10901 # Note that Autoconf sets GCC=yes for Clang as well as GCC
10902 if test "x$GCC" = "xyes"; then
10903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10904 /* end confdefs.h. */
10905 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10906 # if defined(__clang__) && defined(__llvm__)
10907 AX_PTHREAD_CC_IS_CLANG
10908 # endif
10910 _ACEOF
10911 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10912 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10913 ax_cv_PTHREAD_CLANG=yes
10915 rm -f conftest*
10920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10921 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10922 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10924 ax_pthread_clang_warning=no
10926 # Clang needs special handling, because older versions handle the -pthread
10927 # option in a rather... idiosyncratic way
10929 if test "x$ax_pthread_clang" = "xyes"; then
10931 # Clang takes -pthread; it has never supported any other flag
10933 # (Note 1: This will need to be revisited if a system that Clang
10934 # supports has POSIX threads in a separate library. This tends not
10935 # to be the way of modern systems, but it's conceivable.)
10937 # (Note 2: On some systems, notably Darwin, -pthread is not needed
10938 # to get POSIX threads support; the API is always present and
10939 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
10940 # -pthread does define _REENTRANT, and while the Darwin headers
10941 # ignore this macro, third-party headers might not.)
10943 PTHREAD_CFLAGS="-pthread"
10944 PTHREAD_LIBS=
10946 ax_pthread_ok=yes
10948 # However, older versions of Clang make a point of warning the user
10949 # that, in an invocation where only linking and no compilation is
10950 # taking place, the -pthread option has no effect ("argument unused
10951 # during compilation"). They expect -pthread to be passed in only
10952 # when source code is being compiled.
10954 # Problem is, this is at odds with the way Automake and most other
10955 # C build frameworks function, which is that the same flags used in
10956 # compilation (CFLAGS) are also used in linking. Many systems
10957 # supported by AX_PTHREAD require exactly this for POSIX threads
10958 # support, and in fact it is often not straightforward to specify a
10959 # flag that is used only in the compilation phase and not in
10960 # linking. Such a scenario is extremely rare in practice.
10962 # Even though use of the -pthread flag in linking would only print
10963 # a warning, this can be a nuisance for well-run software projects
10964 # that build with -Werror. So if the active version of Clang has
10965 # this misfeature, we search for an option to squash it.
10967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10968 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10969 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10970 $as_echo_n "(cached) " >&6
10971 else
10972 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10973 # Create an alternate version of $ac_link that compiles and
10974 # links in two steps (.c -> .o, .o -> exe) instead of one
10975 # (.c -> exe), because the warning occurs only in the second
10976 # step
10977 ax_pthread_save_ac_link="$ac_link"
10978 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10979 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
10980 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10981 ax_pthread_save_CFLAGS="$CFLAGS"
10982 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10983 if test "x$ax_pthread_try" = "xunknown"; then :
10984 break
10986 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10987 ac_link="$ax_pthread_save_ac_link"
10988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10989 /* end confdefs.h. */
10990 int main(void){return 0;}
10991 _ACEOF
10992 if ac_fn_c_try_link "$LINENO"; then :
10993 ac_link="$ax_pthread_2step_ac_link"
10994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10995 /* end confdefs.h. */
10996 int main(void){return 0;}
10997 _ACEOF
10998 if ac_fn_c_try_link "$LINENO"; then :
10999 break
11001 rm -f core conftest.err conftest.$ac_objext \
11002 conftest$ac_exeext conftest.$ac_ext
11005 rm -f core conftest.err conftest.$ac_objext \
11006 conftest$ac_exeext conftest.$ac_ext
11007 done
11008 ac_link="$ax_pthread_save_ac_link"
11009 CFLAGS="$ax_pthread_save_CFLAGS"
11010 if test "x$ax_pthread_try" = "x"; then :
11011 ax_pthread_try=no
11013 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
11016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
11017 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
11019 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
11020 no | unknown) ;;
11021 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
11022 esac
11024 fi # $ax_pthread_clang = yes
11026 if test "x$ax_pthread_ok" = "xno"; then
11027 for ax_pthread_try_flag in $ax_pthread_flags; do
11029 case $ax_pthread_try_flag in
11030 none)
11031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
11032 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
11035 -mt,pthread)
11036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
11037 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
11038 PTHREAD_CFLAGS="-mt"
11039 PTHREAD_LIBS="-lpthread"
11043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
11044 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
11045 PTHREAD_CFLAGS="$ax_pthread_try_flag"
11048 pthread-config)
11049 # Extract the first word of "pthread-config", so it can be a program name with args.
11050 set dummy pthread-config; ac_word=$2
11051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11052 $as_echo_n "checking for $ac_word... " >&6; }
11053 if ${ac_cv_prog_ax_pthread_config+:} false; then :
11054 $as_echo_n "(cached) " >&6
11055 else
11056 if test -n "$ax_pthread_config"; then
11057 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
11058 else
11059 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11060 for as_dir in $PATH
11062 IFS=$as_save_IFS
11063 test -z "$as_dir" && as_dir=.
11064 for ac_exec_ext in '' $ac_executable_extensions; do
11065 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11066 ac_cv_prog_ax_pthread_config="yes"
11067 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11068 break 2
11070 done
11071 done
11072 IFS=$as_save_IFS
11074 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
11077 ax_pthread_config=$ac_cv_prog_ax_pthread_config
11078 if test -n "$ax_pthread_config"; then
11079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11080 $as_echo "$ax_pthread_config" >&6; }
11081 else
11082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11083 $as_echo "no" >&6; }
11087 if test "x$ax_pthread_config" = "xno"; then :
11088 continue
11090 PTHREAD_CFLAGS="`pthread-config --cflags`"
11091 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11096 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11097 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11099 esac
11101 ax_pthread_save_CFLAGS="$CFLAGS"
11102 ax_pthread_save_LIBS="$LIBS"
11103 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11104 LIBS="$PTHREAD_LIBS $LIBS"
11106 # Check for various functions. We must include pthread.h,
11107 # since some functions may be macros. (On the Sequent, we
11108 # need a special flag -Kthread to make this header compile.)
11109 # We check for pthread_join because it is in -lpthread on IRIX
11110 # while pthread_create is in libc. We check for pthread_attr_init
11111 # due to DEC craziness with -lpthreads. We check for
11112 # pthread_cleanup_push because it is one of the few pthread
11113 # functions on Solaris that doesn't have a non-functional libc stub.
11114 # We try pthread_create on general principles.
11116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11117 /* end confdefs.h. */
11118 #include <pthread.h>
11119 # if $ax_pthread_check_cond
11120 # error "$ax_pthread_check_macro must be defined"
11121 # endif
11122 static void routine(void *a) { a = 0; }
11123 static void *start_routine(void *a) { return a; }
11125 main ()
11127 pthread_t th; pthread_attr_t attr;
11128 pthread_create(&th, 0, start_routine, 0);
11129 pthread_join(th, 0);
11130 pthread_attr_init(&attr);
11131 pthread_cleanup_push(routine, 0);
11132 pthread_cleanup_pop(0) /* ; */
11134 return 0;
11136 _ACEOF
11137 if ac_fn_c_try_link "$LINENO"; then :
11138 ax_pthread_ok=yes
11140 rm -f core conftest.err conftest.$ac_objext \
11141 conftest$ac_exeext conftest.$ac_ext
11143 CFLAGS="$ax_pthread_save_CFLAGS"
11144 LIBS="$ax_pthread_save_LIBS"
11146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11147 $as_echo "$ax_pthread_ok" >&6; }
11148 if test "x$ax_pthread_ok" = "xyes"; then :
11149 break
11152 PTHREAD_LIBS=""
11153 PTHREAD_CFLAGS=""
11154 done
11157 # Various other checks:
11158 if test "x$ax_pthread_ok" = "xyes"; then
11159 ax_pthread_save_CFLAGS="$CFLAGS"
11160 ax_pthread_save_LIBS="$LIBS"
11161 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11162 LIBS="$PTHREAD_LIBS $LIBS"
11164 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11166 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11167 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11168 $as_echo_n "(cached) " >&6
11169 else
11170 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11171 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11173 /* end confdefs.h. */
11174 #include <pthread.h>
11176 main ()
11178 int attr = $ax_pthread_attr; return attr /* ; */
11180 return 0;
11182 _ACEOF
11183 if ac_fn_c_try_link "$LINENO"; then :
11184 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11186 rm -f core conftest.err conftest.$ac_objext \
11187 conftest$ac_exeext conftest.$ac_ext
11188 done
11191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11192 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11193 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11194 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11195 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11197 cat >>confdefs.h <<_ACEOF
11198 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11199 _ACEOF
11201 ax_pthread_joinable_attr_defined=yes
11205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11206 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11207 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11208 $as_echo_n "(cached) " >&6
11209 else
11210 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11211 case $host_os in
11212 solaris*)
11213 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11215 esac
11218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11219 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11220 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11221 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11222 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11223 ax_pthread_special_flags_added=yes
11226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11227 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11228 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11229 $as_echo_n "(cached) " >&6
11230 else
11231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11232 /* end confdefs.h. */
11233 #include <pthread.h>
11235 main ()
11237 int i = PTHREAD_PRIO_INHERIT;
11239 return 0;
11241 _ACEOF
11242 if ac_fn_c_try_link "$LINENO"; then :
11243 ax_cv_PTHREAD_PRIO_INHERIT=yes
11244 else
11245 ax_cv_PTHREAD_PRIO_INHERIT=no
11247 rm -f core conftest.err conftest.$ac_objext \
11248 conftest$ac_exeext conftest.$ac_ext
11251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11252 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11253 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11254 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11256 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11258 ax_pthread_prio_inherit_defined=yes
11262 CFLAGS="$ax_pthread_save_CFLAGS"
11263 LIBS="$ax_pthread_save_LIBS"
11265 # More AIX lossage: compile with *_r variant
11266 if test "x$GCC" != "xyes"; then
11267 case $host_os in
11268 aix*)
11269 case "x/$CC" in #(
11270 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11271 #handle absolute path differently from PATH based program lookup
11272 case "x$CC" in #(
11273 x/*) :
11274 if as_fn_executable_p ${CC}_r; then :
11275 PTHREAD_CC="${CC}_r"
11276 fi ;; #(
11277 *) :
11278 for ac_prog in ${CC}_r
11280 # Extract the first word of "$ac_prog", so it can be a program name with args.
11281 set dummy $ac_prog; ac_word=$2
11282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11283 $as_echo_n "checking for $ac_word... " >&6; }
11284 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11285 $as_echo_n "(cached) " >&6
11286 else
11287 if test -n "$PTHREAD_CC"; then
11288 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11289 else
11290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11291 for as_dir in $PATH
11293 IFS=$as_save_IFS
11294 test -z "$as_dir" && as_dir=.
11295 for ac_exec_ext in '' $ac_executable_extensions; do
11296 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11297 ac_cv_prog_PTHREAD_CC="$ac_prog"
11298 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11299 break 2
11301 done
11302 done
11303 IFS=$as_save_IFS
11307 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11308 if test -n "$PTHREAD_CC"; then
11309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11310 $as_echo "$PTHREAD_CC" >&6; }
11311 else
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11313 $as_echo "no" >&6; }
11317 test -n "$PTHREAD_CC" && break
11318 done
11319 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11321 esac ;; #(
11322 *) :
11324 esac
11326 esac
11330 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11336 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11337 if test "x$ax_pthread_ok" = "xyes"; then
11339 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11342 else
11343 ax_pthread_ok=no
11346 ac_ext=c
11347 ac_cpp='$CPP $CPPFLAGS'
11348 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11349 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11350 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11352 # set thread flags
11354 # Some platforms use these, so just define them. They can't hurt if they
11355 # are not supported.
11356 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE"
11358 # Check for *_r functions
11359 _CFLAGS="$CFLAGS"
11360 _LIBS="$LIBS"
11361 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11362 LIBS="$LIBS $PTHREAD_LIBS"
11364 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11365 if test "x$ac_cv_header_pthread_h" = xyes; then :
11367 else
11368 as_fn_error $? "
11369 pthread.h not found" "$LINENO" 5
11374 for ac_func in strerror_r
11375 do :
11376 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
11377 if test "x$ac_cv_func_strerror_r" = xyes; then :
11378 cat >>confdefs.h <<_ACEOF
11379 #define HAVE_STRERROR_R 1
11380 _ACEOF
11383 done
11386 # Do test here with the proper thread flags
11387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11388 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11389 if ${pgac_cv_func_strerror_r_int+:} false; then :
11390 $as_echo_n "(cached) " >&6
11391 else
11392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11393 /* end confdefs.h. */
11394 #include <string.h>
11396 main ()
11398 char buf[100];
11399 switch (strerror_r(1, buf, sizeof(buf)))
11400 { case 0: break; default: break; }
11403 return 0;
11405 _ACEOF
11406 if ac_fn_c_try_compile "$LINENO"; then :
11407 pgac_cv_func_strerror_r_int=yes
11408 else
11409 pgac_cv_func_strerror_r_int=no
11411 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11414 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11415 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11417 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11422 CFLAGS="$_CFLAGS"
11423 LIBS="$_LIBS"
11426 else
11427 # else
11428 # do not use values from template file
11429 PTHREAD_CFLAGS=
11430 PTHREAD_LIBS=
11432 fi # fi
11439 ## Libraries
11441 ## Most libraries are included only if they demonstrably provide a function
11442 ## we need, but libm is an exception: always include it, because there are
11443 ## too many compilers that play cute optimization games that will break
11444 ## probes for standard functions such as pow().
11447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11448 $as_echo_n "checking for main in -lm... " >&6; }
11449 if ${ac_cv_lib_m_main+:} false; then :
11450 $as_echo_n "(cached) " >&6
11451 else
11452 ac_check_lib_save_LIBS=$LIBS
11453 LIBS="-lm $LIBS"
11454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11455 /* end confdefs.h. */
11459 main ()
11461 return main ();
11463 return 0;
11465 _ACEOF
11466 if ac_fn_c_try_link "$LINENO"; then :
11467 ac_cv_lib_m_main=yes
11468 else
11469 ac_cv_lib_m_main=no
11471 rm -f core conftest.err conftest.$ac_objext \
11472 conftest$ac_exeext conftest.$ac_ext
11473 LIBS=$ac_check_lib_save_LIBS
11475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11476 $as_echo "$ac_cv_lib_m_main" >&6; }
11477 if test "x$ac_cv_lib_m_main" = xyes; then :
11478 cat >>confdefs.h <<_ACEOF
11479 #define HAVE_LIBM 1
11480 _ACEOF
11482 LIBS="-lm $LIBS"
11486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11487 $as_echo_n "checking for library containing setproctitle... " >&6; }
11488 if ${ac_cv_search_setproctitle+:} false; then :
11489 $as_echo_n "(cached) " >&6
11490 else
11491 ac_func_search_save_LIBS=$LIBS
11492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11493 /* end confdefs.h. */
11495 /* Override any GCC internal prototype to avoid an error.
11496 Use char because int might match the return type of a GCC
11497 builtin and then its argument prototype would still apply. */
11498 #ifdef __cplusplus
11499 extern "C"
11500 #endif
11501 char setproctitle ();
11503 main ()
11505 return setproctitle ();
11507 return 0;
11509 _ACEOF
11510 for ac_lib in '' util; do
11511 if test -z "$ac_lib"; then
11512 ac_res="none required"
11513 else
11514 ac_res=-l$ac_lib
11515 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11517 if ac_fn_c_try_link "$LINENO"; then :
11518 ac_cv_search_setproctitle=$ac_res
11520 rm -f core conftest.err conftest.$ac_objext \
11521 conftest$ac_exeext
11522 if ${ac_cv_search_setproctitle+:} false; then :
11523 break
11525 done
11526 if ${ac_cv_search_setproctitle+:} false; then :
11528 else
11529 ac_cv_search_setproctitle=no
11531 rm conftest.$ac_ext
11532 LIBS=$ac_func_search_save_LIBS
11534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11535 $as_echo "$ac_cv_search_setproctitle" >&6; }
11536 ac_res=$ac_cv_search_setproctitle
11537 if test "$ac_res" != no; then :
11538 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11542 # gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
11543 # when enabling asan the dlopen check doesn't notice that -ldl is actually
11544 # required. Just checking for dlsym() ought to suffice.
11545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
11546 $as_echo_n "checking for library containing dlsym... " >&6; }
11547 if ${ac_cv_search_dlsym+:} false; then :
11548 $as_echo_n "(cached) " >&6
11549 else
11550 ac_func_search_save_LIBS=$LIBS
11551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11552 /* end confdefs.h. */
11554 /* Override any GCC internal prototype to avoid an error.
11555 Use char because int might match the return type of a GCC
11556 builtin and then its argument prototype would still apply. */
11557 #ifdef __cplusplus
11558 extern "C"
11559 #endif
11560 char dlsym ();
11562 main ()
11564 return dlsym ();
11566 return 0;
11568 _ACEOF
11569 for ac_lib in '' dl; do
11570 if test -z "$ac_lib"; then
11571 ac_res="none required"
11572 else
11573 ac_res=-l$ac_lib
11574 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11576 if ac_fn_c_try_link "$LINENO"; then :
11577 ac_cv_search_dlsym=$ac_res
11579 rm -f core conftest.err conftest.$ac_objext \
11580 conftest$ac_exeext
11581 if ${ac_cv_search_dlsym+:} false; then :
11582 break
11584 done
11585 if ${ac_cv_search_dlsym+:} false; then :
11587 else
11588 ac_cv_search_dlsym=no
11590 rm conftest.$ac_ext
11591 LIBS=$ac_func_search_save_LIBS
11593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
11594 $as_echo "$ac_cv_search_dlsym" >&6; }
11595 ac_res=$ac_cv_search_dlsym
11596 if test "$ac_res" != no; then :
11597 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11602 $as_echo_n "checking for library containing socket... " >&6; }
11603 if ${ac_cv_search_socket+:} false; then :
11604 $as_echo_n "(cached) " >&6
11605 else
11606 ac_func_search_save_LIBS=$LIBS
11607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11608 /* end confdefs.h. */
11610 /* Override any GCC internal prototype to avoid an error.
11611 Use char because int might match the return type of a GCC
11612 builtin and then its argument prototype would still apply. */
11613 #ifdef __cplusplus
11614 extern "C"
11615 #endif
11616 char socket ();
11618 main ()
11620 return socket ();
11622 return 0;
11624 _ACEOF
11625 for ac_lib in '' socket ws2_32; do
11626 if test -z "$ac_lib"; then
11627 ac_res="none required"
11628 else
11629 ac_res=-l$ac_lib
11630 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11632 if ac_fn_c_try_link "$LINENO"; then :
11633 ac_cv_search_socket=$ac_res
11635 rm -f core conftest.err conftest.$ac_objext \
11636 conftest$ac_exeext
11637 if ${ac_cv_search_socket+:} false; then :
11638 break
11640 done
11641 if ${ac_cv_search_socket+:} false; then :
11643 else
11644 ac_cv_search_socket=no
11646 rm conftest.$ac_ext
11647 LIBS=$ac_func_search_save_LIBS
11649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11650 $as_echo "$ac_cv_search_socket" >&6; }
11651 ac_res=$ac_cv_search_socket
11652 if test "$ac_res" != no; then :
11653 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11658 $as_echo_n "checking for library containing getopt_long... " >&6; }
11659 if ${ac_cv_search_getopt_long+:} false; then :
11660 $as_echo_n "(cached) " >&6
11661 else
11662 ac_func_search_save_LIBS=$LIBS
11663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11664 /* end confdefs.h. */
11666 /* Override any GCC internal prototype to avoid an error.
11667 Use char because int might match the return type of a GCC
11668 builtin and then its argument prototype would still apply. */
11669 #ifdef __cplusplus
11670 extern "C"
11671 #endif
11672 char getopt_long ();
11674 main ()
11676 return getopt_long ();
11678 return 0;
11680 _ACEOF
11681 for ac_lib in '' getopt gnugetopt; do
11682 if test -z "$ac_lib"; then
11683 ac_res="none required"
11684 else
11685 ac_res=-l$ac_lib
11686 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11688 if ac_fn_c_try_link "$LINENO"; then :
11689 ac_cv_search_getopt_long=$ac_res
11691 rm -f core conftest.err conftest.$ac_objext \
11692 conftest$ac_exeext
11693 if ${ac_cv_search_getopt_long+:} false; then :
11694 break
11696 done
11697 if ${ac_cv_search_getopt_long+:} false; then :
11699 else
11700 ac_cv_search_getopt_long=no
11702 rm conftest.$ac_ext
11703 LIBS=$ac_func_search_save_LIBS
11705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11706 $as_echo "$ac_cv_search_getopt_long" >&6; }
11707 ac_res=$ac_cv_search_getopt_long
11708 if test "$ac_res" != no; then :
11709 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11714 $as_echo_n "checking for library containing shm_open... " >&6; }
11715 if ${ac_cv_search_shm_open+:} false; then :
11716 $as_echo_n "(cached) " >&6
11717 else
11718 ac_func_search_save_LIBS=$LIBS
11719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11720 /* end confdefs.h. */
11722 /* Override any GCC internal prototype to avoid an error.
11723 Use char because int might match the return type of a GCC
11724 builtin and then its argument prototype would still apply. */
11725 #ifdef __cplusplus
11726 extern "C"
11727 #endif
11728 char shm_open ();
11730 main ()
11732 return shm_open ();
11734 return 0;
11736 _ACEOF
11737 for ac_lib in '' rt; do
11738 if test -z "$ac_lib"; then
11739 ac_res="none required"
11740 else
11741 ac_res=-l$ac_lib
11742 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11744 if ac_fn_c_try_link "$LINENO"; then :
11745 ac_cv_search_shm_open=$ac_res
11747 rm -f core conftest.err conftest.$ac_objext \
11748 conftest$ac_exeext
11749 if ${ac_cv_search_shm_open+:} false; then :
11750 break
11752 done
11753 if ${ac_cv_search_shm_open+:} false; then :
11755 else
11756 ac_cv_search_shm_open=no
11758 rm conftest.$ac_ext
11759 LIBS=$ac_func_search_save_LIBS
11761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11762 $as_echo "$ac_cv_search_shm_open" >&6; }
11763 ac_res=$ac_cv_search_shm_open
11764 if test "$ac_res" != no; then :
11765 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11770 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11771 if ${ac_cv_search_shm_unlink+:} false; then :
11772 $as_echo_n "(cached) " >&6
11773 else
11774 ac_func_search_save_LIBS=$LIBS
11775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11776 /* end confdefs.h. */
11778 /* Override any GCC internal prototype to avoid an error.
11779 Use char because int might match the return type of a GCC
11780 builtin and then its argument prototype would still apply. */
11781 #ifdef __cplusplus
11782 extern "C"
11783 #endif
11784 char shm_unlink ();
11786 main ()
11788 return shm_unlink ();
11790 return 0;
11792 _ACEOF
11793 for ac_lib in '' rt; do
11794 if test -z "$ac_lib"; then
11795 ac_res="none required"
11796 else
11797 ac_res=-l$ac_lib
11798 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11800 if ac_fn_c_try_link "$LINENO"; then :
11801 ac_cv_search_shm_unlink=$ac_res
11803 rm -f core conftest.err conftest.$ac_objext \
11804 conftest$ac_exeext
11805 if ${ac_cv_search_shm_unlink+:} false; then :
11806 break
11808 done
11809 if ${ac_cv_search_shm_unlink+:} false; then :
11811 else
11812 ac_cv_search_shm_unlink=no
11814 rm conftest.$ac_ext
11815 LIBS=$ac_func_search_save_LIBS
11817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11818 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11819 ac_res=$ac_cv_search_shm_unlink
11820 if test "$ac_res" != no; then :
11821 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11826 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11827 if ${ac_cv_search_clock_gettime+:} false; then :
11828 $as_echo_n "(cached) " >&6
11829 else
11830 ac_func_search_save_LIBS=$LIBS
11831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11832 /* end confdefs.h. */
11834 /* Override any GCC internal prototype to avoid an error.
11835 Use char because int might match the return type of a GCC
11836 builtin and then its argument prototype would still apply. */
11837 #ifdef __cplusplus
11838 extern "C"
11839 #endif
11840 char clock_gettime ();
11842 main ()
11844 return clock_gettime ();
11846 return 0;
11848 _ACEOF
11849 for ac_lib in '' rt; do
11850 if test -z "$ac_lib"; then
11851 ac_res="none required"
11852 else
11853 ac_res=-l$ac_lib
11854 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11856 if ac_fn_c_try_link "$LINENO"; then :
11857 ac_cv_search_clock_gettime=$ac_res
11859 rm -f core conftest.err conftest.$ac_objext \
11860 conftest$ac_exeext
11861 if ${ac_cv_search_clock_gettime+:} false; then :
11862 break
11864 done
11865 if ${ac_cv_search_clock_gettime+:} false; then :
11867 else
11868 ac_cv_search_clock_gettime=no
11870 rm conftest.$ac_ext
11871 LIBS=$ac_func_search_save_LIBS
11873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11874 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11875 ac_res=$ac_cv_search_clock_gettime
11876 if test "$ac_res" != no; then :
11877 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11881 # Cygwin:
11882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11883 $as_echo_n "checking for library containing shmget... " >&6; }
11884 if ${ac_cv_search_shmget+:} false; then :
11885 $as_echo_n "(cached) " >&6
11886 else
11887 ac_func_search_save_LIBS=$LIBS
11888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11889 /* end confdefs.h. */
11891 /* Override any GCC internal prototype to avoid an error.
11892 Use char because int might match the return type of a GCC
11893 builtin and then its argument prototype would still apply. */
11894 #ifdef __cplusplus
11895 extern "C"
11896 #endif
11897 char shmget ();
11899 main ()
11901 return shmget ();
11903 return 0;
11905 _ACEOF
11906 for ac_lib in '' cygipc; do
11907 if test -z "$ac_lib"; then
11908 ac_res="none required"
11909 else
11910 ac_res=-l$ac_lib
11911 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11913 if ac_fn_c_try_link "$LINENO"; then :
11914 ac_cv_search_shmget=$ac_res
11916 rm -f core conftest.err conftest.$ac_objext \
11917 conftest$ac_exeext
11918 if ${ac_cv_search_shmget+:} false; then :
11919 break
11921 done
11922 if ${ac_cv_search_shmget+:} false; then :
11924 else
11925 ac_cv_search_shmget=no
11927 rm conftest.$ac_ext
11928 LIBS=$ac_func_search_save_LIBS
11930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11931 $as_echo "$ac_cv_search_shmget" >&6; }
11932 ac_res=$ac_cv_search_shmget
11933 if test "$ac_res" != no; then :
11934 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11938 # *BSD:
11939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
11940 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
11941 if ${ac_cv_search_backtrace_symbols+:} false; then :
11942 $as_echo_n "(cached) " >&6
11943 else
11944 ac_func_search_save_LIBS=$LIBS
11945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11946 /* end confdefs.h. */
11948 /* Override any GCC internal prototype to avoid an error.
11949 Use char because int might match the return type of a GCC
11950 builtin and then its argument prototype would still apply. */
11951 #ifdef __cplusplus
11952 extern "C"
11953 #endif
11954 char backtrace_symbols ();
11956 main ()
11958 return backtrace_symbols ();
11960 return 0;
11962 _ACEOF
11963 for ac_lib in '' execinfo; do
11964 if test -z "$ac_lib"; then
11965 ac_res="none required"
11966 else
11967 ac_res=-l$ac_lib
11968 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11970 if ac_fn_c_try_link "$LINENO"; then :
11971 ac_cv_search_backtrace_symbols=$ac_res
11973 rm -f core conftest.err conftest.$ac_objext \
11974 conftest$ac_exeext
11975 if ${ac_cv_search_backtrace_symbols+:} false; then :
11976 break
11978 done
11979 if ${ac_cv_search_backtrace_symbols+:} false; then :
11981 else
11982 ac_cv_search_backtrace_symbols=no
11984 rm conftest.$ac_ext
11985 LIBS=$ac_func_search_save_LIBS
11987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
11988 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
11989 ac_res=$ac_cv_search_backtrace_symbols
11990 if test "$ac_res" != no; then :
11991 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
11997 $as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
11998 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
11999 $as_echo_n "(cached) " >&6
12000 else
12001 ac_func_search_save_LIBS=$LIBS
12002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12003 /* end confdefs.h. */
12005 /* Override any GCC internal prototype to avoid an error.
12006 Use char because int might match the return type of a GCC
12007 builtin and then its argument prototype would still apply. */
12008 #ifdef __cplusplus
12009 extern "C"
12010 #endif
12011 char pthread_barrier_wait ();
12013 main ()
12015 return pthread_barrier_wait ();
12017 return 0;
12019 _ACEOF
12020 for ac_lib in '' pthread; do
12021 if test -z "$ac_lib"; then
12022 ac_res="none required"
12023 else
12024 ac_res=-l$ac_lib
12025 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12027 if ac_fn_c_try_link "$LINENO"; then :
12028 ac_cv_search_pthread_barrier_wait=$ac_res
12030 rm -f core conftest.err conftest.$ac_objext \
12031 conftest$ac_exeext
12032 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12033 break
12035 done
12036 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12038 else
12039 ac_cv_search_pthread_barrier_wait=no
12041 rm conftest.$ac_ext
12042 LIBS=$ac_func_search_save_LIBS
12044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_barrier_wait" >&5
12045 $as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
12046 ac_res=$ac_cv_search_pthread_barrier_wait
12047 if test "$ac_res" != no; then :
12048 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12053 if test "$with_readline" = yes; then
12056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
12057 $as_echo_n "checking for library containing readline... " >&6; }
12058 if ${pgac_cv_check_readline+:} false; then :
12059 $as_echo_n "(cached) " >&6
12060 else
12061 pgac_cv_check_readline=no
12062 pgac_save_LIBS=$LIBS
12063 if test x"$with_libedit_preferred" != x"yes"
12064 then READLINE_ORDER="-lreadline -ledit"
12065 else READLINE_ORDER="-ledit -lreadline"
12067 for pgac_rllib in $READLINE_ORDER ; do
12068 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
12069 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
12070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12071 /* end confdefs.h. */
12073 /* Override any GCC internal prototype to avoid an error.
12074 Use char because int might match the return type of a GCC
12075 builtin and then its argument prototype would still apply. */
12076 #ifdef __cplusplus
12077 extern "C"
12078 #endif
12079 char readline ();
12081 main ()
12083 return readline ();
12085 return 0;
12087 _ACEOF
12088 if ac_fn_c_try_link "$LINENO"; then :
12090 # Older NetBSD and OpenBSD have a broken linker that does not
12091 # recognize dependent libraries; assume curses is needed if we didn't
12092 # find any dependency.
12093 case $host_os in
12094 netbsd* | openbsd*)
12095 if test x"$pgac_lib" = x"" ; then
12096 pgac_lib=" -lcurses"
12097 fi ;;
12098 esac
12100 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12101 break
12104 rm -f core conftest.err conftest.$ac_objext \
12105 conftest$ac_exeext conftest.$ac_ext
12106 done
12107 if test "$pgac_cv_check_readline" != no ; then
12108 break
12110 done
12111 LIBS=$pgac_save_LIBS
12114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12115 $as_echo "$pgac_cv_check_readline" >&6; }
12116 if test "$pgac_cv_check_readline" != no ; then
12117 LIBS="$pgac_cv_check_readline $LIBS"
12119 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12124 if test x"$pgac_cv_check_readline" = x"no"; then
12125 as_fn_error $? "readline library not found
12126 If you have readline already installed, see config.log for details on the
12127 failure. It is possible the compiler isn't looking in the proper directory.
12128 Use --without-readline to disable readline support." "$LINENO" 5
12132 if test "$with_zlib" = yes; then
12133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12134 $as_echo_n "checking for inflate in -lz... " >&6; }
12135 if ${ac_cv_lib_z_inflate+:} false; then :
12136 $as_echo_n "(cached) " >&6
12137 else
12138 ac_check_lib_save_LIBS=$LIBS
12139 LIBS="-lz $LIBS"
12140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12141 /* end confdefs.h. */
12143 /* Override any GCC internal prototype to avoid an error.
12144 Use char because int might match the return type of a GCC
12145 builtin and then its argument prototype would still apply. */
12146 #ifdef __cplusplus
12147 extern "C"
12148 #endif
12149 char inflate ();
12151 main ()
12153 return inflate ();
12155 return 0;
12157 _ACEOF
12158 if ac_fn_c_try_link "$LINENO"; then :
12159 ac_cv_lib_z_inflate=yes
12160 else
12161 ac_cv_lib_z_inflate=no
12163 rm -f core conftest.err conftest.$ac_objext \
12164 conftest$ac_exeext conftest.$ac_ext
12165 LIBS=$ac_check_lib_save_LIBS
12167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12168 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12169 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12170 cat >>confdefs.h <<_ACEOF
12171 #define HAVE_LIBZ 1
12172 _ACEOF
12174 LIBS="-lz $LIBS"
12176 else
12177 as_fn_error $? "zlib library not found
12178 If you have zlib already installed, see config.log for details on the
12179 failure. It is possible the compiler isn't looking in the proper directory.
12180 Use --without-zlib to disable zlib support." "$LINENO" 5
12185 if test "$enable_spinlocks" = yes; then
12187 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
12189 else
12190 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12191 *** Not using spinlocks will cause poor performance." >&5
12192 $as_echo "$as_me: WARNING:
12193 *** Not using spinlocks will cause poor performance." >&2;}
12196 if test "$enable_atomics" = yes; then
12198 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
12200 else
12201 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12202 *** Not using atomic operations will cause poor performance." >&5
12203 $as_echo "$as_me: WARNING:
12204 *** Not using atomic operations will cause poor performance." >&2;}
12207 if test "$with_gssapi" = yes ; then
12208 if test "$PORTNAME" != "win32"; then
12209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_store_cred_into" >&5
12210 $as_echo_n "checking for library containing gss_store_cred_into... " >&6; }
12211 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12212 $as_echo_n "(cached) " >&6
12213 else
12214 ac_func_search_save_LIBS=$LIBS
12215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12216 /* end confdefs.h. */
12218 /* Override any GCC internal prototype to avoid an error.
12219 Use char because int might match the return type of a GCC
12220 builtin and then its argument prototype would still apply. */
12221 #ifdef __cplusplus
12222 extern "C"
12223 #endif
12224 char gss_store_cred_into ();
12226 main ()
12228 return gss_store_cred_into ();
12230 return 0;
12232 _ACEOF
12233 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12234 if test -z "$ac_lib"; then
12235 ac_res="none required"
12236 else
12237 ac_res=-l$ac_lib
12238 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12240 if ac_fn_c_try_link "$LINENO"; then :
12241 ac_cv_search_gss_store_cred_into=$ac_res
12243 rm -f core conftest.err conftest.$ac_objext \
12244 conftest$ac_exeext
12245 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12246 break
12248 done
12249 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12251 else
12252 ac_cv_search_gss_store_cred_into=no
12254 rm conftest.$ac_ext
12255 LIBS=$ac_func_search_save_LIBS
12257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_store_cred_into" >&5
12258 $as_echo "$ac_cv_search_gss_store_cred_into" >&6; }
12259 ac_res=$ac_cv_search_gss_store_cred_into
12260 if test "$ac_res" != no; then :
12261 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12263 else
12264 as_fn_error $? "could not find function 'gss_store_cred_into' required for GSSAPI" "$LINENO" 5
12267 else
12268 LIBS="$LIBS -lgssapi32"
12273 # SSL Library
12275 # There is currently only one supported SSL/TLS library: OpenSSL.
12280 # Check whether --with-ssl was given.
12281 if test "${with_ssl+set}" = set; then :
12282 withval=$with_ssl;
12283 case $withval in
12284 yes)
12285 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12288 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12293 esac
12298 if test x"$with_ssl" = x"" ; then
12299 with_ssl=no
12304 # Check whether --with-openssl was given.
12305 if test "${with_openssl+set}" = set; then :
12306 withval=$with_openssl;
12307 case $withval in
12308 yes)
12315 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12317 esac
12319 else
12320 with_openssl=no
12325 if test "$with_openssl" = yes ; then
12326 with_ssl=openssl
12329 if test "$with_ssl" = openssl ; then
12330 # Minimum required OpenSSL version is 1.0.2
12332 $as_echo "#define OPENSSL_API_COMPAT 0x10002000L" >>confdefs.h
12334 if test "$PORTNAME" != "win32"; then
12335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12336 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12337 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12338 $as_echo_n "(cached) " >&6
12339 else
12340 ac_check_lib_save_LIBS=$LIBS
12341 LIBS="-lcrypto $LIBS"
12342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12343 /* end confdefs.h. */
12345 /* Override any GCC internal prototype to avoid an error.
12346 Use char because int might match the return type of a GCC
12347 builtin and then its argument prototype would still apply. */
12348 #ifdef __cplusplus
12349 extern "C"
12350 #endif
12351 char CRYPTO_new_ex_data ();
12353 main ()
12355 return CRYPTO_new_ex_data ();
12357 return 0;
12359 _ACEOF
12360 if ac_fn_c_try_link "$LINENO"; then :
12361 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12362 else
12363 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12365 rm -f core conftest.err conftest.$ac_objext \
12366 conftest$ac_exeext conftest.$ac_ext
12367 LIBS=$ac_check_lib_save_LIBS
12369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12370 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12371 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12372 cat >>confdefs.h <<_ACEOF
12373 #define HAVE_LIBCRYPTO 1
12374 _ACEOF
12376 LIBS="-lcrypto $LIBS"
12378 else
12379 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12383 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12384 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12385 $as_echo_n "(cached) " >&6
12386 else
12387 ac_check_lib_save_LIBS=$LIBS
12388 LIBS="-lssl $LIBS"
12389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12390 /* end confdefs.h. */
12392 /* Override any GCC internal prototype to avoid an error.
12393 Use char because int might match the return type of a GCC
12394 builtin and then its argument prototype would still apply. */
12395 #ifdef __cplusplus
12396 extern "C"
12397 #endif
12398 char SSL_new ();
12400 main ()
12402 return SSL_new ();
12404 return 0;
12406 _ACEOF
12407 if ac_fn_c_try_link "$LINENO"; then :
12408 ac_cv_lib_ssl_SSL_new=yes
12409 else
12410 ac_cv_lib_ssl_SSL_new=no
12412 rm -f core conftest.err conftest.$ac_objext \
12413 conftest$ac_exeext conftest.$ac_ext
12414 LIBS=$ac_check_lib_save_LIBS
12416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12417 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12418 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12419 cat >>confdefs.h <<_ACEOF
12420 #define HAVE_LIBSSL 1
12421 _ACEOF
12423 LIBS="-lssl $LIBS"
12425 else
12426 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12429 else
12430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12431 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12432 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12433 $as_echo_n "(cached) " >&6
12434 else
12435 ac_func_search_save_LIBS=$LIBS
12436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12437 /* end confdefs.h. */
12439 /* Override any GCC internal prototype to avoid an error.
12440 Use char because int might match the return type of a GCC
12441 builtin and then its argument prototype would still apply. */
12442 #ifdef __cplusplus
12443 extern "C"
12444 #endif
12445 char CRYPTO_new_ex_data ();
12447 main ()
12449 return CRYPTO_new_ex_data ();
12451 return 0;
12453 _ACEOF
12454 for ac_lib in '' eay32 crypto; do
12455 if test -z "$ac_lib"; then
12456 ac_res="none required"
12457 else
12458 ac_res=-l$ac_lib
12459 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12461 if ac_fn_c_try_link "$LINENO"; then :
12462 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12464 rm -f core conftest.err conftest.$ac_objext \
12465 conftest$ac_exeext
12466 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12467 break
12469 done
12470 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12472 else
12473 ac_cv_search_CRYPTO_new_ex_data=no
12475 rm conftest.$ac_ext
12476 LIBS=$ac_func_search_save_LIBS
12478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12479 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12480 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12481 if test "$ac_res" != no; then :
12482 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12484 else
12485 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12489 $as_echo_n "checking for library containing SSL_new... " >&6; }
12490 if ${ac_cv_search_SSL_new+:} false; then :
12491 $as_echo_n "(cached) " >&6
12492 else
12493 ac_func_search_save_LIBS=$LIBS
12494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12495 /* end confdefs.h. */
12497 /* Override any GCC internal prototype to avoid an error.
12498 Use char because int might match the return type of a GCC
12499 builtin and then its argument prototype would still apply. */
12500 #ifdef __cplusplus
12501 extern "C"
12502 #endif
12503 char SSL_new ();
12505 main ()
12507 return SSL_new ();
12509 return 0;
12511 _ACEOF
12512 for ac_lib in '' ssleay32 ssl; do
12513 if test -z "$ac_lib"; then
12514 ac_res="none required"
12515 else
12516 ac_res=-l$ac_lib
12517 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12519 if ac_fn_c_try_link "$LINENO"; then :
12520 ac_cv_search_SSL_new=$ac_res
12522 rm -f core conftest.err conftest.$ac_objext \
12523 conftest$ac_exeext
12524 if ${ac_cv_search_SSL_new+:} false; then :
12525 break
12527 done
12528 if ${ac_cv_search_SSL_new+:} false; then :
12530 else
12531 ac_cv_search_SSL_new=no
12533 rm conftest.$ac_ext
12534 LIBS=$ac_func_search_save_LIBS
12536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12537 $as_echo "$ac_cv_search_SSL_new" >&6; }
12538 ac_res=$ac_cv_search_SSL_new
12539 if test "$ac_res" != no; then :
12540 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12542 else
12543 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12547 # Function introduced in OpenSSL 1.0.2, not in LibreSSL.
12548 for ac_func in SSL_CTX_set_cert_cb
12549 do :
12550 ac_fn_c_check_func "$LINENO" "SSL_CTX_set_cert_cb" "ac_cv_func_SSL_CTX_set_cert_cb"
12551 if test "x$ac_cv_func_SSL_CTX_set_cert_cb" = xyes; then :
12552 cat >>confdefs.h <<_ACEOF
12553 #define HAVE_SSL_CTX_SET_CERT_CB 1
12554 _ACEOF
12557 done
12559 # Functions introduced in OpenSSL 1.1.0. We used to check for
12560 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12561 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12562 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12563 # functions.
12564 for ac_func in OPENSSL_init_ssl BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free
12565 do :
12566 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12567 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12568 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12569 cat >>confdefs.h <<_ACEOF
12570 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12571 _ACEOF
12574 done
12576 # OpenSSL versions before 1.1.0 required setting callback functions, for
12577 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12578 # function was removed.
12579 for ac_func in CRYPTO_lock
12580 do :
12581 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12582 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12583 cat >>confdefs.h <<_ACEOF
12584 #define HAVE_CRYPTO_LOCK 1
12585 _ACEOF
12588 done
12590 # Function introduced in OpenSSL 1.1.1.
12591 for ac_func in X509_get_signature_info
12592 do :
12593 ac_fn_c_check_func "$LINENO" "X509_get_signature_info" "ac_cv_func_X509_get_signature_info"
12594 if test "x$ac_cv_func_X509_get_signature_info" = xyes; then :
12595 cat >>confdefs.h <<_ACEOF
12596 #define HAVE_X509_GET_SIGNATURE_INFO 1
12597 _ACEOF
12600 done
12603 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
12605 elif test "$with_ssl" != no ; then
12606 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
12610 if test "$with_pam" = yes ; then
12611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12612 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12613 if ${ac_cv_lib_pam_pam_start+:} false; then :
12614 $as_echo_n "(cached) " >&6
12615 else
12616 ac_check_lib_save_LIBS=$LIBS
12617 LIBS="-lpam $LIBS"
12618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12619 /* end confdefs.h. */
12621 /* Override any GCC internal prototype to avoid an error.
12622 Use char because int might match the return type of a GCC
12623 builtin and then its argument prototype would still apply. */
12624 #ifdef __cplusplus
12625 extern "C"
12626 #endif
12627 char pam_start ();
12629 main ()
12631 return pam_start ();
12633 return 0;
12635 _ACEOF
12636 if ac_fn_c_try_link "$LINENO"; then :
12637 ac_cv_lib_pam_pam_start=yes
12638 else
12639 ac_cv_lib_pam_pam_start=no
12641 rm -f core conftest.err conftest.$ac_objext \
12642 conftest$ac_exeext conftest.$ac_ext
12643 LIBS=$ac_check_lib_save_LIBS
12645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12646 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12647 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12648 cat >>confdefs.h <<_ACEOF
12649 #define HAVE_LIBPAM 1
12650 _ACEOF
12652 LIBS="-lpam $LIBS"
12654 else
12655 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12660 if test "$with_libxml" = yes ; then
12661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12662 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12663 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12664 $as_echo_n "(cached) " >&6
12665 else
12666 ac_check_lib_save_LIBS=$LIBS
12667 LIBS="-lxml2 $LIBS"
12668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12669 /* end confdefs.h. */
12671 /* Override any GCC internal prototype to avoid an error.
12672 Use char because int might match the return type of a GCC
12673 builtin and then its argument prototype would still apply. */
12674 #ifdef __cplusplus
12675 extern "C"
12676 #endif
12677 char xmlSaveToBuffer ();
12679 main ()
12681 return xmlSaveToBuffer ();
12683 return 0;
12685 _ACEOF
12686 if ac_fn_c_try_link "$LINENO"; then :
12687 ac_cv_lib_xml2_xmlSaveToBuffer=yes
12688 else
12689 ac_cv_lib_xml2_xmlSaveToBuffer=no
12691 rm -f core conftest.err conftest.$ac_objext \
12692 conftest$ac_exeext conftest.$ac_ext
12693 LIBS=$ac_check_lib_save_LIBS
12695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12696 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12697 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12698 cat >>confdefs.h <<_ACEOF
12699 #define HAVE_LIBXML2 1
12700 _ACEOF
12702 LIBS="-lxml2 $LIBS"
12704 else
12705 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12710 if test "$with_libxslt" = yes ; then
12711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12712 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12713 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12714 $as_echo_n "(cached) " >&6
12715 else
12716 ac_check_lib_save_LIBS=$LIBS
12717 LIBS="-lxslt $LIBS"
12718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12719 /* end confdefs.h. */
12721 /* Override any GCC internal prototype to avoid an error.
12722 Use char because int might match the return type of a GCC
12723 builtin and then its argument prototype would still apply. */
12724 #ifdef __cplusplus
12725 extern "C"
12726 #endif
12727 char xsltCleanupGlobals ();
12729 main ()
12731 return xsltCleanupGlobals ();
12733 return 0;
12735 _ACEOF
12736 if ac_fn_c_try_link "$LINENO"; then :
12737 ac_cv_lib_xslt_xsltCleanupGlobals=yes
12738 else
12739 ac_cv_lib_xslt_xsltCleanupGlobals=no
12741 rm -f core conftest.err conftest.$ac_objext \
12742 conftest$ac_exeext conftest.$ac_ext
12743 LIBS=$ac_check_lib_save_LIBS
12745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12746 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12747 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12748 cat >>confdefs.h <<_ACEOF
12749 #define HAVE_LIBXSLT 1
12750 _ACEOF
12752 LIBS="-lxslt $LIBS"
12754 else
12755 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12760 if test "$with_lz4" = yes ; then
12761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
12762 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
12763 if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
12764 $as_echo_n "(cached) " >&6
12765 else
12766 ac_check_lib_save_LIBS=$LIBS
12767 LIBS="-llz4 $LIBS"
12768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12769 /* end confdefs.h. */
12771 /* Override any GCC internal prototype to avoid an error.
12772 Use char because int might match the return type of a GCC
12773 builtin and then its argument prototype would still apply. */
12774 #ifdef __cplusplus
12775 extern "C"
12776 #endif
12777 char LZ4_compress_default ();
12779 main ()
12781 return LZ4_compress_default ();
12783 return 0;
12785 _ACEOF
12786 if ac_fn_c_try_link "$LINENO"; then :
12787 ac_cv_lib_lz4_LZ4_compress_default=yes
12788 else
12789 ac_cv_lib_lz4_LZ4_compress_default=no
12791 rm -f core conftest.err conftest.$ac_objext \
12792 conftest$ac_exeext conftest.$ac_ext
12793 LIBS=$ac_check_lib_save_LIBS
12795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5
12796 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
12797 if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
12798 cat >>confdefs.h <<_ACEOF
12799 #define HAVE_LIBLZ4 1
12800 _ACEOF
12802 LIBS="-llz4 $LIBS"
12804 else
12805 as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
12810 if test "$with_zstd" = yes ; then
12811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5
12812 $as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; }
12813 if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then :
12814 $as_echo_n "(cached) " >&6
12815 else
12816 ac_check_lib_save_LIBS=$LIBS
12817 LIBS="-lzstd $LIBS"
12818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12819 /* end confdefs.h. */
12821 /* Override any GCC internal prototype to avoid an error.
12822 Use char because int might match the return type of a GCC
12823 builtin and then its argument prototype would still apply. */
12824 #ifdef __cplusplus
12825 extern "C"
12826 #endif
12827 char ZSTD_compress ();
12829 main ()
12831 return ZSTD_compress ();
12833 return 0;
12835 _ACEOF
12836 if ac_fn_c_try_link "$LINENO"; then :
12837 ac_cv_lib_zstd_ZSTD_compress=yes
12838 else
12839 ac_cv_lib_zstd_ZSTD_compress=no
12841 rm -f core conftest.err conftest.$ac_objext \
12842 conftest$ac_exeext conftest.$ac_ext
12843 LIBS=$ac_check_lib_save_LIBS
12845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5
12846 $as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; }
12847 if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then :
12848 cat >>confdefs.h <<_ACEOF
12849 #define HAVE_LIBZSTD 1
12850 _ACEOF
12852 LIBS="-lzstd $LIBS"
12854 else
12855 as_fn_error $? "library 'zstd' is required for ZSTD support" "$LINENO" 5
12860 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12861 if test "$with_ldap" = yes ; then
12862 _LIBS="$LIBS"
12863 if test "$PORTNAME" != "win32"; then
12864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12865 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12866 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12867 $as_echo_n "(cached) " >&6
12868 else
12869 ac_check_lib_save_LIBS=$LIBS
12870 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12872 /* end confdefs.h. */
12874 /* Override any GCC internal prototype to avoid an error.
12875 Use char because int might match the return type of a GCC
12876 builtin and then its argument prototype would still apply. */
12877 #ifdef __cplusplus
12878 extern "C"
12879 #endif
12880 char ldap_bind ();
12882 main ()
12884 return ldap_bind ();
12886 return 0;
12888 _ACEOF
12889 if ac_fn_c_try_link "$LINENO"; then :
12890 ac_cv_lib_ldap_ldap_bind=yes
12891 else
12892 ac_cv_lib_ldap_ldap_bind=no
12894 rm -f core conftest.err conftest.$ac_objext \
12895 conftest$ac_exeext conftest.$ac_ext
12896 LIBS=$ac_check_lib_save_LIBS
12898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12899 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12900 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12901 cat >>confdefs.h <<_ACEOF
12902 #define HAVE_LIBLDAP 1
12903 _ACEOF
12905 LIBS="-lldap $LIBS"
12907 else
12908 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12911 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12912 # This test is carried out against libldap.
12913 for ac_func in ldap_initialize
12914 do :
12915 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12916 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12917 cat >>confdefs.h <<_ACEOF
12918 #define HAVE_LDAP_INITIALIZE 1
12919 _ACEOF
12922 done
12924 # The separate ldap_r library only exists in OpenLDAP < 2.5, and if we
12925 # have 2.5 or later, we shouldn't even probe for ldap_r (we might find a
12926 # library from a separate OpenLDAP installation). The most reliable
12927 # way to check that is to check for a function introduced in 2.5.
12928 ac_fn_c_check_func "$LINENO" "ldap_verify_credentials" "ac_cv_func_ldap_verify_credentials"
12929 if test "x$ac_cv_func_ldap_verify_credentials" = xyes; then :
12930 thread_safe_libldap=yes
12931 else
12932 thread_safe_libldap=no
12935 if test "$thread_safe_libldap" = no; then
12936 # Use ldap_r for FE if available, else assume ldap is thread-safe.
12937 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
12938 LIBS="$_LIBS"
12939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
12940 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
12941 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
12942 $as_echo_n "(cached) " >&6
12943 else
12944 ac_check_lib_save_LIBS=$LIBS
12945 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12947 /* end confdefs.h. */
12949 /* Override any GCC internal prototype to avoid an error.
12950 Use char because int might match the return type of a GCC
12951 builtin and then its argument prototype would still apply. */
12952 #ifdef __cplusplus
12953 extern "C"
12954 #endif
12955 char ldap_bind ();
12957 main ()
12959 return ldap_bind ();
12961 return 0;
12963 _ACEOF
12964 if ac_fn_c_try_link "$LINENO"; then :
12965 ac_cv_lib_ldap_r_ldap_bind=yes
12966 else
12967 ac_cv_lib_ldap_r_ldap_bind=no
12969 rm -f core conftest.err conftest.$ac_objext \
12970 conftest$ac_exeext conftest.$ac_ext
12971 LIBS=$ac_check_lib_save_LIBS
12973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
12974 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
12975 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
12976 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12977 else
12978 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12981 else
12982 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12984 else
12985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12986 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12987 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12988 $as_echo_n "(cached) " >&6
12989 else
12990 ac_check_lib_save_LIBS=$LIBS
12991 LIBS="-lwldap32 $LIBS"
12992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12993 /* end confdefs.h. */
12995 /* Override any GCC internal prototype to avoid an error.
12996 Use char because int might match the return type of a GCC
12997 builtin and then its argument prototype would still apply. */
12998 #ifdef __cplusplus
12999 extern "C"
13000 #endif
13001 char ldap_bind ();
13003 main ()
13005 return ldap_bind ();
13007 return 0;
13009 _ACEOF
13010 if ac_fn_c_try_link "$LINENO"; then :
13011 ac_cv_lib_wldap32_ldap_bind=yes
13012 else
13013 ac_cv_lib_wldap32_ldap_bind=no
13015 rm -f core conftest.err conftest.$ac_objext \
13016 conftest$ac_exeext conftest.$ac_ext
13017 LIBS=$ac_check_lib_save_LIBS
13019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
13020 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
13021 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
13022 cat >>confdefs.h <<_ACEOF
13023 #define HAVE_LIBWLDAP32 1
13024 _ACEOF
13026 LIBS="-lwldap32 $LIBS"
13028 else
13029 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13032 LDAP_LIBS_FE="-lwldap32"
13033 LDAP_LIBS_BE="-lwldap32"
13035 LIBS="$_LIBS"
13040 # for contrib/sepgsql
13041 if test "$with_selinux" = yes; then
13042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
13043 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
13044 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
13045 $as_echo_n "(cached) " >&6
13046 else
13047 ac_check_lib_save_LIBS=$LIBS
13048 LIBS="-lselinux $LIBS"
13049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13050 /* end confdefs.h. */
13052 /* Override any GCC internal prototype to avoid an error.
13053 Use char because int might match the return type of a GCC
13054 builtin and then its argument prototype would still apply. */
13055 #ifdef __cplusplus
13056 extern "C"
13057 #endif
13058 char security_compute_create_name ();
13060 main ()
13062 return security_compute_create_name ();
13064 return 0;
13066 _ACEOF
13067 if ac_fn_c_try_link "$LINENO"; then :
13068 ac_cv_lib_selinux_security_compute_create_name=yes
13069 else
13070 ac_cv_lib_selinux_security_compute_create_name=no
13072 rm -f core conftest.err conftest.$ac_objext \
13073 conftest$ac_exeext conftest.$ac_ext
13074 LIBS=$ac_check_lib_save_LIBS
13076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
13077 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
13078 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
13079 cat >>confdefs.h <<_ACEOF
13080 #define HAVE_LIBSELINUX 1
13081 _ACEOF
13083 LIBS="-lselinux $LIBS"
13085 else
13086 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
13091 # for contrib/uuid-ossp
13092 if test "$with_uuid" = bsd ; then
13093 # On BSD, the UUID functions are in libc
13094 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
13095 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
13096 UUID_LIBS=""
13097 else
13098 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
13101 elif test "$with_uuid" = e2fs ; then
13102 # On macOS, the UUID functions are in libc
13103 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
13104 if test "x$ac_cv_func_uuid_generate" = xyes; then :
13105 UUID_LIBS=""
13106 else
13107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
13108 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
13109 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
13110 $as_echo_n "(cached) " >&6
13111 else
13112 ac_check_lib_save_LIBS=$LIBS
13113 LIBS="-luuid $LIBS"
13114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13115 /* end confdefs.h. */
13117 /* Override any GCC internal prototype to avoid an error.
13118 Use char because int might match the return type of a GCC
13119 builtin and then its argument prototype would still apply. */
13120 #ifdef __cplusplus
13121 extern "C"
13122 #endif
13123 char uuid_generate ();
13125 main ()
13127 return uuid_generate ();
13129 return 0;
13131 _ACEOF
13132 if ac_fn_c_try_link "$LINENO"; then :
13133 ac_cv_lib_uuid_uuid_generate=yes
13134 else
13135 ac_cv_lib_uuid_uuid_generate=no
13137 rm -f core conftest.err conftest.$ac_objext \
13138 conftest$ac_exeext conftest.$ac_ext
13139 LIBS=$ac_check_lib_save_LIBS
13141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13142 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13143 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13144 UUID_LIBS="-luuid"
13145 else
13146 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13151 elif test "$with_uuid" = ossp ; then
13152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13153 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13154 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13155 $as_echo_n "(cached) " >&6
13156 else
13157 ac_check_lib_save_LIBS=$LIBS
13158 LIBS="-lossp-uuid $LIBS"
13159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13160 /* end confdefs.h. */
13162 /* Override any GCC internal prototype to avoid an error.
13163 Use char because int might match the return type of a GCC
13164 builtin and then its argument prototype would still apply. */
13165 #ifdef __cplusplus
13166 extern "C"
13167 #endif
13168 char uuid_export ();
13170 main ()
13172 return uuid_export ();
13174 return 0;
13176 _ACEOF
13177 if ac_fn_c_try_link "$LINENO"; then :
13178 ac_cv_lib_ossp_uuid_uuid_export=yes
13179 else
13180 ac_cv_lib_ossp_uuid_uuid_export=no
13182 rm -f core conftest.err conftest.$ac_objext \
13183 conftest$ac_exeext conftest.$ac_ext
13184 LIBS=$ac_check_lib_save_LIBS
13186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13187 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13188 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13189 UUID_LIBS="-lossp-uuid"
13190 else
13191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13192 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13193 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13194 $as_echo_n "(cached) " >&6
13195 else
13196 ac_check_lib_save_LIBS=$LIBS
13197 LIBS="-luuid $LIBS"
13198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13199 /* end confdefs.h. */
13201 /* Override any GCC internal prototype to avoid an error.
13202 Use char because int might match the return type of a GCC
13203 builtin and then its argument prototype would still apply. */
13204 #ifdef __cplusplus
13205 extern "C"
13206 #endif
13207 char uuid_export ();
13209 main ()
13211 return uuid_export ();
13213 return 0;
13215 _ACEOF
13216 if ac_fn_c_try_link "$LINENO"; then :
13217 ac_cv_lib_uuid_uuid_export=yes
13218 else
13219 ac_cv_lib_uuid_uuid_export=no
13221 rm -f core conftest.err conftest.$ac_objext \
13222 conftest$ac_exeext conftest.$ac_ext
13223 LIBS=$ac_check_lib_save_LIBS
13225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13226 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13227 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13228 UUID_LIBS="-luuid"
13229 else
13230 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13240 ## Header files
13243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13244 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13245 if ${ac_cv_header_stdbool_h+:} false; then :
13246 $as_echo_n "(cached) " >&6
13247 else
13248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13249 /* end confdefs.h. */
13251 #include <stdbool.h>
13252 #ifndef bool
13253 "error: bool is not defined"
13254 #endif
13255 #ifndef false
13256 "error: false is not defined"
13257 #endif
13258 #if false
13259 "error: false is not 0"
13260 #endif
13261 #ifndef true
13262 "error: true is not defined"
13263 #endif
13264 #if true != 1
13265 "error: true is not 1"
13266 #endif
13267 #ifndef __bool_true_false_are_defined
13268 "error: __bool_true_false_are_defined is not defined"
13269 #endif
13271 struct s { _Bool s: 1; _Bool t; } s;
13273 char a[true == 1 ? 1 : -1];
13274 char b[false == 0 ? 1 : -1];
13275 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13276 char d[(bool) 0.5 == true ? 1 : -1];
13277 /* See body of main program for 'e'. */
13278 char f[(_Bool) 0.0 == false ? 1 : -1];
13279 char g[true];
13280 char h[sizeof (_Bool)];
13281 char i[sizeof s.t];
13282 enum { j = false, k = true, l = false * true, m = true * 256 };
13283 /* The following fails for
13284 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13285 _Bool n[m];
13286 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13287 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13288 /* Catch a bug in an HP-UX C compiler. See
13289 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13290 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13292 _Bool q = true;
13293 _Bool *pq = &q;
13296 main ()
13299 bool e = &s;
13300 *pq |= q;
13301 *pq |= ! q;
13302 /* Refer to every declared value, to avoid compiler optimizations. */
13303 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13304 + !m + !n + !o + !p + !q + !pq);
13307 return 0;
13309 _ACEOF
13310 if ac_fn_c_try_compile "$LINENO"; then :
13311 ac_cv_header_stdbool_h=yes
13312 else
13313 ac_cv_header_stdbool_h=no
13315 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13318 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13319 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13320 if test "x$ac_cv_type__Bool" = xyes; then :
13322 cat >>confdefs.h <<_ACEOF
13323 #define HAVE__BOOL 1
13324 _ACEOF
13330 if test $ac_cv_header_stdbool_h = yes; then
13332 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13337 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
13338 do :
13339 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13340 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13341 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13342 cat >>confdefs.h <<_ACEOF
13343 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13344 _ACEOF
13348 done
13351 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13352 for ac_header in readline/readline.h
13353 do :
13354 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13355 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13356 cat >>confdefs.h <<_ACEOF
13357 #define HAVE_READLINE_READLINE_H 1
13358 _ACEOF
13360 else
13361 for ac_header in readline.h
13362 do :
13363 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13364 if test "x$ac_cv_header_readline_h" = xyes; then :
13365 cat >>confdefs.h <<_ACEOF
13366 #define HAVE_READLINE_H 1
13367 _ACEOF
13369 else
13370 as_fn_error $? "readline header not found
13371 If you have readline already installed, see config.log for details on the
13372 failure. It is possible the compiler isn't looking in the proper directory.
13373 Use --without-readline to disable readline support." "$LINENO" 5
13376 done
13380 done
13382 for ac_header in readline/history.h
13383 do :
13384 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13385 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13386 cat >>confdefs.h <<_ACEOF
13387 #define HAVE_READLINE_HISTORY_H 1
13388 _ACEOF
13390 else
13391 for ac_header in history.h
13392 do :
13393 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13394 if test "x$ac_cv_header_history_h" = xyes; then :
13395 cat >>confdefs.h <<_ACEOF
13396 #define HAVE_HISTORY_H 1
13397 _ACEOF
13399 else
13400 as_fn_error $? "history header not found
13401 If you have readline already installed, see config.log for details on the
13402 failure. It is possible the compiler isn't looking in the proper directory.
13403 Use --without-readline to disable readline support." "$LINENO" 5
13406 done
13410 done
13414 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13415 # Some installations of libedit usurp /usr/include/readline/, which seems
13416 # bad practice, since in combined installations readline will have its headers
13417 # there. We might have to resort to AC_EGREP checks to make sure we found
13418 # the proper header...
13419 for ac_header in editline/readline.h
13420 do :
13421 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13422 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13423 cat >>confdefs.h <<_ACEOF
13424 #define HAVE_EDITLINE_READLINE_H 1
13425 _ACEOF
13427 else
13428 for ac_header in readline.h
13429 do :
13430 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13431 if test "x$ac_cv_header_readline_h" = xyes; then :
13432 cat >>confdefs.h <<_ACEOF
13433 #define HAVE_READLINE_H 1
13434 _ACEOF
13436 else
13437 for ac_header in readline/readline.h
13438 do :
13439 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13440 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13441 cat >>confdefs.h <<_ACEOF
13442 #define HAVE_READLINE_READLINE_H 1
13443 _ACEOF
13445 else
13446 as_fn_error $? "readline header not found
13447 If you have libedit already installed, see config.log for details on the
13448 failure. It is possible the compiler isn't looking in the proper directory.
13449 Use --without-readline to disable libedit support." "$LINENO" 5
13452 done
13456 done
13460 done
13462 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13463 # not be there at all. Hence, don't complain if not found. We must check
13464 # though, since in yet other versions it is an independent header.
13465 for ac_header in editline/history.h
13466 do :
13467 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13468 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13469 cat >>confdefs.h <<_ACEOF
13470 #define HAVE_EDITLINE_HISTORY_H 1
13471 _ACEOF
13473 else
13474 for ac_header in history.h
13475 do :
13476 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13477 if test "x$ac_cv_header_history_h" = xyes; then :
13478 cat >>confdefs.h <<_ACEOF
13479 #define HAVE_HISTORY_H 1
13480 _ACEOF
13482 else
13483 for ac_header in readline/history.h
13484 do :
13485 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13486 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13487 cat >>confdefs.h <<_ACEOF
13488 #define HAVE_READLINE_HISTORY_H 1
13489 _ACEOF
13493 done
13497 done
13501 done
13505 if test "$with_zlib" = yes; then
13506 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13507 if test "x$ac_cv_header_zlib_h" = xyes; then :
13509 else
13510 as_fn_error $? "zlib header not found
13511 If you have zlib already installed, see config.log for details on the
13512 failure. It is possible the compiler isn't looking in the proper directory.
13513 Use --without-zlib to disable zlib support." "$LINENO" 5
13519 if test -z "$LZ4"; then
13520 for ac_prog in lz4
13522 # Extract the first word of "$ac_prog", so it can be a program name with args.
13523 set dummy $ac_prog; ac_word=$2
13524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13525 $as_echo_n "checking for $ac_word... " >&6; }
13526 if ${ac_cv_path_LZ4+:} false; then :
13527 $as_echo_n "(cached) " >&6
13528 else
13529 case $LZ4 in
13530 [\\/]* | ?:[\\/]*)
13531 ac_cv_path_LZ4="$LZ4" # Let the user override the test with a path.
13534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13535 for as_dir in $PATH
13537 IFS=$as_save_IFS
13538 test -z "$as_dir" && as_dir=.
13539 for ac_exec_ext in '' $ac_executable_extensions; do
13540 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13541 ac_cv_path_LZ4="$as_dir/$ac_word$ac_exec_ext"
13542 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13543 break 2
13545 done
13546 done
13547 IFS=$as_save_IFS
13550 esac
13552 LZ4=$ac_cv_path_LZ4
13553 if test -n "$LZ4"; then
13554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13555 $as_echo "$LZ4" >&6; }
13556 else
13557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13558 $as_echo "no" >&6; }
13562 test -n "$LZ4" && break
13563 done
13565 else
13566 # Report the value of LZ4 in configure's output in all cases.
13567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4" >&5
13568 $as_echo_n "checking for LZ4... " >&6; }
13569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13570 $as_echo "$LZ4" >&6; }
13573 if test "$with_lz4" = yes; then
13574 ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
13575 if test "x$ac_cv_header_lz4_h" = xyes; then :
13577 else
13578 as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
13584 if test -z "$ZSTD"; then
13585 for ac_prog in zstd
13587 # Extract the first word of "$ac_prog", so it can be a program name with args.
13588 set dummy $ac_prog; ac_word=$2
13589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13590 $as_echo_n "checking for $ac_word... " >&6; }
13591 if ${ac_cv_path_ZSTD+:} false; then :
13592 $as_echo_n "(cached) " >&6
13593 else
13594 case $ZSTD in
13595 [\\/]* | ?:[\\/]*)
13596 ac_cv_path_ZSTD="$ZSTD" # Let the user override the test with a path.
13599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13600 for as_dir in $PATH
13602 IFS=$as_save_IFS
13603 test -z "$as_dir" && as_dir=.
13604 for ac_exec_ext in '' $ac_executable_extensions; do
13605 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13606 ac_cv_path_ZSTD="$as_dir/$ac_word$ac_exec_ext"
13607 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13608 break 2
13610 done
13611 done
13612 IFS=$as_save_IFS
13615 esac
13617 ZSTD=$ac_cv_path_ZSTD
13618 if test -n "$ZSTD"; then
13619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13620 $as_echo "$ZSTD" >&6; }
13621 else
13622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13623 $as_echo "no" >&6; }
13627 test -n "$ZSTD" && break
13628 done
13630 else
13631 # Report the value of ZSTD in configure's output in all cases.
13632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD" >&5
13633 $as_echo_n "checking for ZSTD... " >&6; }
13634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13635 $as_echo "$ZSTD" >&6; }
13638 if test "$with_zstd" = yes; then
13639 ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default"
13640 if test "x$ac_cv_header_zstd_h" = xyes; then :
13642 else
13643 as_fn_error $? "zstd.h header file is required for ZSTD" "$LINENO" 5
13649 if test "$with_gssapi" = yes ; then
13650 for ac_header in gssapi/gssapi.h
13651 do :
13652 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13653 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13654 cat >>confdefs.h <<_ACEOF
13655 #define HAVE_GSSAPI_GSSAPI_H 1
13656 _ACEOF
13658 else
13659 for ac_header in gssapi.h
13660 do :
13661 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13662 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13663 cat >>confdefs.h <<_ACEOF
13664 #define HAVE_GSSAPI_H 1
13665 _ACEOF
13667 else
13668 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13671 done
13675 done
13677 for ac_header in gssapi/gssapi_ext.h
13678 do :
13679 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi_ext.h" "ac_cv_header_gssapi_gssapi_ext_h" "$ac_includes_default"
13680 if test "x$ac_cv_header_gssapi_gssapi_ext_h" = xyes; then :
13681 cat >>confdefs.h <<_ACEOF
13682 #define HAVE_GSSAPI_GSSAPI_EXT_H 1
13683 _ACEOF
13685 else
13686 for ac_header in gssapi_ext.h
13687 do :
13688 ac_fn_c_check_header_mongrel "$LINENO" "gssapi_ext.h" "ac_cv_header_gssapi_ext_h" "$ac_includes_default"
13689 if test "x$ac_cv_header_gssapi_ext_h" = xyes; then :
13690 cat >>confdefs.h <<_ACEOF
13691 #define HAVE_GSSAPI_EXT_H 1
13692 _ACEOF
13694 else
13695 as_fn_error $? "gssapi_ext.h header file is required for GSSAPI" "$LINENO" 5
13698 done
13702 done
13706 if test -z "$OPENSSL"; then
13707 for ac_prog in openssl
13709 # Extract the first word of "$ac_prog", so it can be a program name with args.
13710 set dummy $ac_prog; ac_word=$2
13711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13712 $as_echo_n "checking for $ac_word... " >&6; }
13713 if ${ac_cv_path_OPENSSL+:} false; then :
13714 $as_echo_n "(cached) " >&6
13715 else
13716 case $OPENSSL in
13717 [\\/]* | ?:[\\/]*)
13718 ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a path.
13721 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13722 for as_dir in $PATH
13724 IFS=$as_save_IFS
13725 test -z "$as_dir" && as_dir=.
13726 for ac_exec_ext in '' $ac_executable_extensions; do
13727 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13728 ac_cv_path_OPENSSL="$as_dir/$ac_word$ac_exec_ext"
13729 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13730 break 2
13732 done
13733 done
13734 IFS=$as_save_IFS
13737 esac
13739 OPENSSL=$ac_cv_path_OPENSSL
13740 if test -n "$OPENSSL"; then
13741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
13742 $as_echo "$OPENSSL" >&6; }
13743 else
13744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13745 $as_echo "no" >&6; }
13749 test -n "$OPENSSL" && break
13750 done
13752 else
13753 # Report the value of OPENSSL in configure's output in all cases.
13754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
13755 $as_echo_n "checking for OPENSSL... " >&6; }
13756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
13757 $as_echo "$OPENSSL" >&6; }
13760 pgac_openssl_version="$($OPENSSL version 2> /dev/null || echo openssl not found)"
13761 { $as_echo "$as_me:${as_lineno-$LINENO}: using openssl: $pgac_openssl_version" >&5
13762 $as_echo "$as_me: using openssl: $pgac_openssl_version" >&6;}
13763 if test "$with_ssl" = openssl ; then
13764 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13765 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13767 else
13768 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13772 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13773 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13775 else
13776 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13782 if test "$with_pam" = yes ; then
13783 for ac_header in security/pam_appl.h
13784 do :
13785 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13786 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13787 cat >>confdefs.h <<_ACEOF
13788 #define HAVE_SECURITY_PAM_APPL_H 1
13789 _ACEOF
13791 else
13792 for ac_header in pam/pam_appl.h
13793 do :
13794 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13795 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13796 cat >>confdefs.h <<_ACEOF
13797 #define HAVE_PAM_PAM_APPL_H 1
13798 _ACEOF
13800 else
13801 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13804 done
13808 done
13812 if test "$with_bsd_auth" = yes ; then
13813 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13814 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13816 else
13817 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13823 if test "$with_systemd" = yes ; then
13824 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13825 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13827 else
13828 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13834 if test "$with_libxml" = yes ; then
13835 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13836 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13838 else
13839 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13845 if test "$with_libxslt" = yes ; then
13846 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13847 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13849 else
13850 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13856 if test "$with_ldap" = yes ; then
13857 if test "$PORTNAME" != "win32"; then
13858 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13859 if test "x$ac_cv_header_ldap_h" = xyes; then :
13861 else
13862 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13867 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13868 if ${pgac_cv_ldap_safe+:} false; then :
13869 $as_echo_n "(cached) " >&6
13870 else
13871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13872 /* end confdefs.h. */
13873 #include <ldap.h>
13874 #if !defined(LDAP_VENDOR_VERSION) || \
13875 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13876 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13877 choke me
13878 #endif
13880 main ()
13884 return 0;
13886 _ACEOF
13887 if ac_fn_c_try_compile "$LINENO"; then :
13888 pgac_cv_ldap_safe=yes
13889 else
13890 pgac_cv_ldap_safe=no
13892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13895 $as_echo "$pgac_cv_ldap_safe" >&6; }
13897 if test "$pgac_cv_ldap_safe" != yes; then
13898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13899 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13900 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13901 *** also uses LDAP will crash on exit." >&5
13902 $as_echo "$as_me: WARNING:
13903 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13904 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13905 *** also uses LDAP will crash on exit." >&2;}
13907 else
13908 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13909 #include <windows.h>
13912 if test "x$ac_cv_header_winldap_h" = xyes; then :
13914 else
13915 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13922 if test "$with_bonjour" = yes ; then
13923 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13924 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13926 else
13927 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13933 # for contrib/uuid-ossp
13934 if test "$with_uuid" = bsd ; then
13935 for ac_header in uuid.h
13936 do :
13937 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13938 if test "x$ac_cv_header_uuid_h" = xyes; then :
13939 cat >>confdefs.h <<_ACEOF
13940 #define HAVE_UUID_H 1
13941 _ACEOF
13942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13943 /* end confdefs.h. */
13944 #include <uuid.h>
13946 _ACEOF
13947 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13948 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13950 else
13951 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13953 rm -f conftest*
13955 else
13956 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13959 done
13961 elif test "$with_uuid" = e2fs ; then
13962 for ac_header in uuid/uuid.h
13963 do :
13964 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13965 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13966 cat >>confdefs.h <<_ACEOF
13967 #define HAVE_UUID_UUID_H 1
13968 _ACEOF
13969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13970 /* end confdefs.h. */
13971 #include <uuid/uuid.h>
13973 _ACEOF
13974 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13975 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13977 else
13978 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13980 rm -f conftest*
13982 else
13983 for ac_header in uuid.h
13984 do :
13985 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13986 if test "x$ac_cv_header_uuid_h" = xyes; then :
13987 cat >>confdefs.h <<_ACEOF
13988 #define HAVE_UUID_H 1
13989 _ACEOF
13990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13991 /* end confdefs.h. */
13992 #include <uuid.h>
13994 _ACEOF
13995 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13996 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13998 else
13999 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
14001 rm -f conftest*
14003 else
14004 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
14007 done
14011 done
14013 elif test "$with_uuid" = ossp ; then
14014 for ac_header in ossp/uuid.h
14015 do :
14016 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
14017 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
14018 cat >>confdefs.h <<_ACEOF
14019 #define HAVE_OSSP_UUID_H 1
14020 _ACEOF
14021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14022 /* end confdefs.h. */
14023 #include <ossp/uuid.h>
14025 _ACEOF
14026 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14027 $EGREP "uuid_export" >/dev/null 2>&1; then :
14029 else
14030 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
14032 rm -f conftest*
14034 else
14035 for ac_header in uuid.h
14036 do :
14037 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14038 if test "x$ac_cv_header_uuid_h" = xyes; then :
14039 cat >>confdefs.h <<_ACEOF
14040 #define HAVE_UUID_H 1
14041 _ACEOF
14042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14043 /* end confdefs.h. */
14044 #include <uuid.h>
14046 _ACEOF
14047 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14048 $EGREP "uuid_export" >/dev/null 2>&1; then :
14050 else
14051 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
14053 rm -f conftest*
14055 else
14056 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
14059 done
14063 done
14067 if test "$PORTNAME" = "win32" ; then
14068 for ac_header in crtdefs.h
14069 do :
14070 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
14071 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
14072 cat >>confdefs.h <<_ACEOF
14073 #define HAVE_CRTDEFS_H 1
14074 _ACEOF
14078 done
14083 ## Types, structures, compiler characteristics
14086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14087 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14088 if ${ac_cv_c_bigendian+:} false; then :
14089 $as_echo_n "(cached) " >&6
14090 else
14091 ac_cv_c_bigendian=unknown
14092 # See if we're dealing with a universal compiler.
14093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14094 /* end confdefs.h. */
14095 #ifndef __APPLE_CC__
14096 not a universal capable compiler
14097 #endif
14098 typedef int dummy;
14100 _ACEOF
14101 if ac_fn_c_try_compile "$LINENO"; then :
14103 # Check for potential -arch flags. It is not universal unless
14104 # there are at least two -arch flags with different values.
14105 ac_arch=
14106 ac_prev=
14107 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14108 if test -n "$ac_prev"; then
14109 case $ac_word in
14110 i?86 | x86_64 | ppc | ppc64)
14111 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14112 ac_arch=$ac_word
14113 else
14114 ac_cv_c_bigendian=universal
14115 break
14118 esac
14119 ac_prev=
14120 elif test "x$ac_word" = "x-arch"; then
14121 ac_prev=arch
14123 done
14125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14126 if test $ac_cv_c_bigendian = unknown; then
14127 # See if sys/param.h defines the BYTE_ORDER macro.
14128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14129 /* end confdefs.h. */
14130 #include <sys/types.h>
14131 #include <sys/param.h>
14134 main ()
14136 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14137 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14138 && LITTLE_ENDIAN)
14139 bogus endian macros
14140 #endif
14143 return 0;
14145 _ACEOF
14146 if ac_fn_c_try_compile "$LINENO"; then :
14147 # It does; now see whether it defined to BIG_ENDIAN or not.
14148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14149 /* end confdefs.h. */
14150 #include <sys/types.h>
14151 #include <sys/param.h>
14154 main ()
14156 #if BYTE_ORDER != BIG_ENDIAN
14157 not big endian
14158 #endif
14161 return 0;
14163 _ACEOF
14164 if ac_fn_c_try_compile "$LINENO"; then :
14165 ac_cv_c_bigendian=yes
14166 else
14167 ac_cv_c_bigendian=no
14169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14173 if test $ac_cv_c_bigendian = unknown; then
14174 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14176 /* end confdefs.h. */
14177 #include <limits.h>
14180 main ()
14182 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14183 bogus endian macros
14184 #endif
14187 return 0;
14189 _ACEOF
14190 if ac_fn_c_try_compile "$LINENO"; then :
14191 # It does; now see whether it defined to _BIG_ENDIAN or not.
14192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14193 /* end confdefs.h. */
14194 #include <limits.h>
14197 main ()
14199 #ifndef _BIG_ENDIAN
14200 not big endian
14201 #endif
14204 return 0;
14206 _ACEOF
14207 if ac_fn_c_try_compile "$LINENO"; then :
14208 ac_cv_c_bigendian=yes
14209 else
14210 ac_cv_c_bigendian=no
14212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14216 if test $ac_cv_c_bigendian = unknown; then
14217 # Compile a test program.
14218 if test "$cross_compiling" = yes; then :
14219 # Try to guess by grepping values from an object file.
14220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14221 /* end confdefs.h. */
14222 short int ascii_mm[] =
14223 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14224 short int ascii_ii[] =
14225 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14226 int use_ascii (int i) {
14227 return ascii_mm[i] + ascii_ii[i];
14229 short int ebcdic_ii[] =
14230 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14231 short int ebcdic_mm[] =
14232 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14233 int use_ebcdic (int i) {
14234 return ebcdic_mm[i] + ebcdic_ii[i];
14236 extern int foo;
14239 main ()
14241 return use_ascii (foo) == use_ebcdic (foo);
14243 return 0;
14245 _ACEOF
14246 if ac_fn_c_try_compile "$LINENO"; then :
14247 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14248 ac_cv_c_bigendian=yes
14250 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14251 if test "$ac_cv_c_bigendian" = unknown; then
14252 ac_cv_c_bigendian=no
14253 else
14254 # finding both strings is unlikely to happen, but who knows?
14255 ac_cv_c_bigendian=unknown
14259 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14260 else
14261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14262 /* end confdefs.h. */
14263 $ac_includes_default
14265 main ()
14268 /* Are we little or big endian? From Harbison&Steele. */
14269 union
14271 long int l;
14272 char c[sizeof (long int)];
14273 } u;
14274 u.l = 1;
14275 return u.c[sizeof (long int) - 1] == 1;
14278 return 0;
14280 _ACEOF
14281 if ac_fn_c_try_run "$LINENO"; then :
14282 ac_cv_c_bigendian=no
14283 else
14284 ac_cv_c_bigendian=yes
14286 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14287 conftest.$ac_objext conftest.beam conftest.$ac_ext
14292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14293 $as_echo "$ac_cv_c_bigendian" >&6; }
14294 case $ac_cv_c_bigendian in #(
14295 yes)
14296 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14297 ;; #(
14299 ;; #(
14300 universal)
14302 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14304 ;; #(
14306 as_fn_error $? "unknown endianness
14307 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14308 esac
14310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14311 $as_echo_n "checking for inline... " >&6; }
14312 if ${ac_cv_c_inline+:} false; then :
14313 $as_echo_n "(cached) " >&6
14314 else
14315 ac_cv_c_inline=no
14316 for ac_kw in inline __inline__ __inline; do
14317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14318 /* end confdefs.h. */
14319 #ifndef __cplusplus
14320 typedef int foo_t;
14321 static $ac_kw foo_t static_foo () {return 0; }
14322 $ac_kw foo_t foo () {return 0; }
14323 #endif
14325 _ACEOF
14326 if ac_fn_c_try_compile "$LINENO"; then :
14327 ac_cv_c_inline=$ac_kw
14329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14330 test "$ac_cv_c_inline" != no && break
14331 done
14334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14335 $as_echo "$ac_cv_c_inline" >&6; }
14337 case $ac_cv_c_inline in
14338 inline | yes) ;;
14340 case $ac_cv_c_inline in
14341 no) ac_val=;;
14342 *) ac_val=$ac_cv_c_inline;;
14343 esac
14344 cat >>confdefs.h <<_ACEOF
14345 #ifndef __cplusplus
14346 #define inline $ac_val
14347 #endif
14348 _ACEOF
14350 esac
14352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14353 $as_echo_n "checking for printf format archetype... " >&6; }
14354 if ${pgac_cv_printf_archetype+:} false; then :
14355 $as_echo_n "(cached) " >&6
14356 else
14357 pgac_cv_printf_archetype=gnu_printf
14358 ac_save_c_werror_flag=$ac_c_werror_flag
14359 ac_c_werror_flag=yes
14360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14361 /* end confdefs.h. */
14362 extern void pgac_write(int ignore, const char *fmt,...)
14363 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14365 main ()
14367 pgac_write(0, "error %s: %m", "foo");
14369 return 0;
14371 _ACEOF
14372 if ac_fn_c_try_compile "$LINENO"; then :
14373 ac_archetype_ok=yes
14374 else
14375 ac_archetype_ok=no
14377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14378 ac_c_werror_flag=$ac_save_c_werror_flag
14380 if [ "$ac_archetype_ok" = no ]; then
14381 pgac_cv_printf_archetype=__syslog__
14382 ac_save_c_werror_flag=$ac_c_werror_flag
14383 ac_c_werror_flag=yes
14384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14385 /* end confdefs.h. */
14386 extern void pgac_write(int ignore, const char *fmt,...)
14387 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14389 main ()
14391 pgac_write(0, "error %s: %m", "foo");
14393 return 0;
14395 _ACEOF
14396 if ac_fn_c_try_compile "$LINENO"; then :
14397 ac_archetype_ok=yes
14398 else
14399 ac_archetype_ok=no
14401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14402 ac_c_werror_flag=$ac_save_c_werror_flag
14404 if [ "$ac_archetype_ok" = no ]; then
14405 pgac_cv_printf_archetype=printf
14409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14410 $as_echo "$pgac_cv_printf_archetype" >&6; }
14412 cat >>confdefs.h <<_ACEOF
14413 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14414 _ACEOF
14417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14418 $as_echo_n "checking for _Static_assert... " >&6; }
14419 if ${pgac_cv__static_assert+:} false; then :
14420 $as_echo_n "(cached) " >&6
14421 else
14422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14423 /* end confdefs.h. */
14426 main ()
14428 ({ _Static_assert(1, "foo"); })
14430 return 0;
14432 _ACEOF
14433 if ac_fn_c_try_link "$LINENO"; then :
14434 pgac_cv__static_assert=yes
14435 else
14436 pgac_cv__static_assert=no
14438 rm -f core conftest.err conftest.$ac_objext \
14439 conftest$ac_exeext conftest.$ac_ext
14441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14442 $as_echo "$pgac_cv__static_assert" >&6; }
14443 if test x"$pgac_cv__static_assert" = xyes ; then
14445 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14449 $as_echo_n "checking for typeof... " >&6; }
14450 if ${pgac_cv_c_typeof+:} false; then :
14451 $as_echo_n "(cached) " >&6
14452 else
14453 pgac_cv_c_typeof=no
14454 for pgac_kw in typeof __typeof__ decltype; do
14455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14456 /* end confdefs.h. */
14459 main ()
14461 int x = 0;
14462 $pgac_kw(x) y;
14463 y = x;
14464 return y;
14466 return 0;
14468 _ACEOF
14469 if ac_fn_c_try_compile "$LINENO"; then :
14470 pgac_cv_c_typeof=$pgac_kw
14472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14473 test "$pgac_cv_c_typeof" != no && break
14474 done
14476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14477 $as_echo "$pgac_cv_c_typeof" >&6; }
14478 if test "$pgac_cv_c_typeof" != no; then
14480 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14482 if test "$pgac_cv_c_typeof" != typeof; then
14484 cat >>confdefs.h <<_ACEOF
14485 #define typeof $pgac_cv_c_typeof
14486 _ACEOF
14490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14491 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14492 if ${pgac_cv__types_compatible+:} false; then :
14493 $as_echo_n "(cached) " >&6
14494 else
14495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14496 /* end confdefs.h. */
14499 main ()
14501 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14503 return 0;
14505 _ACEOF
14506 if ac_fn_c_try_compile "$LINENO"; then :
14507 pgac_cv__types_compatible=yes
14508 else
14509 pgac_cv__types_compatible=no
14511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14514 $as_echo "$pgac_cv__types_compatible" >&6; }
14515 if test x"$pgac_cv__types_compatible" = xyes ; then
14517 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14521 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14522 if ${pgac_cv__builtin_constant_p+:} false; then :
14523 $as_echo_n "(cached) " >&6
14524 else
14525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14526 /* end confdefs.h. */
14527 static int x;
14528 static int y[__builtin_constant_p(x) ? x : 1];
14529 static int z[__builtin_constant_p("string literal") ? 1 : x];
14532 _ACEOF
14533 if ac_fn_c_try_compile "$LINENO"; then :
14534 pgac_cv__builtin_constant_p=yes
14535 else
14536 pgac_cv__builtin_constant_p=no
14538 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14541 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14542 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14544 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14548 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14549 if ${pgac_cv__builtin_unreachable+:} false; then :
14550 $as_echo_n "(cached) " >&6
14551 else
14552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14553 /* end confdefs.h. */
14556 main ()
14558 __builtin_unreachable();
14560 return 0;
14562 _ACEOF
14563 if ac_fn_c_try_link "$LINENO"; then :
14564 pgac_cv__builtin_unreachable=yes
14565 else
14566 pgac_cv__builtin_unreachable=no
14568 rm -f core conftest.err conftest.$ac_objext \
14569 conftest$ac_exeext conftest.$ac_ext
14571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14572 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14573 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14575 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14579 $as_echo_n "checking for computed goto support... " >&6; }
14580 if ${pgac_cv_computed_goto+:} false; then :
14581 $as_echo_n "(cached) " >&6
14582 else
14583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14584 /* end confdefs.h. */
14587 main ()
14589 void *labeladdrs[] = {&&my_label};
14590 goto *labeladdrs[0];
14591 my_label:
14592 return 1;
14595 return 0;
14597 _ACEOF
14598 if ac_fn_c_try_compile "$LINENO"; then :
14599 pgac_cv_computed_goto=yes
14600 else
14601 pgac_cv_computed_goto=no
14603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14606 $as_echo "$pgac_cv_computed_goto" >&6; }
14607 if test x"$pgac_cv_computed_goto" = xyes ; then
14609 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14612 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14613 #include <time.h>
14616 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14618 cat >>confdefs.h <<_ACEOF
14619 #define HAVE_STRUCT_TM_TM_ZONE 1
14620 _ACEOF
14626 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14627 #include <sys/ipc.h>
14628 #include <sys/sem.h>
14631 if test "x$ac_cv_type_union_semun" = xyes; then :
14633 cat >>confdefs.h <<_ACEOF
14634 #define HAVE_UNION_SEMUN 1
14635 _ACEOF
14640 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/socket.h>
14642 if test "x$ac_cv_type_socklen_t" = xyes; then :
14644 cat >>confdefs.h <<_ACEOF
14645 #define HAVE_SOCKLEN_T 1
14646 _ACEOF
14651 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14652 #include <sys/socket.h>
14655 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14657 cat >>confdefs.h <<_ACEOF
14658 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14659 _ACEOF
14665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14666 $as_echo_n "checking for locale_t... " >&6; }
14667 if ${pgac_cv_type_locale_t+:} false; then :
14668 $as_echo_n "(cached) " >&6
14669 else
14670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14671 /* end confdefs.h. */
14672 #include <locale.h>
14673 locale_t x;
14675 main ()
14679 return 0;
14681 _ACEOF
14682 if ac_fn_c_try_compile "$LINENO"; then :
14683 pgac_cv_type_locale_t=yes
14684 else
14685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14686 /* end confdefs.h. */
14687 #include <xlocale.h>
14688 locale_t x;
14690 main ()
14694 return 0;
14696 _ACEOF
14697 if ac_fn_c_try_compile "$LINENO"; then :
14698 pgac_cv_type_locale_t='yes (in xlocale.h)'
14699 else
14700 pgac_cv_type_locale_t=no
14702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14704 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14707 $as_echo "$pgac_cv_type_locale_t" >&6; }
14708 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14710 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14714 # MSVC doesn't cope well with defining restrict to __restrict, the
14715 # spelling it understands, because it conflicts with
14716 # __declspec(restrict). Therefore we define pg_restrict to the
14717 # appropriate definition, which presumably won't conflict.
14718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14719 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14720 if ${ac_cv_c_restrict+:} false; then :
14721 $as_echo_n "(cached) " >&6
14722 else
14723 ac_cv_c_restrict=no
14724 # The order here caters to the fact that C++ does not require restrict.
14725 for ac_kw in __restrict __restrict__ _Restrict restrict; do
14726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14727 /* end confdefs.h. */
14728 typedef int * int_ptr;
14729 int foo (int_ptr $ac_kw ip) {
14730 return ip[0];
14733 main ()
14735 int s[1];
14736 int * $ac_kw t = s;
14737 t[0] = 0;
14738 return foo(t)
14740 return 0;
14742 _ACEOF
14743 if ac_fn_c_try_compile "$LINENO"; then :
14744 ac_cv_c_restrict=$ac_kw
14746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14747 test "$ac_cv_c_restrict" != no && break
14748 done
14751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14752 $as_echo "$ac_cv_c_restrict" >&6; }
14754 case $ac_cv_c_restrict in
14755 restrict) ;;
14756 no) $as_echo "#define restrict /**/" >>confdefs.h
14758 *) cat >>confdefs.h <<_ACEOF
14759 #define restrict $ac_cv_c_restrict
14760 _ACEOF
14762 esac
14764 if test "$ac_cv_c_restrict" = "no"; then
14765 pg_restrict=""
14766 else
14767 pg_restrict="$ac_cv_c_restrict"
14770 cat >>confdefs.h <<_ACEOF
14771 #define pg_restrict $pg_restrict
14772 _ACEOF
14775 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14776 #include <getopt.h>
14777 #endif
14779 if test "x$ac_cv_type_struct_option" = xyes; then :
14781 cat >>confdefs.h <<_ACEOF
14782 #define HAVE_STRUCT_OPTION 1
14783 _ACEOF
14789 case $host_cpu in
14790 x86_64)
14791 # On x86_64, check if we can compile a popcntq instruction
14792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
14793 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
14794 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
14795 $as_echo_n "(cached) " >&6
14796 else
14797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14798 /* end confdefs.h. */
14801 main ()
14803 long long x = 1; long long r;
14804 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
14806 return 0;
14808 _ACEOF
14809 if ac_fn_c_try_compile "$LINENO"; then :
14810 pgac_cv_have_x86_64_popcntq=yes
14811 else
14812 pgac_cv_have_x86_64_popcntq=no
14814 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
14817 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
14818 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
14820 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
14824 ppc*|powerpc*)
14825 # On PPC, check if compiler accepts "i"(x) when __builtin_constant_p(x).
14826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
14827 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
14828 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
14829 $as_echo_n "(cached) " >&6
14830 else
14831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14832 /* end confdefs.h. */
14833 static inline int
14834 addi(int ra, int si)
14836 int res = 0;
14837 if (__builtin_constant_p(si))
14838 __asm__ __volatile__(
14839 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
14840 return res;
14842 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
14844 main ()
14848 return 0;
14850 _ACEOF
14851 if ac_fn_c_try_compile "$LINENO"; then :
14852 pgac_cv_have_i_constraint__builtin_constant_p=yes
14853 else
14854 pgac_cv_have_i_constraint__builtin_constant_p=no
14856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
14859 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
14860 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
14862 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
14866 esac
14868 # Check largefile support. You might think this is a system service not a
14869 # compiler characteristic, but you'd be wrong. We must check this before
14870 # probing existence of related functions such as fseeko, since the largefile
14871 # defines can affect what is generated for that.
14872 if test "$PORTNAME" != "win32"; then
14873 # Check whether --enable-largefile was given.
14874 if test "${enable_largefile+set}" = set; then :
14875 enableval=$enable_largefile;
14878 if test "$enable_largefile" != no; then
14880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14881 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14882 if ${ac_cv_sys_largefile_CC+:} false; then :
14883 $as_echo_n "(cached) " >&6
14884 else
14885 ac_cv_sys_largefile_CC=no
14886 if test "$GCC" != yes; then
14887 ac_save_CC=$CC
14888 while :; do
14889 # IRIX 6.2 and later do not support large files by default,
14890 # so use the C compiler's -n32 option if that helps.
14891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14892 /* end confdefs.h. */
14893 #include <sys/types.h>
14894 /* Check that off_t can represent 2**63 - 1 correctly.
14895 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14896 since some C++ compilers masquerading as C compilers
14897 incorrectly reject 9223372036854775807. */
14898 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14899 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14900 && LARGE_OFF_T % 2147483647 == 1)
14901 ? 1 : -1];
14903 main ()
14907 return 0;
14909 _ACEOF
14910 if ac_fn_c_try_compile "$LINENO"; then :
14911 break
14913 rm -f core conftest.err conftest.$ac_objext
14914 CC="$CC -n32"
14915 if ac_fn_c_try_compile "$LINENO"; then :
14916 ac_cv_sys_largefile_CC=' -n32'; break
14918 rm -f core conftest.err conftest.$ac_objext
14919 break
14920 done
14921 CC=$ac_save_CC
14922 rm -f conftest.$ac_ext
14925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14926 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14927 if test "$ac_cv_sys_largefile_CC" != no; then
14928 CC=$CC$ac_cv_sys_largefile_CC
14931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14932 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14933 if ${ac_cv_sys_file_offset_bits+:} false; then :
14934 $as_echo_n "(cached) " >&6
14935 else
14936 while :; do
14937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14938 /* end confdefs.h. */
14939 #include <sys/types.h>
14940 /* Check that off_t can represent 2**63 - 1 correctly.
14941 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14942 since some C++ compilers masquerading as C compilers
14943 incorrectly reject 9223372036854775807. */
14944 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14945 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14946 && LARGE_OFF_T % 2147483647 == 1)
14947 ? 1 : -1];
14949 main ()
14953 return 0;
14955 _ACEOF
14956 if ac_fn_c_try_compile "$LINENO"; then :
14957 ac_cv_sys_file_offset_bits=no; break
14959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14961 /* end confdefs.h. */
14962 #define _FILE_OFFSET_BITS 64
14963 #include <sys/types.h>
14964 /* Check that off_t can represent 2**63 - 1 correctly.
14965 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14966 since some C++ compilers masquerading as C compilers
14967 incorrectly reject 9223372036854775807. */
14968 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14969 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14970 && LARGE_OFF_T % 2147483647 == 1)
14971 ? 1 : -1];
14973 main ()
14977 return 0;
14979 _ACEOF
14980 if ac_fn_c_try_compile "$LINENO"; then :
14981 ac_cv_sys_file_offset_bits=64; break
14983 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14984 ac_cv_sys_file_offset_bits=unknown
14985 break
14986 done
14988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14989 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14990 case $ac_cv_sys_file_offset_bits in #(
14991 no | unknown) ;;
14993 cat >>confdefs.h <<_ACEOF
14994 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14995 _ACEOF
14997 esac
14998 rm -rf conftest*
14999 if test $ac_cv_sys_file_offset_bits = unknown; then
15000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15001 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15002 if ${ac_cv_sys_large_files+:} false; then :
15003 $as_echo_n "(cached) " >&6
15004 else
15005 while :; do
15006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15007 /* end confdefs.h. */
15008 #include <sys/types.h>
15009 /* Check that off_t can represent 2**63 - 1 correctly.
15010 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15011 since some C++ compilers masquerading as C compilers
15012 incorrectly reject 9223372036854775807. */
15013 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15014 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15015 && LARGE_OFF_T % 2147483647 == 1)
15016 ? 1 : -1];
15018 main ()
15022 return 0;
15024 _ACEOF
15025 if ac_fn_c_try_compile "$LINENO"; then :
15026 ac_cv_sys_large_files=no; break
15028 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15030 /* end confdefs.h. */
15031 #define _LARGE_FILES 1
15032 #include <sys/types.h>
15033 /* Check that off_t can represent 2**63 - 1 correctly.
15034 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15035 since some C++ compilers masquerading as C compilers
15036 incorrectly reject 9223372036854775807. */
15037 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15038 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15039 && LARGE_OFF_T % 2147483647 == 1)
15040 ? 1 : -1];
15042 main ()
15046 return 0;
15048 _ACEOF
15049 if ac_fn_c_try_compile "$LINENO"; then :
15050 ac_cv_sys_large_files=1; break
15052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15053 ac_cv_sys_large_files=unknown
15054 break
15055 done
15057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15058 $as_echo "$ac_cv_sys_large_files" >&6; }
15059 case $ac_cv_sys_large_files in #(
15060 no | unknown) ;;
15062 cat >>confdefs.h <<_ACEOF
15063 #define _LARGE_FILES $ac_cv_sys_large_files
15064 _ACEOF
15066 esac
15067 rm -rf conftest*
15076 # The cast to long int works around a bug in the HP C Compiler
15077 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15078 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15079 # This bug is HP SR number 8606223364.
15080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15081 $as_echo_n "checking size of off_t... " >&6; }
15082 if ${ac_cv_sizeof_off_t+:} false; then :
15083 $as_echo_n "(cached) " >&6
15084 else
15085 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
15087 else
15088 if test "$ac_cv_type_off_t" = yes; then
15089 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15090 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15091 as_fn_error 77 "cannot compute sizeof (off_t)
15092 See \`config.log' for more details" "$LINENO" 5; }
15093 else
15094 ac_cv_sizeof_off_t=0
15099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15100 $as_echo "$ac_cv_sizeof_off_t" >&6; }
15104 cat >>confdefs.h <<_ACEOF
15105 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15106 _ACEOF
15110 # If we don't have largefile support, can't handle segment size >= 2GB.
15111 if test "$ac_cv_sizeof_off_t" -lt 8; then
15112 if expr $RELSEG_SIZE '*' $blocksize '>=' 2 '*' 1024 '*' 1024; then
15113 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15117 # The cast to long int works around a bug in the HP C Compiler
15118 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15119 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15120 # This bug is HP SR number 8606223364.
15121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
15122 $as_echo_n "checking size of bool... " >&6; }
15123 if ${ac_cv_sizeof_bool+:} false; then :
15124 $as_echo_n "(cached) " >&6
15125 else
15126 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
15127 #include <stdbool.h>
15128 #endif
15129 "; then :
15131 else
15132 if test "$ac_cv_type_bool" = yes; then
15133 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15134 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15135 as_fn_error 77 "cannot compute sizeof (bool)
15136 See \`config.log' for more details" "$LINENO" 5; }
15137 else
15138 ac_cv_sizeof_bool=0
15143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15144 $as_echo "$ac_cv_sizeof_bool" >&6; }
15148 cat >>confdefs.h <<_ACEOF
15149 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15150 _ACEOF
15154 if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
15156 $as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
15162 ## Functions, global variables
15165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15166 $as_echo_n "checking for int timezone... " >&6; }
15167 if ${pgac_cv_var_int_timezone+:} false; then :
15168 $as_echo_n "(cached) " >&6
15169 else
15170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15171 /* end confdefs.h. */
15172 #include <time.h>
15173 int res;
15175 main ()
15177 #ifndef __CYGWIN__
15178 res = timezone / 60;
15179 #else
15180 res = _timezone / 60;
15181 #endif
15183 return 0;
15185 _ACEOF
15186 if ac_fn_c_try_link "$LINENO"; then :
15187 pgac_cv_var_int_timezone=yes
15188 else
15189 pgac_cv_var_int_timezone=no
15191 rm -f core conftest.err conftest.$ac_objext \
15192 conftest$ac_exeext conftest.$ac_ext
15194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15195 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15196 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15198 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15202 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15203 if ${pgac_cv_func_wcstombs_l+:} false; then :
15204 $as_echo_n "(cached) " >&6
15205 else
15206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15207 /* end confdefs.h. */
15208 #include <stdlib.h>
15209 #include <locale.h>
15211 main ()
15213 #ifndef wcstombs_l
15214 (void) wcstombs_l;
15215 #endif
15217 return 0;
15219 _ACEOF
15220 if ac_fn_c_try_compile "$LINENO"; then :
15221 pgac_cv_func_wcstombs_l='yes'
15222 else
15223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15224 /* end confdefs.h. */
15225 #include <stdlib.h>
15226 #include <locale.h>
15227 #include <xlocale.h>
15229 main ()
15231 #ifndef wcstombs_l
15232 (void) wcstombs_l;
15233 #endif
15235 return 0;
15237 _ACEOF
15238 if ac_fn_c_try_compile "$LINENO"; then :
15239 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15240 else
15241 pgac_cv_func_wcstombs_l='no'
15243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15245 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15248 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15249 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15251 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15255 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15256 # symbols that that library has no business exposing to the world. Pending
15257 # acquisition of a clue by those developers, ignore libedit (including its
15258 # possible alias of libreadline) while checking for everything else.
15259 LIBS_including_readline="$LIBS"
15260 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15262 for ac_func in backtrace_symbols copyfile copy_file_range 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
15263 do :
15264 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15265 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15266 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15267 cat >>confdefs.h <<_ACEOF
15268 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15269 _ACEOF
15272 done
15275 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15277 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15278 if ${pgac_cv__builtin_bswap16+:} false; then :
15279 $as_echo_n "(cached) " >&6
15280 else
15281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15282 /* end confdefs.h. */
15285 call__builtin_bswap16(int x)
15287 return __builtin_bswap16(x);
15290 main ()
15294 return 0;
15296 _ACEOF
15297 if ac_fn_c_try_link "$LINENO"; then :
15298 pgac_cv__builtin_bswap16=yes
15299 else
15300 pgac_cv__builtin_bswap16=no
15302 rm -f core conftest.err conftest.$ac_objext \
15303 conftest$ac_exeext conftest.$ac_ext
15305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15306 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15307 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15309 cat >>confdefs.h <<_ACEOF
15310 #define HAVE__BUILTIN_BSWAP16 1
15311 _ACEOF
15314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15315 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15316 if ${pgac_cv__builtin_bswap32+:} false; then :
15317 $as_echo_n "(cached) " >&6
15318 else
15319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15320 /* end confdefs.h. */
15323 call__builtin_bswap32(int x)
15325 return __builtin_bswap32(x);
15328 main ()
15332 return 0;
15334 _ACEOF
15335 if ac_fn_c_try_link "$LINENO"; then :
15336 pgac_cv__builtin_bswap32=yes
15337 else
15338 pgac_cv__builtin_bswap32=no
15340 rm -f core conftest.err conftest.$ac_objext \
15341 conftest$ac_exeext conftest.$ac_ext
15343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15344 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15345 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15347 cat >>confdefs.h <<_ACEOF
15348 #define HAVE__BUILTIN_BSWAP32 1
15349 _ACEOF
15352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15353 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15354 if ${pgac_cv__builtin_bswap64+:} false; then :
15355 $as_echo_n "(cached) " >&6
15356 else
15357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15358 /* end confdefs.h. */
15361 call__builtin_bswap64(long int x)
15363 return __builtin_bswap64(x);
15366 main ()
15370 return 0;
15372 _ACEOF
15373 if ac_fn_c_try_link "$LINENO"; then :
15374 pgac_cv__builtin_bswap64=yes
15375 else
15376 pgac_cv__builtin_bswap64=no
15378 rm -f core conftest.err conftest.$ac_objext \
15379 conftest$ac_exeext conftest.$ac_ext
15381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15382 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15383 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15385 cat >>confdefs.h <<_ACEOF
15386 #define HAVE__BUILTIN_BSWAP64 1
15387 _ACEOF
15390 # We assume that we needn't test all widths of these explicitly:
15391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15392 $as_echo_n "checking for __builtin_clz... " >&6; }
15393 if ${pgac_cv__builtin_clz+:} false; then :
15394 $as_echo_n "(cached) " >&6
15395 else
15396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15397 /* end confdefs.h. */
15400 call__builtin_clz(unsigned int x)
15402 return __builtin_clz(x);
15405 main ()
15409 return 0;
15411 _ACEOF
15412 if ac_fn_c_try_link "$LINENO"; then :
15413 pgac_cv__builtin_clz=yes
15414 else
15415 pgac_cv__builtin_clz=no
15417 rm -f core conftest.err conftest.$ac_objext \
15418 conftest$ac_exeext conftest.$ac_ext
15420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15421 $as_echo "$pgac_cv__builtin_clz" >&6; }
15422 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15424 cat >>confdefs.h <<_ACEOF
15425 #define HAVE__BUILTIN_CLZ 1
15426 _ACEOF
15429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15430 $as_echo_n "checking for __builtin_ctz... " >&6; }
15431 if ${pgac_cv__builtin_ctz+:} false; then :
15432 $as_echo_n "(cached) " >&6
15433 else
15434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15435 /* end confdefs.h. */
15438 call__builtin_ctz(unsigned int x)
15440 return __builtin_ctz(x);
15443 main ()
15447 return 0;
15449 _ACEOF
15450 if ac_fn_c_try_link "$LINENO"; then :
15451 pgac_cv__builtin_ctz=yes
15452 else
15453 pgac_cv__builtin_ctz=no
15455 rm -f core conftest.err conftest.$ac_objext \
15456 conftest$ac_exeext conftest.$ac_ext
15458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15459 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15460 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15462 cat >>confdefs.h <<_ACEOF
15463 #define HAVE__BUILTIN_CTZ 1
15464 _ACEOF
15467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15468 $as_echo_n "checking for __builtin_popcount... " >&6; }
15469 if ${pgac_cv__builtin_popcount+:} false; then :
15470 $as_echo_n "(cached) " >&6
15471 else
15472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15473 /* end confdefs.h. */
15476 call__builtin_popcount(unsigned int x)
15478 return __builtin_popcount(x);
15481 main ()
15485 return 0;
15487 _ACEOF
15488 if ac_fn_c_try_link "$LINENO"; then :
15489 pgac_cv__builtin_popcount=yes
15490 else
15491 pgac_cv__builtin_popcount=no
15493 rm -f core conftest.err conftest.$ac_objext \
15494 conftest$ac_exeext conftest.$ac_ext
15496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15497 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15498 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15500 cat >>confdefs.h <<_ACEOF
15501 #define HAVE__BUILTIN_POPCOUNT 1
15502 _ACEOF
15505 # __builtin_frame_address may draw a diagnostic for non-constant argument,
15506 # so it needs a different test function.
15507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
15508 $as_echo_n "checking for __builtin_frame_address... " >&6; }
15509 if ${pgac_cv__builtin_frame_address+:} false; then :
15510 $as_echo_n "(cached) " >&6
15511 else
15512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15513 /* end confdefs.h. */
15515 void *
15516 call__builtin_frame_address(void)
15518 return __builtin_frame_address(0);
15521 main ()
15525 return 0;
15527 _ACEOF
15528 if ac_fn_c_try_link "$LINENO"; then :
15529 pgac_cv__builtin_frame_address=yes
15530 else
15531 pgac_cv__builtin_frame_address=no
15533 rm -f core conftest.err conftest.$ac_objext \
15534 conftest$ac_exeext conftest.$ac_ext
15536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5
15537 $as_echo "$pgac_cv__builtin_frame_address" >&6; }
15538 if test x"${pgac_cv__builtin_frame_address}" = xyes ; then
15540 cat >>confdefs.h <<_ACEOF
15541 #define HAVE__BUILTIN_FRAME_ADDRESS 1
15542 _ACEOF
15546 # We require 64-bit fseeko() to be available, but run this check anyway
15547 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
15548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15549 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15550 if ${ac_cv_sys_largefile_source+:} false; then :
15551 $as_echo_n "(cached) " >&6
15552 else
15553 while :; do
15554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15555 /* end confdefs.h. */
15556 #include <sys/types.h> /* for off_t */
15557 #include <stdio.h>
15559 main ()
15561 int (*fp) (FILE *, off_t, int) = fseeko;
15562 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15564 return 0;
15566 _ACEOF
15567 if ac_fn_c_try_link "$LINENO"; then :
15568 ac_cv_sys_largefile_source=no; break
15570 rm -f core conftest.err conftest.$ac_objext \
15571 conftest$ac_exeext conftest.$ac_ext
15572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15573 /* end confdefs.h. */
15574 #define _LARGEFILE_SOURCE 1
15575 #include <sys/types.h> /* for off_t */
15576 #include <stdio.h>
15578 main ()
15580 int (*fp) (FILE *, off_t, int) = fseeko;
15581 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15583 return 0;
15585 _ACEOF
15586 if ac_fn_c_try_link "$LINENO"; then :
15587 ac_cv_sys_largefile_source=1; break
15589 rm -f core conftest.err conftest.$ac_objext \
15590 conftest$ac_exeext conftest.$ac_ext
15591 ac_cv_sys_largefile_source=unknown
15592 break
15593 done
15595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15596 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15597 case $ac_cv_sys_largefile_source in #(
15598 no | unknown) ;;
15600 cat >>confdefs.h <<_ACEOF
15601 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15602 _ACEOF
15604 esac
15605 rm -rf conftest*
15607 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15608 # in glibc 2.1.3, but that breaks too many other things.
15609 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15610 if test $ac_cv_sys_largefile_source != unknown; then
15612 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15617 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15618 # by calling it, 2009-04-02
15619 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15620 # The Clang compiler raises a warning for an undeclared identifier that matches
15621 # a compiler builtin function. All extant Clang versions are affected, as of
15622 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
15623 # C and Objective C languages, but Clang does report an error under C++ and
15624 # Objective C++.
15626 # Passing -fno-builtin to the compiler would suppress this problem. That
15627 # strategy would have the advantage of being insensitive to stray warnings, but
15628 # it would make tests less realistic.
15629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15630 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15631 if ${ac_cv_c_decl_report+:} false; then :
15632 $as_echo_n "(cached) " >&6
15633 else
15634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15635 /* end confdefs.h. */
15638 main ()
15640 (void) strchr;
15642 return 0;
15644 _ACEOF
15645 if ac_fn_c_try_compile "$LINENO"; then :
15646 if test -s conftest.err; then :
15647 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15648 # valid AC_CHECK_DECL input. No library function is consistently available
15649 # on freestanding implementations, so test against a dummy declaration.
15650 # Include always-available headers on the off chance that they somehow
15651 # elicit warnings.
15652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15653 /* end confdefs.h. */
15654 #include <float.h>
15655 #include <limits.h>
15656 #include <stdarg.h>
15657 #include <stddef.h>
15658 extern void ac_decl (int, char *);
15660 main ()
15662 #ifdef __cplusplus
15663 (void) ac_decl ((int) 0, (char *) 0);
15664 (void) ac_decl;
15665 #else
15666 (void) ac_decl;
15667 #endif
15670 return 0;
15672 _ACEOF
15673 if ac_fn_c_try_compile "$LINENO"; then :
15674 if test -s conftest.err; then :
15675 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15676 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15677 as_fn_error $? "cannot detect from compiler exit status or warnings
15678 See \`config.log' for more details" "$LINENO" 5; }
15679 else
15680 ac_cv_c_decl_report=warning
15682 else
15683 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15684 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15685 as_fn_error $? "cannot compile a simple declaration test
15686 See \`config.log' for more details" "$LINENO" 5; }
15688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15689 else
15690 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15691 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15692 as_fn_error $? "compiler does not report undeclared identifiers
15693 See \`config.log' for more details" "$LINENO" 5; }
15695 else
15696 ac_cv_c_decl_report=error
15698 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15701 $as_echo "$ac_cv_c_decl_report" >&6; }
15703 case $ac_cv_c_decl_report in
15704 warning) ac_c_decl_warn_flag=yes ;;
15705 *) ac_c_decl_warn_flag= ;;
15706 esac
15708 if test "$PORTNAME" != "solaris"; then :
15710 for ac_func in posix_fadvise
15711 do :
15712 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15713 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15714 cat >>confdefs.h <<_ACEOF
15715 #define HAVE_POSIX_FADVISE 1
15716 _ACEOF
15719 done
15721 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15723 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15724 ac_have_decl=1
15725 else
15726 ac_have_decl=0
15729 cat >>confdefs.h <<_ACEOF
15730 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15731 _ACEOF
15734 fi # fi
15736 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15738 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15739 ac_have_decl=1
15740 else
15741 ac_have_decl=0
15744 cat >>confdefs.h <<_ACEOF
15745 #define HAVE_DECL_FDATASYNC $ac_have_decl
15746 _ACEOF
15748 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15749 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15750 ac_have_decl=1
15751 else
15752 ac_have_decl=0
15755 cat >>confdefs.h <<_ACEOF
15756 #define HAVE_DECL_STRLCAT $ac_have_decl
15757 _ACEOF
15758 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15759 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15760 ac_have_decl=1
15761 else
15762 ac_have_decl=0
15765 cat >>confdefs.h <<_ACEOF
15766 #define HAVE_DECL_STRLCPY $ac_have_decl
15767 _ACEOF
15768 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15769 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15770 ac_have_decl=1
15771 else
15772 ac_have_decl=0
15775 cat >>confdefs.h <<_ACEOF
15776 #define HAVE_DECL_STRNLEN $ac_have_decl
15777 _ACEOF
15780 # We can't use AC_CHECK_FUNCS to detect these functions, because it
15781 # won't handle deployment target restrictions on macOS
15782 ac_fn_c_check_decl "$LINENO" "preadv" "ac_cv_have_decl_preadv" "#include <sys/uio.h>
15784 if test "x$ac_cv_have_decl_preadv" = xyes; then :
15785 ac_have_decl=1
15786 else
15787 ac_have_decl=0
15790 cat >>confdefs.h <<_ACEOF
15791 #define HAVE_DECL_PREADV $ac_have_decl
15792 _ACEOF
15794 ac_fn_c_check_decl "$LINENO" "pwritev" "ac_cv_have_decl_pwritev" "#include <sys/uio.h>
15796 if test "x$ac_cv_have_decl_pwritev" = xyes; then :
15797 ac_have_decl=1
15798 else
15799 ac_have_decl=0
15802 cat >>confdefs.h <<_ACEOF
15803 #define HAVE_DECL_PWRITEV $ac_have_decl
15804 _ACEOF
15807 # This is probably only present on macOS, but may as well check always
15808 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15810 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15811 ac_have_decl=1
15812 else
15813 ac_have_decl=0
15816 cat >>confdefs.h <<_ACEOF
15817 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15818 _ACEOF
15821 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
15822 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
15823 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
15825 else
15826 case " $LIBOBJS " in
15827 *" explicit_bzero.$ac_objext "* ) ;;
15828 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
15830 esac
15834 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15835 if test "x$ac_cv_func_getopt" = xyes; then :
15836 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15838 else
15839 case " $LIBOBJS " in
15840 *" getopt.$ac_objext "* ) ;;
15841 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15843 esac
15847 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15848 if test "x$ac_cv_func_getpeereid" = xyes; then :
15849 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15851 else
15852 case " $LIBOBJS " in
15853 *" getpeereid.$ac_objext "* ) ;;
15854 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15856 esac
15860 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15861 if test "x$ac_cv_func_inet_aton" = xyes; then :
15862 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15864 else
15865 case " $LIBOBJS " in
15866 *" inet_aton.$ac_objext "* ) ;;
15867 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15869 esac
15873 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15874 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15875 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15877 else
15878 case " $LIBOBJS " in
15879 *" mkdtemp.$ac_objext "* ) ;;
15880 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15882 esac
15886 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15887 if test "x$ac_cv_func_strlcat" = xyes; then :
15888 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15890 else
15891 case " $LIBOBJS " in
15892 *" strlcat.$ac_objext "* ) ;;
15893 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15895 esac
15899 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15900 if test "x$ac_cv_func_strlcpy" = xyes; then :
15901 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15903 else
15904 case " $LIBOBJS " in
15905 *" strlcpy.$ac_objext "* ) ;;
15906 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15908 esac
15912 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15913 if test "x$ac_cv_func_strnlen" = xyes; then :
15914 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15916 else
15917 case " $LIBOBJS " in
15918 *" strnlen.$ac_objext "* ) ;;
15919 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15921 esac
15927 ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
15928 if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
15929 $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
15931 else
15932 case " $LIBOBJS " in
15933 *" pthread_barrier_wait.$ac_objext "* ) ;;
15934 *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
15936 esac
15942 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
15943 # Cygwin and (apparently, based on test results) Mingw both
15944 # have a broken strtof(), so substitute its implementation.
15945 # That's not a perfect fix, since it doesn't avoid double-rounding,
15946 # but we have no better options.
15947 case " $LIBOBJS " in
15948 *" strtof.$ac_objext "* ) ;;
15949 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
15951 esac
15953 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
15954 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
15957 # Similarly, use system's getopt_long() only if system provides struct option.
15958 if test x"$ac_cv_type_struct_option" = xyes ; then
15959 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15960 if test "x$ac_cv_func_getopt_long" = xyes; then :
15961 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15963 else
15964 case " $LIBOBJS " in
15965 *" getopt_long.$ac_objext "* ) ;;
15966 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15968 esac
15973 else
15974 case " $LIBOBJS " in
15975 *" getopt_long.$ac_objext "* ) ;;
15976 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15978 esac
15982 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
15983 # (i.e., allow '-' as a flag character), so use our version on those platforms.
15984 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
15985 case " $LIBOBJS " in
15986 *" getopt.$ac_objext "* ) ;;
15987 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15989 esac
15993 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15994 # so always use our version on Windows.
15995 if test "$PORTNAME" = "win32"; then
15996 case " $LIBOBJS " in
15997 *" getopt.$ac_objext "* ) ;;
15998 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16000 esac
16002 case " $LIBOBJS " in
16003 *" getopt_long.$ac_objext "* ) ;;
16004 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16006 esac
16010 # Win32 (really MinGW) support
16011 if test "$PORTNAME" = "win32"; then
16012 for ac_func in _configthreadlocale
16013 do :
16014 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16015 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16016 cat >>confdefs.h <<_ACEOF
16017 #define HAVE__CONFIGTHREADLOCALE 1
16018 _ACEOF
16021 done
16023 case " $LIBOBJS " in
16024 *" dirmod.$ac_objext "* ) ;;
16025 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16027 esac
16029 case " $LIBOBJS " in
16030 *" kill.$ac_objext "* ) ;;
16031 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16033 esac
16035 case " $LIBOBJS " in
16036 *" open.$ac_objext "* ) ;;
16037 *) LIBOBJS="$LIBOBJS open.$ac_objext"
16039 esac
16041 case " $LIBOBJS " in
16042 *" system.$ac_objext "* ) ;;
16043 *) LIBOBJS="$LIBOBJS system.$ac_objext"
16045 esac
16047 case " $LIBOBJS " in
16048 *" win32common.$ac_objext "* ) ;;
16049 *) LIBOBJS="$LIBOBJS win32common.$ac_objext"
16051 esac
16053 case " $LIBOBJS " in
16054 *" win32dlopen.$ac_objext "* ) ;;
16055 *) LIBOBJS="$LIBOBJS win32dlopen.$ac_objext"
16057 esac
16059 case " $LIBOBJS " in
16060 *" win32env.$ac_objext "* ) ;;
16061 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16063 esac
16065 case " $LIBOBJS " in
16066 *" win32error.$ac_objext "* ) ;;
16067 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16069 esac
16071 case " $LIBOBJS " in
16072 *" win32fdatasync.$ac_objext "* ) ;;
16073 *) LIBOBJS="$LIBOBJS win32fdatasync.$ac_objext"
16075 esac
16077 case " $LIBOBJS " in
16078 *" win32gai_strerror.$ac_objext "* ) ;;
16079 *) LIBOBJS="$LIBOBJS win32gai_strerror.$ac_objext"
16081 esac
16083 case " $LIBOBJS " in
16084 *" win32getrusage.$ac_objext "* ) ;;
16085 *) LIBOBJS="$LIBOBJS win32getrusage.$ac_objext"
16087 esac
16089 case " $LIBOBJS " in
16090 *" win32link.$ac_objext "* ) ;;
16091 *) LIBOBJS="$LIBOBJS win32link.$ac_objext"
16093 esac
16095 case " $LIBOBJS " in
16096 *" win32ntdll.$ac_objext "* ) ;;
16097 *) LIBOBJS="$LIBOBJS win32ntdll.$ac_objext"
16099 esac
16101 case " $LIBOBJS " in
16102 *" win32pread.$ac_objext "* ) ;;
16103 *) LIBOBJS="$LIBOBJS win32pread.$ac_objext"
16105 esac
16107 case " $LIBOBJS " in
16108 *" win32pwrite.$ac_objext "* ) ;;
16109 *) LIBOBJS="$LIBOBJS win32pwrite.$ac_objext"
16111 esac
16113 case " $LIBOBJS " in
16114 *" win32security.$ac_objext "* ) ;;
16115 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16117 esac
16119 case " $LIBOBJS " in
16120 *" win32setlocale.$ac_objext "* ) ;;
16121 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16123 esac
16125 case " $LIBOBJS " in
16126 *" win32stat.$ac_objext "* ) ;;
16127 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
16129 esac
16132 # Cygwin needs only a bit of that
16133 if test "$PORTNAME" = "cygwin"; then
16134 case " $LIBOBJS " in
16135 *" dirmod.$ac_objext "* ) ;;
16136 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16138 esac
16142 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16143 if test "x$ac_cv_func_syslog" = xyes; then :
16144 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16145 if test "x$ac_cv_header_syslog_h" = xyes; then :
16147 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16156 $as_echo_n "checking for opterr... " >&6; }
16157 if ${pgac_cv_var_int_opterr+:} false; then :
16158 $as_echo_n "(cached) " >&6
16159 else
16160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16161 /* end confdefs.h. */
16162 #include <unistd.h>
16164 main ()
16166 extern int opterr; opterr = 1;
16168 return 0;
16170 _ACEOF
16171 if ac_fn_c_try_link "$LINENO"; then :
16172 pgac_cv_var_int_opterr=yes
16173 else
16174 pgac_cv_var_int_opterr=no
16176 rm -f core conftest.err conftest.$ac_objext \
16177 conftest$ac_exeext conftest.$ac_ext
16179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16180 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16181 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16183 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16188 $as_echo_n "checking for optreset... " >&6; }
16189 if ${pgac_cv_var_int_optreset+:} false; then :
16190 $as_echo_n "(cached) " >&6
16191 else
16192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16193 /* end confdefs.h. */
16194 #include <unistd.h>
16196 main ()
16198 extern int optreset; optreset = 1;
16200 return 0;
16202 _ACEOF
16203 if ac_fn_c_try_link "$LINENO"; then :
16204 pgac_cv_var_int_optreset=yes
16205 else
16206 pgac_cv_var_int_optreset=no
16208 rm -f core conftest.err conftest.$ac_objext \
16209 conftest$ac_exeext conftest.$ac_ext
16211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16212 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16213 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16215 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16219 if test "$with_icu" = yes; then
16220 ac_save_CPPFLAGS=$CPPFLAGS
16221 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16223 # Verify we have ICU's header files
16224 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16225 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16227 else
16228 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16233 CPPFLAGS=$ac_save_CPPFLAGS
16236 if test "$with_llvm" = yes; then
16238 # Check which functionality is present
16239 SAVE_CPPFLAGS="$CPPFLAGS"
16240 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16241 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16243 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16244 ac_have_decl=1
16245 else
16246 ac_have_decl=0
16249 cat >>confdefs.h <<_ACEOF
16250 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16251 _ACEOF
16252 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16254 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16255 ac_have_decl=1
16256 else
16257 ac_have_decl=0
16260 cat >>confdefs.h <<_ACEOF
16261 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16262 _ACEOF
16264 CPPFLAGS="$SAVE_CPPFLAGS"
16268 # Lastly, restore full LIBS list and check for readline/libedit symbols
16269 LIBS="$LIBS_including_readline"
16271 if test "$with_readline" = yes; then
16272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
16273 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
16274 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
16275 $as_echo_n "(cached) " >&6
16276 else
16277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16278 /* end confdefs.h. */
16279 #include <stdio.h>
16280 #if defined(HAVE_READLINE_READLINE_H)
16281 #include <readline/readline.h>
16282 #elif defined(HAVE_EDITLINE_READLINE_H)
16283 #include <editline/readline.h>
16284 #elif defined(HAVE_READLINE_H)
16285 #include <readline.h>
16286 #endif
16289 main ()
16291 rl_completion_suppress_quote = 1;
16293 return 0;
16295 _ACEOF
16296 if ac_fn_c_try_link "$LINENO"; then :
16297 pgac_cv_var_rl_completion_suppress_quote=yes
16298 else
16299 pgac_cv_var_rl_completion_suppress_quote=no
16301 rm -f core conftest.err conftest.$ac_objext \
16302 conftest$ac_exeext conftest.$ac_ext
16304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
16305 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
16306 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
16308 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
16311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
16312 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
16313 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
16314 $as_echo_n "(cached) " >&6
16315 else
16316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16317 /* end confdefs.h. */
16318 #include <stdio.h>
16319 #if defined(HAVE_READLINE_READLINE_H)
16320 #include <readline/readline.h>
16321 #elif defined(HAVE_EDITLINE_READLINE_H)
16322 #include <editline/readline.h>
16323 #elif defined(HAVE_READLINE_H)
16324 #include <readline.h>
16325 #endif
16328 main ()
16330 rl_filename_quote_characters = "x";
16332 return 0;
16334 _ACEOF
16335 if ac_fn_c_try_link "$LINENO"; then :
16336 pgac_cv_var_rl_filename_quote_characters=yes
16337 else
16338 pgac_cv_var_rl_filename_quote_characters=no
16340 rm -f core conftest.err conftest.$ac_objext \
16341 conftest$ac_exeext conftest.$ac_ext
16343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
16344 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
16345 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
16347 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
16350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
16351 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
16352 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
16353 $as_echo_n "(cached) " >&6
16354 else
16355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16356 /* end confdefs.h. */
16357 #include <stdio.h>
16358 #if defined(HAVE_READLINE_READLINE_H)
16359 #include <readline/readline.h>
16360 #elif defined(HAVE_EDITLINE_READLINE_H)
16361 #include <editline/readline.h>
16362 #elif defined(HAVE_READLINE_H)
16363 #include <readline.h>
16364 #endif
16367 main ()
16369 rl_filename_quoting_function = 0;
16371 return 0;
16373 _ACEOF
16374 if ac_fn_c_try_link "$LINENO"; then :
16375 pgac_cv_var_rl_filename_quoting_function=yes
16376 else
16377 pgac_cv_var_rl_filename_quoting_function=no
16379 rm -f core conftest.err conftest.$ac_objext \
16380 conftest$ac_exeext conftest.$ac_ext
16382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
16383 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
16384 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
16386 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
16390 for ac_func in append_history history_truncate_file rl_completion_matches rl_filename_completion_function rl_reset_screen_size rl_variable_bind
16391 do :
16392 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16393 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16394 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16395 cat >>confdefs.h <<_ACEOF
16396 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16397 _ACEOF
16400 done
16405 # This test makes sure that run tests work at all. Sometimes a shared
16406 # library is found by the linker, but the runtime linker can't find it.
16407 # This check should come after all modifications of compiler or linker
16408 # variables, and before any other run tests.
16409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16410 $as_echo_n "checking test program... " >&6; }
16411 if test "$cross_compiling" = yes; then :
16412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16413 $as_echo "cross-compiling" >&6; }
16414 else
16415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16416 /* end confdefs.h. */
16417 int main() { return 0; }
16418 _ACEOF
16419 if ac_fn_c_try_run "$LINENO"; then :
16420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16421 $as_echo "ok" >&6; }
16422 else
16423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16424 $as_echo "failed" >&6; }
16425 as_fn_error $? "
16426 Could not execute a simple test program. This may be a problem
16427 related to locating shared libraries. Check the file 'config.log'
16428 for the exact reason." "$LINENO" 5
16430 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16431 conftest.$ac_objext conftest.beam conftest.$ac_ext
16435 # --------------------
16436 # Run tests below here
16437 # --------------------
16440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16441 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16442 if ${pgac_cv_type_long_int_64+:} false; then :
16443 $as_echo_n "(cached) " >&6
16444 else
16445 if test "$cross_compiling" = yes; then :
16446 # If cross-compiling, check the size reported by the compiler and
16447 # trust that the arithmetic works.
16448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16449 /* end confdefs.h. */
16452 main ()
16454 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16455 test_array [0] = 0;
16456 return test_array [0];
16459 return 0;
16461 _ACEOF
16462 if ac_fn_c_try_compile "$LINENO"; then :
16463 pgac_cv_type_long_int_64=yes
16464 else
16465 pgac_cv_type_long_int_64=no
16467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16468 else
16469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16470 /* end confdefs.h. */
16471 typedef long int ac_int64;
16474 * These are globals to discourage the compiler from folding all the
16475 * arithmetic tests down to compile-time constants.
16477 ac_int64 a = 20000001;
16478 ac_int64 b = 40000005;
16480 int does_int64_work()
16482 ac_int64 c,d;
16484 if (sizeof(ac_int64) != 8)
16485 return 0; /* definitely not the right size */
16487 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16488 c = a * b;
16489 d = (c + b) / b;
16490 if (d != a+1)
16491 return 0;
16492 return 1;
16496 main() {
16497 return (! does_int64_work());
16499 _ACEOF
16500 if ac_fn_c_try_run "$LINENO"; then :
16501 pgac_cv_type_long_int_64=yes
16502 else
16503 pgac_cv_type_long_int_64=no
16505 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16506 conftest.$ac_objext conftest.beam conftest.$ac_ext
16510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16511 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16513 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16514 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16516 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16521 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16522 pg_int64_type="long int"
16523 else
16524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16525 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16526 if ${pgac_cv_type_long_long_int_64+:} false; then :
16527 $as_echo_n "(cached) " >&6
16528 else
16529 if test "$cross_compiling" = yes; then :
16530 # If cross-compiling, check the size reported by the compiler and
16531 # trust that the arithmetic works.
16532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16533 /* end confdefs.h. */
16536 main ()
16538 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16539 test_array [0] = 0;
16540 return test_array [0];
16543 return 0;
16545 _ACEOF
16546 if ac_fn_c_try_compile "$LINENO"; then :
16547 pgac_cv_type_long_long_int_64=yes
16548 else
16549 pgac_cv_type_long_long_int_64=no
16551 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16552 else
16553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16554 /* end confdefs.h. */
16555 typedef long long int ac_int64;
16558 * These are globals to discourage the compiler from folding all the
16559 * arithmetic tests down to compile-time constants.
16561 ac_int64 a = 20000001;
16562 ac_int64 b = 40000005;
16564 int does_int64_work()
16566 ac_int64 c,d;
16568 if (sizeof(ac_int64) != 8)
16569 return 0; /* definitely not the right size */
16571 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16572 c = a * b;
16573 d = (c + b) / b;
16574 if (d != a+1)
16575 return 0;
16576 return 1;
16580 main() {
16581 return (! does_int64_work());
16583 _ACEOF
16584 if ac_fn_c_try_run "$LINENO"; then :
16585 pgac_cv_type_long_long_int_64=yes
16586 else
16587 pgac_cv_type_long_long_int_64=no
16589 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16590 conftest.$ac_objext conftest.beam conftest.$ac_ext
16594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16595 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16597 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16598 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16600 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16604 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16605 pg_int64_type="long long int"
16606 else
16607 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16612 cat >>confdefs.h <<_ACEOF
16613 #define PG_INT64_TYPE $pg_int64_type
16614 _ACEOF
16617 # Select the printf length modifier that goes with that, too.
16618 if test x"$pg_int64_type" = x"long long int" ; then
16619 INT64_MODIFIER='"ll"'
16620 else
16621 INT64_MODIFIER='"l"'
16625 cat >>confdefs.h <<_ACEOF
16626 #define INT64_MODIFIER $INT64_MODIFIER
16627 _ACEOF
16630 # has to be down here, rather than with the other builtins, because
16631 # the test uses PG_INT64_TYPE.
16632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16633 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16634 if ${pgac_cv__builtin_op_overflow+:} false; then :
16635 $as_echo_n "(cached) " >&6
16636 else
16637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16638 /* end confdefs.h. */
16640 PG_INT64_TYPE a = 1;
16641 PG_INT64_TYPE b = 1;
16642 PG_INT64_TYPE result;
16643 int oflo;
16646 main ()
16648 oflo = __builtin_mul_overflow(a, b, &result);
16650 return 0;
16652 _ACEOF
16653 if ac_fn_c_try_link "$LINENO"; then :
16654 pgac_cv__builtin_op_overflow=yes
16655 else
16656 pgac_cv__builtin_op_overflow=no
16658 rm -f core conftest.err conftest.$ac_objext \
16659 conftest$ac_exeext conftest.$ac_ext
16661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16662 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16663 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16665 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16669 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16670 # The cast to long int works around a bug in the HP C Compiler
16671 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16672 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16673 # This bug is HP SR number 8606223364.
16674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16675 $as_echo_n "checking size of void *... " >&6; }
16676 if ${ac_cv_sizeof_void_p+:} false; then :
16677 $as_echo_n "(cached) " >&6
16678 else
16679 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
16681 else
16682 if test "$ac_cv_type_void_p" = yes; then
16683 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16684 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16685 as_fn_error 77 "cannot compute sizeof (void *)
16686 See \`config.log' for more details" "$LINENO" 5; }
16687 else
16688 ac_cv_sizeof_void_p=0
16693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16694 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16698 cat >>confdefs.h <<_ACEOF
16699 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16700 _ACEOF
16703 # The cast to long int works around a bug in the HP C Compiler
16704 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16705 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16706 # This bug is HP SR number 8606223364.
16707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16708 $as_echo_n "checking size of size_t... " >&6; }
16709 if ${ac_cv_sizeof_size_t+:} false; then :
16710 $as_echo_n "(cached) " >&6
16711 else
16712 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
16714 else
16715 if test "$ac_cv_type_size_t" = yes; then
16716 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16717 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16718 as_fn_error 77 "cannot compute sizeof (size_t)
16719 See \`config.log' for more details" "$LINENO" 5; }
16720 else
16721 ac_cv_sizeof_size_t=0
16726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16727 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16731 cat >>confdefs.h <<_ACEOF
16732 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16733 _ACEOF
16736 # The cast to long int works around a bug in the HP C Compiler
16737 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16738 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16739 # This bug is HP SR number 8606223364.
16740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16741 $as_echo_n "checking size of long... " >&6; }
16742 if ${ac_cv_sizeof_long+:} false; then :
16743 $as_echo_n "(cached) " >&6
16744 else
16745 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
16747 else
16748 if test "$ac_cv_type_long" = yes; then
16749 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16750 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16751 as_fn_error 77 "cannot compute sizeof (long)
16752 See \`config.log' for more details" "$LINENO" 5; }
16753 else
16754 ac_cv_sizeof_long=0
16759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16760 $as_echo "$ac_cv_sizeof_long" >&6; }
16764 cat >>confdefs.h <<_ACEOF
16765 #define SIZEOF_LONG $ac_cv_sizeof_long
16766 _ACEOF
16770 # Determine memory alignment requirements for the basic C data types.
16772 # The cast to long int works around a bug in the HP C Compiler,
16773 # see AC_CHECK_SIZEOF for more information.
16774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16775 $as_echo_n "checking alignment of short... " >&6; }
16776 if ${ac_cv_alignof_short+:} false; then :
16777 $as_echo_n "(cached) " >&6
16778 else
16779 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
16780 #ifndef offsetof
16781 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16782 #endif
16783 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16785 else
16786 if test "$ac_cv_type_short" = yes; then
16787 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16788 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16789 as_fn_error 77 "cannot compute alignment of short
16790 See \`config.log' for more details" "$LINENO" 5; }
16791 else
16792 ac_cv_alignof_short=0
16797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16798 $as_echo "$ac_cv_alignof_short" >&6; }
16802 cat >>confdefs.h <<_ACEOF
16803 #define ALIGNOF_SHORT $ac_cv_alignof_short
16804 _ACEOF
16807 # The cast to long int works around a bug in the HP C Compiler,
16808 # see AC_CHECK_SIZEOF for more information.
16809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16810 $as_echo_n "checking alignment of int... " >&6; }
16811 if ${ac_cv_alignof_int+:} false; then :
16812 $as_echo_n "(cached) " >&6
16813 else
16814 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
16815 #ifndef offsetof
16816 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16817 #endif
16818 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16820 else
16821 if test "$ac_cv_type_int" = yes; then
16822 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16823 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16824 as_fn_error 77 "cannot compute alignment of int
16825 See \`config.log' for more details" "$LINENO" 5; }
16826 else
16827 ac_cv_alignof_int=0
16832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16833 $as_echo "$ac_cv_alignof_int" >&6; }
16837 cat >>confdefs.h <<_ACEOF
16838 #define ALIGNOF_INT $ac_cv_alignof_int
16839 _ACEOF
16842 # The cast to long int works around a bug in the HP C Compiler,
16843 # see AC_CHECK_SIZEOF for more information.
16844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16845 $as_echo_n "checking alignment of long... " >&6; }
16846 if ${ac_cv_alignof_long+:} false; then :
16847 $as_echo_n "(cached) " >&6
16848 else
16849 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
16850 #ifndef offsetof
16851 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16852 #endif
16853 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16855 else
16856 if test "$ac_cv_type_long" = yes; then
16857 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16858 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16859 as_fn_error 77 "cannot compute alignment of long
16860 See \`config.log' for more details" "$LINENO" 5; }
16861 else
16862 ac_cv_alignof_long=0
16867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16868 $as_echo "$ac_cv_alignof_long" >&6; }
16872 cat >>confdefs.h <<_ACEOF
16873 #define ALIGNOF_LONG $ac_cv_alignof_long
16874 _ACEOF
16877 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16878 # The cast to long int works around a bug in the HP C Compiler,
16879 # see AC_CHECK_SIZEOF for more information.
16880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16881 $as_echo_n "checking alignment of long long int... " >&6; }
16882 if ${ac_cv_alignof_long_long_int+:} false; then :
16883 $as_echo_n "(cached) " >&6
16884 else
16885 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
16886 #ifndef offsetof
16887 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16888 #endif
16889 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16891 else
16892 if test "$ac_cv_type_long_long_int" = yes; then
16893 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16894 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16895 as_fn_error 77 "cannot compute alignment of long long int
16896 See \`config.log' for more details" "$LINENO" 5; }
16897 else
16898 ac_cv_alignof_long_long_int=0
16903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16904 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
16908 cat >>confdefs.h <<_ACEOF
16909 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16910 _ACEOF
16914 # The cast to long int works around a bug in the HP C Compiler,
16915 # see AC_CHECK_SIZEOF for more information.
16916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16917 $as_echo_n "checking alignment of double... " >&6; }
16918 if ${ac_cv_alignof_double+:} false; then :
16919 $as_echo_n "(cached) " >&6
16920 else
16921 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
16922 #ifndef offsetof
16923 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16924 #endif
16925 typedef struct { char x; double y; } ac__type_alignof_;"; then :
16927 else
16928 if test "$ac_cv_type_double" = yes; then
16929 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16930 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16931 as_fn_error 77 "cannot compute alignment of double
16932 See \`config.log' for more details" "$LINENO" 5; }
16933 else
16934 ac_cv_alignof_double=0
16939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
16940 $as_echo "$ac_cv_alignof_double" >&6; }
16944 cat >>confdefs.h <<_ACEOF
16945 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
16946 _ACEOF
16950 # Compute maximum alignment of any basic type.
16952 # We require 'double' to have the strictest alignment among the basic types,
16953 # because otherwise the C ABI might impose 8-byte alignment on some of the
16954 # other C types that correspond to TYPALIGN_DOUBLE SQL types. That could
16955 # cause a mismatch between the tuple layout and the C struct layout of a
16956 # catalog tuple. We used to carefully order catalog columns such that any
16957 # fixed-width, attalign=4 columns were at offsets divisible by 8 regardless
16958 # of MAXIMUM_ALIGNOF to avoid that, but we no longer support any platforms
16959 # where TYPALIGN_DOUBLE != MAXIMUM_ALIGNOF.
16961 # We assume without checking that long's alignment is at least as strong as
16962 # char, short, or int. Note that we intentionally do not consider any types
16963 # wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8 would be too
16964 # much of a penalty for disk and memory space.
16966 MAX_ALIGNOF=$ac_cv_alignof_double
16968 if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
16969 as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5
16971 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $ac_cv_alignof_long_long_int -gt $MAX_ALIGNOF ; then
16972 as_fn_error $? "alignment of 'long long int' is greater than the alignment of 'double'" "$LINENO" 5
16975 cat >>confdefs.h <<_ACEOF
16976 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
16977 _ACEOF
16981 # Some platforms predefine the types int8, int16, etc. Only check
16982 # a (hopefully) representative subset.
16983 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
16985 if test "x$ac_cv_type_int8" = xyes; then :
16987 cat >>confdefs.h <<_ACEOF
16988 #define HAVE_INT8 1
16989 _ACEOF
16993 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
16995 if test "x$ac_cv_type_uint8" = xyes; then :
16997 cat >>confdefs.h <<_ACEOF
16998 #define HAVE_UINT8 1
16999 _ACEOF
17003 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17005 if test "x$ac_cv_type_int64" = xyes; then :
17007 cat >>confdefs.h <<_ACEOF
17008 #define HAVE_INT64 1
17009 _ACEOF
17013 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17015 if test "x$ac_cv_type_uint64" = xyes; then :
17017 cat >>confdefs.h <<_ACEOF
17018 #define HAVE_UINT64 1
17019 _ACEOF
17025 # Some compilers offer a 128-bit integer scalar type.
17026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17027 $as_echo_n "checking for __int128... " >&6; }
17028 if ${pgac_cv__128bit_int+:} false; then :
17029 $as_echo_n "(cached) " >&6
17030 else
17031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17032 /* end confdefs.h. */
17035 * We don't actually run this test, just link it to verify that any support
17036 * functions needed for __int128 are present.
17038 * These are globals to discourage the compiler from folding all the
17039 * arithmetic tests down to compile-time constants. We do not have
17040 * convenient support for 128bit literals at this point...
17042 __int128 a = 48828125;
17043 __int128 b = 97656250;
17046 main ()
17049 __int128 c,d;
17050 a = (a << 12) + 1; /* 200000000001 */
17051 b = (b << 12) + 5; /* 400000000005 */
17052 /* try the most relevant arithmetic ops */
17053 c = a * b;
17054 d = (c + b) / b;
17055 /* must use the results, else compiler may optimize arithmetic away */
17056 if (d != a+1)
17057 return 1;
17060 return 0;
17062 _ACEOF
17063 if ac_fn_c_try_link "$LINENO"; then :
17064 pgac_cv__128bit_int=yes
17065 else
17066 pgac_cv__128bit_int=no
17068 rm -f core conftest.err conftest.$ac_objext \
17069 conftest$ac_exeext conftest.$ac_ext
17071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17072 $as_echo "$pgac_cv__128bit_int" >&6; }
17073 if test x"$pgac_cv__128bit_int" = xyes ; then
17074 # Use of non-default alignment with __int128 tickles bugs in some compilers.
17075 # If not cross-compiling, we can test for bugs and disable use of __int128
17076 # with buggy compilers. If cross-compiling, hope for the best.
17077 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17079 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17080 if ${pgac_cv__128bit_int_bug+:} false; then :
17081 $as_echo_n "(cached) " >&6
17082 else
17083 if test "$cross_compiling" = yes; then :
17084 pgac_cv__128bit_int_bug="assuming ok"
17085 else
17086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17087 /* end confdefs.h. */
17089 /* This must match the corresponding code in c.h: */
17090 #if defined(__GNUC__) || defined(__SUNPRO_C)
17091 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17092 #elif defined(_MSC_VER)
17093 #define pg_attribute_aligned(a) __declspec(align(a))
17094 #endif
17095 typedef __int128 int128a
17096 #if defined(pg_attribute_aligned)
17097 pg_attribute_aligned(8)
17098 #endif
17100 int128a holder;
17101 void pass_by_val(void *buffer, int128a par) { holder = par; }
17104 main ()
17107 long int i64 = 97656225L << 12;
17108 int128a q;
17109 pass_by_val(main, (int128a) i64);
17110 q = (int128a) i64;
17111 if (q != holder)
17112 return 1;
17115 return 0;
17117 _ACEOF
17118 if ac_fn_c_try_run "$LINENO"; then :
17119 pgac_cv__128bit_int_bug=ok
17120 else
17121 pgac_cv__128bit_int_bug=broken
17123 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17124 conftest.$ac_objext conftest.beam conftest.$ac_ext
17128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17129 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17130 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17132 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17134 # The cast to long int works around a bug in the HP C Compiler,
17135 # see AC_CHECK_SIZEOF for more information.
17136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17137 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17138 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17139 $as_echo_n "(cached) " >&6
17140 else
17141 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
17142 #ifndef offsetof
17143 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17144 #endif
17145 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17147 else
17148 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17149 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17150 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17151 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17152 See \`config.log' for more details" "$LINENO" 5; }
17153 else
17154 ac_cv_alignof_PG_INT128_TYPE=0
17159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17160 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17164 cat >>confdefs.h <<_ACEOF
17165 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17166 _ACEOF
17172 # Check for various atomic operations now that we have checked how to declare
17173 # 64bit integers.
17174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17175 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17176 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17177 $as_echo_n "(cached) " >&6
17178 else
17179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17180 /* end confdefs.h. */
17183 main ()
17185 char lock = 0;
17186 __sync_lock_test_and_set(&lock, 1);
17187 __sync_lock_release(&lock);
17189 return 0;
17191 _ACEOF
17192 if ac_fn_c_try_link "$LINENO"; then :
17193 pgac_cv_gcc_sync_char_tas="yes"
17194 else
17195 pgac_cv_gcc_sync_char_tas="no"
17197 rm -f core conftest.err conftest.$ac_objext \
17198 conftest$ac_exeext conftest.$ac_ext
17200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17201 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17202 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17204 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17208 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17209 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17210 $as_echo_n "(cached) " >&6
17211 else
17212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17213 /* end confdefs.h. */
17216 main ()
17218 int lock = 0;
17219 __sync_lock_test_and_set(&lock, 1);
17220 __sync_lock_release(&lock);
17222 return 0;
17224 _ACEOF
17225 if ac_fn_c_try_link "$LINENO"; then :
17226 pgac_cv_gcc_sync_int32_tas="yes"
17227 else
17228 pgac_cv_gcc_sync_int32_tas="no"
17230 rm -f core conftest.err conftest.$ac_objext \
17231 conftest$ac_exeext conftest.$ac_ext
17233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17234 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17235 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17237 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17241 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17242 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17243 $as_echo_n "(cached) " >&6
17244 else
17245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17246 /* end confdefs.h. */
17249 main ()
17251 int val = 0;
17252 __sync_val_compare_and_swap(&val, 0, 37);
17254 return 0;
17256 _ACEOF
17257 if ac_fn_c_try_link "$LINENO"; then :
17258 pgac_cv_gcc_sync_int32_cas="yes"
17259 else
17260 pgac_cv_gcc_sync_int32_cas="no"
17262 rm -f core conftest.err conftest.$ac_objext \
17263 conftest$ac_exeext conftest.$ac_ext
17265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17266 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17267 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17269 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17273 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17274 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17275 $as_echo_n "(cached) " >&6
17276 else
17277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17278 /* end confdefs.h. */
17281 main ()
17283 PG_INT64_TYPE lock = 0;
17284 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17286 return 0;
17288 _ACEOF
17289 if ac_fn_c_try_link "$LINENO"; then :
17290 pgac_cv_gcc_sync_int64_cas="yes"
17291 else
17292 pgac_cv_gcc_sync_int64_cas="no"
17294 rm -f core conftest.err conftest.$ac_objext \
17295 conftest$ac_exeext conftest.$ac_ext
17297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17298 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17299 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17301 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17305 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17306 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17307 $as_echo_n "(cached) " >&6
17308 else
17309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17310 /* end confdefs.h. */
17313 main ()
17315 int val = 0;
17316 int expect = 0;
17317 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17319 return 0;
17321 _ACEOF
17322 if ac_fn_c_try_link "$LINENO"; then :
17323 pgac_cv_gcc_atomic_int32_cas="yes"
17324 else
17325 pgac_cv_gcc_atomic_int32_cas="no"
17327 rm -f core conftest.err conftest.$ac_objext \
17328 conftest$ac_exeext conftest.$ac_ext
17330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17331 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17332 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17334 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17338 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17339 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17340 $as_echo_n "(cached) " >&6
17341 else
17342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17343 /* end confdefs.h. */
17346 main ()
17348 PG_INT64_TYPE val = 0;
17349 PG_INT64_TYPE expect = 0;
17350 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17352 return 0;
17354 _ACEOF
17355 if ac_fn_c_try_link "$LINENO"; then :
17356 pgac_cv_gcc_atomic_int64_cas="yes"
17357 else
17358 pgac_cv_gcc_atomic_int64_cas="no"
17360 rm -f core conftest.err conftest.$ac_objext \
17361 conftest$ac_exeext conftest.$ac_ext
17363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17364 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17365 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17367 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17372 # Check for x86 cpuid instruction
17373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17374 $as_echo_n "checking for __get_cpuid... " >&6; }
17375 if ${pgac_cv__get_cpuid+:} false; then :
17376 $as_echo_n "(cached) " >&6
17377 else
17378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17379 /* end confdefs.h. */
17380 #include <cpuid.h>
17382 main ()
17384 unsigned int exx[4] = {0, 0, 0, 0};
17385 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17388 return 0;
17390 _ACEOF
17391 if ac_fn_c_try_link "$LINENO"; then :
17392 pgac_cv__get_cpuid="yes"
17393 else
17394 pgac_cv__get_cpuid="no"
17396 rm -f core conftest.err conftest.$ac_objext \
17397 conftest$ac_exeext conftest.$ac_ext
17399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17400 $as_echo "$pgac_cv__get_cpuid" >&6; }
17401 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17403 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17408 $as_echo_n "checking for __cpuid... " >&6; }
17409 if ${pgac_cv__cpuid+:} false; then :
17410 $as_echo_n "(cached) " >&6
17411 else
17412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17413 /* end confdefs.h. */
17414 #include <intrin.h>
17416 main ()
17418 unsigned int exx[4] = {0, 0, 0, 0};
17419 __get_cpuid(exx[0], 1);
17422 return 0;
17424 _ACEOF
17425 if ac_fn_c_try_link "$LINENO"; then :
17426 pgac_cv__cpuid="yes"
17427 else
17428 pgac_cv__cpuid="no"
17430 rm -f core conftest.err conftest.$ac_objext \
17431 conftest$ac_exeext conftest.$ac_ext
17433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17434 $as_echo "$pgac_cv__cpuid" >&6; }
17435 if test x"$pgac_cv__cpuid" = x"yes"; then
17437 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17441 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17443 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17444 # with the default compiler flags. If not, check if adding the -msse4.2
17445 # flag helps. CFLAGS_CRC is set to -msse4.2 if that's required.
17446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17447 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17448 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17449 $as_echo_n "(cached) " >&6
17450 else
17451 pgac_save_CFLAGS=$CFLAGS
17452 CFLAGS="$pgac_save_CFLAGS "
17453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17454 /* end confdefs.h. */
17455 #include <nmmintrin.h>
17457 main ()
17459 unsigned int crc = 0;
17460 crc = _mm_crc32_u8(crc, 0);
17461 crc = _mm_crc32_u32(crc, 0);
17462 /* return computed value, to prevent the above being optimized away */
17463 return crc == 0;
17465 return 0;
17467 _ACEOF
17468 if ac_fn_c_try_link "$LINENO"; then :
17469 pgac_cv_sse42_crc32_intrinsics_=yes
17470 else
17471 pgac_cv_sse42_crc32_intrinsics_=no
17473 rm -f core conftest.err conftest.$ac_objext \
17474 conftest$ac_exeext conftest.$ac_ext
17475 CFLAGS="$pgac_save_CFLAGS"
17477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17478 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17479 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17480 CFLAGS_CRC=""
17481 pgac_sse42_crc32_intrinsics=yes
17484 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17486 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17487 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17488 $as_echo_n "(cached) " >&6
17489 else
17490 pgac_save_CFLAGS=$CFLAGS
17491 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17493 /* end confdefs.h. */
17494 #include <nmmintrin.h>
17496 main ()
17498 unsigned int crc = 0;
17499 crc = _mm_crc32_u8(crc, 0);
17500 crc = _mm_crc32_u32(crc, 0);
17501 /* return computed value, to prevent the above being optimized away */
17502 return crc == 0;
17504 return 0;
17506 _ACEOF
17507 if ac_fn_c_try_link "$LINENO"; then :
17508 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17509 else
17510 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17512 rm -f core conftest.err conftest.$ac_objext \
17513 conftest$ac_exeext conftest.$ac_ext
17514 CFLAGS="$pgac_save_CFLAGS"
17516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17517 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17518 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17519 CFLAGS_CRC="-msse4.2"
17520 pgac_sse42_crc32_intrinsics=yes
17525 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17526 # define __SSE4_2__ in that case.
17527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17528 /* end confdefs.h. */
17531 main ()
17534 #ifndef __SSE4_2__
17535 #error __SSE4_2__ not defined
17536 #endif
17539 return 0;
17541 _ACEOF
17542 if ac_fn_c_try_compile "$LINENO"; then :
17543 SSE4_2_TARGETED=1
17545 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17547 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17549 # First check if __crc32c* intrinsics can be used with the default compiler
17550 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17551 # CFLAGS_CRC is set if the extra flag is required.
17552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17553 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17554 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17555 $as_echo_n "(cached) " >&6
17556 else
17557 pgac_save_CFLAGS=$CFLAGS
17558 CFLAGS="$pgac_save_CFLAGS "
17559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17560 /* end confdefs.h. */
17561 #include <arm_acle.h>
17563 main ()
17565 unsigned int crc = 0;
17566 crc = __crc32cb(crc, 0);
17567 crc = __crc32ch(crc, 0);
17568 crc = __crc32cw(crc, 0);
17569 crc = __crc32cd(crc, 0);
17570 /* return computed value, to prevent the above being optimized away */
17571 return crc == 0;
17573 return 0;
17575 _ACEOF
17576 if ac_fn_c_try_link "$LINENO"; then :
17577 pgac_cv_armv8_crc32c_intrinsics_=yes
17578 else
17579 pgac_cv_armv8_crc32c_intrinsics_=no
17581 rm -f core conftest.err conftest.$ac_objext \
17582 conftest$ac_exeext conftest.$ac_ext
17583 CFLAGS="$pgac_save_CFLAGS"
17585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17586 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17587 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17588 CFLAGS_CRC=""
17589 pgac_armv8_crc32c_intrinsics=yes
17592 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17594 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17595 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17596 $as_echo_n "(cached) " >&6
17597 else
17598 pgac_save_CFLAGS=$CFLAGS
17599 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17601 /* end confdefs.h. */
17602 #include <arm_acle.h>
17604 main ()
17606 unsigned int crc = 0;
17607 crc = __crc32cb(crc, 0);
17608 crc = __crc32ch(crc, 0);
17609 crc = __crc32cw(crc, 0);
17610 crc = __crc32cd(crc, 0);
17611 /* return computed value, to prevent the above being optimized away */
17612 return crc == 0;
17614 return 0;
17616 _ACEOF
17617 if ac_fn_c_try_link "$LINENO"; then :
17618 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17619 else
17620 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17622 rm -f core conftest.err conftest.$ac_objext \
17623 conftest$ac_exeext conftest.$ac_ext
17624 CFLAGS="$pgac_save_CFLAGS"
17626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17627 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17628 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17629 CFLAGS_CRC="-march=armv8-a+crc"
17630 pgac_armv8_crc32c_intrinsics=yes
17635 # Check for LoongArch CRC intrinsics to do CRC calculations.
17637 # Check if __builtin_loongarch_crcc_* intrinsics can be used
17638 # with the default compiler flags.
17639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_loongarch_crcc_w_b_w, __builtin_loongarch_crcc_w_h_w, __builtin_loongarch_crcc_w_w_w and __builtin_loongarch_crcc_w_d_w" >&5
17640 $as_echo_n "checking for __builtin_loongarch_crcc_w_b_w, __builtin_loongarch_crcc_w_h_w, __builtin_loongarch_crcc_w_w_w and __builtin_loongarch_crcc_w_d_w... " >&6; }
17641 if ${pgac_cv_loongarch_crc32c_intrinsics+:} false; then :
17642 $as_echo_n "(cached) " >&6
17643 else
17644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17645 /* end confdefs.h. */
17648 main ()
17650 unsigned int crc = 0;
17651 crc = __builtin_loongarch_crcc_w_b_w(0, crc);
17652 crc = __builtin_loongarch_crcc_w_h_w(0, crc);
17653 crc = __builtin_loongarch_crcc_w_w_w(0, crc);
17654 crc = __builtin_loongarch_crcc_w_d_w(0, crc);
17655 /* return computed value, to prevent the above being optimized away */
17656 return crc == 0;
17658 return 0;
17660 _ACEOF
17661 if ac_fn_c_try_link "$LINENO"; then :
17662 pgac_cv_loongarch_crc32c_intrinsics=yes
17663 else
17664 pgac_cv_loongarch_crc32c_intrinsics=no
17666 rm -f core conftest.err conftest.$ac_objext \
17667 conftest$ac_exeext conftest.$ac_ext
17669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_loongarch_crc32c_intrinsics" >&5
17670 $as_echo "$pgac_cv_loongarch_crc32c_intrinsics" >&6; }
17671 if test x"$pgac_cv_loongarch_crc32c_intrinsics" = x"yes"; then
17672 pgac_loongarch_crc32c_intrinsics=yes
17678 # Select CRC-32C implementation.
17680 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17681 # use the special CRC instructions for calculating CRC-32C. If we're not
17682 # targeting such a processor, but we can nevertheless produce code that uses
17683 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17684 # implementations and select which one to use at runtime, depending on whether
17685 # SSE 4.2 is supported by the processor we're running on.
17687 # Similarly, if we are targeting an ARM processor that has the CRC
17688 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17689 # we're not targeting such a processor, but can nevertheless produce code that
17690 # uses the CRC instructions, compile both, and select at runtime.
17692 # You can skip the runtime check by setting the appropriate USE_*_CRC32 flag to 1
17693 # in the template or configure command line.
17695 # If we are targeting a LoongArch processor, CRC instructions are
17696 # always available (at least on 64 bit), so no runtime check is needed.
17697 if test x"$USE_SLICING_BY_8_CRC32C" = x"" && test x"$USE_SSE42_CRC32C" = x"" && test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"" && test x"$USE_ARMV8_CRC32C" = x"" && test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"" && test x"$USE_LOONGARCH_CRC32C" = x""; then
17698 # Use Intel SSE 4.2 if available.
17699 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17700 USE_SSE42_CRC32C=1
17701 else
17702 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17703 # the runtime check.
17704 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
17705 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17706 else
17707 # Use ARM CRC Extension if available.
17708 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_CRC" = x""; then
17709 USE_ARMV8_CRC32C=1
17710 else
17711 # ARM CRC Extension, with runtime check?
17712 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17713 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17714 else
17715 # LoongArch CRCC instructions.
17716 if test x"$pgac_loongarch_crc32c_intrinsics" = x"yes"; then
17717 USE_LOONGARCH_CRC32C=1
17718 else
17719 # fall back to slicing-by-8 algorithm, which doesn't require any
17720 # special CPU support.
17721 USE_SLICING_BY_8_CRC32C=1
17729 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17731 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17732 if test x"$USE_SSE42_CRC32C" = x"1"; then
17734 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17736 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17738 $as_echo "SSE 4.2" >&6; }
17739 else
17740 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17742 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17744 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17746 $as_echo "SSE 4.2 with runtime check" >&6; }
17747 else
17748 if test x"$USE_ARMV8_CRC32C" = x"1"; then
17750 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17752 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17754 $as_echo "ARMv8 CRC instructions" >&6; }
17755 else
17756 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17758 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17760 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17762 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17763 else
17764 if test x"$USE_LOONGARCH_CRC32C" = x"1"; then
17766 $as_echo "#define USE_LOONGARCH_CRC32C 1" >>confdefs.h
17768 PG_CRC32C_OBJS="pg_crc32c_loongarch.o"
17769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: LoongArch CRCC instructions" >&5
17770 $as_echo "LoongArch CRCC instructions" >&6; }
17771 else
17773 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17775 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17777 $as_echo "slicing-by-8" >&6; }
17786 # Select semaphore implementation type.
17787 if test "$PORTNAME" != "win32"; then
17788 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17789 # Need sem_open for this
17790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17791 $as_echo_n "checking for library containing sem_open... " >&6; }
17792 if ${ac_cv_search_sem_open+:} false; then :
17793 $as_echo_n "(cached) " >&6
17794 else
17795 ac_func_search_save_LIBS=$LIBS
17796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17797 /* end confdefs.h. */
17799 /* Override any GCC internal prototype to avoid an error.
17800 Use char because int might match the return type of a GCC
17801 builtin and then its argument prototype would still apply. */
17802 #ifdef __cplusplus
17803 extern "C"
17804 #endif
17805 char sem_open ();
17807 main ()
17809 return sem_open ();
17811 return 0;
17813 _ACEOF
17814 for ac_lib in '' rt pthread; do
17815 if test -z "$ac_lib"; then
17816 ac_res="none required"
17817 else
17818 ac_res=-l$ac_lib
17819 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17821 if ac_fn_c_try_link "$LINENO"; then :
17822 ac_cv_search_sem_open=$ac_res
17824 rm -f core conftest.err conftest.$ac_objext \
17825 conftest$ac_exeext
17826 if ${ac_cv_search_sem_open+:} false; then :
17827 break
17829 done
17830 if ${ac_cv_search_sem_open+:} false; then :
17832 else
17833 ac_cv_search_sem_open=no
17835 rm conftest.$ac_ext
17836 LIBS=$ac_func_search_save_LIBS
17838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17839 $as_echo "$ac_cv_search_sem_open" >&6; }
17840 ac_res=$ac_cv_search_sem_open
17841 if test "$ac_res" != no; then :
17842 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17843 USE_NAMED_POSIX_SEMAPHORES=1
17847 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17848 # Need sem_init for this
17849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17850 $as_echo_n "checking for library containing sem_init... " >&6; }
17851 if ${ac_cv_search_sem_init+:} false; then :
17852 $as_echo_n "(cached) " >&6
17853 else
17854 ac_func_search_save_LIBS=$LIBS
17855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17856 /* end confdefs.h. */
17858 /* Override any GCC internal prototype to avoid an error.
17859 Use char because int might match the return type of a GCC
17860 builtin and then its argument prototype would still apply. */
17861 #ifdef __cplusplus
17862 extern "C"
17863 #endif
17864 char sem_init ();
17866 main ()
17868 return sem_init ();
17870 return 0;
17872 _ACEOF
17873 for ac_lib in '' rt pthread; do
17874 if test -z "$ac_lib"; then
17875 ac_res="none required"
17876 else
17877 ac_res=-l$ac_lib
17878 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17880 if ac_fn_c_try_link "$LINENO"; then :
17881 ac_cv_search_sem_init=$ac_res
17883 rm -f core conftest.err conftest.$ac_objext \
17884 conftest$ac_exeext
17885 if ${ac_cv_search_sem_init+:} false; then :
17886 break
17888 done
17889 if ${ac_cv_search_sem_init+:} false; then :
17891 else
17892 ac_cv_search_sem_init=no
17894 rm conftest.$ac_ext
17895 LIBS=$ac_func_search_save_LIBS
17897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17898 $as_echo "$ac_cv_search_sem_init" >&6; }
17899 ac_res=$ac_cv_search_sem_init
17900 if test "$ac_res" != no; then :
17901 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17902 USE_UNNAMED_POSIX_SEMAPHORES=1
17906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17907 $as_echo_n "checking which semaphore API to use... " >&6; }
17908 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17910 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17912 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17913 sematype="named POSIX"
17914 else
17915 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17917 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17919 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17920 sematype="unnamed POSIX"
17921 else
17923 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17925 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17926 sematype="System V"
17929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17930 $as_echo "$sematype" >&6; }
17931 else
17933 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17935 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
17939 # Select shared-memory implementation type.
17940 if test "$PORTNAME" != "win32"; then
17942 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
17944 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17945 else
17947 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
17949 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
17952 # Select random number source. If a TLS library is used then it will be the
17953 # first choice, else the native platform sources (Windows API or /dev/urandom)
17954 # will be used.
17955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
17956 $as_echo_n "checking which random number source to use... " >&6; }
17957 if test x"$with_ssl" = x"openssl" ; then
17958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
17959 $as_echo "OpenSSL" >&6; }
17960 elif test x"$PORTNAME" = x"win32" ; then
17961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
17962 $as_echo "Windows native" >&6; }
17963 elif test x"$cross_compiling" = x"yes"; then
17964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming /dev/urandom" >&5
17965 $as_echo "assuming /dev/urandom" >&6; }
17966 else
17967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
17968 $as_echo "/dev/urandom" >&6; }
17969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
17970 $as_echo_n "checking for /dev/urandom... " >&6; }
17971 if ${ac_cv_file__dev_urandom+:} false; then :
17972 $as_echo_n "(cached) " >&6
17973 else
17974 test "$cross_compiling" = yes &&
17975 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17976 if test -r "/dev/urandom"; then
17977 ac_cv_file__dev_urandom=yes
17978 else
17979 ac_cv_file__dev_urandom=no
17982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
17983 $as_echo "$ac_cv_file__dev_urandom" >&6; }
17984 if test "x$ac_cv_file__dev_urandom" = xyes; then :
17989 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
17990 as_fn_error $? "
17991 no source of strong random numbers was found
17992 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
17996 # If not set in template file, set bytes to use libc memset()
17997 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
17998 MEMSET_LOOP_LIMIT=1024
18001 cat >>confdefs.h <<_ACEOF
18002 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18003 _ACEOF
18007 if test "$enable_nls" = yes ; then
18009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18010 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18011 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18012 $as_echo_n "(cached) " >&6
18013 else
18014 ac_func_search_save_LIBS=$LIBS
18015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18016 /* end confdefs.h. */
18018 /* Override any GCC internal prototype to avoid an error.
18019 Use char because int might match the return type of a GCC
18020 builtin and then its argument prototype would still apply. */
18021 #ifdef __cplusplus
18022 extern "C"
18023 #endif
18024 char bind_textdomain_codeset ();
18026 main ()
18028 return bind_textdomain_codeset ();
18030 return 0;
18032 _ACEOF
18033 for ac_lib in '' intl; do
18034 if test -z "$ac_lib"; then
18035 ac_res="none required"
18036 else
18037 ac_res=-l$ac_lib
18038 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18040 if ac_fn_c_try_link "$LINENO"; then :
18041 ac_cv_search_bind_textdomain_codeset=$ac_res
18043 rm -f core conftest.err conftest.$ac_objext \
18044 conftest$ac_exeext
18045 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18046 break
18048 done
18049 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18051 else
18052 ac_cv_search_bind_textdomain_codeset=no
18054 rm conftest.$ac_ext
18055 LIBS=$ac_func_search_save_LIBS
18057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18058 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18059 ac_res=$ac_cv_search_bind_textdomain_codeset
18060 if test "$ac_res" != no; then :
18061 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18063 else
18064 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18067 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18068 if test "x$ac_cv_header_libintl_h" = xyes; then :
18070 else
18071 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18075 if test -z "$MSGFMT"; then
18076 for ac_prog in msgfmt
18078 # Extract the first word of "$ac_prog", so it can be a program name with args.
18079 set dummy $ac_prog; ac_word=$2
18080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18081 $as_echo_n "checking for $ac_word... " >&6; }
18082 if ${ac_cv_path_MSGFMT+:} false; then :
18083 $as_echo_n "(cached) " >&6
18084 else
18085 case $MSGFMT in
18086 [\\/]* | ?:[\\/]*)
18087 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18090 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18091 for as_dir in $PATH
18093 IFS=$as_save_IFS
18094 test -z "$as_dir" && as_dir=.
18095 for ac_exec_ext in '' $ac_executable_extensions; do
18096 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18097 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18099 break 2
18101 done
18102 done
18103 IFS=$as_save_IFS
18106 esac
18108 MSGFMT=$ac_cv_path_MSGFMT
18109 if test -n "$MSGFMT"; then
18110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18111 $as_echo "$MSGFMT" >&6; }
18112 else
18113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18114 $as_echo "no" >&6; }
18118 test -n "$MSGFMT" && break
18119 done
18121 else
18122 # Report the value of MSGFMT in configure's output in all cases.
18123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18124 $as_echo_n "checking for MSGFMT... " >&6; }
18125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18126 $as_echo "$MSGFMT" >&6; }
18129 if test -z "$MSGFMT"; then
18130 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18133 $as_echo_n "checking for msgfmt flags... " >&6; }
18134 if ${pgac_cv_msgfmt_flags+:} false; then :
18135 $as_echo_n "(cached) " >&6
18136 else
18137 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18138 pgac_cv_msgfmt_flags=-c
18141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18142 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18143 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18145 if test -z "$MSGMERGE"; then
18146 for ac_prog in msgmerge
18148 # Extract the first word of "$ac_prog", so it can be a program name with args.
18149 set dummy $ac_prog; ac_word=$2
18150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18151 $as_echo_n "checking for $ac_word... " >&6; }
18152 if ${ac_cv_path_MSGMERGE+:} false; then :
18153 $as_echo_n "(cached) " >&6
18154 else
18155 case $MSGMERGE in
18156 [\\/]* | ?:[\\/]*)
18157 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18160 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18161 for as_dir in $PATH
18163 IFS=$as_save_IFS
18164 test -z "$as_dir" && as_dir=.
18165 for ac_exec_ext in '' $ac_executable_extensions; do
18166 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18167 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18168 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18169 break 2
18171 done
18172 done
18173 IFS=$as_save_IFS
18176 esac
18178 MSGMERGE=$ac_cv_path_MSGMERGE
18179 if test -n "$MSGMERGE"; then
18180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18181 $as_echo "$MSGMERGE" >&6; }
18182 else
18183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18184 $as_echo "no" >&6; }
18188 test -n "$MSGMERGE" && break
18189 done
18191 else
18192 # Report the value of MSGMERGE in configure's output in all cases.
18193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18194 $as_echo_n "checking for MSGMERGE... " >&6; }
18195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18196 $as_echo "$MSGMERGE" >&6; }
18199 if test -z "$XGETTEXT"; then
18200 for ac_prog in xgettext
18202 # Extract the first word of "$ac_prog", so it can be a program name with args.
18203 set dummy $ac_prog; ac_word=$2
18204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18205 $as_echo_n "checking for $ac_word... " >&6; }
18206 if ${ac_cv_path_XGETTEXT+:} false; then :
18207 $as_echo_n "(cached) " >&6
18208 else
18209 case $XGETTEXT in
18210 [\\/]* | ?:[\\/]*)
18211 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18214 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18215 for as_dir in $PATH
18217 IFS=$as_save_IFS
18218 test -z "$as_dir" && as_dir=.
18219 for ac_exec_ext in '' $ac_executable_extensions; do
18220 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18221 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18222 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18223 break 2
18225 done
18226 done
18227 IFS=$as_save_IFS
18230 esac
18232 XGETTEXT=$ac_cv_path_XGETTEXT
18233 if test -n "$XGETTEXT"; then
18234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18235 $as_echo "$XGETTEXT" >&6; }
18236 else
18237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18238 $as_echo "no" >&6; }
18242 test -n "$XGETTEXT" && break
18243 done
18245 else
18246 # Report the value of XGETTEXT in configure's output in all cases.
18247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18248 $as_echo_n "checking for XGETTEXT... " >&6; }
18249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18250 $as_echo "$XGETTEXT" >&6; }
18256 # Check for Tcl configuration script tclConfig.sh
18257 if test "$with_tcl" = yes; then
18258 if test -z "$TCLSH"; then
18259 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18261 # Extract the first word of "$ac_prog", so it can be a program name with args.
18262 set dummy $ac_prog; ac_word=$2
18263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18264 $as_echo_n "checking for $ac_word... " >&6; }
18265 if ${ac_cv_path_TCLSH+:} false; then :
18266 $as_echo_n "(cached) " >&6
18267 else
18268 case $TCLSH in
18269 [\\/]* | ?:[\\/]*)
18270 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18274 for as_dir in $PATH
18276 IFS=$as_save_IFS
18277 test -z "$as_dir" && as_dir=.
18278 for ac_exec_ext in '' $ac_executable_extensions; do
18279 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18280 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18281 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18282 break 2
18284 done
18285 done
18286 IFS=$as_save_IFS
18289 esac
18291 TCLSH=$ac_cv_path_TCLSH
18292 if test -n "$TCLSH"; then
18293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18294 $as_echo "$TCLSH" >&6; }
18295 else
18296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18297 $as_echo "no" >&6; }
18301 test -n "$TCLSH" && break
18302 done
18304 else
18305 # Report the value of TCLSH in configure's output in all cases.
18306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18307 $as_echo_n "checking for TCLSH... " >&6; }
18308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18309 $as_echo "$TCLSH" >&6; }
18312 if test x"$TCLSH" = x""; then
18313 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18317 $as_echo_n "checking for tclConfig.sh... " >&6; }
18318 # Let user override test
18319 if test -z "$TCL_CONFIG_SH"; then
18320 pgac_test_dirs="$with_tclconfig"
18322 set X $pgac_test_dirs; shift
18323 if test $# -eq 0; then
18324 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18325 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18326 # On newer macOS, $auto_path frequently doesn't include the place
18327 # where tclConfig.sh actually lives. Append that to the end, so as not
18328 # to break cases where a non-default Tcl installation is being used.
18329 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18330 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18332 set X $pgac_test_dirs; shift
18335 for pgac_dir do
18336 if test -r "$pgac_dir/tclConfig.sh"; then
18337 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18338 break
18340 done
18343 if test -z "$TCL_CONFIG_SH"; then
18344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18345 $as_echo "no" >&6; }
18346 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18347 else
18348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18349 $as_echo "$TCL_CONFIG_SH" >&6; }
18354 . "$TCL_CONFIG_SH"
18355 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18356 eval TCL_LIBS=\"$TCL_LIBS\"
18357 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18358 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18360 if test "$TCL_SHARED_BUILD" != 1; then
18361 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18362 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18364 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18365 ac_save_CPPFLAGS=$CPPFLAGS
18366 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18367 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18368 if test "x$ac_cv_header_tcl_h" = xyes; then :
18370 else
18371 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18375 CPPFLAGS=$ac_save_CPPFLAGS
18378 # check for <perl.h>
18379 if test "$with_perl" = yes; then
18380 ac_save_CPPFLAGS=$CPPFLAGS
18381 CPPFLAGS="$CPPFLAGS $perl_includespec"
18382 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18384 if test "x$ac_cv_header_perl_h" = xyes; then :
18386 else
18387 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18391 # While we're at it, check that we can link to libperl.
18392 # On most platforms, if perl.h is there then libperl.so will be too, but at
18393 # this writing Debian packages them separately. There is no known reason to
18394 # waste cycles on separate probes for the Tcl or Python libraries, though.
18395 # On some Red Hat platforms, the link attempt can fail if we don't use
18396 # CFLAGS_SL while building the test program.
18397 ac_save_CFLAGS=$CFLAGS
18398 CFLAGS="$CFLAGS $CFLAGS_SL"
18399 pgac_save_LIBS=$LIBS
18400 LIBS="$perl_embed_ldflags"
18401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18402 $as_echo_n "checking for libperl... " >&6; }
18403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18404 /* end confdefs.h. */
18406 #include <EXTERN.h>
18407 #include <perl.h>
18410 main ()
18412 perl_alloc();
18414 return 0;
18416 _ACEOF
18417 if ac_fn_c_try_link "$LINENO"; then :
18418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18419 $as_echo "yes" >&6; }
18420 else
18421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18422 $as_echo "no" >&6; }
18423 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18425 rm -f core conftest.err conftest.$ac_objext \
18426 conftest$ac_exeext conftest.$ac_ext
18427 LIBS=$pgac_save_LIBS
18428 CFLAGS=$ac_save_CFLAGS
18429 CPPFLAGS=$ac_save_CPPFLAGS
18432 # check for <Python.h>
18433 if test "$with_python" = yes; then
18434 ac_save_CPPFLAGS=$CPPFLAGS
18435 CPPFLAGS="$python_includespec $CPPFLAGS"
18436 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18437 if test "x$ac_cv_header_Python_h" = xyes; then :
18439 else
18440 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18444 CPPFLAGS=$ac_save_CPPFLAGS
18448 # Check for documentation-building tools
18450 if test -z "$XMLLINT"; then
18451 for ac_prog in xmllint
18453 # Extract the first word of "$ac_prog", so it can be a program name with args.
18454 set dummy $ac_prog; ac_word=$2
18455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18456 $as_echo_n "checking for $ac_word... " >&6; }
18457 if ${ac_cv_path_XMLLINT+:} false; then :
18458 $as_echo_n "(cached) " >&6
18459 else
18460 case $XMLLINT in
18461 [\\/]* | ?:[\\/]*)
18462 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18466 for as_dir in $PATH
18468 IFS=$as_save_IFS
18469 test -z "$as_dir" && as_dir=.
18470 for ac_exec_ext in '' $ac_executable_extensions; do
18471 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18472 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18473 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18474 break 2
18476 done
18477 done
18478 IFS=$as_save_IFS
18481 esac
18483 XMLLINT=$ac_cv_path_XMLLINT
18484 if test -n "$XMLLINT"; then
18485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18486 $as_echo "$XMLLINT" >&6; }
18487 else
18488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18489 $as_echo "no" >&6; }
18493 test -n "$XMLLINT" && break
18494 done
18496 else
18497 # Report the value of XMLLINT in configure's output in all cases.
18498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18499 $as_echo_n "checking for XMLLINT... " >&6; }
18500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18501 $as_echo "$XMLLINT" >&6; }
18504 if test -z "$XSLTPROC"; then
18505 for ac_prog in xsltproc
18507 # Extract the first word of "$ac_prog", so it can be a program name with args.
18508 set dummy $ac_prog; ac_word=$2
18509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18510 $as_echo_n "checking for $ac_word... " >&6; }
18511 if ${ac_cv_path_XSLTPROC+:} false; then :
18512 $as_echo_n "(cached) " >&6
18513 else
18514 case $XSLTPROC in
18515 [\\/]* | ?:[\\/]*)
18516 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18520 for as_dir in $PATH
18522 IFS=$as_save_IFS
18523 test -z "$as_dir" && as_dir=.
18524 for ac_exec_ext in '' $ac_executable_extensions; do
18525 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18526 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18527 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18528 break 2
18530 done
18531 done
18532 IFS=$as_save_IFS
18535 esac
18537 XSLTPROC=$ac_cv_path_XSLTPROC
18538 if test -n "$XSLTPROC"; then
18539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18540 $as_echo "$XSLTPROC" >&6; }
18541 else
18542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18543 $as_echo "no" >&6; }
18547 test -n "$XSLTPROC" && break
18548 done
18550 else
18551 # Report the value of XSLTPROC in configure's output in all cases.
18552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18553 $as_echo_n "checking for XSLTPROC... " >&6; }
18554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18555 $as_echo "$XSLTPROC" >&6; }
18558 if test -z "$FOP"; then
18559 for ac_prog in fop
18561 # Extract the first word of "$ac_prog", so it can be a program name with args.
18562 set dummy $ac_prog; ac_word=$2
18563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18564 $as_echo_n "checking for $ac_word... " >&6; }
18565 if ${ac_cv_path_FOP+:} false; then :
18566 $as_echo_n "(cached) " >&6
18567 else
18568 case $FOP in
18569 [\\/]* | ?:[\\/]*)
18570 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18574 for as_dir in $PATH
18576 IFS=$as_save_IFS
18577 test -z "$as_dir" && as_dir=.
18578 for ac_exec_ext in '' $ac_executable_extensions; do
18579 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18580 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18581 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18582 break 2
18584 done
18585 done
18586 IFS=$as_save_IFS
18589 esac
18591 FOP=$ac_cv_path_FOP
18592 if test -n "$FOP"; then
18593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18594 $as_echo "$FOP" >&6; }
18595 else
18596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18597 $as_echo "no" >&6; }
18601 test -n "$FOP" && break
18602 done
18604 else
18605 # Report the value of FOP in configure's output in all cases.
18606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18607 $as_echo_n "checking for FOP... " >&6; }
18608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18609 $as_echo "$FOP" >&6; }
18612 if test -z "$DBTOEPUB"; then
18613 for ac_prog in dbtoepub
18615 # Extract the first word of "$ac_prog", so it can be a program name with args.
18616 set dummy $ac_prog; ac_word=$2
18617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18618 $as_echo_n "checking for $ac_word... " >&6; }
18619 if ${ac_cv_path_DBTOEPUB+:} false; then :
18620 $as_echo_n "(cached) " >&6
18621 else
18622 case $DBTOEPUB in
18623 [\\/]* | ?:[\\/]*)
18624 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18627 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18628 for as_dir in $PATH
18630 IFS=$as_save_IFS
18631 test -z "$as_dir" && as_dir=.
18632 for ac_exec_ext in '' $ac_executable_extensions; do
18633 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18634 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18635 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18636 break 2
18638 done
18639 done
18640 IFS=$as_save_IFS
18643 esac
18645 DBTOEPUB=$ac_cv_path_DBTOEPUB
18646 if test -n "$DBTOEPUB"; then
18647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18648 $as_echo "$DBTOEPUB" >&6; }
18649 else
18650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18651 $as_echo "no" >&6; }
18655 test -n "$DBTOEPUB" && break
18656 done
18658 else
18659 # Report the value of DBTOEPUB in configure's output in all cases.
18660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18661 $as_echo_n "checking for DBTOEPUB... " >&6; }
18662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18663 $as_echo "$DBTOEPUB" >&6; }
18668 # Check for test tools
18670 if test "$enable_tap_tests" = yes; then
18671 # Make sure we know where prove is.
18672 if test -z "$PROVE"; then
18673 for ac_prog in prove
18675 # Extract the first word of "$ac_prog", so it can be a program name with args.
18676 set dummy $ac_prog; ac_word=$2
18677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18678 $as_echo_n "checking for $ac_word... " >&6; }
18679 if ${ac_cv_path_PROVE+:} false; then :
18680 $as_echo_n "(cached) " >&6
18681 else
18682 case $PROVE in
18683 [\\/]* | ?:[\\/]*)
18684 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18687 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18688 for as_dir in $PATH
18690 IFS=$as_save_IFS
18691 test -z "$as_dir" && as_dir=.
18692 for ac_exec_ext in '' $ac_executable_extensions; do
18693 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18694 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18695 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18696 break 2
18698 done
18699 done
18700 IFS=$as_save_IFS
18703 esac
18705 PROVE=$ac_cv_path_PROVE
18706 if test -n "$PROVE"; then
18707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18708 $as_echo "$PROVE" >&6; }
18709 else
18710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18711 $as_echo "no" >&6; }
18715 test -n "$PROVE" && break
18716 done
18718 else
18719 # Report the value of PROVE in configure's output in all cases.
18720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18721 $as_echo_n "checking for PROVE... " >&6; }
18722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18723 $as_echo "$PROVE" >&6; }
18726 if test -z "$PROVE"; then
18727 as_fn_error $? "prove not found" "$LINENO" 5
18729 # Check for necessary Perl modules. You might think we should use
18730 # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
18731 # installation than perl, eg on MSys, so we have to check using prove.
18732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
18733 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
18734 __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__
18735 modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
18736 if test $? -eq 0; then
18737 # log the module version details, but don't show them interactively
18738 echo "$modulestderr" >&5
18739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18740 $as_echo "yes" >&6; }
18741 else
18742 # on failure, though, show the results to the user
18743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modulestderr" >&5
18744 $as_echo "$modulestderr" >&6; }
18745 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18749 # If compiler will take -Wl,--as-needed (or various platform-specific
18750 # spellings thereof) then add that to LDFLAGS. This is much easier than
18751 # trying to filter LIBS to the minimum for each executable.
18752 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18753 # libreadline; therefore we postpone testing it until we know what library
18754 # dependencies readline has. The test code will try to link with $LIBS.
18755 if test "$with_readline" = yes; then
18756 link_test_func=readline
18757 else
18758 link_test_func=exit
18761 if test "$PORTNAME" = "darwin"; then
18762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS" >&5
18763 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS... " >&6; }
18764 if ${pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs+:} false; then :
18765 $as_echo_n "(cached) " >&6
18766 else
18767 pgac_save_LDFLAGS=$LDFLAGS
18768 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
18769 if test "$cross_compiling" = yes; then :
18770 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs="assuming no"
18771 else
18772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18773 /* end confdefs.h. */
18774 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18776 main ()
18780 return 0;
18782 _ACEOF
18783 if ac_fn_c_try_run "$LINENO"; then :
18784 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=yes
18785 else
18786 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=no
18788 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18789 conftest.$ac_objext conftest.beam conftest.$ac_ext
18792 LDFLAGS="$pgac_save_LDFLAGS"
18794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&5
18795 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&6; }
18796 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" = x"yes"; then
18797 LDFLAGS="${LDFLAGS} -Wl,-dead_strip_dylibs"
18801 elif test "$PORTNAME" = "openbsd"; then
18802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS" >&5
18803 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS... " >&6; }
18804 if ${pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic+:} false; then :
18805 $as_echo_n "(cached) " >&6
18806 else
18807 pgac_save_LDFLAGS=$LDFLAGS
18808 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
18809 if test "$cross_compiling" = yes; then :
18810 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic="assuming no"
18811 else
18812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18813 /* end confdefs.h. */
18814 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18816 main ()
18820 return 0;
18822 _ACEOF
18823 if ac_fn_c_try_run "$LINENO"; then :
18824 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=yes
18825 else
18826 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=no
18828 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18829 conftest.$ac_objext conftest.beam conftest.$ac_ext
18832 LDFLAGS="$pgac_save_LDFLAGS"
18834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&5
18835 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&6; }
18836 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" = x"yes"; then
18837 LDFLAGS="${LDFLAGS} -Wl,-Bdynamic"
18841 else
18842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed, for LDFLAGS" >&5
18843 $as_echo_n "checking whether $CC supports -Wl,--as-needed, for LDFLAGS... " >&6; }
18844 if ${pgac_cv_prog_cc_LDFLAGS__Wl___as_needed+:} false; then :
18845 $as_echo_n "(cached) " >&6
18846 else
18847 pgac_save_LDFLAGS=$LDFLAGS
18848 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
18849 if test "$cross_compiling" = yes; then :
18850 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed="assuming no"
18851 else
18852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18853 /* end confdefs.h. */
18854 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18856 main ()
18860 return 0;
18862 _ACEOF
18863 if ac_fn_c_try_run "$LINENO"; then :
18864 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=yes
18865 else
18866 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=no
18868 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18869 conftest.$ac_objext conftest.beam conftest.$ac_ext
18872 LDFLAGS="$pgac_save_LDFLAGS"
18874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&5
18875 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&6; }
18876 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" = x"yes"; then
18877 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
18883 # For linkers that understand --export-dynamic, add that to the LDFLAGS_EX_BE
18884 # (backend specific ldflags). One some platforms this will always fail (e.g.,
18885 # windows), but on others it depends on the choice of linker (e.g., solaris).
18886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE" >&5
18887 $as_echo_n "checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE... " >&6; }
18888 if ${pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic+:} false; then :
18889 $as_echo_n "(cached) " >&6
18890 else
18891 pgac_save_LDFLAGS=$LDFLAGS
18892 LDFLAGS="$pgac_save_LDFLAGS -Wl,--export-dynamic"
18893 if test "$cross_compiling" = yes; then :
18894 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic="assuming no"
18895 else
18896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18897 /* end confdefs.h. */
18898 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18900 main ()
18904 return 0;
18906 _ACEOF
18907 if ac_fn_c_try_run "$LINENO"; then :
18908 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=yes
18909 else
18910 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=no
18912 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18913 conftest.$ac_objext conftest.beam conftest.$ac_ext
18916 LDFLAGS="$pgac_save_LDFLAGS"
18918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&5
18919 $as_echo "$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&6; }
18920 if test x"$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" = x"yes"; then
18921 LDFLAGS_EX_BE="${LDFLAGS_EX_BE} -Wl,--export-dynamic"
18926 # Create compiler version string
18927 if test x"$GCC" = x"yes" ; then
18928 cc_string=`${CC} --version | sed q`
18929 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
18930 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
18931 cc_string=`${CC} -V 2>&1 | sed q`
18932 else
18933 cc_string=$CC
18937 cat >>confdefs.h <<_ACEOF
18938 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
18939 _ACEOF
18942 # Supply a numeric version string for use by 3rd party add-ons
18943 # awk -F is a regex on some platforms, and not on others, so make "." a tab
18944 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
18945 $AWK '{printf "%d%04d", $1, $2}'`"
18947 cat >>confdefs.h <<_ACEOF
18948 #define PG_VERSION_NUM $PG_VERSION_NUM
18949 _ACEOF
18953 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
18954 # literally, so that it's possible to override it at build time using
18955 # a command like "make ... PG_SYSROOT=path". This has to be done after
18956 # we've finished all configure checks that depend on CPPFLAGS.
18957 # The same for LDFLAGS, too.
18958 if test x"$PG_SYSROOT" != x; then
18959 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
18960 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
18965 # Begin output steps
18967 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
18968 $as_echo "$as_me: using compiler=$cc_string" >&6;}
18969 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
18970 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
18971 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
18972 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
18973 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
18974 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
18975 # Currently only used when LLVM is used
18976 if test "$with_llvm" = yes ; then
18977 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
18978 $as_echo "$as_me: using CXX=$CXX" >&6;}
18979 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
18980 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
18981 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
18982 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
18983 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
18984 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
18985 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
18986 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
18989 # prepare build tree if outside source tree
18990 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
18991 # Note 2: /bin/pwd might be better than shell's built-in at getting
18992 # a symlink-free name.
18993 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
18994 vpath_build=no
18995 else
18996 vpath_build=yes
18997 if test "$no_create" != yes; then
18998 $as_echo_n "preparing build tree... " >&6
18999 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19000 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19001 || as_fn_error $? "failed" "$LINENO" 5
19002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19003 $as_echo "done" >&6; }
19009 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19012 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}"
19015 if test "$PORTNAME" = "win32"; then
19016 ac_config_commands="$ac_config_commands check_win32_symlinks"
19020 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19023 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19026 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19029 cat >confcache <<\_ACEOF
19030 # This file is a shell script that caches the results of configure
19031 # tests run on this system so they can be shared between configure
19032 # scripts and configure runs, see configure's option --config-cache.
19033 # It is not useful on other systems. If it contains results you don't
19034 # want to keep, you may remove or edit it.
19036 # config.status only pays attention to the cache file if you give it
19037 # the --recheck option to rerun configure.
19039 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19040 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19041 # following values.
19043 _ACEOF
19045 # The following way of writing the cache mishandles newlines in values,
19046 # but we know of no workaround that is simple, portable, and efficient.
19047 # So, we kill variables containing newlines.
19048 # Ultrix sh set writes to stderr and can't be redirected directly,
19049 # and sets the high bit in the cache file unless we assign to the vars.
19051 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19052 eval ac_val=\$$ac_var
19053 case $ac_val in #(
19054 *${as_nl}*)
19055 case $ac_var in #(
19056 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19057 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19058 esac
19059 case $ac_var in #(
19060 _ | IFS | as_nl) ;; #(
19061 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19062 *) { eval $ac_var=; unset $ac_var;} ;;
19063 esac ;;
19064 esac
19065 done
19067 (set) 2>&1 |
19068 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19069 *${as_nl}ac_space=\ *)
19070 # `set' does not quote correctly, so add quotes: double-quote
19071 # substitution turns \\\\ into \\, and sed turns \\ into \.
19072 sed -n \
19073 "s/'/'\\\\''/g;
19074 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19075 ;; #(
19077 # `set' quotes correctly as required by POSIX, so do not add quotes.
19078 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19080 esac |
19081 sort
19083 sed '
19084 /^ac_cv_env_/b end
19085 t clear
19086 :clear
19087 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19088 t end
19089 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19090 :end' >>confcache
19091 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19092 if test -w "$cache_file"; then
19093 if test "x$cache_file" != "x/dev/null"; then
19094 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19095 $as_echo "$as_me: updating cache $cache_file" >&6;}
19096 if test ! -f "$cache_file" || test -h "$cache_file"; then
19097 cat confcache >"$cache_file"
19098 else
19099 case $cache_file in #(
19100 */* | ?:*)
19101 mv -f confcache "$cache_file"$$ &&
19102 mv -f "$cache_file"$$ "$cache_file" ;; #(
19104 mv -f confcache "$cache_file" ;;
19105 esac
19108 else
19109 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19110 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19113 rm -f confcache
19115 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19116 # Let make expand exec_prefix.
19117 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19119 DEFS=-DHAVE_CONFIG_H
19121 ac_libobjs=
19122 ac_ltlibobjs=
19124 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19125 # 1. Remove the extension, and $U if already installed.
19126 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19127 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19128 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19129 # will be set to the directory where LIBOBJS objects are built.
19130 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19131 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19132 done
19133 LIBOBJS=$ac_libobjs
19135 LTLIBOBJS=$ac_ltlibobjs
19140 : "${CONFIG_STATUS=./config.status}"
19141 ac_write_fail=0
19142 ac_clean_files_save=$ac_clean_files
19143 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19144 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19145 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19146 as_write_fail=0
19147 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19148 #! $SHELL
19149 # Generated by $as_me.
19150 # Run this file to recreate the current configuration.
19151 # Compiler output produced by configure, useful for debugging
19152 # configure, is in config.log if it exists.
19154 debug=false
19155 ac_cs_recheck=false
19156 ac_cs_silent=false
19158 SHELL=\${CONFIG_SHELL-$SHELL}
19159 export SHELL
19160 _ASEOF
19161 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19162 ## -------------------- ##
19163 ## M4sh Initialization. ##
19164 ## -------------------- ##
19166 # Be more Bourne compatible
19167 DUALCASE=1; export DUALCASE # for MKS sh
19168 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19169 emulate sh
19170 NULLCMD=:
19171 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19172 # is contrary to our usage. Disable this feature.
19173 alias -g '${1+"$@"}'='"$@"'
19174 setopt NO_GLOB_SUBST
19175 else
19176 case `(set -o) 2>/dev/null` in #(
19177 *posix*) :
19178 set -o posix ;; #(
19179 *) :
19181 esac
19185 as_nl='
19187 export as_nl
19188 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19189 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19190 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19191 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19192 # Prefer a ksh shell builtin over an external printf program on Solaris,
19193 # but without wasting forks for bash or zsh.
19194 if test -z "$BASH_VERSION$ZSH_VERSION" \
19195 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19196 as_echo='print -r --'
19197 as_echo_n='print -rn --'
19198 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19199 as_echo='printf %s\n'
19200 as_echo_n='printf %s'
19201 else
19202 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19203 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19204 as_echo_n='/usr/ucb/echo -n'
19205 else
19206 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19207 as_echo_n_body='eval
19208 arg=$1;
19209 case $arg in #(
19210 *"$as_nl"*)
19211 expr "X$arg" : "X\\(.*\\)$as_nl";
19212 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19213 esac;
19214 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19216 export as_echo_n_body
19217 as_echo_n='sh -c $as_echo_n_body as_echo'
19219 export as_echo_body
19220 as_echo='sh -c $as_echo_body as_echo'
19223 # The user is always right.
19224 if test "${PATH_SEPARATOR+set}" != set; then
19225 PATH_SEPARATOR=:
19226 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19227 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19228 PATH_SEPARATOR=';'
19233 # IFS
19234 # We need space, tab and new line, in precisely that order. Quoting is
19235 # there to prevent editors from complaining about space-tab.
19236 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19237 # splitting by setting IFS to empty value.)
19238 IFS=" "" $as_nl"
19240 # Find who we are. Look in the path if we contain no directory separator.
19241 as_myself=
19242 case $0 in #((
19243 *[\\/]* ) as_myself=$0 ;;
19244 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19245 for as_dir in $PATH
19247 IFS=$as_save_IFS
19248 test -z "$as_dir" && as_dir=.
19249 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19250 done
19251 IFS=$as_save_IFS
19254 esac
19255 # We did not find ourselves, most probably we were run as `sh COMMAND'
19256 # in which case we are not to be found in the path.
19257 if test "x$as_myself" = x; then
19258 as_myself=$0
19260 if test ! -f "$as_myself"; then
19261 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19262 exit 1
19265 # Unset variables that we do not need and which cause bugs (e.g. in
19266 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19267 # suppresses any "Segmentation fault" message there. '((' could
19268 # trigger a bug in pdksh 5.2.14.
19269 for as_var in BASH_ENV ENV MAIL MAILPATH
19270 do eval test x\${$as_var+set} = xset \
19271 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19272 done
19273 PS1='$ '
19274 PS2='> '
19275 PS4='+ '
19277 # NLS nuisances.
19278 LC_ALL=C
19279 export LC_ALL
19280 LANGUAGE=C
19281 export LANGUAGE
19283 # CDPATH.
19284 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19287 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19288 # ----------------------------------------
19289 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19290 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19291 # script with STATUS, using 1 if that was 0.
19292 as_fn_error ()
19294 as_status=$1; test $as_status -eq 0 && as_status=1
19295 if test "$4"; then
19296 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19297 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19299 $as_echo "$as_me: error: $2" >&2
19300 as_fn_exit $as_status
19301 } # as_fn_error
19304 # as_fn_set_status STATUS
19305 # -----------------------
19306 # Set $? to STATUS, without forking.
19307 as_fn_set_status ()
19309 return $1
19310 } # as_fn_set_status
19312 # as_fn_exit STATUS
19313 # -----------------
19314 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19315 as_fn_exit ()
19317 set +e
19318 as_fn_set_status $1
19319 exit $1
19320 } # as_fn_exit
19322 # as_fn_unset VAR
19323 # ---------------
19324 # Portably unset VAR.
19325 as_fn_unset ()
19327 { eval $1=; unset $1;}
19329 as_unset=as_fn_unset
19330 # as_fn_append VAR VALUE
19331 # ----------------------
19332 # Append the text in VALUE to the end of the definition contained in VAR. Take
19333 # advantage of any shell optimizations that allow amortized linear growth over
19334 # repeated appends, instead of the typical quadratic growth present in naive
19335 # implementations.
19336 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19337 eval 'as_fn_append ()
19339 eval $1+=\$2
19341 else
19342 as_fn_append ()
19344 eval $1=\$$1\$2
19346 fi # as_fn_append
19348 # as_fn_arith ARG...
19349 # ------------------
19350 # Perform arithmetic evaluation on the ARGs, and store the result in the
19351 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19352 # must be portable across $(()) and expr.
19353 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19354 eval 'as_fn_arith ()
19356 as_val=$(( $* ))
19358 else
19359 as_fn_arith ()
19361 as_val=`expr "$@" || test $? -eq 1`
19363 fi # as_fn_arith
19366 if expr a : '\(a\)' >/dev/null 2>&1 &&
19367 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19368 as_expr=expr
19369 else
19370 as_expr=false
19373 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19374 as_basename=basename
19375 else
19376 as_basename=false
19379 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19380 as_dirname=dirname
19381 else
19382 as_dirname=false
19385 as_me=`$as_basename -- "$0" ||
19386 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19387 X"$0" : 'X\(//\)$' \| \
19388 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19389 $as_echo X/"$0" |
19390 sed '/^.*\/\([^/][^/]*\)\/*$/{
19391 s//\1/
19394 /^X\/\(\/\/\)$/{
19395 s//\1/
19398 /^X\/\(\/\).*/{
19399 s//\1/
19402 s/.*/./; q'`
19404 # Avoid depending upon Character Ranges.
19405 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19406 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19407 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19408 as_cr_digits='0123456789'
19409 as_cr_alnum=$as_cr_Letters$as_cr_digits
19411 ECHO_C= ECHO_N= ECHO_T=
19412 case `echo -n x` in #(((((
19413 -n*)
19414 case `echo 'xy\c'` in
19415 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19416 xy) ECHO_C='\c';;
19417 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19418 ECHO_T=' ';;
19419 esac;;
19421 ECHO_N='-n';;
19422 esac
19424 rm -f conf$$ conf$$.exe conf$$.file
19425 if test -d conf$$.dir; then
19426 rm -f conf$$.dir/conf$$.file
19427 else
19428 rm -f conf$$.dir
19429 mkdir conf$$.dir 2>/dev/null
19431 if (echo >conf$$.file) 2>/dev/null; then
19432 if ln -s conf$$.file conf$$ 2>/dev/null; then
19433 as_ln_s='ln -s'
19434 # ... but there are two gotchas:
19435 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19436 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19437 # In both cases, we have to default to `cp -pR'.
19438 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19439 as_ln_s='cp -pR'
19440 elif ln conf$$.file conf$$ 2>/dev/null; then
19441 as_ln_s=ln
19442 else
19443 as_ln_s='cp -pR'
19445 else
19446 as_ln_s='cp -pR'
19448 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19449 rmdir conf$$.dir 2>/dev/null
19452 # as_fn_mkdir_p
19453 # -------------
19454 # Create "$as_dir" as a directory, including parents if necessary.
19455 as_fn_mkdir_p ()
19458 case $as_dir in #(
19459 -*) as_dir=./$as_dir;;
19460 esac
19461 test -d "$as_dir" || eval $as_mkdir_p || {
19462 as_dirs=
19463 while :; do
19464 case $as_dir in #(
19465 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19466 *) as_qdir=$as_dir;;
19467 esac
19468 as_dirs="'$as_qdir' $as_dirs"
19469 as_dir=`$as_dirname -- "$as_dir" ||
19470 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19471 X"$as_dir" : 'X\(//\)[^/]' \| \
19472 X"$as_dir" : 'X\(//\)$' \| \
19473 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19474 $as_echo X"$as_dir" |
19475 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19476 s//\1/
19479 /^X\(\/\/\)[^/].*/{
19480 s//\1/
19483 /^X\(\/\/\)$/{
19484 s//\1/
19487 /^X\(\/\).*/{
19488 s//\1/
19491 s/.*/./; q'`
19492 test -d "$as_dir" && break
19493 done
19494 test -z "$as_dirs" || eval "mkdir $as_dirs"
19495 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19498 } # as_fn_mkdir_p
19499 if mkdir -p . 2>/dev/null; then
19500 as_mkdir_p='mkdir -p "$as_dir"'
19501 else
19502 test -d ./-p && rmdir ./-p
19503 as_mkdir_p=false
19507 # as_fn_executable_p FILE
19508 # -----------------------
19509 # Test if FILE is an executable regular file.
19510 as_fn_executable_p ()
19512 test -f "$1" && test -x "$1"
19513 } # as_fn_executable_p
19514 as_test_x='test -x'
19515 as_executable_p=as_fn_executable_p
19517 # Sed expression to map a string onto a valid CPP name.
19518 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19520 # Sed expression to map a string onto a valid variable name.
19521 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19524 exec 6>&1
19525 ## ----------------------------------- ##
19526 ## Main body of $CONFIG_STATUS script. ##
19527 ## ----------------------------------- ##
19528 _ASEOF
19529 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19531 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19532 # Save the log message, to keep $0 and so on meaningful, and to
19533 # report actual input values of CONFIG_FILES etc. instead of their
19534 # values after options handling.
19535 ac_log="
19536 This file was extended by PostgreSQL $as_me 17devel, which was
19537 generated by GNU Autoconf 2.69. Invocation command line was
19539 CONFIG_FILES = $CONFIG_FILES
19540 CONFIG_HEADERS = $CONFIG_HEADERS
19541 CONFIG_LINKS = $CONFIG_LINKS
19542 CONFIG_COMMANDS = $CONFIG_COMMANDS
19543 $ $0 $@
19545 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19548 _ACEOF
19550 case $ac_config_files in *"
19551 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19552 esac
19554 case $ac_config_headers in *"
19555 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19556 esac
19559 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19560 # Files that config.status was made for.
19561 config_files="$ac_config_files"
19562 config_headers="$ac_config_headers"
19563 config_links="$ac_config_links"
19564 config_commands="$ac_config_commands"
19566 _ACEOF
19568 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19569 ac_cs_usage="\
19570 \`$as_me' instantiates files and other configuration actions
19571 from templates according to the current configuration. Unless the files
19572 and actions are specified as TAGs, all are instantiated by default.
19574 Usage: $0 [OPTION]... [TAG]...
19576 -h, --help print this help, then exit
19577 -V, --version print version number and configuration settings, then exit
19578 --config print configuration, then exit
19579 -q, --quiet, --silent
19580 do not print progress messages
19581 -d, --debug don't remove temporary files
19582 --recheck update $as_me by reconfiguring in the same conditions
19583 --file=FILE[:TEMPLATE]
19584 instantiate the configuration file FILE
19585 --header=FILE[:TEMPLATE]
19586 instantiate the configuration header FILE
19588 Configuration files:
19589 $config_files
19591 Configuration headers:
19592 $config_headers
19594 Configuration links:
19595 $config_links
19597 Configuration commands:
19598 $config_commands
19600 Report bugs to <pgsql-bugs@lists.postgresql.org>.
19601 PostgreSQL home page: <https://www.postgresql.org/>."
19603 _ACEOF
19604 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19605 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19606 ac_cs_version="\\
19607 PostgreSQL config.status 17devel
19608 configured by $0, generated by GNU Autoconf 2.69,
19609 with options \\"\$ac_cs_config\\"
19611 Copyright (C) 2012 Free Software Foundation, Inc.
19612 This config.status script is free software; the Free Software Foundation
19613 gives unlimited permission to copy, distribute and modify it."
19615 ac_pwd='$ac_pwd'
19616 srcdir='$srcdir'
19617 INSTALL='$INSTALL'
19618 MKDIR_P='$MKDIR_P'
19619 AWK='$AWK'
19620 test -n "\$AWK" || AWK=awk
19621 _ACEOF
19623 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19624 # The default lists apply if the user does not specify any file.
19625 ac_need_defaults=:
19626 while test $# != 0
19628 case $1 in
19629 --*=?*)
19630 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19631 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19632 ac_shift=:
19634 --*=)
19635 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19636 ac_optarg=
19637 ac_shift=:
19640 ac_option=$1
19641 ac_optarg=$2
19642 ac_shift=shift
19644 esac
19646 case $ac_option in
19647 # Handling of the options.
19648 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19649 ac_cs_recheck=: ;;
19650 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19651 $as_echo "$ac_cs_version"; exit ;;
19652 --config | --confi | --conf | --con | --co | --c )
19653 $as_echo "$ac_cs_config"; exit ;;
19654 --debug | --debu | --deb | --de | --d | -d )
19655 debug=: ;;
19656 --file | --fil | --fi | --f )
19657 $ac_shift
19658 case $ac_optarg in
19659 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19660 '') as_fn_error $? "missing file argument" ;;
19661 esac
19662 as_fn_append CONFIG_FILES " '$ac_optarg'"
19663 ac_need_defaults=false;;
19664 --header | --heade | --head | --hea )
19665 $ac_shift
19666 case $ac_optarg in
19667 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19668 esac
19669 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19670 ac_need_defaults=false;;
19671 --he | --h)
19672 # Conflict between --help and --header
19673 as_fn_error $? "ambiguous option: \`$1'
19674 Try \`$0 --help' for more information.";;
19675 --help | --hel | -h )
19676 $as_echo "$ac_cs_usage"; exit ;;
19677 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19678 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19679 ac_cs_silent=: ;;
19681 # This is an error.
19682 -*) as_fn_error $? "unrecognized option: \`$1'
19683 Try \`$0 --help' for more information." ;;
19685 *) as_fn_append ac_config_targets " $1"
19686 ac_need_defaults=false ;;
19688 esac
19689 shift
19690 done
19692 ac_configure_extra_args=
19694 if $ac_cs_silent; then
19695 exec 6>/dev/null
19696 ac_configure_extra_args="$ac_configure_extra_args --silent"
19699 _ACEOF
19700 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19701 if \$ac_cs_recheck; then
19702 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19703 shift
19704 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19705 CONFIG_SHELL='$SHELL'
19706 export CONFIG_SHELL
19707 exec "\$@"
19710 _ACEOF
19711 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19712 exec 5>>config.log
19714 echo
19715 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19716 ## Running $as_me. ##
19717 _ASBOX
19718 $as_echo "$ac_log"
19719 } >&5
19721 _ACEOF
19722 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19723 _ACEOF
19725 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19727 # Handling of arguments.
19728 for ac_config_target in $ac_config_targets
19730 case $ac_config_target in
19731 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19732 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19733 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19734 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19735 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19736 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19737 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19738 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19739 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19740 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19741 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19743 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19744 esac
19745 done
19748 # If the user did not use the arguments to specify the items to instantiate,
19749 # then the envvar interface is used. Set only those that are not.
19750 # We use the long form for the default assignment because of an extremely
19751 # bizarre bug on SunOS 4.1.3.
19752 if $ac_need_defaults; then
19753 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19754 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19755 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19756 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19759 # Have a temporary directory for convenience. Make it in the build tree
19760 # simply because there is no reason against having it here, and in addition,
19761 # creating and moving files from /tmp can sometimes cause problems.
19762 # Hook for its removal unless debugging.
19763 # Note that there is a small window in which the directory will not be cleaned:
19764 # after its creation but before its name has been assigned to `$tmp'.
19765 $debug ||
19767 tmp= ac_tmp=
19768 trap 'exit_status=$?
19769 : "${ac_tmp:=$tmp}"
19770 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19772 trap 'as_fn_exit 1' 1 2 13 15
19774 # Create a (secure) tmp directory for tmp files.
19777 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19778 test -d "$tmp"
19779 } ||
19781 tmp=./conf$$-$RANDOM
19782 (umask 077 && mkdir "$tmp")
19783 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19784 ac_tmp=$tmp
19786 # Set up the scripts for CONFIG_FILES section.
19787 # No need to generate them if there are no CONFIG_FILES.
19788 # This happens for instance with `./config.status config.h'.
19789 if test -n "$CONFIG_FILES"; then
19792 ac_cr=`echo X | tr X '\015'`
19793 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19794 # But we know of no other shell where ac_cr would be empty at this
19795 # point, so we can use a bashism as a fallback.
19796 if test "x$ac_cr" = x; then
19797 eval ac_cr=\$\'\\r\'
19799 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19800 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19801 ac_cs_awk_cr='\\r'
19802 else
19803 ac_cs_awk_cr=$ac_cr
19806 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19807 _ACEOF
19811 echo "cat >conf$$subs.awk <<_ACEOF" &&
19812 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19813 echo "_ACEOF"
19814 } >conf$$subs.sh ||
19815 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19816 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19817 ac_delim='%!_!# '
19818 for ac_last_try in false false false false false :; do
19819 . ./conf$$subs.sh ||
19820 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19822 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19823 if test $ac_delim_n = $ac_delim_num; then
19824 break
19825 elif $ac_last_try; then
19826 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19827 else
19828 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19830 done
19831 rm -f conf$$subs.sh
19833 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19834 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19835 _ACEOF
19836 sed -n '
19838 s/^/S["/; s/!.*/"]=/
19841 s/^[^!]*!//
19842 :repl
19843 t repl
19844 s/'"$ac_delim"'$//
19845 t delim
19848 s/\(.\{148\}\)..*/\1/
19849 t more1
19850 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19853 b repl
19854 :more1
19855 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19858 s/.\{148\}//
19859 t nl
19860 :delim
19862 s/\(.\{148\}\)..*/\1/
19863 t more2
19864 s/["\\]/\\&/g; s/^/"/; s/$/"/
19867 :more2
19868 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19871 s/.\{148\}//
19872 t delim
19873 ' <conf$$subs.awk | sed '
19874 /^[^""]/{
19876 s/\n//
19878 ' >>$CONFIG_STATUS || ac_write_fail=1
19879 rm -f conf$$subs.awk
19880 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19881 _ACAWK
19882 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19883 for (key in S) S_is_set[key] = 1
19884 FS = "\a"
19888 line = $ 0
19889 nfields = split(line, field, "@")
19890 substed = 0
19891 len = length(field[1])
19892 for (i = 2; i < nfields; i++) {
19893 key = field[i]
19894 keylen = length(key)
19895 if (S_is_set[key]) {
19896 value = S[key]
19897 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19898 len += length(value) + length(field[++i])
19899 substed = 1
19900 } else
19901 len += 1 + keylen
19904 print line
19907 _ACAWK
19908 _ACEOF
19909 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19910 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19911 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19912 else
19914 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19915 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19916 _ACEOF
19918 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19919 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19920 # trailing colons and then remove the whole line if VPATH becomes empty
19921 # (actually we leave an empty line to preserve line numbers).
19922 if test "x$srcdir" = x.; then
19923 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
19925 s///
19926 s/^/:/
19927 s/[ ]*$/:/
19928 s/:\$(srcdir):/:/g
19929 s/:\${srcdir}:/:/g
19930 s/:@srcdir@:/:/g
19931 s/^:*//
19932 s/:*$//
19934 s/\(=[ ]*\).*/\1/
19936 s/\n//
19937 s/^[^=]*=[ ]*$//
19941 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19942 fi # test -n "$CONFIG_FILES"
19944 # Set up the scripts for CONFIG_HEADERS section.
19945 # No need to generate them if there are no CONFIG_HEADERS.
19946 # This happens for instance with `./config.status Makefile'.
19947 if test -n "$CONFIG_HEADERS"; then
19948 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19949 BEGIN {
19950 _ACEOF
19952 # Transform confdefs.h into an awk script `defines.awk', embedded as
19953 # here-document in config.status, that substitutes the proper values into
19954 # config.h.in to produce config.h.
19956 # Create a delimiter string that does not exist in confdefs.h, to ease
19957 # handling of long lines.
19958 ac_delim='%!_!# '
19959 for ac_last_try in false false :; do
19960 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19961 if test -z "$ac_tt"; then
19962 break
19963 elif $ac_last_try; then
19964 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
19965 else
19966 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19968 done
19970 # For the awk script, D is an array of macro values keyed by name,
19971 # likewise P contains macro parameters if any. Preserve backslash
19972 # newline sequences.
19974 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19975 sed -n '
19976 s/.\{148\}/&'"$ac_delim"'/g
19977 t rset
19978 :rset
19979 s/^[ ]*#[ ]*define[ ][ ]*/ /
19980 t def
19982 :def
19983 s/\\$//
19984 t bsnl
19985 s/["\\]/\\&/g
19986 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19987 D["\1"]=" \3"/p
19988 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
19990 :bsnl
19991 s/["\\]/\\&/g
19992 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19993 D["\1"]=" \3\\\\\\n"\\/p
19994 t cont
19995 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19996 t cont
19998 :cont
20000 s/.\{148\}/&'"$ac_delim"'/g
20001 t clear
20002 :clear
20003 s/\\$//
20004 t bsnlc
20005 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20007 :bsnlc
20008 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20009 b cont
20010 ' <confdefs.h | sed '
20011 s/'"$ac_delim"'/"\\\
20012 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20014 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20015 for (key in D) D_is_set[key] = 1
20016 FS = "\a"
20018 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20019 line = \$ 0
20020 split(line, arg, " ")
20021 if (arg[1] == "#") {
20022 defundef = arg[2]
20023 mac1 = arg[3]
20024 } else {
20025 defundef = substr(arg[1], 2)
20026 mac1 = arg[2]
20028 split(mac1, mac2, "(") #)
20029 macro = mac2[1]
20030 prefix = substr(line, 1, index(line, defundef) - 1)
20031 if (D_is_set[macro]) {
20032 # Preserve the white space surrounding the "#".
20033 print prefix "define", macro P[macro] D[macro]
20034 next
20035 } else {
20036 # Replace #undef with comments. This is necessary, for example,
20037 # in the case of _POSIX_SOURCE, which is predefined and required
20038 # on some systems where configure will not decide to define it.
20039 if (defundef == "undef") {
20040 print "/*", prefix defundef, macro, "*/"
20041 next
20045 { print }
20046 _ACAWK
20047 _ACEOF
20048 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20049 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20050 fi # test -n "$CONFIG_HEADERS"
20053 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20054 shift
20055 for ac_tag
20057 case $ac_tag in
20058 :[FHLC]) ac_mode=$ac_tag; continue;;
20059 esac
20060 case $ac_mode$ac_tag in
20061 :[FHL]*:*);;
20062 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20063 :[FH]-) ac_tag=-:-;;
20064 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20065 esac
20066 ac_save_IFS=$IFS
20067 IFS=:
20068 set x $ac_tag
20069 IFS=$ac_save_IFS
20070 shift
20071 ac_file=$1
20072 shift
20074 case $ac_mode in
20075 :L) ac_source=$1;;
20076 :[FH])
20077 ac_file_inputs=
20078 for ac_f
20080 case $ac_f in
20081 -) ac_f="$ac_tmp/stdin";;
20082 *) # Look for the file first in the build tree, then in the source tree
20083 # (if the path is not absolute). The absolute path cannot be DOS-style,
20084 # because $ac_f cannot contain `:'.
20085 test -f "$ac_f" ||
20086 case $ac_f in
20087 [\\/$]*) false;;
20088 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20089 esac ||
20090 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20091 esac
20092 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20093 as_fn_append ac_file_inputs " '$ac_f'"
20094 done
20096 # Let's still pretend it is `configure' which instantiates (i.e., don't
20097 # use $as_me), people would be surprised to read:
20098 # /* config.h. Generated by config.status. */
20099 configure_input='Generated from '`
20100 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20101 `' by configure.'
20102 if test x"$ac_file" != x-; then
20103 configure_input="$ac_file. $configure_input"
20104 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20105 $as_echo "$as_me: creating $ac_file" >&6;}
20107 # Neutralize special characters interpreted by sed in replacement strings.
20108 case $configure_input in #(
20109 *\&* | *\|* | *\\* )
20110 ac_sed_conf_input=`$as_echo "$configure_input" |
20111 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20112 *) ac_sed_conf_input=$configure_input;;
20113 esac
20115 case $ac_tag in
20116 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20117 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20118 esac
20120 esac
20122 ac_dir=`$as_dirname -- "$ac_file" ||
20123 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20124 X"$ac_file" : 'X\(//\)[^/]' \| \
20125 X"$ac_file" : 'X\(//\)$' \| \
20126 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20127 $as_echo X"$ac_file" |
20128 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20129 s//\1/
20132 /^X\(\/\/\)[^/].*/{
20133 s//\1/
20136 /^X\(\/\/\)$/{
20137 s//\1/
20140 /^X\(\/\).*/{
20141 s//\1/
20144 s/.*/./; q'`
20145 as_dir="$ac_dir"; as_fn_mkdir_p
20146 ac_builddir=.
20148 case "$ac_dir" in
20149 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20151 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20152 # A ".." for each directory in $ac_dir_suffix.
20153 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20154 case $ac_top_builddir_sub in
20155 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20156 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20157 esac ;;
20158 esac
20159 ac_abs_top_builddir=$ac_pwd
20160 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20161 # for backward compatibility:
20162 ac_top_builddir=$ac_top_build_prefix
20164 case $srcdir in
20165 .) # We are building in place.
20166 ac_srcdir=.
20167 ac_top_srcdir=$ac_top_builddir_sub
20168 ac_abs_top_srcdir=$ac_pwd ;;
20169 [\\/]* | ?:[\\/]* ) # Absolute name.
20170 ac_srcdir=$srcdir$ac_dir_suffix;
20171 ac_top_srcdir=$srcdir
20172 ac_abs_top_srcdir=$srcdir ;;
20173 *) # Relative name.
20174 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20175 ac_top_srcdir=$ac_top_build_prefix$srcdir
20176 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20177 esac
20178 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20181 case $ac_mode in
20184 # CONFIG_FILE
20187 case $INSTALL in
20188 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20189 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20190 esac
20191 ac_MKDIR_P=$MKDIR_P
20192 case $MKDIR_P in
20193 [\\/$]* | ?:[\\/]* ) ;;
20194 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20195 esac
20196 _ACEOF
20198 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20199 # If the template does not know about datarootdir, expand it.
20200 # FIXME: This hack should be removed a few years after 2.60.
20201 ac_datarootdir_hack=; ac_datarootdir_seen=
20202 ac_sed_dataroot='
20203 /datarootdir/ {
20207 /@datadir@/p
20208 /@docdir@/p
20209 /@infodir@/p
20210 /@localedir@/p
20211 /@mandir@/p'
20212 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20213 *datarootdir*) ac_datarootdir_seen=yes;;
20214 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20215 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20216 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20217 _ACEOF
20218 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20219 ac_datarootdir_hack='
20220 s&@datadir@&$datadir&g
20221 s&@docdir@&$docdir&g
20222 s&@infodir@&$infodir&g
20223 s&@localedir@&$localedir&g
20224 s&@mandir@&$mandir&g
20225 s&\\\${datarootdir}&$datarootdir&g' ;;
20226 esac
20227 _ACEOF
20229 # Neutralize VPATH when `$srcdir' = `.'.
20230 # Shell code in configure.ac might set extrasub.
20231 # FIXME: do we really want to maintain this feature?
20232 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20233 ac_sed_extra="$ac_vpsub
20234 $extrasub
20235 _ACEOF
20236 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20238 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20239 s|@configure_input@|$ac_sed_conf_input|;t t
20240 s&@top_builddir@&$ac_top_builddir_sub&;t t
20241 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20242 s&@srcdir@&$ac_srcdir&;t t
20243 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20244 s&@top_srcdir@&$ac_top_srcdir&;t t
20245 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20246 s&@builddir@&$ac_builddir&;t t
20247 s&@abs_builddir@&$ac_abs_builddir&;t t
20248 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20249 s&@INSTALL@&$ac_INSTALL&;t t
20250 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20251 $ac_datarootdir_hack
20253 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20254 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20256 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20257 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20258 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20259 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20260 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20261 which seems to be undefined. Please make sure it is defined" >&5
20262 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20263 which seems to be undefined. Please make sure it is defined" >&2;}
20265 rm -f "$ac_tmp/stdin"
20266 case $ac_file in
20267 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20268 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20269 esac \
20270 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20274 # CONFIG_HEADER
20276 if test x"$ac_file" != x-; then
20278 $as_echo "/* $configure_input */" \
20279 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20280 } >"$ac_tmp/config.h" \
20281 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20282 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20283 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20284 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20285 else
20286 rm -f "$ac_file"
20287 mv "$ac_tmp/config.h" "$ac_file" \
20288 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20290 else
20291 $as_echo "/* $configure_input */" \
20292 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20293 || as_fn_error $? "could not create -" "$LINENO" 5
20298 # CONFIG_LINK
20301 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20303 else
20304 # Prefer the file from the source tree if names are identical.
20305 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20306 ac_source=$srcdir/$ac_source
20309 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20310 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20312 if test ! -r "$ac_source"; then
20313 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20315 rm -f "$ac_file"
20317 # Try a relative symlink, then a hard link, then a copy.
20318 case $ac_source in
20319 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20320 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20321 esac
20322 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20323 ln "$ac_source" "$ac_file" 2>/dev/null ||
20324 cp -p "$ac_source" "$ac_file" ||
20325 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20328 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20329 $as_echo "$as_me: executing $ac_file commands" >&6;}
20331 esac
20334 case $ac_file$ac_mode in
20335 "check_win32_symlinks":C)
20336 # Links sometimes fail undetected on Mingw -
20337 # so here we detect it and warn the user
20338 for FILE in $CONFIG_LINKS
20340 # test -e works for symlinks in the MinGW console
20341 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20342 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20343 done
20345 "src/include/pg_config.h":H)
20346 # Update timestamp for pg_config.h (see Makefile.global)
20347 echo >src/include/stamp-h
20349 "src/include/pg_config_ext.h":H)
20350 # Update timestamp for pg_config_ext.h (see Makefile.global)
20351 echo >src/include/stamp-ext-h
20353 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20355 esac
20356 done # for ac_tag
20359 as_fn_exit 0
20360 _ACEOF
20361 ac_clean_files=$ac_clean_files_save
20363 test $ac_write_fail = 0 ||
20364 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20367 # configure is writing to config.log, and then calls config.status.
20368 # config.status does its own redirection, appending to config.log.
20369 # Unfortunately, on DOS this fails, as config.log is still kept open
20370 # by configure, so config.status won't be able to write to it; its
20371 # output is simply discarded. So we exec the FD to /dev/null,
20372 # effectively closing config.log, so it can be properly (re)opened and
20373 # appended to by config.status. When coming back to configure, we
20374 # need to make the FD available again.
20375 if test "$no_create" != yes; then
20376 ac_cs_success=:
20377 ac_config_status_args=
20378 test "$silent" = yes &&
20379 ac_config_status_args="$ac_config_status_args --quiet"
20380 exec 5>/dev/null
20381 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20382 exec 5>>config.log
20383 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20384 # would make configure fail if this is the last instruction.
20385 $ac_cs_success || as_fn_exit 1
20387 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20388 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20389 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20393 # Ensure that any meson build directories would reconfigure and see that
20394 # there's a conflicting in-tree build and can error out.
20395 if test "$vpath_build"="no"; then
20396 touch meson.build