ATTACH PARTITION: Don't match a PK with a UNIQUE constraint
[pgsql.git] / configure
blobcfbd2a096f4d29f516413a5b15d2a52edd68ff3d
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 PG_POPCNT_OBJS
651 CFLAGS_POPCNT
652 CFLAGS_XSAVE
653 LIBOBJS
654 OPENSSL
655 ZSTD
657 UUID_LIBS
658 LDAP_LIBS_BE
659 LDAP_LIBS_FE
660 with_ssl
661 PTHREAD_CFLAGS
662 PTHREAD_LIBS
663 PTHREAD_CC
664 ax_pthread_config
665 EGREP
666 GREP
669 python_additional_libs
670 python_libspec
671 python_libdir
672 python_includespec
673 python_version
674 python_majorversion
675 PYTHON
676 perl_embed_ldflags
677 perl_embed_ccflags
678 perl_includespec
679 perl_useshrplib
680 perl_privlibexp
681 perl_archlibexp
682 PERL
683 FLEXFLAGS
684 FLEX
685 BISONFLAGS
686 BISON
687 MKDIR_P
688 LN_S
690 install_bin
691 INSTALL_DATA
692 INSTALL_SCRIPT
693 INSTALL_PROGRAM
694 WINDRES
696 STRIP_SHARED_LIB
697 STRIP_STATIC_LIB
698 STRIP
699 LDFLAGS_SL
700 LDFLAGS_EX
701 ZSTD_LIBS
702 ZSTD_CFLAGS
703 with_zstd
704 LZ4_LIBS
705 LZ4_CFLAGS
706 with_lz4
707 with_zlib
708 with_system_tzdata
709 with_libxslt
710 XML2_LIBS
711 XML2_CFLAGS
712 XML2_CONFIG
713 with_libxml
714 with_uuid
715 with_readline
716 with_systemd
717 with_selinux
718 with_ldap
719 with_krb_srvnam
720 krb_srvtab
721 with_gssapi
722 with_python
723 with_perl
724 with_tcl
725 ICU_LIBS
726 ICU_CFLAGS
727 with_icu
728 INCLUDES
729 autodepend
730 PKG_CONFIG_LIBDIR
731 PKG_CONFIG_PATH
732 PKG_CONFIG
733 DLSUFFIX
737 CFLAGS_SL
738 BITCODE_CXXFLAGS
739 BITCODE_CFLAGS
740 CXXFLAGS_SL_MODULE
741 CFLAGS_SL_MODULE
742 CFLAGS_VECTORIZE
743 CFLAGS_UNROLL_LOOPS
744 PERMIT_DECLARATION_AFTER_STATEMENT
745 LLVM_BINPATH
746 LLVM_CXXFLAGS
747 LLVM_CFLAGS
748 LLVM_CPPFLAGS
749 LLVM_LIBS
750 CLANG
751 LLVM_CONFIG
753 with_llvm
754 SUN_STUDIO_CC
755 ac_ct_CXX
756 CXXFLAGS
758 OBJEXT
759 EXEEXT
760 ac_ct_CC
761 CPPFLAGS
762 LDFLAGS
763 CFLAGS
765 enable_injection_points
766 enable_tap_tests
767 enable_dtrace
768 DTRACEFLAGS
769 DTRACE
770 enable_coverage
771 GENHTML
772 LCOV
773 GCOV
774 enable_debug
775 enable_rpath
776 default_port
777 WANTED_LANGUAGES
778 enable_nls
779 PORTNAME
780 host_os
781 host_vendor
782 host_cpu
783 host
784 build_os
785 build_vendor
786 build_cpu
787 build
788 PG_MAJORVERSION
789 target_alias
790 host_alias
791 build_alias
792 LIBS
793 ECHO_T
794 ECHO_N
795 ECHO_C
796 DEFS
797 mandir
798 localedir
799 libdir
800 psdir
801 pdfdir
802 dvidir
803 htmldir
804 infodir
805 docdir
806 oldincludedir
807 includedir
808 localstatedir
809 sharedstatedir
810 sysconfdir
811 datadir
812 datarootdir
813 libexecdir
814 sbindir
815 bindir
816 program_transform_name
817 prefix
818 exec_prefix
819 PACKAGE_URL
820 PACKAGE_BUGREPORT
821 PACKAGE_STRING
822 PACKAGE_VERSION
823 PACKAGE_TARNAME
824 PACKAGE_NAME
825 PATH_SEPARATOR
826 SHELL'
827 ac_subst_files=''
828 ac_user_opts='
829 enable_option_checking
830 with_extra_version
831 with_template
832 with_includes
833 with_libraries
834 with_libs
835 enable_integer_datetimes
836 enable_nls
837 with_pgport
838 enable_rpath
839 enable_spinlocks
840 enable_atomics
841 enable_debug
842 enable_profiling
843 enable_coverage
844 enable_dtrace
845 enable_tap_tests
846 enable_injection_points
847 with_blocksize
848 with_segsize
849 with_segsize_blocks
850 with_wal_blocksize
851 with_llvm
852 enable_depend
853 enable_cassert
854 with_icu
855 with_tcl
856 with_tclconfig
857 with_perl
858 with_python
859 with_gssapi
860 with_krb_srvnam
861 with_pam
862 with_bsd_auth
863 with_ldap
864 with_bonjour
865 with_selinux
866 with_systemd
867 with_readline
868 with_libedit_preferred
869 with_uuid
870 with_ossp_uuid
871 with_libxml
872 with_libxslt
873 with_system_tzdata
874 with_zlib
875 with_lz4
876 with_zstd
877 with_ssl
878 with_openssl
879 enable_largefile
881 ac_precious_vars='build_alias
882 host_alias
883 target_alias
885 CFLAGS
886 LDFLAGS
887 LIBS
888 CPPFLAGS
890 CXXFLAGS
892 LLVM_CONFIG
893 CLANG
895 PKG_CONFIG
896 PKG_CONFIG_PATH
897 PKG_CONFIG_LIBDIR
898 ICU_CFLAGS
899 ICU_LIBS
900 XML2_CONFIG
901 XML2_CFLAGS
902 XML2_LIBS
903 LZ4_CFLAGS
904 LZ4_LIBS
905 ZSTD_CFLAGS
906 ZSTD_LIBS
907 LDFLAGS_EX
908 LDFLAGS_SL
909 PERL
910 PYTHON
911 MSGFMT
912 TCLSH'
915 # Initialize some variables set by options.
916 ac_init_help=
917 ac_init_version=false
918 ac_unrecognized_opts=
919 ac_unrecognized_sep=
920 # The variables have the same names as the options, with
921 # dashes changed to underlines.
922 cache_file=/dev/null
923 exec_prefix=NONE
924 no_create=
925 no_recursion=
926 prefix=NONE
927 program_prefix=NONE
928 program_suffix=NONE
929 program_transform_name=s,x,x,
930 silent=
931 site=
932 srcdir=
933 verbose=
934 x_includes=NONE
935 x_libraries=NONE
937 # Installation directory options.
938 # These are left unexpanded so users can "make install exec_prefix=/foo"
939 # and all the variables that are supposed to be based on exec_prefix
940 # by default will actually change.
941 # Use braces instead of parens because sh, perl, etc. also accept them.
942 # (The list follows the same order as the GNU Coding Standards.)
943 bindir='${exec_prefix}/bin'
944 sbindir='${exec_prefix}/sbin'
945 libexecdir='${exec_prefix}/libexec'
946 datarootdir='${prefix}/share'
947 datadir='${datarootdir}'
948 sysconfdir='${prefix}/etc'
949 sharedstatedir='${prefix}/com'
950 localstatedir='${prefix}/var'
951 includedir='${prefix}/include'
952 oldincludedir='/usr/include'
953 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
954 infodir='${datarootdir}/info'
955 htmldir='${docdir}'
956 dvidir='${docdir}'
957 pdfdir='${docdir}'
958 psdir='${docdir}'
959 libdir='${exec_prefix}/lib'
960 localedir='${datarootdir}/locale'
961 mandir='${datarootdir}/man'
963 ac_prev=
964 ac_dashdash=
965 for ac_option
967 # If the previous option needs an argument, assign it.
968 if test -n "$ac_prev"; then
969 eval $ac_prev=\$ac_option
970 ac_prev=
971 continue
974 case $ac_option in
975 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
976 *=) ac_optarg= ;;
977 *) ac_optarg=yes ;;
978 esac
980 # Accept the important Cygnus configure options, so we can diagnose typos.
982 case $ac_dashdash$ac_option in
984 ac_dashdash=yes ;;
986 -bindir | --bindir | --bindi | --bind | --bin | --bi)
987 ac_prev=bindir ;;
988 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
989 bindir=$ac_optarg ;;
991 -build | --build | --buil | --bui | --bu)
992 ac_prev=build_alias ;;
993 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
994 build_alias=$ac_optarg ;;
996 -cache-file | --cache-file | --cache-fil | --cache-fi \
997 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
998 ac_prev=cache_file ;;
999 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1000 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1001 cache_file=$ac_optarg ;;
1003 --config-cache | -C)
1004 cache_file=config.cache ;;
1006 -datadir | --datadir | --datadi | --datad)
1007 ac_prev=datadir ;;
1008 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1009 datadir=$ac_optarg ;;
1011 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1012 | --dataroo | --dataro | --datar)
1013 ac_prev=datarootdir ;;
1014 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1015 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1016 datarootdir=$ac_optarg ;;
1018 -disable-* | --disable-*)
1019 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1020 # Reject names that are not valid shell variable names.
1021 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1022 as_fn_error $? "invalid feature name: $ac_useropt"
1023 ac_useropt_orig=$ac_useropt
1024 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1025 case $ac_user_opts in
1027 "enable_$ac_useropt"
1028 "*) ;;
1029 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1030 ac_unrecognized_sep=', ';;
1031 esac
1032 eval enable_$ac_useropt=no ;;
1034 -docdir | --docdir | --docdi | --doc | --do)
1035 ac_prev=docdir ;;
1036 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1037 docdir=$ac_optarg ;;
1039 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1040 ac_prev=dvidir ;;
1041 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1042 dvidir=$ac_optarg ;;
1044 -enable-* | --enable-*)
1045 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1046 # Reject names that are not valid shell variable names.
1047 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1048 as_fn_error $? "invalid feature name: $ac_useropt"
1049 ac_useropt_orig=$ac_useropt
1050 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1051 case $ac_user_opts in
1053 "enable_$ac_useropt"
1054 "*) ;;
1055 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1056 ac_unrecognized_sep=', ';;
1057 esac
1058 eval enable_$ac_useropt=\$ac_optarg ;;
1060 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1061 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1062 | --exec | --exe | --ex)
1063 ac_prev=exec_prefix ;;
1064 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1065 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1066 | --exec=* | --exe=* | --ex=*)
1067 exec_prefix=$ac_optarg ;;
1069 -gas | --gas | --ga | --g)
1070 # Obsolete; use --with-gas.
1071 with_gas=yes ;;
1073 -help | --help | --hel | --he | -h)
1074 ac_init_help=long ;;
1075 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1076 ac_init_help=recursive ;;
1077 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1078 ac_init_help=short ;;
1080 -host | --host | --hos | --ho)
1081 ac_prev=host_alias ;;
1082 -host=* | --host=* | --hos=* | --ho=*)
1083 host_alias=$ac_optarg ;;
1085 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1086 ac_prev=htmldir ;;
1087 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1088 | --ht=*)
1089 htmldir=$ac_optarg ;;
1091 -includedir | --includedir | --includedi | --included | --include \
1092 | --includ | --inclu | --incl | --inc)
1093 ac_prev=includedir ;;
1094 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1095 | --includ=* | --inclu=* | --incl=* | --inc=*)
1096 includedir=$ac_optarg ;;
1098 -infodir | --infodir | --infodi | --infod | --info | --inf)
1099 ac_prev=infodir ;;
1100 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1101 infodir=$ac_optarg ;;
1103 -libdir | --libdir | --libdi | --libd)
1104 ac_prev=libdir ;;
1105 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1106 libdir=$ac_optarg ;;
1108 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1109 | --libexe | --libex | --libe)
1110 ac_prev=libexecdir ;;
1111 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1112 | --libexe=* | --libex=* | --libe=*)
1113 libexecdir=$ac_optarg ;;
1115 -localedir | --localedir | --localedi | --localed | --locale)
1116 ac_prev=localedir ;;
1117 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1118 localedir=$ac_optarg ;;
1120 -localstatedir | --localstatedir | --localstatedi | --localstated \
1121 | --localstate | --localstat | --localsta | --localst | --locals)
1122 ac_prev=localstatedir ;;
1123 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1124 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1125 localstatedir=$ac_optarg ;;
1127 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1128 ac_prev=mandir ;;
1129 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1130 mandir=$ac_optarg ;;
1132 -nfp | --nfp | --nf)
1133 # Obsolete; use --without-fp.
1134 with_fp=no ;;
1136 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1137 | --no-cr | --no-c | -n)
1138 no_create=yes ;;
1140 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1141 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1142 no_recursion=yes ;;
1144 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1145 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1146 | --oldin | --oldi | --old | --ol | --o)
1147 ac_prev=oldincludedir ;;
1148 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1149 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1150 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1151 oldincludedir=$ac_optarg ;;
1153 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1154 ac_prev=prefix ;;
1155 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1156 prefix=$ac_optarg ;;
1158 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1159 | --program-pre | --program-pr | --program-p)
1160 ac_prev=program_prefix ;;
1161 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1162 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1163 program_prefix=$ac_optarg ;;
1165 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1166 | --program-suf | --program-su | --program-s)
1167 ac_prev=program_suffix ;;
1168 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1169 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1170 program_suffix=$ac_optarg ;;
1172 -program-transform-name | --program-transform-name \
1173 | --program-transform-nam | --program-transform-na \
1174 | --program-transform-n | --program-transform- \
1175 | --program-transform | --program-transfor \
1176 | --program-transfo | --program-transf \
1177 | --program-trans | --program-tran \
1178 | --progr-tra | --program-tr | --program-t)
1179 ac_prev=program_transform_name ;;
1180 -program-transform-name=* | --program-transform-name=* \
1181 | --program-transform-nam=* | --program-transform-na=* \
1182 | --program-transform-n=* | --program-transform-=* \
1183 | --program-transform=* | --program-transfor=* \
1184 | --program-transfo=* | --program-transf=* \
1185 | --program-trans=* | --program-tran=* \
1186 | --progr-tra=* | --program-tr=* | --program-t=*)
1187 program_transform_name=$ac_optarg ;;
1189 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1190 ac_prev=pdfdir ;;
1191 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1192 pdfdir=$ac_optarg ;;
1194 -psdir | --psdir | --psdi | --psd | --ps)
1195 ac_prev=psdir ;;
1196 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1197 psdir=$ac_optarg ;;
1199 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1200 | -silent | --silent | --silen | --sile | --sil)
1201 silent=yes ;;
1203 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1204 ac_prev=sbindir ;;
1205 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1206 | --sbi=* | --sb=*)
1207 sbindir=$ac_optarg ;;
1209 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1210 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1211 | --sharedst | --shareds | --shared | --share | --shar \
1212 | --sha | --sh)
1213 ac_prev=sharedstatedir ;;
1214 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1215 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1216 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1217 | --sha=* | --sh=*)
1218 sharedstatedir=$ac_optarg ;;
1220 -site | --site | --sit)
1221 ac_prev=site ;;
1222 -site=* | --site=* | --sit=*)
1223 site=$ac_optarg ;;
1225 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1226 ac_prev=srcdir ;;
1227 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1228 srcdir=$ac_optarg ;;
1230 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1231 | --syscon | --sysco | --sysc | --sys | --sy)
1232 ac_prev=sysconfdir ;;
1233 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1234 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1235 sysconfdir=$ac_optarg ;;
1237 -target | --target | --targe | --targ | --tar | --ta | --t)
1238 ac_prev=target_alias ;;
1239 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1240 target_alias=$ac_optarg ;;
1242 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1243 verbose=yes ;;
1245 -version | --version | --versio | --versi | --vers | -V)
1246 ac_init_version=: ;;
1248 -with-* | --with-*)
1249 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1250 # Reject names that are not valid shell variable names.
1251 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1252 as_fn_error $? "invalid package name: $ac_useropt"
1253 ac_useropt_orig=$ac_useropt
1254 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1255 case $ac_user_opts in
1257 "with_$ac_useropt"
1258 "*) ;;
1259 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1260 ac_unrecognized_sep=', ';;
1261 esac
1262 eval with_$ac_useropt=\$ac_optarg ;;
1264 -without-* | --without-*)
1265 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1266 # Reject names that are not valid shell variable names.
1267 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1268 as_fn_error $? "invalid package name: $ac_useropt"
1269 ac_useropt_orig=$ac_useropt
1270 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1271 case $ac_user_opts in
1273 "with_$ac_useropt"
1274 "*) ;;
1275 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1276 ac_unrecognized_sep=', ';;
1277 esac
1278 eval with_$ac_useropt=no ;;
1280 --x)
1281 # Obsolete; use --with-x.
1282 with_x=yes ;;
1284 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1285 | --x-incl | --x-inc | --x-in | --x-i)
1286 ac_prev=x_includes ;;
1287 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1288 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1289 x_includes=$ac_optarg ;;
1291 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1292 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1293 ac_prev=x_libraries ;;
1294 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1295 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1296 x_libraries=$ac_optarg ;;
1298 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1299 Try \`$0 --help' for more information"
1302 *=*)
1303 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1304 # Reject names that are not valid shell variable names.
1305 case $ac_envvar in #(
1306 '' | [0-9]* | *[!_$as_cr_alnum]* )
1307 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1308 esac
1309 eval $ac_envvar=\$ac_optarg
1310 export $ac_envvar ;;
1313 # FIXME: should be removed in autoconf 3.0.
1314 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1315 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1316 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1317 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1320 esac
1321 done
1323 if test -n "$ac_prev"; then
1324 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1325 as_fn_error $? "missing argument to $ac_option"
1328 if test -n "$ac_unrecognized_opts"; then
1329 case $enable_option_checking in
1330 no) ;;
1331 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1332 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1333 esac
1336 # Check all directory arguments for consistency.
1337 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1338 datadir sysconfdir sharedstatedir localstatedir includedir \
1339 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1340 libdir localedir mandir
1342 eval ac_val=\$$ac_var
1343 # Remove trailing slashes.
1344 case $ac_val in
1345 */ )
1346 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1347 eval $ac_var=\$ac_val;;
1348 esac
1349 # Be sure to have absolute directory names.
1350 case $ac_val in
1351 [\\/$]* | ?:[\\/]* ) continue;;
1352 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1353 esac
1354 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1355 done
1357 # There might be people who depend on the old broken behavior: `$host'
1358 # used to hold the argument of --host etc.
1359 # FIXME: To remove some day.
1360 build=$build_alias
1361 host=$host_alias
1362 target=$target_alias
1364 # FIXME: To remove some day.
1365 if test "x$host_alias" != x; then
1366 if test "x$build_alias" = x; then
1367 cross_compiling=maybe
1368 elif test "x$build_alias" != "x$host_alias"; then
1369 cross_compiling=yes
1373 ac_tool_prefix=
1374 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1376 test "$silent" = yes && exec 6>/dev/null
1379 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1380 ac_ls_di=`ls -di .` &&
1381 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1382 as_fn_error $? "working directory cannot be determined"
1383 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1384 as_fn_error $? "pwd does not report name of working directory"
1387 # Find the source files, if location was not specified.
1388 if test -z "$srcdir"; then
1389 ac_srcdir_defaulted=yes
1390 # Try the directory containing this script, then the parent directory.
1391 ac_confdir=`$as_dirname -- "$as_myself" ||
1392 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1393 X"$as_myself" : 'X\(//\)[^/]' \| \
1394 X"$as_myself" : 'X\(//\)$' \| \
1395 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1396 $as_echo X"$as_myself" |
1397 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1398 s//\1/
1401 /^X\(\/\/\)[^/].*/{
1402 s//\1/
1405 /^X\(\/\/\)$/{
1406 s//\1/
1409 /^X\(\/\).*/{
1410 s//\1/
1413 s/.*/./; q'`
1414 srcdir=$ac_confdir
1415 if test ! -r "$srcdir/$ac_unique_file"; then
1416 srcdir=..
1418 else
1419 ac_srcdir_defaulted=no
1421 if test ! -r "$srcdir/$ac_unique_file"; then
1422 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1423 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1425 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1426 ac_abs_confdir=`(
1427 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1428 pwd)`
1429 # When building in place, set srcdir=.
1430 if test "$ac_abs_confdir" = "$ac_pwd"; then
1431 srcdir=.
1433 # Remove unnecessary trailing slashes from srcdir.
1434 # Double slashes in file names in object file debugging info
1435 # mess up M-x gdb in Emacs.
1436 case $srcdir in
1437 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1438 esac
1439 for ac_var in $ac_precious_vars; do
1440 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1441 eval ac_env_${ac_var}_value=\$${ac_var}
1442 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1443 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1444 done
1447 # Report the --help message.
1449 if test "$ac_init_help" = "long"; then
1450 # Omit some internal or obsolete options to make the list less imposing.
1451 # This message is too long to be a string in the A/UX 3.1 sh.
1452 cat <<_ACEOF
1453 \`configure' configures PostgreSQL 17devel to adapt to many kinds of systems.
1455 Usage: $0 [OPTION]... [VAR=VALUE]...
1457 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1458 VAR=VALUE. See below for descriptions of some of the useful variables.
1460 Defaults for the options are specified in brackets.
1462 Configuration:
1463 -h, --help display this help and exit
1464 --help=short display options specific to this package
1465 --help=recursive display the short help of all the included packages
1466 -V, --version display version information and exit
1467 -q, --quiet, --silent do not print \`checking ...' messages
1468 --cache-file=FILE cache test results in FILE [disabled]
1469 -C, --config-cache alias for \`--cache-file=config.cache'
1470 -n, --no-create do not create output files
1471 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1473 Installation directories:
1474 --prefix=PREFIX install architecture-independent files in PREFIX
1475 [$ac_default_prefix]
1476 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1477 [PREFIX]
1479 By default, \`make install' will install all the files in
1480 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1481 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1482 for instance \`--prefix=\$HOME'.
1484 For better control, use the options below.
1486 Fine tuning of the installation directories:
1487 --bindir=DIR user executables [EPREFIX/bin]
1488 --sbindir=DIR system admin executables [EPREFIX/sbin]
1489 --libexecdir=DIR program executables [EPREFIX/libexec]
1490 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1491 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1492 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1493 --libdir=DIR object code libraries [EPREFIX/lib]
1494 --includedir=DIR C header files [PREFIX/include]
1495 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1496 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1497 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1498 --infodir=DIR info documentation [DATAROOTDIR/info]
1499 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1500 --mandir=DIR man documentation [DATAROOTDIR/man]
1501 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1502 --htmldir=DIR html documentation [DOCDIR]
1503 --dvidir=DIR dvi documentation [DOCDIR]
1504 --pdfdir=DIR pdf documentation [DOCDIR]
1505 --psdir=DIR ps documentation [DOCDIR]
1506 _ACEOF
1508 cat <<\_ACEOF
1510 System types:
1511 --build=BUILD configure for building on BUILD [guessed]
1512 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1513 _ACEOF
1516 if test -n "$ac_init_help"; then
1517 case $ac_init_help in
1518 short | recursive ) echo "Configuration of PostgreSQL 17devel:";;
1519 esac
1520 cat <<\_ACEOF
1522 Optional Features:
1523 --disable-option-checking ignore unrecognized --enable/--with options
1524 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1525 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1526 --disable-integer-datetimes
1527 obsolete option, no longer supported
1528 --enable-nls[=LANGUAGES]
1529 enable Native Language Support
1530 --disable-rpath do not embed shared library search path in
1531 executables
1532 --disable-spinlocks do not use spinlocks
1533 --disable-atomics do not use atomic operations
1534 --enable-debug build with debugging symbols (-g)
1535 --enable-profiling build with profiling enabled
1536 --enable-coverage build with coverage testing instrumentation
1537 --enable-dtrace build with DTrace support
1538 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1539 --enable-injection-points
1540 enable injection points (for testing)
1541 --enable-depend turn on automatic dependency tracking
1542 --enable-cassert enable assertion checks (for debugging)
1543 --disable-largefile omit support for large files
1545 Optional Packages:
1546 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1547 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1548 --with-extra-version=STRING
1549 append STRING to version
1550 --with-template=NAME override operating system template
1551 --with-includes=DIRS look for additional header files in DIRS
1552 --with-libraries=DIRS look for additional libraries in DIRS
1553 --with-libs=DIRS alternative spelling of --with-libraries
1554 --with-pgport=PORTNUM set default port number [5432]
1555 --with-blocksize=BLOCKSIZE
1556 set table block size in kB [8]
1557 --with-segsize=SEGSIZE set table segment size in GB [1]
1558 --with-segsize-blocks=SEGSIZE_BLOCKS
1559 set table segment size in blocks [0]
1560 --with-wal-blocksize=BLOCKSIZE
1561 set WAL block size in kB [8]
1562 --with-llvm build with LLVM based JIT support
1563 --without-icu build without ICU support
1564 --with-tcl build Tcl modules (PL/Tcl)
1565 --with-tclconfig=DIR tclConfig.sh is in DIR
1566 --with-perl build Perl modules (PL/Perl)
1567 --with-python build Python modules (PL/Python)
1568 --with-gssapi build with GSSAPI support
1569 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1570 [postgres]
1571 --with-pam build with PAM support
1572 --with-bsd-auth build with BSD Authentication support
1573 --with-ldap build with LDAP support
1574 --with-bonjour build with Bonjour support
1575 --with-selinux build with SELinux support
1576 --with-systemd build with systemd support
1577 --without-readline do not use GNU Readline nor BSD Libedit for editing
1578 --with-libedit-preferred
1579 prefer BSD Libedit over GNU Readline
1580 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1581 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1582 --with-libxml build with XML support
1583 --with-libxslt use XSLT support when building contrib/xml2
1584 --with-system-tzdata=DIR
1585 use system time zone data in DIR
1586 --without-zlib do not use Zlib
1587 --with-lz4 build with LZ4 support
1588 --with-zstd build with ZSTD support
1589 --with-ssl=LIB use LIB for SSL/TLS support (openssl)
1590 --with-openssl obsolete spelling of --with-ssl=openssl
1592 Some influential environment variables:
1593 CC C compiler command
1594 CFLAGS C compiler flags
1595 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1596 nonstandard directory <lib dir>
1597 LIBS libraries to pass to the linker, e.g. -l<library>
1598 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1599 you have headers in a nonstandard directory <include dir>
1600 CXX C++ compiler command
1601 CXXFLAGS C++ compiler flags
1602 LLVM_CONFIG path to llvm-config command
1603 CLANG path to clang compiler to generate bitcode
1604 CPP C preprocessor
1605 PKG_CONFIG path to pkg-config utility
1606 PKG_CONFIG_PATH
1607 directories to add to pkg-config's search path
1608 PKG_CONFIG_LIBDIR
1609 path overriding pkg-config's built-in search path
1610 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1611 ICU_LIBS linker flags for ICU, overriding pkg-config
1612 XML2_CONFIG path to xml2-config utility
1613 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1614 XML2_LIBS linker flags for XML2, overriding pkg-config
1615 LZ4_CFLAGS C compiler flags for LZ4, overriding pkg-config
1616 LZ4_LIBS linker flags for LZ4, overriding pkg-config
1617 ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
1618 ZSTD_LIBS linker flags for ZSTD, overriding pkg-config
1619 LDFLAGS_EX extra linker flags for linking executables only
1620 LDFLAGS_SL extra linker flags for linking shared libraries only
1621 PERL Perl program
1622 PYTHON Python program
1623 MSGFMT msgfmt program for NLS
1624 TCLSH Tcl interpreter program (tclsh)
1626 Use these variables to override the choices made by `configure' or to help
1627 it to find libraries and programs with nonstandard names/locations.
1629 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1630 PostgreSQL home page: <https://www.postgresql.org/>.
1631 _ACEOF
1632 ac_status=$?
1635 if test "$ac_init_help" = "recursive"; then
1636 # If there are subdirs, report their specific --help.
1637 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1638 test -d "$ac_dir" ||
1639 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1640 continue
1641 ac_builddir=.
1643 case "$ac_dir" in
1644 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1646 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1647 # A ".." for each directory in $ac_dir_suffix.
1648 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1649 case $ac_top_builddir_sub in
1650 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1651 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1652 esac ;;
1653 esac
1654 ac_abs_top_builddir=$ac_pwd
1655 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1656 # for backward compatibility:
1657 ac_top_builddir=$ac_top_build_prefix
1659 case $srcdir in
1660 .) # We are building in place.
1661 ac_srcdir=.
1662 ac_top_srcdir=$ac_top_builddir_sub
1663 ac_abs_top_srcdir=$ac_pwd ;;
1664 [\\/]* | ?:[\\/]* ) # Absolute name.
1665 ac_srcdir=$srcdir$ac_dir_suffix;
1666 ac_top_srcdir=$srcdir
1667 ac_abs_top_srcdir=$srcdir ;;
1668 *) # Relative name.
1669 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1670 ac_top_srcdir=$ac_top_build_prefix$srcdir
1671 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1672 esac
1673 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1675 cd "$ac_dir" || { ac_status=$?; continue; }
1676 # Check for guested configure.
1677 if test -f "$ac_srcdir/configure.gnu"; then
1678 echo &&
1679 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1680 elif test -f "$ac_srcdir/configure"; then
1681 echo &&
1682 $SHELL "$ac_srcdir/configure" --help=recursive
1683 else
1684 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1685 fi || ac_status=$?
1686 cd "$ac_pwd" || { ac_status=$?; break; }
1687 done
1690 test -n "$ac_init_help" && exit $ac_status
1691 if $ac_init_version; then
1692 cat <<\_ACEOF
1693 PostgreSQL configure 17devel
1694 generated by GNU Autoconf 2.69
1696 Copyright (C) 2012 Free Software Foundation, Inc.
1697 This configure script is free software; the Free Software Foundation
1698 gives unlimited permission to copy, distribute and modify it.
1700 Copyright (c) 1996-2024, PostgreSQL Global Development Group
1701 _ACEOF
1702 exit
1705 ## ------------------------ ##
1706 ## Autoconf initialization. ##
1707 ## ------------------------ ##
1709 # ac_fn_c_try_compile LINENO
1710 # --------------------------
1711 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1712 ac_fn_c_try_compile ()
1714 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1715 rm -f conftest.$ac_objext
1716 if { { ac_try="$ac_compile"
1717 case "(($ac_try" in
1718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1719 *) ac_try_echo=$ac_try;;
1720 esac
1721 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1722 $as_echo "$ac_try_echo"; } >&5
1723 (eval "$ac_compile") 2>conftest.err
1724 ac_status=$?
1725 if test -s conftest.err; then
1726 grep -v '^ *+' conftest.err >conftest.er1
1727 cat conftest.er1 >&5
1728 mv -f conftest.er1 conftest.err
1730 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1731 test $ac_status = 0; } && {
1732 test -z "$ac_c_werror_flag" ||
1733 test ! -s conftest.err
1734 } && test -s conftest.$ac_objext; then :
1735 ac_retval=0
1736 else
1737 $as_echo "$as_me: failed program was:" >&5
1738 sed 's/^/| /' conftest.$ac_ext >&5
1740 ac_retval=1
1742 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1743 as_fn_set_status $ac_retval
1745 } # ac_fn_c_try_compile
1747 # ac_fn_cxx_try_compile LINENO
1748 # ----------------------------
1749 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1750 ac_fn_cxx_try_compile ()
1752 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1753 rm -f conftest.$ac_objext
1754 if { { ac_try="$ac_compile"
1755 case "(($ac_try" in
1756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1757 *) ac_try_echo=$ac_try;;
1758 esac
1759 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1760 $as_echo "$ac_try_echo"; } >&5
1761 (eval "$ac_compile") 2>conftest.err
1762 ac_status=$?
1763 if test -s conftest.err; then
1764 grep -v '^ *+' conftest.err >conftest.er1
1765 cat conftest.er1 >&5
1766 mv -f conftest.er1 conftest.err
1768 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1769 test $ac_status = 0; } && {
1770 test -z "$ac_cxx_werror_flag" ||
1771 test ! -s conftest.err
1772 } && test -s conftest.$ac_objext; then :
1773 ac_retval=0
1774 else
1775 $as_echo "$as_me: failed program was:" >&5
1776 sed 's/^/| /' conftest.$ac_ext >&5
1778 ac_retval=1
1780 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1781 as_fn_set_status $ac_retval
1783 } # ac_fn_cxx_try_compile
1785 # ac_fn_c_try_link LINENO
1786 # -----------------------
1787 # Try to link conftest.$ac_ext, and return whether this succeeded.
1788 ac_fn_c_try_link ()
1790 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1791 rm -f conftest.$ac_objext conftest$ac_exeext
1792 if { { ac_try="$ac_link"
1793 case "(($ac_try" in
1794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1795 *) ac_try_echo=$ac_try;;
1796 esac
1797 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1798 $as_echo "$ac_try_echo"; } >&5
1799 (eval "$ac_link") 2>conftest.err
1800 ac_status=$?
1801 if test -s conftest.err; then
1802 grep -v '^ *+' conftest.err >conftest.er1
1803 cat conftest.er1 >&5
1804 mv -f conftest.er1 conftest.err
1806 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1807 test $ac_status = 0; } && {
1808 test -z "$ac_c_werror_flag" ||
1809 test ! -s conftest.err
1810 } && test -s conftest$ac_exeext && {
1811 test "$cross_compiling" = yes ||
1812 test -x conftest$ac_exeext
1813 }; then :
1814 ac_retval=0
1815 else
1816 $as_echo "$as_me: failed program was:" >&5
1817 sed 's/^/| /' conftest.$ac_ext >&5
1819 ac_retval=1
1821 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1822 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1823 # interfere with the next link command; also delete a directory that is
1824 # left behind by Apple's compiler. We do this before executing the actions.
1825 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1826 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1827 as_fn_set_status $ac_retval
1829 } # ac_fn_c_try_link
1831 # ac_fn_c_try_cpp LINENO
1832 # ----------------------
1833 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1834 ac_fn_c_try_cpp ()
1836 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1837 if { { ac_try="$ac_cpp conftest.$ac_ext"
1838 case "(($ac_try" in
1839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1840 *) ac_try_echo=$ac_try;;
1841 esac
1842 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1843 $as_echo "$ac_try_echo"; } >&5
1844 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1845 ac_status=$?
1846 if test -s conftest.err; then
1847 grep -v '^ *+' conftest.err >conftest.er1
1848 cat conftest.er1 >&5
1849 mv -f conftest.er1 conftest.err
1851 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1852 test $ac_status = 0; } > conftest.i && {
1853 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1854 test ! -s conftest.err
1855 }; then :
1856 ac_retval=0
1857 else
1858 $as_echo "$as_me: failed program was:" >&5
1859 sed 's/^/| /' conftest.$ac_ext >&5
1861 ac_retval=1
1863 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1864 as_fn_set_status $ac_retval
1866 } # ac_fn_c_try_cpp
1868 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1869 # -------------------------------------------------------
1870 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1871 # the include files in INCLUDES and setting the cache variable VAR
1872 # accordingly.
1873 ac_fn_c_check_header_mongrel ()
1875 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1876 if eval \${$3+:} false; then :
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1878 $as_echo_n "checking for $2... " >&6; }
1879 if eval \${$3+:} false; then :
1880 $as_echo_n "(cached) " >&6
1882 eval ac_res=\$$3
1883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1884 $as_echo "$ac_res" >&6; }
1885 else
1886 # Is the header compilable?
1887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1888 $as_echo_n "checking $2 usability... " >&6; }
1889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1890 /* end confdefs.h. */
1892 #include <$2>
1893 _ACEOF
1894 if ac_fn_c_try_compile "$LINENO"; then :
1895 ac_header_compiler=yes
1896 else
1897 ac_header_compiler=no
1899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1901 $as_echo "$ac_header_compiler" >&6; }
1903 # Is the header present?
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1905 $as_echo_n "checking $2 presence... " >&6; }
1906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1907 /* end confdefs.h. */
1908 #include <$2>
1909 _ACEOF
1910 if ac_fn_c_try_cpp "$LINENO"; then :
1911 ac_header_preproc=yes
1912 else
1913 ac_header_preproc=no
1915 rm -f conftest.err conftest.i conftest.$ac_ext
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1917 $as_echo "$ac_header_preproc" >&6; }
1919 # So? What about this header?
1920 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1921 yes:no: )
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1923 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1925 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1927 no:yes:* )
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1929 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1931 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1933 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1935 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1936 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1937 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1938 ( $as_echo "## ---------------------------------------------- ##
1939 ## Report this to pgsql-bugs@lists.postgresql.org ##
1940 ## ---------------------------------------------- ##"
1941 ) | sed "s/^/$as_me: WARNING: /" >&2
1943 esac
1944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1945 $as_echo_n "checking for $2... " >&6; }
1946 if eval \${$3+:} false; then :
1947 $as_echo_n "(cached) " >&6
1948 else
1949 eval "$3=\$ac_header_compiler"
1951 eval ac_res=\$$3
1952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1953 $as_echo "$ac_res" >&6; }
1955 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1957 } # ac_fn_c_check_header_mongrel
1959 # ac_fn_c_try_run LINENO
1960 # ----------------------
1961 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1962 # that executables *can* be run.
1963 ac_fn_c_try_run ()
1965 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1966 if { { ac_try="$ac_link"
1967 case "(($ac_try" in
1968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1969 *) ac_try_echo=$ac_try;;
1970 esac
1971 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1972 $as_echo "$ac_try_echo"; } >&5
1973 (eval "$ac_link") 2>&5
1974 ac_status=$?
1975 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1976 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1977 { { case "(($ac_try" in
1978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1979 *) ac_try_echo=$ac_try;;
1980 esac
1981 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1982 $as_echo "$ac_try_echo"; } >&5
1983 (eval "$ac_try") 2>&5
1984 ac_status=$?
1985 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1986 test $ac_status = 0; }; }; then :
1987 ac_retval=0
1988 else
1989 $as_echo "$as_me: program exited with status $ac_status" >&5
1990 $as_echo "$as_me: failed program was:" >&5
1991 sed 's/^/| /' conftest.$ac_ext >&5
1993 ac_retval=$ac_status
1995 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1996 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1997 as_fn_set_status $ac_retval
1999 } # ac_fn_c_try_run
2001 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2002 # -------------------------------------------------------
2003 # Tests whether HEADER exists and can be compiled using the include files in
2004 # INCLUDES, setting the cache variable VAR accordingly.
2005 ac_fn_c_check_header_compile ()
2007 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2009 $as_echo_n "checking for $2... " >&6; }
2010 if eval \${$3+:} false; then :
2011 $as_echo_n "(cached) " >&6
2012 else
2013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014 /* end confdefs.h. */
2016 #include <$2>
2017 _ACEOF
2018 if ac_fn_c_try_compile "$LINENO"; then :
2019 eval "$3=yes"
2020 else
2021 eval "$3=no"
2023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2025 eval ac_res=\$$3
2026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2027 $as_echo "$ac_res" >&6; }
2028 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2030 } # ac_fn_c_check_header_compile
2032 # ac_fn_c_check_func LINENO FUNC VAR
2033 # ----------------------------------
2034 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2035 ac_fn_c_check_func ()
2037 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2039 $as_echo_n "checking for $2... " >&6; }
2040 if eval \${$3+:} false; then :
2041 $as_echo_n "(cached) " >&6
2042 else
2043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2044 /* end confdefs.h. */
2045 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2046 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2047 #define $2 innocuous_$2
2049 /* System header to define __stub macros and hopefully few prototypes,
2050 which can conflict with char $2 (); below.
2051 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2052 <limits.h> exists even on freestanding compilers. */
2054 #ifdef __STDC__
2055 # include <limits.h>
2056 #else
2057 # include <assert.h>
2058 #endif
2060 #undef $2
2062 /* Override any GCC internal prototype to avoid an error.
2063 Use char because int might match the return type of a GCC
2064 builtin and then its argument prototype would still apply. */
2065 #ifdef __cplusplus
2066 extern "C"
2067 #endif
2068 char $2 ();
2069 /* The GNU C library defines this for functions which it implements
2070 to always fail with ENOSYS. Some functions are actually named
2071 something starting with __ and the normal name is an alias. */
2072 #if defined __stub_$2 || defined __stub___$2
2073 choke me
2074 #endif
2077 main ()
2079 return $2 ();
2081 return 0;
2083 _ACEOF
2084 if ac_fn_c_try_link "$LINENO"; then :
2085 eval "$3=yes"
2086 else
2087 eval "$3=no"
2089 rm -f core conftest.err conftest.$ac_objext \
2090 conftest$ac_exeext conftest.$ac_ext
2092 eval ac_res=\$$3
2093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2094 $as_echo "$ac_res" >&6; }
2095 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2097 } # ac_fn_c_check_func
2099 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2100 # -------------------------------------------
2101 # Tests whether TYPE exists after having included INCLUDES, setting cache
2102 # variable VAR accordingly.
2103 ac_fn_c_check_type ()
2105 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2107 $as_echo_n "checking for $2... " >&6; }
2108 if eval \${$3+:} false; then :
2109 $as_echo_n "(cached) " >&6
2110 else
2111 eval "$3=no"
2112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2113 /* end confdefs.h. */
2116 main ()
2118 if (sizeof ($2))
2119 return 0;
2121 return 0;
2123 _ACEOF
2124 if ac_fn_c_try_compile "$LINENO"; then :
2125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2126 /* end confdefs.h. */
2129 main ()
2131 if (sizeof (($2)))
2132 return 0;
2134 return 0;
2136 _ACEOF
2137 if ac_fn_c_try_compile "$LINENO"; then :
2139 else
2140 eval "$3=yes"
2142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2144 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2146 eval ac_res=\$$3
2147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2148 $as_echo "$ac_res" >&6; }
2149 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2151 } # ac_fn_c_check_type
2153 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2154 # ----------------------------------------------------
2155 # Tries to find if the field MEMBER exists in type AGGR, after including
2156 # INCLUDES, setting cache variable VAR accordingly.
2157 ac_fn_c_check_member ()
2159 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2161 $as_echo_n "checking for $2.$3... " >&6; }
2162 if eval \${$4+:} false; then :
2163 $as_echo_n "(cached) " >&6
2164 else
2165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2166 /* end confdefs.h. */
2169 main ()
2171 static $2 ac_aggr;
2172 if (ac_aggr.$3)
2173 return 0;
2175 return 0;
2177 _ACEOF
2178 if ac_fn_c_try_compile "$LINENO"; then :
2179 eval "$4=yes"
2180 else
2181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182 /* end confdefs.h. */
2185 main ()
2187 static $2 ac_aggr;
2188 if (sizeof ac_aggr.$3)
2189 return 0;
2191 return 0;
2193 _ACEOF
2194 if ac_fn_c_try_compile "$LINENO"; then :
2195 eval "$4=yes"
2196 else
2197 eval "$4=no"
2199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2201 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2203 eval ac_res=\$$4
2204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2205 $as_echo "$ac_res" >&6; }
2206 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2208 } # ac_fn_c_check_member
2210 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2211 # --------------------------------------------
2212 # Tries to find the compile-time value of EXPR in a program that includes
2213 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2214 # computed
2215 ac_fn_c_compute_int ()
2217 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2218 if test "$cross_compiling" = yes; then
2219 # Depending upon the size, compute the lo and hi bounds.
2220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2221 /* end confdefs.h. */
2224 main ()
2226 static int test_array [1 - 2 * !(($2) >= 0)];
2227 test_array [0] = 0;
2228 return test_array [0];
2231 return 0;
2233 _ACEOF
2234 if ac_fn_c_try_compile "$LINENO"; then :
2235 ac_lo=0 ac_mid=0
2236 while :; do
2237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2238 /* end confdefs.h. */
2241 main ()
2243 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2244 test_array [0] = 0;
2245 return test_array [0];
2248 return 0;
2250 _ACEOF
2251 if ac_fn_c_try_compile "$LINENO"; then :
2252 ac_hi=$ac_mid; break
2253 else
2254 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2255 if test $ac_lo -le $ac_mid; then
2256 ac_lo= ac_hi=
2257 break
2259 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2262 done
2263 else
2264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2265 /* end confdefs.h. */
2268 main ()
2270 static int test_array [1 - 2 * !(($2) < 0)];
2271 test_array [0] = 0;
2272 return test_array [0];
2275 return 0;
2277 _ACEOF
2278 if ac_fn_c_try_compile "$LINENO"; then :
2279 ac_hi=-1 ac_mid=-1
2280 while :; do
2281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2282 /* end confdefs.h. */
2285 main ()
2287 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2288 test_array [0] = 0;
2289 return test_array [0];
2292 return 0;
2294 _ACEOF
2295 if ac_fn_c_try_compile "$LINENO"; then :
2296 ac_lo=$ac_mid; break
2297 else
2298 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2299 if test $ac_mid -le $ac_hi; then
2300 ac_lo= ac_hi=
2301 break
2303 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2306 done
2307 else
2308 ac_lo= ac_hi=
2310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2313 # Binary search between lo and hi bounds.
2314 while test "x$ac_lo" != "x$ac_hi"; do
2315 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317 /* end confdefs.h. */
2320 main ()
2322 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2323 test_array [0] = 0;
2324 return test_array [0];
2327 return 0;
2329 _ACEOF
2330 if ac_fn_c_try_compile "$LINENO"; then :
2331 ac_hi=$ac_mid
2332 else
2333 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2336 done
2337 case $ac_lo in #((
2338 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2339 '') ac_retval=1 ;;
2340 esac
2341 else
2342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2343 /* end confdefs.h. */
2345 static long int longval () { return $2; }
2346 static unsigned long int ulongval () { return $2; }
2347 #include <stdio.h>
2348 #include <stdlib.h>
2350 main ()
2353 FILE *f = fopen ("conftest.val", "w");
2354 if (! f)
2355 return 1;
2356 if (($2) < 0)
2358 long int i = longval ();
2359 if (i != ($2))
2360 return 1;
2361 fprintf (f, "%ld", i);
2363 else
2365 unsigned long int i = ulongval ();
2366 if (i != ($2))
2367 return 1;
2368 fprintf (f, "%lu", i);
2370 /* Do not output a trailing newline, as this causes \r\n confusion
2371 on some platforms. */
2372 return ferror (f) || fclose (f) != 0;
2375 return 0;
2377 _ACEOF
2378 if ac_fn_c_try_run "$LINENO"; then :
2379 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2380 else
2381 ac_retval=1
2383 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2384 conftest.$ac_objext conftest.beam conftest.$ac_ext
2385 rm -f conftest.val
2388 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2389 as_fn_set_status $ac_retval
2391 } # ac_fn_c_compute_int
2393 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2394 # ---------------------------------------------
2395 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2396 # accordingly.
2397 ac_fn_c_check_decl ()
2399 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2400 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2401 as_decl_name=`echo $2|sed 's/ *(.*//'`
2402 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2404 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2405 if eval \${$3+:} false; then :
2406 $as_echo_n "(cached) " >&6
2407 else
2408 ac_save_werror_flag=$ac_c_werror_flag
2409 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2411 /* end confdefs.h. */
2414 main ()
2416 #ifndef $as_decl_name
2417 #ifdef __cplusplus
2418 (void) $as_decl_use;
2419 #else
2420 (void) $as_decl_name;
2421 #endif
2422 #endif
2425 return 0;
2427 _ACEOF
2428 if ac_fn_c_try_compile "$LINENO"; then :
2429 eval "$3=yes"
2430 else
2431 eval "$3=no"
2433 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2434 ac_c_werror_flag=$ac_save_werror_flag
2436 eval ac_res=\$$3
2437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2438 $as_echo "$ac_res" >&6; }
2439 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2441 } # ac_fn_c_check_decl
2442 cat >config.log <<_ACEOF
2443 This file contains any messages produced by compilers while
2444 running configure, to aid debugging if configure makes a mistake.
2446 It was created by PostgreSQL $as_me 17devel, which was
2447 generated by GNU Autoconf 2.69. Invocation command line was
2449 $ $0 $@
2451 _ACEOF
2452 exec 5>>config.log
2454 cat <<_ASUNAME
2455 ## --------- ##
2456 ## Platform. ##
2457 ## --------- ##
2459 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2460 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2461 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2462 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2463 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2465 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2466 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2468 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2469 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2470 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2471 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2472 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2473 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2474 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2476 _ASUNAME
2478 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2479 for as_dir in $PATH
2481 IFS=$as_save_IFS
2482 test -z "$as_dir" && as_dir=.
2483 $as_echo "PATH: $as_dir"
2484 done
2485 IFS=$as_save_IFS
2487 } >&5
2489 cat >&5 <<_ACEOF
2492 ## ----------- ##
2493 ## Core tests. ##
2494 ## ----------- ##
2496 _ACEOF
2499 # Keep a trace of the command line.
2500 # Strip out --no-create and --no-recursion so they do not pile up.
2501 # Strip out --silent because we don't want to record it for future runs.
2502 # Also quote any args containing shell meta-characters.
2503 # Make two passes to allow for proper duplicate-argument suppression.
2504 ac_configure_args=
2505 ac_configure_args0=
2506 ac_configure_args1=
2507 ac_must_keep_next=false
2508 for ac_pass in 1 2
2510 for ac_arg
2512 case $ac_arg in
2513 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2514 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2515 | -silent | --silent | --silen | --sile | --sil)
2516 continue ;;
2517 *\'*)
2518 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2519 esac
2520 case $ac_pass in
2521 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2523 as_fn_append ac_configure_args1 " '$ac_arg'"
2524 if test $ac_must_keep_next = true; then
2525 ac_must_keep_next=false # Got value, back to normal.
2526 else
2527 case $ac_arg in
2528 *=* | --config-cache | -C | -disable-* | --disable-* \
2529 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2530 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2531 | -with-* | --with-* | -without-* | --without-* | --x)
2532 case "$ac_configure_args0 " in
2533 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2534 esac
2536 -* ) ac_must_keep_next=true ;;
2537 esac
2539 as_fn_append ac_configure_args " '$ac_arg'"
2541 esac
2542 done
2543 done
2544 { ac_configure_args0=; unset ac_configure_args0;}
2545 { ac_configure_args1=; unset ac_configure_args1;}
2547 # When interrupted or exit'd, cleanup temporary files, and complete
2548 # config.log. We remove comments because anyway the quotes in there
2549 # would cause problems or look ugly.
2550 # WARNING: Use '\'' to represent an apostrophe within the trap.
2551 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2552 trap 'exit_status=$?
2553 # Save into config.log some information that might help in debugging.
2555 echo
2557 $as_echo "## ---------------- ##
2558 ## Cache variables. ##
2559 ## ---------------- ##"
2560 echo
2561 # The following way of writing the cache mishandles newlines in values,
2563 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2564 eval ac_val=\$$ac_var
2565 case $ac_val in #(
2566 *${as_nl}*)
2567 case $ac_var in #(
2568 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2569 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2570 esac
2571 case $ac_var in #(
2572 _ | IFS | as_nl) ;; #(
2573 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2574 *) { eval $ac_var=; unset $ac_var;} ;;
2575 esac ;;
2576 esac
2577 done
2578 (set) 2>&1 |
2579 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2580 *${as_nl}ac_space=\ *)
2581 sed -n \
2582 "s/'\''/'\''\\\\'\'''\''/g;
2583 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2584 ;; #(
2586 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2588 esac |
2589 sort
2591 echo
2593 $as_echo "## ----------------- ##
2594 ## Output variables. ##
2595 ## ----------------- ##"
2596 echo
2597 for ac_var in $ac_subst_vars
2599 eval ac_val=\$$ac_var
2600 case $ac_val in
2601 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2602 esac
2603 $as_echo "$ac_var='\''$ac_val'\''"
2604 done | sort
2605 echo
2607 if test -n "$ac_subst_files"; then
2608 $as_echo "## ------------------- ##
2609 ## File substitutions. ##
2610 ## ------------------- ##"
2611 echo
2612 for ac_var in $ac_subst_files
2614 eval ac_val=\$$ac_var
2615 case $ac_val in
2616 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2617 esac
2618 $as_echo "$ac_var='\''$ac_val'\''"
2619 done | sort
2620 echo
2623 if test -s confdefs.h; then
2624 $as_echo "## ----------- ##
2625 ## confdefs.h. ##
2626 ## ----------- ##"
2627 echo
2628 cat confdefs.h
2629 echo
2631 test "$ac_signal" != 0 &&
2632 $as_echo "$as_me: caught signal $ac_signal"
2633 $as_echo "$as_me: exit $exit_status"
2634 } >&5
2635 rm -f core *.core core.conftest.* &&
2636 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2637 exit $exit_status
2639 for ac_signal in 1 2 13 15; do
2640 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2641 done
2642 ac_signal=0
2644 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2645 rm -f -r conftest* confdefs.h
2647 $as_echo "/* confdefs.h */" > confdefs.h
2649 # Predefined preprocessor variables.
2651 cat >>confdefs.h <<_ACEOF
2652 #define PACKAGE_NAME "$PACKAGE_NAME"
2653 _ACEOF
2655 cat >>confdefs.h <<_ACEOF
2656 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2657 _ACEOF
2659 cat >>confdefs.h <<_ACEOF
2660 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2661 _ACEOF
2663 cat >>confdefs.h <<_ACEOF
2664 #define PACKAGE_STRING "$PACKAGE_STRING"
2665 _ACEOF
2667 cat >>confdefs.h <<_ACEOF
2668 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2669 _ACEOF
2671 cat >>confdefs.h <<_ACEOF
2672 #define PACKAGE_URL "$PACKAGE_URL"
2673 _ACEOF
2676 # Let the site file select an alternate cache file if it wants to.
2677 # Prefer an explicitly selected file to automatically selected ones.
2678 ac_site_file1=NONE
2679 ac_site_file2=NONE
2680 if test -n "$CONFIG_SITE"; then
2681 # We do not want a PATH search for config.site.
2682 case $CONFIG_SITE in #((
2683 -*) ac_site_file1=./$CONFIG_SITE;;
2684 */*) ac_site_file1=$CONFIG_SITE;;
2685 *) ac_site_file1=./$CONFIG_SITE;;
2686 esac
2687 elif test "x$prefix" != xNONE; then
2688 ac_site_file1=$prefix/share/config.site
2689 ac_site_file2=$prefix/etc/config.site
2690 else
2691 ac_site_file1=$ac_default_prefix/share/config.site
2692 ac_site_file2=$ac_default_prefix/etc/config.site
2694 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2696 test "x$ac_site_file" = xNONE && continue
2697 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2698 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2699 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2700 sed 's/^/| /' "$ac_site_file" >&5
2701 . "$ac_site_file" \
2702 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2703 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2704 as_fn_error $? "failed to load site script $ac_site_file
2705 See \`config.log' for more details" "$LINENO" 5; }
2707 done
2709 if test -r "$cache_file"; then
2710 # Some versions of bash will fail to source /dev/null (special files
2711 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2712 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2714 $as_echo "$as_me: loading cache $cache_file" >&6;}
2715 case $cache_file in
2716 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2717 *) . "./$cache_file";;
2718 esac
2720 else
2721 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2722 $as_echo "$as_me: creating cache $cache_file" >&6;}
2723 >$cache_file
2726 # Check that the precious variables saved in the cache have kept the same
2727 # value.
2728 ac_cache_corrupted=false
2729 for ac_var in $ac_precious_vars; do
2730 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2731 eval ac_new_set=\$ac_env_${ac_var}_set
2732 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2733 eval ac_new_val=\$ac_env_${ac_var}_value
2734 case $ac_old_set,$ac_new_set in
2735 set,)
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2737 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2738 ac_cache_corrupted=: ;;
2739 ,set)
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2741 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2742 ac_cache_corrupted=: ;;
2743 ,);;
2745 if test "x$ac_old_val" != "x$ac_new_val"; then
2746 # differences in whitespace do not lead to failure.
2747 ac_old_val_w=`echo x $ac_old_val`
2748 ac_new_val_w=`echo x $ac_new_val`
2749 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2750 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2751 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2752 ac_cache_corrupted=:
2753 else
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2755 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2756 eval $ac_var=\$ac_old_val
2758 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2759 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2761 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2762 fi;;
2763 esac
2764 # Pass precious variables to config.status.
2765 if test "$ac_new_set" = set; then
2766 case $ac_new_val in
2767 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2768 *) ac_arg=$ac_var=$ac_new_val ;;
2769 esac
2770 case " $ac_configure_args " in
2771 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2772 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2773 esac
2775 done
2776 if $ac_cache_corrupted; then
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2778 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2779 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2780 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2781 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2783 ## -------------------- ##
2784 ## Main body of script. ##
2785 ## -------------------- ##
2787 ac_ext=c
2788 ac_cpp='$CPP $CPPFLAGS'
2789 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2790 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2791 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2798 ac_aux_dir=
2799 for ac_dir in config "$srcdir"/config; do
2800 if test -f "$ac_dir/install-sh"; then
2801 ac_aux_dir=$ac_dir
2802 ac_install_sh="$ac_aux_dir/install-sh -c"
2803 break
2804 elif test -f "$ac_dir/install.sh"; then
2805 ac_aux_dir=$ac_dir
2806 ac_install_sh="$ac_aux_dir/install.sh -c"
2807 break
2808 elif test -f "$ac_dir/shtool"; then
2809 ac_aux_dir=$ac_dir
2810 ac_install_sh="$ac_aux_dir/shtool install -c"
2811 break
2813 done
2814 if test -z "$ac_aux_dir"; then
2815 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2818 # These three variables are undocumented and unsupported,
2819 # and are intended to be withdrawn in a future Autoconf release.
2820 # They can cause serious problems if a builder's source tree is in a directory
2821 # whose full name contains unusual characters.
2822 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2823 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2824 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2829 cat >>confdefs.h <<_ACEOF
2830 #define CONFIGURE_ARGS "$ac_configure_args"
2831 _ACEOF
2834 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2835 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2836 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2839 cat >>confdefs.h <<_ACEOF
2840 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2841 _ACEOF
2844 cat >>confdefs.h <<_ACEOF
2845 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2846 _ACEOF
2849 cat >>confdefs.h <<_ACEOF
2850 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2851 _ACEOF
2857 # Check whether --with-extra-version was given.
2858 if test "${with_extra_version+set}" = set; then :
2859 withval=$with_extra_version;
2860 case $withval in
2861 yes)
2862 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2865 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2868 PG_VERSION="$PACKAGE_VERSION$withval"
2870 esac
2872 else
2873 PG_VERSION="$PACKAGE_VERSION"
2878 cat >>confdefs.h <<_ACEOF
2879 #define PG_VERSION "$PG_VERSION"
2880 _ACEOF
2883 # Make sure we can run config.sub.
2884 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2885 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2888 $as_echo_n "checking build system type... " >&6; }
2889 if ${ac_cv_build+:} false; then :
2890 $as_echo_n "(cached) " >&6
2891 else
2892 ac_build_alias=$build_alias
2893 test "x$ac_build_alias" = x &&
2894 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2895 test "x$ac_build_alias" = x &&
2896 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2897 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2898 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2902 $as_echo "$ac_cv_build" >&6; }
2903 case $ac_cv_build in
2904 *-*-*) ;;
2905 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2906 esac
2907 build=$ac_cv_build
2908 ac_save_IFS=$IFS; IFS='-'
2909 set x $ac_cv_build
2910 shift
2911 build_cpu=$1
2912 build_vendor=$2
2913 shift; shift
2914 # Remember, the first character of IFS is used to create $*,
2915 # except with old shells:
2916 build_os=$*
2917 IFS=$ac_save_IFS
2918 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2922 $as_echo_n "checking host system type... " >&6; }
2923 if ${ac_cv_host+:} false; then :
2924 $as_echo_n "(cached) " >&6
2925 else
2926 if test "x$host_alias" = x; then
2927 ac_cv_host=$ac_cv_build
2928 else
2929 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2930 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2935 $as_echo "$ac_cv_host" >&6; }
2936 case $ac_cv_host in
2937 *-*-*) ;;
2938 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2939 esac
2940 host=$ac_cv_host
2941 ac_save_IFS=$IFS; IFS='-'
2942 set x $ac_cv_host
2943 shift
2944 host_cpu=$1
2945 host_vendor=$2
2946 shift; shift
2947 # Remember, the first character of IFS is used to create $*,
2948 # except with old shells:
2949 host_os=$*
2950 IFS=$ac_save_IFS
2951 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2955 template=
2956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2957 $as_echo_n "checking which template to use... " >&6; }
2962 # Check whether --with-template was given.
2963 if test "${with_template+set}" = set; then :
2964 withval=$with_template;
2965 case $withval in
2966 yes)
2967 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2970 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2974 case $withval in
2975 list) echo; ls "$srcdir/src/template"; exit;;
2976 *) if test -f "$srcdir/src/template/$with_template" ; then
2977 template=$withval
2978 else
2979 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2980 fi;;
2981 esac
2984 esac
2986 else
2988 # --with-template not given
2990 case $host_os in
2991 cygwin*|msys*) template=cygwin ;;
2992 darwin*) template=darwin ;;
2993 dragonfly*) template=netbsd ;;
2994 freebsd*) template=freebsd ;;
2995 linux*|gnu*|k*bsd*-gnu)
2996 template=linux ;;
2997 mingw*) template=win32 ;;
2998 netbsd*) template=netbsd ;;
2999 openbsd*) template=openbsd ;;
3000 solaris*) template=solaris ;;
3001 esac
3003 if test x"$template" = x"" ; then
3004 as_fn_error $? "
3005 *******************************************************************
3006 PostgreSQL has apparently not been ported to your platform yet.
3007 To try a manual configuration, look into the src/template directory
3008 for a similar platform and use the '--with-template=' option.
3010 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
3011 rectifying this. Include the above 'checking host system type...'
3012 line.
3013 *******************************************************************
3014 " "$LINENO" 5
3022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3023 $as_echo "$template" >&6; }
3025 PORTNAME=$template
3028 # Initialize default assumption that we do not need separate assembly code
3029 # for TAS (test-and-set). This can be overridden by the template file
3030 # when it's executed.
3031 need_tas=no
3032 tas_file=dummy.s
3034 # Default, works for most platforms, override in template file if needed
3035 DLSUFFIX=".so"
3040 ## Command line options
3044 # Add non-standard directories to the include path
3049 # Check whether --with-includes was given.
3050 if test "${with_includes+set}" = set; then :
3051 withval=$with_includes;
3052 case $withval in
3053 yes)
3054 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3057 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3062 esac
3070 # Add non-standard directories to the library search path
3075 # Check whether --with-libraries was given.
3076 if test "${with_libraries+set}" = set; then :
3077 withval=$with_libraries;
3078 case $withval in
3079 yes)
3080 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3083 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3086 LIBRARY_DIRS=$withval
3088 esac
3097 # Check whether --with-libs was given.
3098 if test "${with_libs+set}" = set; then :
3099 withval=$with_libs;
3100 case $withval in
3101 yes)
3102 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3105 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3108 LIBRARY_DIRS=$withval
3110 esac
3118 # 64-bit integer date/time storage is now the only option, but to avoid
3119 # unnecessary breakage of build scripts, continue to accept an explicit
3120 # "--enable-integer-datetimes" switch.
3124 # Check whether --enable-integer-datetimes was given.
3125 if test "${enable_integer_datetimes+set}" = set; then :
3126 enableval=$enable_integer_datetimes;
3127 case $enableval in
3128 yes)
3132 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3135 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3137 esac
3139 else
3140 enable_integer_datetimes=yes
3148 # NLS
3150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3151 $as_echo_n "checking whether NLS is wanted... " >&6; }
3154 # Check whether --enable-nls was given.
3155 if test "${enable_nls+set}" = set; then :
3156 enableval=$enable_nls;
3157 case $enableval in
3158 yes)
3165 enable_nls=yes
3166 WANTED_LANGUAGES=$enableval
3168 esac
3170 else
3171 enable_nls=no
3176 if test "$enable_nls" = yes; then
3178 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3183 $as_echo "$enable_nls" >&6; }
3188 # Default port number (--with-pgport), default 5432
3190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3191 $as_echo_n "checking for default port number... " >&6; }
3195 # Check whether --with-pgport was given.
3196 if test "${with_pgport+set}" = set; then :
3197 withval=$with_pgport;
3198 case $withval in
3199 yes)
3200 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3203 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3206 default_port=$withval
3208 esac
3210 else
3211 default_port=5432
3215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3216 $as_echo "$default_port" >&6; }
3217 # Need both of these because some places want an integer and some a string
3219 cat >>confdefs.h <<_ACEOF
3220 #define DEF_PGPORT ${default_port}
3221 _ACEOF
3224 cat >>confdefs.h <<_ACEOF
3225 #define DEF_PGPORT_STR "${default_port}"
3226 _ACEOF
3230 # It's worth validating port; you can get very confusing errors otherwise
3231 if test x"$default_port" = x""; then
3232 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3233 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3234 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3235 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3236 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3237 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3238 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3242 # '-rpath'-like feature can be disabled
3246 # Check whether --enable-rpath was given.
3247 if test "${enable_rpath+set}" = set; then :
3248 enableval=$enable_rpath;
3249 case $enableval in
3250 yes)
3257 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3259 esac
3261 else
3262 enable_rpath=yes
3270 # Spinlocks
3274 # Check whether --enable-spinlocks was given.
3275 if test "${enable_spinlocks+set}" = set; then :
3276 enableval=$enable_spinlocks;
3277 case $enableval in
3278 yes)
3285 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3287 esac
3289 else
3290 enable_spinlocks=yes
3297 # Atomic operations
3301 # Check whether --enable-atomics was given.
3302 if test "${enable_atomics+set}" = set; then :
3303 enableval=$enable_atomics;
3304 case $enableval in
3305 yes)
3312 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3314 esac
3316 else
3317 enable_atomics=yes
3324 # --enable-debug adds -g to compiler flags
3328 # Check whether --enable-debug was given.
3329 if test "${enable_debug+set}" = set; then :
3330 enableval=$enable_debug;
3331 case $enableval in
3332 yes)
3339 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3341 esac
3343 else
3344 enable_debug=no
3352 # --enable-profiling enables gcc profiling
3356 # Check whether --enable-profiling was given.
3357 if test "${enable_profiling+set}" = set; then :
3358 enableval=$enable_profiling;
3359 case $enableval in
3360 yes)
3367 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3369 esac
3371 else
3372 enable_profiling=no
3379 # --enable-coverage enables generation of code coverage metrics with gcov
3383 # Check whether --enable-coverage was given.
3384 if test "${enable_coverage+set}" = set; then :
3385 enableval=$enable_coverage;
3386 case $enableval in
3387 yes)
3388 if test -z "$GCOV"; then
3389 for ac_prog in gcov
3391 # Extract the first word of "$ac_prog", so it can be a program name with args.
3392 set dummy $ac_prog; ac_word=$2
3393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3394 $as_echo_n "checking for $ac_word... " >&6; }
3395 if ${ac_cv_path_GCOV+:} false; then :
3396 $as_echo_n "(cached) " >&6
3397 else
3398 case $GCOV in
3399 [\\/]* | ?:[\\/]*)
3400 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3403 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3404 for as_dir in $PATH
3406 IFS=$as_save_IFS
3407 test -z "$as_dir" && as_dir=.
3408 for ac_exec_ext in '' $ac_executable_extensions; do
3409 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3410 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3411 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3412 break 2
3414 done
3415 done
3416 IFS=$as_save_IFS
3419 esac
3421 GCOV=$ac_cv_path_GCOV
3422 if test -n "$GCOV"; then
3423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3424 $as_echo "$GCOV" >&6; }
3425 else
3426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3427 $as_echo "no" >&6; }
3431 test -n "$GCOV" && break
3432 done
3434 else
3435 # Report the value of GCOV in configure's output in all cases.
3436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3437 $as_echo_n "checking for GCOV... " >&6; }
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3439 $as_echo "$GCOV" >&6; }
3442 if test -z "$GCOV"; then
3443 as_fn_error $? "gcov not found" "$LINENO" 5
3445 if test -z "$LCOV"; then
3446 for ac_prog in lcov
3448 # Extract the first word of "$ac_prog", so it can be a program name with args.
3449 set dummy $ac_prog; ac_word=$2
3450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3451 $as_echo_n "checking for $ac_word... " >&6; }
3452 if ${ac_cv_path_LCOV+:} false; then :
3453 $as_echo_n "(cached) " >&6
3454 else
3455 case $LCOV in
3456 [\\/]* | ?:[\\/]*)
3457 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3461 for as_dir in $PATH
3463 IFS=$as_save_IFS
3464 test -z "$as_dir" && as_dir=.
3465 for ac_exec_ext in '' $ac_executable_extensions; do
3466 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3467 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3468 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3469 break 2
3471 done
3472 done
3473 IFS=$as_save_IFS
3476 esac
3478 LCOV=$ac_cv_path_LCOV
3479 if test -n "$LCOV"; then
3480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3481 $as_echo "$LCOV" >&6; }
3482 else
3483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3484 $as_echo "no" >&6; }
3488 test -n "$LCOV" && break
3489 done
3491 else
3492 # Report the value of LCOV in configure's output in all cases.
3493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3494 $as_echo_n "checking for LCOV... " >&6; }
3495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3496 $as_echo "$LCOV" >&6; }
3499 if test -z "$LCOV"; then
3500 as_fn_error $? "lcov not found" "$LINENO" 5
3502 if test -z "$GENHTML"; then
3503 for ac_prog in genhtml
3505 # Extract the first word of "$ac_prog", so it can be a program name with args.
3506 set dummy $ac_prog; ac_word=$2
3507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3508 $as_echo_n "checking for $ac_word... " >&6; }
3509 if ${ac_cv_path_GENHTML+:} false; then :
3510 $as_echo_n "(cached) " >&6
3511 else
3512 case $GENHTML in
3513 [\\/]* | ?:[\\/]*)
3514 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3518 for as_dir in $PATH
3520 IFS=$as_save_IFS
3521 test -z "$as_dir" && as_dir=.
3522 for ac_exec_ext in '' $ac_executable_extensions; do
3523 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3524 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3525 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3526 break 2
3528 done
3529 done
3530 IFS=$as_save_IFS
3533 esac
3535 GENHTML=$ac_cv_path_GENHTML
3536 if test -n "$GENHTML"; then
3537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3538 $as_echo "$GENHTML" >&6; }
3539 else
3540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3541 $as_echo "no" >&6; }
3545 test -n "$GENHTML" && break
3546 done
3548 else
3549 # Report the value of GENHTML in configure's output in all cases.
3550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3551 $as_echo_n "checking for GENHTML... " >&6; }
3552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3553 $as_echo "$GENHTML" >&6; }
3556 if test -z "$GENHTML"; then
3557 as_fn_error $? "genhtml not found" "$LINENO" 5
3564 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3566 esac
3568 else
3569 enable_coverage=no
3577 # DTrace
3581 # Check whether --enable-dtrace was given.
3582 if test "${enable_dtrace+set}" = set; then :
3583 enableval=$enable_dtrace;
3584 case $enableval in
3585 yes)
3586 if test -z "$DTRACE"; then
3587 for ac_prog in dtrace
3589 # Extract the first word of "$ac_prog", so it can be a program name with args.
3590 set dummy $ac_prog; ac_word=$2
3591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3592 $as_echo_n "checking for $ac_word... " >&6; }
3593 if ${ac_cv_path_DTRACE+:} false; then :
3594 $as_echo_n "(cached) " >&6
3595 else
3596 case $DTRACE in
3597 [\\/]* | ?:[\\/]*)
3598 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3601 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3602 for as_dir in $PATH
3604 IFS=$as_save_IFS
3605 test -z "$as_dir" && as_dir=.
3606 for ac_exec_ext in '' $ac_executable_extensions; do
3607 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3608 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3609 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3610 break 2
3612 done
3613 done
3614 IFS=$as_save_IFS
3617 esac
3619 DTRACE=$ac_cv_path_DTRACE
3620 if test -n "$DTRACE"; then
3621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3622 $as_echo "$DTRACE" >&6; }
3623 else
3624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3625 $as_echo "no" >&6; }
3629 test -n "$DTRACE" && break
3630 done
3632 else
3633 # Report the value of DTRACE in configure's output in all cases.
3634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3635 $as_echo_n "checking for DTRACE... " >&6; }
3636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3637 $as_echo "$DTRACE" >&6; }
3640 if test -z "$DTRACE"; then
3641 as_fn_error $? "dtrace not found" "$LINENO" 5
3649 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3651 esac
3653 else
3654 enable_dtrace=no
3662 # TAP tests
3666 # Check whether --enable-tap-tests was given.
3667 if test "${enable_tap_tests+set}" = set; then :
3668 enableval=$enable_tap_tests;
3669 case $enableval in
3670 yes)
3677 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3679 esac
3681 else
3682 enable_tap_tests=no
3690 # Injection points
3694 # Check whether --enable-injection-points was given.
3695 if test "${enable_injection_points+set}" = set; then :
3696 enableval=$enable_injection_points;
3697 case $enableval in
3698 yes)
3700 $as_echo "#define USE_INJECTION_POINTS 1" >>confdefs.h
3707 as_fn_error $? "no argument expected for --enable-injection-points option" "$LINENO" 5
3709 esac
3711 else
3712 enable_injection_points=no
3720 # Block size
3722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3723 $as_echo_n "checking for block size... " >&6; }
3727 # Check whether --with-blocksize was given.
3728 if test "${with_blocksize+set}" = set; then :
3729 withval=$with_blocksize;
3730 case $withval in
3731 yes)
3732 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3735 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3738 blocksize=$withval
3740 esac
3742 else
3743 blocksize=8
3747 case ${blocksize} in
3748 1) BLCKSZ=1024;;
3749 2) BLCKSZ=2048;;
3750 4) BLCKSZ=4096;;
3751 8) BLCKSZ=8192;;
3752 16) BLCKSZ=16384;;
3753 32) BLCKSZ=32768;;
3754 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3755 esac
3756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3757 $as_echo "${blocksize}kB" >&6; }
3760 cat >>confdefs.h <<_ACEOF
3761 #define BLCKSZ ${BLCKSZ}
3762 _ACEOF
3766 # Relation segment size
3771 # Check whether --with-segsize was given.
3772 if test "${with_segsize+set}" = set; then :
3773 withval=$with_segsize;
3774 case $withval in
3775 yes)
3776 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3779 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3782 segsize=$withval
3784 esac
3786 else
3787 segsize=1
3794 # Check whether --with-segsize-blocks was given.
3795 if test "${with_segsize_blocks+set}" = set; then :
3796 withval=$with_segsize_blocks;
3797 case $withval in
3798 yes)
3799 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3802 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3805 segsize_blocks=$withval
3807 esac
3809 else
3810 segsize_blocks=0
3815 # If --with-segsize-blocks is non-zero, it is used, --with-segsize
3816 # otherwise. segsize-blocks is only really useful for developers wanting to
3817 # test segment related code. Warn if both are used.
3818 if test $segsize_blocks -ne 0 -a $segsize -ne 1; then
3819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&5
3820 $as_echo "$as_me: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&2;}
3823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3824 $as_echo_n "checking for segment size... " >&6; }
3825 if test $segsize_blocks -eq 0; then
3826 # this expression is set up to avoid unnecessary integer overflow
3827 # blocksize is already guaranteed to be a factor of 1024
3828 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3829 test $? -eq 0 || exit 1
3830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3831 $as_echo "${segsize}GB" >&6; }
3832 else
3833 RELSEG_SIZE=$segsize_blocks
3834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${RELSEG_SIZE} blocks" >&5
3835 $as_echo "${RELSEG_SIZE} blocks" >&6; }
3839 cat >>confdefs.h <<_ACEOF
3840 #define RELSEG_SIZE ${RELSEG_SIZE}
3841 _ACEOF
3845 # WAL block size
3847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3848 $as_echo_n "checking for WAL block size... " >&6; }
3852 # Check whether --with-wal-blocksize was given.
3853 if test "${with_wal_blocksize+set}" = set; then :
3854 withval=$with_wal_blocksize;
3855 case $withval in
3856 yes)
3857 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3860 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3863 wal_blocksize=$withval
3865 esac
3867 else
3868 wal_blocksize=8
3872 case ${wal_blocksize} in
3873 1) XLOG_BLCKSZ=1024;;
3874 2) XLOG_BLCKSZ=2048;;
3875 4) XLOG_BLCKSZ=4096;;
3876 8) XLOG_BLCKSZ=8192;;
3877 16) XLOG_BLCKSZ=16384;;
3878 32) XLOG_BLCKSZ=32768;;
3879 64) XLOG_BLCKSZ=65536;;
3880 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3881 esac
3882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3883 $as_echo "${wal_blocksize}kB" >&6; }
3886 cat >>confdefs.h <<_ACEOF
3887 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3888 _ACEOF
3892 # C compiler
3895 # If you don't specify a list of compilers to test, the AC_PROG_CC and
3896 # AC_PROG_CXX macros test for a long list of unsupported compilers.
3897 pgac_cc_list="gcc cc"
3898 pgac_cxx_list="g++ c++"
3900 ac_ext=c
3901 ac_cpp='$CPP $CPPFLAGS'
3902 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3903 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3904 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3905 if test -n "$ac_tool_prefix"; then
3906 for ac_prog in $pgac_cc_list
3908 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3909 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3911 $as_echo_n "checking for $ac_word... " >&6; }
3912 if ${ac_cv_prog_CC+:} false; then :
3913 $as_echo_n "(cached) " >&6
3914 else
3915 if test -n "$CC"; then
3916 ac_cv_prog_CC="$CC" # Let the user override the test.
3917 else
3918 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3919 for as_dir in $PATH
3921 IFS=$as_save_IFS
3922 test -z "$as_dir" && as_dir=.
3923 for ac_exec_ext in '' $ac_executable_extensions; do
3924 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3925 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3926 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3927 break 2
3929 done
3930 done
3931 IFS=$as_save_IFS
3935 CC=$ac_cv_prog_CC
3936 if test -n "$CC"; then
3937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3938 $as_echo "$CC" >&6; }
3939 else
3940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3941 $as_echo "no" >&6; }
3945 test -n "$CC" && break
3946 done
3948 if test -z "$CC"; then
3949 ac_ct_CC=$CC
3950 for ac_prog in $pgac_cc_list
3952 # Extract the first word of "$ac_prog", so it can be a program name with args.
3953 set dummy $ac_prog; ac_word=$2
3954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3955 $as_echo_n "checking for $ac_word... " >&6; }
3956 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3957 $as_echo_n "(cached) " >&6
3958 else
3959 if test -n "$ac_ct_CC"; then
3960 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3961 else
3962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3963 for as_dir in $PATH
3965 IFS=$as_save_IFS
3966 test -z "$as_dir" && as_dir=.
3967 for ac_exec_ext in '' $ac_executable_extensions; do
3968 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3969 ac_cv_prog_ac_ct_CC="$ac_prog"
3970 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3971 break 2
3973 done
3974 done
3975 IFS=$as_save_IFS
3979 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3980 if test -n "$ac_ct_CC"; then
3981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3982 $as_echo "$ac_ct_CC" >&6; }
3983 else
3984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3985 $as_echo "no" >&6; }
3989 test -n "$ac_ct_CC" && break
3990 done
3992 if test "x$ac_ct_CC" = x; then
3993 CC=""
3994 else
3995 case $cross_compiling:$ac_tool_warned in
3996 yes:)
3997 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3998 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3999 ac_tool_warned=yes ;;
4000 esac
4001 CC=$ac_ct_CC
4006 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4007 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4008 as_fn_error $? "no acceptable C compiler found in \$PATH
4009 See \`config.log' for more details" "$LINENO" 5; }
4011 # Provide some information about the compiler.
4012 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4013 set X $ac_compile
4014 ac_compiler=$2
4015 for ac_option in --version -v -V -qversion; do
4016 { { ac_try="$ac_compiler $ac_option >&5"
4017 case "(($ac_try" in
4018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4019 *) ac_try_echo=$ac_try;;
4020 esac
4021 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4022 $as_echo "$ac_try_echo"; } >&5
4023 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4024 ac_status=$?
4025 if test -s conftest.err; then
4026 sed '10a\
4027 ... rest of stderr output deleted ...
4028 10q' conftest.err >conftest.er1
4029 cat conftest.er1 >&5
4031 rm -f conftest.er1 conftest.err
4032 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4033 test $ac_status = 0; }
4034 done
4036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4037 /* end confdefs.h. */
4040 main ()
4044 return 0;
4046 _ACEOF
4047 ac_clean_files_save=$ac_clean_files
4048 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4049 # Try to create an executable without -o first, disregard a.out.
4050 # It will help us diagnose broken compilers, and finding out an intuition
4051 # of exeext.
4052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4053 $as_echo_n "checking whether the C compiler works... " >&6; }
4054 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4056 # The possible output files:
4057 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4059 ac_rmfiles=
4060 for ac_file in $ac_files
4062 case $ac_file in
4063 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4064 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4065 esac
4066 done
4067 rm -f $ac_rmfiles
4069 if { { ac_try="$ac_link_default"
4070 case "(($ac_try" in
4071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4072 *) ac_try_echo=$ac_try;;
4073 esac
4074 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4075 $as_echo "$ac_try_echo"; } >&5
4076 (eval "$ac_link_default") 2>&5
4077 ac_status=$?
4078 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4079 test $ac_status = 0; }; then :
4080 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4081 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4082 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4083 # so that the user can short-circuit this test for compilers unknown to
4084 # Autoconf.
4085 for ac_file in $ac_files ''
4087 test -f "$ac_file" || continue
4088 case $ac_file in
4089 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4091 [ab].out )
4092 # We found the default executable, but exeext='' is most
4093 # certainly right.
4094 break;;
4095 *.* )
4096 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4097 then :; else
4098 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4100 # We set ac_cv_exeext here because the later test for it is not
4101 # safe: cross compilers may not add the suffix if given an `-o'
4102 # argument, so we may need to know it at that point already.
4103 # Even if this section looks crufty: it has the advantage of
4104 # actually working.
4105 break;;
4107 break;;
4108 esac
4109 done
4110 test "$ac_cv_exeext" = no && ac_cv_exeext=
4112 else
4113 ac_file=''
4115 if test -z "$ac_file"; then :
4116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4117 $as_echo "no" >&6; }
4118 $as_echo "$as_me: failed program was:" >&5
4119 sed 's/^/| /' conftest.$ac_ext >&5
4121 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4122 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4123 as_fn_error 77 "C compiler cannot create executables
4124 See \`config.log' for more details" "$LINENO" 5; }
4125 else
4126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4127 $as_echo "yes" >&6; }
4129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4130 $as_echo_n "checking for C compiler default output file name... " >&6; }
4131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4132 $as_echo "$ac_file" >&6; }
4133 ac_exeext=$ac_cv_exeext
4135 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4136 ac_clean_files=$ac_clean_files_save
4137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4138 $as_echo_n "checking for suffix of executables... " >&6; }
4139 if { { ac_try="$ac_link"
4140 case "(($ac_try" in
4141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4142 *) ac_try_echo=$ac_try;;
4143 esac
4144 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4145 $as_echo "$ac_try_echo"; } >&5
4146 (eval "$ac_link") 2>&5
4147 ac_status=$?
4148 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4149 test $ac_status = 0; }; then :
4150 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4151 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4152 # work properly (i.e., refer to `conftest.exe'), while it won't with
4153 # `rm'.
4154 for ac_file in conftest.exe conftest conftest.*; do
4155 test -f "$ac_file" || continue
4156 case $ac_file in
4157 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4158 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4159 break;;
4160 * ) break;;
4161 esac
4162 done
4163 else
4164 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4165 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4166 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4167 See \`config.log' for more details" "$LINENO" 5; }
4169 rm -f conftest conftest$ac_cv_exeext
4170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4171 $as_echo "$ac_cv_exeext" >&6; }
4173 rm -f conftest.$ac_ext
4174 EXEEXT=$ac_cv_exeext
4175 ac_exeext=$EXEEXT
4176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4177 /* end confdefs.h. */
4178 #include <stdio.h>
4180 main ()
4182 FILE *f = fopen ("conftest.out", "w");
4183 return ferror (f) || fclose (f) != 0;
4186 return 0;
4188 _ACEOF
4189 ac_clean_files="$ac_clean_files conftest.out"
4190 # Check that the compiler produces executables we can run. If not, either
4191 # the compiler is broken, or we cross compile.
4192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4193 $as_echo_n "checking whether we are cross compiling... " >&6; }
4194 if test "$cross_compiling" != yes; then
4195 { { ac_try="$ac_link"
4196 case "(($ac_try" in
4197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4198 *) ac_try_echo=$ac_try;;
4199 esac
4200 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4201 $as_echo "$ac_try_echo"; } >&5
4202 (eval "$ac_link") 2>&5
4203 ac_status=$?
4204 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4205 test $ac_status = 0; }
4206 if { ac_try='./conftest$ac_cv_exeext'
4207 { { case "(($ac_try" in
4208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4209 *) ac_try_echo=$ac_try;;
4210 esac
4211 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4212 $as_echo "$ac_try_echo"; } >&5
4213 (eval "$ac_try") 2>&5
4214 ac_status=$?
4215 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4216 test $ac_status = 0; }; }; then
4217 cross_compiling=no
4218 else
4219 if test "$cross_compiling" = maybe; then
4220 cross_compiling=yes
4221 else
4222 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4223 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4224 as_fn_error $? "cannot run C compiled programs.
4225 If you meant to cross compile, use \`--host'.
4226 See \`config.log' for more details" "$LINENO" 5; }
4230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4231 $as_echo "$cross_compiling" >&6; }
4233 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4234 ac_clean_files=$ac_clean_files_save
4235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4236 $as_echo_n "checking for suffix of object files... " >&6; }
4237 if ${ac_cv_objext+:} false; then :
4238 $as_echo_n "(cached) " >&6
4239 else
4240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4241 /* end confdefs.h. */
4244 main ()
4248 return 0;
4250 _ACEOF
4251 rm -f conftest.o conftest.obj
4252 if { { ac_try="$ac_compile"
4253 case "(($ac_try" in
4254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4255 *) ac_try_echo=$ac_try;;
4256 esac
4257 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4258 $as_echo "$ac_try_echo"; } >&5
4259 (eval "$ac_compile") 2>&5
4260 ac_status=$?
4261 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4262 test $ac_status = 0; }; then :
4263 for ac_file in conftest.o conftest.obj conftest.*; do
4264 test -f "$ac_file" || continue;
4265 case $ac_file in
4266 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4267 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4268 break;;
4269 esac
4270 done
4271 else
4272 $as_echo "$as_me: failed program was:" >&5
4273 sed 's/^/| /' conftest.$ac_ext >&5
4275 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4276 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4277 as_fn_error $? "cannot compute suffix of object files: cannot compile
4278 See \`config.log' for more details" "$LINENO" 5; }
4280 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4283 $as_echo "$ac_cv_objext" >&6; }
4284 OBJEXT=$ac_cv_objext
4285 ac_objext=$OBJEXT
4286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4287 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4288 if ${ac_cv_c_compiler_gnu+:} false; then :
4289 $as_echo_n "(cached) " >&6
4290 else
4291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4292 /* end confdefs.h. */
4295 main ()
4297 #ifndef __GNUC__
4298 choke me
4299 #endif
4302 return 0;
4304 _ACEOF
4305 if ac_fn_c_try_compile "$LINENO"; then :
4306 ac_compiler_gnu=yes
4307 else
4308 ac_compiler_gnu=no
4310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4311 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4315 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4316 if test $ac_compiler_gnu = yes; then
4317 GCC=yes
4318 else
4319 GCC=
4321 ac_test_CFLAGS=${CFLAGS+set}
4322 ac_save_CFLAGS=$CFLAGS
4323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4324 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4325 if ${ac_cv_prog_cc_g+:} false; then :
4326 $as_echo_n "(cached) " >&6
4327 else
4328 ac_save_c_werror_flag=$ac_c_werror_flag
4329 ac_c_werror_flag=yes
4330 ac_cv_prog_cc_g=no
4331 CFLAGS="-g"
4332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4333 /* end confdefs.h. */
4336 main ()
4340 return 0;
4342 _ACEOF
4343 if ac_fn_c_try_compile "$LINENO"; then :
4344 ac_cv_prog_cc_g=yes
4345 else
4346 CFLAGS=""
4347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4348 /* end confdefs.h. */
4351 main ()
4355 return 0;
4357 _ACEOF
4358 if ac_fn_c_try_compile "$LINENO"; then :
4360 else
4361 ac_c_werror_flag=$ac_save_c_werror_flag
4362 CFLAGS="-g"
4363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4364 /* end confdefs.h. */
4367 main ()
4371 return 0;
4373 _ACEOF
4374 if ac_fn_c_try_compile "$LINENO"; then :
4375 ac_cv_prog_cc_g=yes
4377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4381 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4382 ac_c_werror_flag=$ac_save_c_werror_flag
4384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4385 $as_echo "$ac_cv_prog_cc_g" >&6; }
4386 if test "$ac_test_CFLAGS" = set; then
4387 CFLAGS=$ac_save_CFLAGS
4388 elif test $ac_cv_prog_cc_g = yes; then
4389 if test "$GCC" = yes; then
4390 CFLAGS="-g -O2"
4391 else
4392 CFLAGS="-g"
4394 else
4395 if test "$GCC" = yes; then
4396 CFLAGS="-O2"
4397 else
4398 CFLAGS=
4401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4402 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4403 if ${ac_cv_prog_cc_c89+:} false; then :
4404 $as_echo_n "(cached) " >&6
4405 else
4406 ac_cv_prog_cc_c89=no
4407 ac_save_CC=$CC
4408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4409 /* end confdefs.h. */
4410 #include <stdarg.h>
4411 #include <stdio.h>
4412 struct stat;
4413 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4414 struct buf { int x; };
4415 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4416 static char *e (p, i)
4417 char **p;
4418 int i;
4420 return p[i];
4422 static char *f (char * (*g) (char **, int), char **p, ...)
4424 char *s;
4425 va_list v;
4426 va_start (v,p);
4427 s = g (p, va_arg (v,int));
4428 va_end (v);
4429 return s;
4432 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4433 function prototypes and stuff, but not '\xHH' hex character constants.
4434 These don't provoke an error unfortunately, instead are silently treated
4435 as 'x'. The following induces an error, until -std is added to get
4436 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4437 array size at least. It's necessary to write '\x00'==0 to get something
4438 that's true only with -std. */
4439 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4441 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4442 inside strings and character constants. */
4443 #define FOO(x) 'x'
4444 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4446 int test (int i, double x);
4447 struct s1 {int (*f) (int a);};
4448 struct s2 {int (*f) (double a);};
4449 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4450 int argc;
4451 char **argv;
4453 main ()
4455 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4457 return 0;
4459 _ACEOF
4460 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4461 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4463 CC="$ac_save_CC $ac_arg"
4464 if ac_fn_c_try_compile "$LINENO"; then :
4465 ac_cv_prog_cc_c89=$ac_arg
4467 rm -f core conftest.err conftest.$ac_objext
4468 test "x$ac_cv_prog_cc_c89" != "xno" && break
4469 done
4470 rm -f conftest.$ac_ext
4471 CC=$ac_save_CC
4474 # AC_CACHE_VAL
4475 case "x$ac_cv_prog_cc_c89" in
4477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4478 $as_echo "none needed" >&6; } ;;
4479 xno)
4480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4481 $as_echo "unsupported" >&6; } ;;
4483 CC="$CC $ac_cv_prog_cc_c89"
4484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4485 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4486 esac
4487 if test "x$ac_cv_prog_cc_c89" != xno; then :
4491 ac_ext=c
4492 ac_cpp='$CPP $CPPFLAGS'
4493 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4494 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4495 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4498 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4499 if ${ac_cv_prog_cc_c99+:} false; then :
4500 $as_echo_n "(cached) " >&6
4501 else
4502 ac_cv_prog_cc_c99=no
4503 ac_save_CC=$CC
4504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4505 /* end confdefs.h. */
4506 #include <stdarg.h>
4507 #include <stdbool.h>
4508 #include <stdlib.h>
4509 #include <wchar.h>
4510 #include <stdio.h>
4512 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4513 #define debug(...) fprintf (stderr, __VA_ARGS__)
4514 #define showlist(...) puts (#__VA_ARGS__)
4515 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4516 static void
4517 test_varargs_macros (void)
4519 int x = 1234;
4520 int y = 5678;
4521 debug ("Flag");
4522 debug ("X = %d\n", x);
4523 showlist (The first, second, and third items.);
4524 report (x>y, "x is %d but y is %d", x, y);
4527 // Check long long types.
4528 #define BIG64 18446744073709551615ull
4529 #define BIG32 4294967295ul
4530 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4531 #if !BIG_OK
4532 your preprocessor is broken;
4533 #endif
4534 #if BIG_OK
4535 #else
4536 your preprocessor is broken;
4537 #endif
4538 static long long int bignum = -9223372036854775807LL;
4539 static unsigned long long int ubignum = BIG64;
4541 struct incomplete_array
4543 int datasize;
4544 double data[];
4547 struct named_init {
4548 int number;
4549 const wchar_t *name;
4550 double average;
4553 typedef const char *ccp;
4555 static inline int
4556 test_restrict (ccp restrict text)
4558 // See if C++-style comments work.
4559 // Iterate through items via the restricted pointer.
4560 // Also check for declarations in for loops.
4561 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4562 continue;
4563 return 0;
4566 // Check varargs and va_copy.
4567 static void
4568 test_varargs (const char *format, ...)
4570 va_list args;
4571 va_start (args, format);
4572 va_list args_copy;
4573 va_copy (args_copy, args);
4575 const char *str;
4576 int number;
4577 float fnumber;
4579 while (*format)
4581 switch (*format++)
4583 case 's': // string
4584 str = va_arg (args_copy, const char *);
4585 break;
4586 case 'd': // int
4587 number = va_arg (args_copy, int);
4588 break;
4589 case 'f': // float
4590 fnumber = va_arg (args_copy, double);
4591 break;
4592 default:
4593 break;
4596 va_end (args_copy);
4597 va_end (args);
4601 main ()
4604 // Check bool.
4605 _Bool success = false;
4607 // Check restrict.
4608 if (test_restrict ("String literal") == 0)
4609 success = true;
4610 char *restrict newvar = "Another string";
4612 // Check varargs.
4613 test_varargs ("s, d' f .", "string", 65, 34.234);
4614 test_varargs_macros ();
4616 // Check flexible array members.
4617 struct incomplete_array *ia =
4618 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4619 ia->datasize = 10;
4620 for (int i = 0; i < ia->datasize; ++i)
4621 ia->data[i] = i * 1.234;
4623 // Check named initializers.
4624 struct named_init ni = {
4625 .number = 34,
4626 .name = L"Test wide string",
4627 .average = 543.34343,
4630 ni.number = 58;
4632 int dynamic_array[ni.number];
4633 dynamic_array[ni.number - 1] = 543;
4635 // work around unused variable warnings
4636 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4637 || dynamic_array[ni.number - 1] != 543);
4640 return 0;
4642 _ACEOF
4643 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4645 CC="$ac_save_CC $ac_arg"
4646 if ac_fn_c_try_compile "$LINENO"; then :
4647 ac_cv_prog_cc_c99=$ac_arg
4649 rm -f core conftest.err conftest.$ac_objext
4650 test "x$ac_cv_prog_cc_c99" != "xno" && break
4651 done
4652 rm -f conftest.$ac_ext
4653 CC=$ac_save_CC
4656 # AC_CACHE_VAL
4657 case "x$ac_cv_prog_cc_c99" in
4659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4660 $as_echo "none needed" >&6; } ;;
4661 xno)
4662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4663 $as_echo "unsupported" >&6; } ;;
4665 CC="$CC $ac_cv_prog_cc_c99"
4666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4667 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4668 esac
4669 if test "x$ac_cv_prog_cc_c99" != xno; then :
4675 # Error out if the compiler does not support C99, as the codebase
4676 # relies on that.
4677 if test "$ac_cv_prog_cc_c99" = no; then
4678 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4681 ac_ext=cpp
4682 ac_cpp='$CXXCPP $CPPFLAGS'
4683 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4684 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4685 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4686 if test -z "$CXX"; then
4687 if test -n "$CCC"; then
4688 CXX=$CCC
4689 else
4690 if test -n "$ac_tool_prefix"; then
4691 for ac_prog in $pgac_cxx_list
4693 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4694 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4696 $as_echo_n "checking for $ac_word... " >&6; }
4697 if ${ac_cv_prog_CXX+:} false; then :
4698 $as_echo_n "(cached) " >&6
4699 else
4700 if test -n "$CXX"; then
4701 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4702 else
4703 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4704 for as_dir in $PATH
4706 IFS=$as_save_IFS
4707 test -z "$as_dir" && as_dir=.
4708 for ac_exec_ext in '' $ac_executable_extensions; do
4709 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4710 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4711 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4712 break 2
4714 done
4715 done
4716 IFS=$as_save_IFS
4720 CXX=$ac_cv_prog_CXX
4721 if test -n "$CXX"; then
4722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4723 $as_echo "$CXX" >&6; }
4724 else
4725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4726 $as_echo "no" >&6; }
4730 test -n "$CXX" && break
4731 done
4733 if test -z "$CXX"; then
4734 ac_ct_CXX=$CXX
4735 for ac_prog in $pgac_cxx_list
4737 # Extract the first word of "$ac_prog", so it can be a program name with args.
4738 set dummy $ac_prog; ac_word=$2
4739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4740 $as_echo_n "checking for $ac_word... " >&6; }
4741 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4742 $as_echo_n "(cached) " >&6
4743 else
4744 if test -n "$ac_ct_CXX"; then
4745 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4746 else
4747 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4748 for as_dir in $PATH
4750 IFS=$as_save_IFS
4751 test -z "$as_dir" && as_dir=.
4752 for ac_exec_ext in '' $ac_executable_extensions; do
4753 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4754 ac_cv_prog_ac_ct_CXX="$ac_prog"
4755 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4756 break 2
4758 done
4759 done
4760 IFS=$as_save_IFS
4764 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4765 if test -n "$ac_ct_CXX"; then
4766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4767 $as_echo "$ac_ct_CXX" >&6; }
4768 else
4769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4770 $as_echo "no" >&6; }
4774 test -n "$ac_ct_CXX" && break
4775 done
4777 if test "x$ac_ct_CXX" = x; then
4778 CXX="g++"
4779 else
4780 case $cross_compiling:$ac_tool_warned in
4781 yes:)
4782 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4783 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4784 ac_tool_warned=yes ;;
4785 esac
4786 CXX=$ac_ct_CXX
4792 # Provide some information about the compiler.
4793 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4794 set X $ac_compile
4795 ac_compiler=$2
4796 for ac_option in --version -v -V -qversion; do
4797 { { ac_try="$ac_compiler $ac_option >&5"
4798 case "(($ac_try" in
4799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4800 *) ac_try_echo=$ac_try;;
4801 esac
4802 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4803 $as_echo "$ac_try_echo"; } >&5
4804 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4805 ac_status=$?
4806 if test -s conftest.err; then
4807 sed '10a\
4808 ... rest of stderr output deleted ...
4809 10q' conftest.err >conftest.er1
4810 cat conftest.er1 >&5
4812 rm -f conftest.er1 conftest.err
4813 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4814 test $ac_status = 0; }
4815 done
4817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4818 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4819 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4820 $as_echo_n "(cached) " >&6
4821 else
4822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4823 /* end confdefs.h. */
4826 main ()
4828 #ifndef __GNUC__
4829 choke me
4830 #endif
4833 return 0;
4835 _ACEOF
4836 if ac_fn_cxx_try_compile "$LINENO"; then :
4837 ac_compiler_gnu=yes
4838 else
4839 ac_compiler_gnu=no
4841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4842 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4846 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4847 if test $ac_compiler_gnu = yes; then
4848 GXX=yes
4849 else
4850 GXX=
4852 ac_test_CXXFLAGS=${CXXFLAGS+set}
4853 ac_save_CXXFLAGS=$CXXFLAGS
4854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4855 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4856 if ${ac_cv_prog_cxx_g+:} false; then :
4857 $as_echo_n "(cached) " >&6
4858 else
4859 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4860 ac_cxx_werror_flag=yes
4861 ac_cv_prog_cxx_g=no
4862 CXXFLAGS="-g"
4863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4864 /* end confdefs.h. */
4867 main ()
4871 return 0;
4873 _ACEOF
4874 if ac_fn_cxx_try_compile "$LINENO"; then :
4875 ac_cv_prog_cxx_g=yes
4876 else
4877 CXXFLAGS=""
4878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4879 /* end confdefs.h. */
4882 main ()
4886 return 0;
4888 _ACEOF
4889 if ac_fn_cxx_try_compile "$LINENO"; then :
4891 else
4892 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4893 CXXFLAGS="-g"
4894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4895 /* end confdefs.h. */
4898 main ()
4902 return 0;
4904 _ACEOF
4905 if ac_fn_cxx_try_compile "$LINENO"; then :
4906 ac_cv_prog_cxx_g=yes
4908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4910 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4913 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4916 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4917 if test "$ac_test_CXXFLAGS" = set; then
4918 CXXFLAGS=$ac_save_CXXFLAGS
4919 elif test $ac_cv_prog_cxx_g = yes; then
4920 if test "$GXX" = yes; then
4921 CXXFLAGS="-g -O2"
4922 else
4923 CXXFLAGS="-g"
4925 else
4926 if test "$GXX" = yes; then
4927 CXXFLAGS="-O2"
4928 else
4929 CXXFLAGS=
4932 ac_ext=c
4933 ac_cpp='$CPP $CPPFLAGS'
4934 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4935 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4936 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4939 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4940 # but has idiosyncrasies of its own. We assume icc will define
4941 # __INTEL_COMPILER regardless of CFLAGS.
4943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4944 /* end confdefs.h. */
4947 main ()
4949 #ifndef __INTEL_COMPILER
4950 choke me
4951 #endif
4953 return 0;
4955 _ACEOF
4956 if ac_fn_c_try_compile "$LINENO"; then :
4957 ICC=yes
4958 else
4959 ICC=no
4961 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4963 # Check if it's Sun Studio compiler. We assume that
4964 # __SUNPRO_C will be defined for Sun Studio compilers
4965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4966 /* end confdefs.h. */
4969 main ()
4971 #ifndef __SUNPRO_C
4972 choke me
4973 #endif
4975 return 0;
4977 _ACEOF
4978 if ac_fn_c_try_compile "$LINENO"; then :
4979 SUN_STUDIO_CC=yes
4980 else
4981 SUN_STUDIO_CC=no
4983 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4989 # LLVM
4991 # Checked early because subsequent tests depend on it.
4995 # Check whether --with-llvm was given.
4996 if test "${with_llvm+set}" = set; then :
4997 withval=$with_llvm;
4998 case $withval in
4999 yes)
5001 $as_echo "#define USE_LLVM 1" >>confdefs.h
5008 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
5010 esac
5012 else
5013 with_llvm=no
5019 for ac_prog in gawk mawk nawk awk
5021 # Extract the first word of "$ac_prog", so it can be a program name with args.
5022 set dummy $ac_prog; ac_word=$2
5023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5024 $as_echo_n "checking for $ac_word... " >&6; }
5025 if ${ac_cv_prog_AWK+:} false; then :
5026 $as_echo_n "(cached) " >&6
5027 else
5028 if test -n "$AWK"; then
5029 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5030 else
5031 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5032 for as_dir in $PATH
5034 IFS=$as_save_IFS
5035 test -z "$as_dir" && as_dir=.
5036 for ac_exec_ext in '' $ac_executable_extensions; do
5037 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5038 ac_cv_prog_AWK="$ac_prog"
5039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5040 break 2
5042 done
5043 done
5044 IFS=$as_save_IFS
5048 AWK=$ac_cv_prog_AWK
5049 if test -n "$AWK"; then
5050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5051 $as_echo "$AWK" >&6; }
5052 else
5053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5054 $as_echo "no" >&6; }
5058 test -n "$AWK" && break
5059 done
5061 if test "$with_llvm" = yes; then :
5067 if test -z "$LLVM_CONFIG"; then
5068 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
5070 # Extract the first word of "$ac_prog", so it can be a program name with args.
5071 set dummy $ac_prog; ac_word=$2
5072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5073 $as_echo_n "checking for $ac_word... " >&6; }
5074 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5075 $as_echo_n "(cached) " >&6
5076 else
5077 case $LLVM_CONFIG in
5078 [\\/]* | ?:[\\/]*)
5079 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5082 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5083 for as_dir in $PATH
5085 IFS=$as_save_IFS
5086 test -z "$as_dir" && as_dir=.
5087 for ac_exec_ext in '' $ac_executable_extensions; do
5088 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5089 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5090 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5091 break 2
5093 done
5094 done
5095 IFS=$as_save_IFS
5098 esac
5100 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5101 if test -n "$LLVM_CONFIG"; then
5102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5103 $as_echo "$LLVM_CONFIG" >&6; }
5104 else
5105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5106 $as_echo "no" >&6; }
5110 test -n "$LLVM_CONFIG" && break
5111 done
5113 else
5114 # Report the value of LLVM_CONFIG in configure's output in all cases.
5115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5116 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5118 $as_echo "$LLVM_CONFIG" >&6; }
5122 # no point continuing if llvm wasn't found
5123 if test -z "$LLVM_CONFIG"; then
5124 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5126 # check if detected $LLVM_CONFIG is executable
5127 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5128 if test "x$pgac_llvm_version" = "xno"; then
5129 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5131 # and whether the version is supported
5132 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 10) exit 1; else exit 0;}';then
5133 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 10 is required" "$LINENO" 5
5135 { $as_echo "$as_me:${as_lineno-$LINENO}: using llvm $pgac_llvm_version" >&5
5136 $as_echo "$as_me: using llvm $pgac_llvm_version" >&6;}
5138 # need clang to create some bitcode files
5140 if test -z "$CLANG"; then
5141 for ac_prog in clang clang-17 clang-16 clang-15 clang-14 clang-13 clang-12 clang-11 clang-10
5143 # Extract the first word of "$ac_prog", so it can be a program name with args.
5144 set dummy $ac_prog; ac_word=$2
5145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5146 $as_echo_n "checking for $ac_word... " >&6; }
5147 if ${ac_cv_path_CLANG+:} false; then :
5148 $as_echo_n "(cached) " >&6
5149 else
5150 case $CLANG in
5151 [\\/]* | ?:[\\/]*)
5152 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5155 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5156 for as_dir in $PATH
5158 IFS=$as_save_IFS
5159 test -z "$as_dir" && as_dir=.
5160 for ac_exec_ext in '' $ac_executable_extensions; do
5161 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5162 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5163 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5164 break 2
5166 done
5167 done
5168 IFS=$as_save_IFS
5171 esac
5173 CLANG=$ac_cv_path_CLANG
5174 if test -n "$CLANG"; then
5175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5176 $as_echo "$CLANG" >&6; }
5177 else
5178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5179 $as_echo "no" >&6; }
5183 test -n "$CLANG" && break
5184 done
5186 else
5187 # Report the value of CLANG in configure's output in all cases.
5188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5189 $as_echo_n "checking for CLANG... " >&6; }
5190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5191 $as_echo "$CLANG" >&6; }
5194 if test -z "$CLANG"; then
5195 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5197 # make sure clang is executable
5198 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5199 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5201 # Could check clang version, but it doesn't seem that
5202 # important. Systems with a new enough LLVM version are usually
5203 # going to have a decent clang version too. It's also not entirely
5204 # clear what the minimum version is.
5206 # Collect compiler flags necessary to build the LLVM dependent
5207 # shared library.
5208 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5209 case $pgac_option in
5210 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5211 esac
5212 done
5214 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5215 case $pgac_option in
5216 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5217 esac
5218 done
5220 # ABI influencing options, standard influencing options
5221 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5222 case $pgac_option in
5223 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5224 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5225 esac
5226 done
5228 # Look for components we're interested in, collect necessary
5229 # libs. As some components are optional, we can't just list all of
5230 # them as it'd raise an error.
5231 pgac_components='';
5232 for pgac_component in `$LLVM_CONFIG --components`; do
5233 case $pgac_component in
5234 engine) pgac_components="$pgac_components $pgac_component";;
5235 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5236 orcjit) pgac_components="$pgac_components $pgac_component";;
5237 passes) pgac_components="$pgac_components $pgac_component";;
5238 native) pgac_components="$pgac_components $pgac_component";;
5239 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5240 esac
5241 done;
5243 # And then get the libraries that need to be linked in for the
5244 # selected components. They're large libraries, we only want to
5245 # link them into the LLVM using shared library.
5246 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5247 case $pgac_option in
5248 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5249 esac
5250 done
5252 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5262 fi # fi
5265 unset CFLAGS
5266 unset CXXFLAGS
5269 # Read the template
5271 . "$srcdir/src/template/$template" || exit
5273 # C[XX]FLAGS are selected so:
5274 # If the user specifies something in the environment, that is used.
5275 # else: If the template file set something, that is used.
5276 # else: If coverage was enabled, don't set anything.
5277 # else: If the compiler is GCC, then we use -O2.
5278 # else: If the compiler is something else, then we use -O, unless debugging.
5280 if test "$ac_env_CFLAGS_set" = set; then
5281 CFLAGS=$ac_env_CFLAGS_value
5282 elif test "${CFLAGS+set}" = set; then
5283 : # (keep what template set)
5284 elif test "$enable_coverage" = yes; then
5285 : # no optimization by default
5286 elif test "$GCC" = yes; then
5287 CFLAGS="-O2"
5288 else
5289 # if the user selected debug mode, don't use -O
5290 if test "$enable_debug" != yes; then
5291 CFLAGS="-O"
5295 if test "$ac_env_CXXFLAGS_set" = set; then
5296 CXXFLAGS=$ac_env_CXXFLAGS_value
5297 elif test "${CXXFLAGS+set}" = set; then
5298 : # (keep what template set)
5299 elif test "$enable_coverage" = yes; then
5300 : # no optimization by default
5301 elif test "$GCC" = yes; then
5302 CXXFLAGS="-O2"
5303 else
5304 # if the user selected debug mode, don't use -O
5305 if test "$enable_debug" != yes; then
5306 CXXFLAGS="-O"
5310 # When generating bitcode (for inlining) we always want to use -O2
5311 # even when --enable-debug is specified. The bitcode is not going to
5312 # be used for line-by-line debugging, and JIT inlining doesn't work
5313 # without at least -O1 (otherwise clang will emit 'noinline'
5314 # attributes everywhere), which is bad for testing. Still allow the
5315 # environment to override if done explicitly.
5316 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5317 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5318 else
5319 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5321 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5322 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5323 else
5324 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5327 # C[XX]FLAGS we determined above will be added back at the end
5328 user_CFLAGS=$CFLAGS
5329 CFLAGS=""
5330 user_CXXFLAGS=$CXXFLAGS
5331 CXXFLAGS=""
5332 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5333 BITCODE_CFLAGS=""
5334 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5335 BITCODE_CXXFLAGS=""
5337 # set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5338 if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5339 CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5341 if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5342 CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5345 # Some versions of GCC support some additional useful warning flags.
5346 # Check whether they are supported, and add them to CFLAGS if so.
5347 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5348 # but has its own. Also check other compiler-specific flags here.
5350 if test "$GCC" = yes -a "$ICC" = no; then
5351 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5352 CXXFLAGS="-Wall -Wpointer-arith"
5353 # These work in some but not all gcc versions
5354 save_CFLAGS=$CFLAGS
5356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5357 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5358 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5359 $as_echo_n "(cached) " >&6
5360 else
5361 pgac_save_CFLAGS=$CFLAGS
5362 pgac_save_CC=$CC
5363 CC=${CC}
5364 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5365 ac_save_c_werror_flag=$ac_c_werror_flag
5366 ac_c_werror_flag=yes
5367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5368 /* end confdefs.h. */
5371 main ()
5375 return 0;
5377 _ACEOF
5378 if ac_fn_c_try_compile "$LINENO"; then :
5379 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5380 else
5381 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5383 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5384 ac_c_werror_flag=$ac_save_c_werror_flag
5385 CFLAGS="$pgac_save_CFLAGS"
5386 CC="$pgac_save_CC"
5388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5389 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5390 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5391 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5395 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5396 # disable it, so AC_SUBST the negative form.
5397 PERMIT_DECLARATION_AFTER_STATEMENT=
5398 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5399 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5402 # Really don't want VLAs to be used in our dialect of C
5404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5405 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5406 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5407 $as_echo_n "(cached) " >&6
5408 else
5409 pgac_save_CFLAGS=$CFLAGS
5410 pgac_save_CC=$CC
5411 CC=${CC}
5412 CFLAGS="${CFLAGS} -Werror=vla"
5413 ac_save_c_werror_flag=$ac_c_werror_flag
5414 ac_c_werror_flag=yes
5415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5416 /* end confdefs.h. */
5419 main ()
5423 return 0;
5425 _ACEOF
5426 if ac_fn_c_try_compile "$LINENO"; then :
5427 pgac_cv_prog_CC_cflags__Werror_vla=yes
5428 else
5429 pgac_cv_prog_CC_cflags__Werror_vla=no
5431 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5432 ac_c_werror_flag=$ac_save_c_werror_flag
5433 CFLAGS="$pgac_save_CFLAGS"
5434 CC="$pgac_save_CC"
5436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5437 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5438 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5439 CFLAGS="${CFLAGS} -Werror=vla"
5443 # On macOS, complain about usage of symbols newer than the deployment target
5445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS" >&5
5446 $as_echo_n "checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS... " >&6; }
5447 if ${pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new+:} false; then :
5448 $as_echo_n "(cached) " >&6
5449 else
5450 pgac_save_CFLAGS=$CFLAGS
5451 pgac_save_CC=$CC
5452 CC=${CC}
5453 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5454 ac_save_c_werror_flag=$ac_c_werror_flag
5455 ac_c_werror_flag=yes
5456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5457 /* end confdefs.h. */
5460 main ()
5464 return 0;
5466 _ACEOF
5467 if ac_fn_c_try_compile "$LINENO"; then :
5468 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=yes
5469 else
5470 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=no
5472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5473 ac_c_werror_flag=$ac_save_c_werror_flag
5474 CFLAGS="$pgac_save_CFLAGS"
5475 CC="$pgac_save_CC"
5477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&5
5478 $as_echo "$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&6; }
5479 if test x"$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" = x"yes"; then
5480 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS" >&5
5485 $as_echo_n "checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS... " >&6; }
5486 if ${pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new+:} false; then :
5487 $as_echo_n "(cached) " >&6
5488 else
5489 pgac_save_CXXFLAGS=$CXXFLAGS
5490 pgac_save_CXX=$CXX
5491 CXX=${CXX}
5492 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5493 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5494 ac_cxx_werror_flag=yes
5495 ac_ext=cpp
5496 ac_cpp='$CXXCPP $CPPFLAGS'
5497 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5498 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5499 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5502 /* end confdefs.h. */
5505 main ()
5509 return 0;
5511 _ACEOF
5512 if ac_fn_cxx_try_compile "$LINENO"; then :
5513 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=yes
5514 else
5515 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=no
5517 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5518 ac_ext=c
5519 ac_cpp='$CPP $CPPFLAGS'
5520 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5521 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5522 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5524 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5525 CXXFLAGS="$pgac_save_CXXFLAGS"
5526 CXX="$pgac_save_CXX"
5528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&5
5529 $as_echo "$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&6; }
5530 if test x"$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" = x"yes"; then
5531 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5535 # -Wvla is not applicable for C++
5537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5538 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5539 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5540 $as_echo_n "(cached) " >&6
5541 else
5542 pgac_save_CFLAGS=$CFLAGS
5543 pgac_save_CC=$CC
5544 CC=${CC}
5545 CFLAGS="${CFLAGS} -Wendif-labels"
5546 ac_save_c_werror_flag=$ac_c_werror_flag
5547 ac_c_werror_flag=yes
5548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5549 /* end confdefs.h. */
5552 main ()
5556 return 0;
5558 _ACEOF
5559 if ac_fn_c_try_compile "$LINENO"; then :
5560 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5561 else
5562 pgac_cv_prog_CC_cflags__Wendif_labels=no
5564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5565 ac_c_werror_flag=$ac_save_c_werror_flag
5566 CFLAGS="$pgac_save_CFLAGS"
5567 CC="$pgac_save_CC"
5569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5570 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5571 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5572 CFLAGS="${CFLAGS} -Wendif-labels"
5576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5577 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5578 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5579 $as_echo_n "(cached) " >&6
5580 else
5581 pgac_save_CXXFLAGS=$CXXFLAGS
5582 pgac_save_CXX=$CXX
5583 CXX=${CXX}
5584 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5585 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5586 ac_cxx_werror_flag=yes
5587 ac_ext=cpp
5588 ac_cpp='$CXXCPP $CPPFLAGS'
5589 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5590 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5591 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5594 /* end confdefs.h. */
5597 main ()
5601 return 0;
5603 _ACEOF
5604 if ac_fn_cxx_try_compile "$LINENO"; then :
5605 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5606 else
5607 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5609 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5610 ac_ext=c
5611 ac_cpp='$CPP $CPPFLAGS'
5612 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5613 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5614 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5616 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5617 CXXFLAGS="$pgac_save_CXXFLAGS"
5618 CXX="$pgac_save_CXX"
5620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5621 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5622 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5623 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5629 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5630 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5631 $as_echo_n "(cached) " >&6
5632 else
5633 pgac_save_CFLAGS=$CFLAGS
5634 pgac_save_CC=$CC
5635 CC=${CC}
5636 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5637 ac_save_c_werror_flag=$ac_c_werror_flag
5638 ac_c_werror_flag=yes
5639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5640 /* end confdefs.h. */
5643 main ()
5647 return 0;
5649 _ACEOF
5650 if ac_fn_c_try_compile "$LINENO"; then :
5651 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5652 else
5653 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5655 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5656 ac_c_werror_flag=$ac_save_c_werror_flag
5657 CFLAGS="$pgac_save_CFLAGS"
5658 CC="$pgac_save_CC"
5660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5661 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5662 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5663 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5668 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5669 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5670 $as_echo_n "(cached) " >&6
5671 else
5672 pgac_save_CXXFLAGS=$CXXFLAGS
5673 pgac_save_CXX=$CXX
5674 CXX=${CXX}
5675 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5676 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5677 ac_cxx_werror_flag=yes
5678 ac_ext=cpp
5679 ac_cpp='$CXXCPP $CPPFLAGS'
5680 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5681 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5682 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5685 /* end confdefs.h. */
5688 main ()
5692 return 0;
5694 _ACEOF
5695 if ac_fn_cxx_try_compile "$LINENO"; then :
5696 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5697 else
5698 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5701 ac_ext=c
5702 ac_cpp='$CPP $CPPFLAGS'
5703 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5704 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5705 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5707 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5708 CXXFLAGS="$pgac_save_CXXFLAGS"
5709 CXX="$pgac_save_CXX"
5711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5712 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5713 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5714 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5720 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5721 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5722 $as_echo_n "(cached) " >&6
5723 else
5724 pgac_save_CFLAGS=$CFLAGS
5725 pgac_save_CC=$CC
5726 CC=${CC}
5727 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5728 ac_save_c_werror_flag=$ac_c_werror_flag
5729 ac_c_werror_flag=yes
5730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5731 /* end confdefs.h. */
5734 main ()
5738 return 0;
5740 _ACEOF
5741 if ac_fn_c_try_compile "$LINENO"; then :
5742 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5743 else
5744 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5747 ac_c_werror_flag=$ac_save_c_werror_flag
5748 CFLAGS="$pgac_save_CFLAGS"
5749 CC="$pgac_save_CC"
5751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5752 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5753 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5754 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5759 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5760 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5761 $as_echo_n "(cached) " >&6
5762 else
5763 pgac_save_CXXFLAGS=$CXXFLAGS
5764 pgac_save_CXX=$CXX
5765 CXX=${CXX}
5766 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5767 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5768 ac_cxx_werror_flag=yes
5769 ac_ext=cpp
5770 ac_cpp='$CXXCPP $CPPFLAGS'
5771 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5772 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5773 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5776 /* end confdefs.h. */
5779 main ()
5783 return 0;
5785 _ACEOF
5786 if ac_fn_cxx_try_compile "$LINENO"; then :
5787 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5788 else
5789 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5792 ac_ext=c
5793 ac_cpp='$CPP $CPPFLAGS'
5794 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5795 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5796 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5798 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5799 CXXFLAGS="$pgac_save_CXXFLAGS"
5800 CXX="$pgac_save_CXX"
5802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5803 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5804 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5805 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5811 $as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5812 if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5813 $as_echo_n "(cached) " >&6
5814 else
5815 pgac_save_CFLAGS=$CFLAGS
5816 pgac_save_CC=$CC
5817 CC=${CC}
5818 CFLAGS="${CFLAGS} -Wcast-function-type"
5819 ac_save_c_werror_flag=$ac_c_werror_flag
5820 ac_c_werror_flag=yes
5821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5822 /* end confdefs.h. */
5825 main ()
5829 return 0;
5831 _ACEOF
5832 if ac_fn_c_try_compile "$LINENO"; then :
5833 pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5834 else
5835 pgac_cv_prog_CC_cflags__Wcast_function_type=no
5837 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5838 ac_c_werror_flag=$ac_save_c_werror_flag
5839 CFLAGS="$pgac_save_CFLAGS"
5840 CC="$pgac_save_CC"
5842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5843 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5844 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5845 CFLAGS="${CFLAGS} -Wcast-function-type"
5849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5850 $as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5851 if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5852 $as_echo_n "(cached) " >&6
5853 else
5854 pgac_save_CXXFLAGS=$CXXFLAGS
5855 pgac_save_CXX=$CXX
5856 CXX=${CXX}
5857 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5858 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5859 ac_cxx_werror_flag=yes
5860 ac_ext=cpp
5861 ac_cpp='$CXXCPP $CPPFLAGS'
5862 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5863 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5864 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5867 /* end confdefs.h. */
5870 main ()
5874 return 0;
5876 _ACEOF
5877 if ac_fn_cxx_try_compile "$LINENO"; then :
5878 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5879 else
5880 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5882 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5883 ac_ext=c
5884 ac_cpp='$CPP $CPPFLAGS'
5885 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5886 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5887 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5889 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5890 CXXFLAGS="$pgac_save_CXXFLAGS"
5891 CXX="$pgac_save_CXX"
5893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5894 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5895 if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5896 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS" >&5
5902 $as_echo_n "checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS... " >&6; }
5903 if ${pgac_cv_prog_CC_cflags__Wshadow_compatible_local+:} false; then :
5904 $as_echo_n "(cached) " >&6
5905 else
5906 pgac_save_CFLAGS=$CFLAGS
5907 pgac_save_CC=$CC
5908 CC=${CC}
5909 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5910 ac_save_c_werror_flag=$ac_c_werror_flag
5911 ac_c_werror_flag=yes
5912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5913 /* end confdefs.h. */
5916 main ()
5920 return 0;
5922 _ACEOF
5923 if ac_fn_c_try_compile "$LINENO"; then :
5924 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=yes
5925 else
5926 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=no
5928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5929 ac_c_werror_flag=$ac_save_c_werror_flag
5930 CFLAGS="$pgac_save_CFLAGS"
5931 CC="$pgac_save_CC"
5933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&5
5934 $as_echo "$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&6; }
5935 if test x"$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" = x"yes"; then
5936 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS" >&5
5941 $as_echo_n "checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS... " >&6; }
5942 if ${pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local+:} false; then :
5943 $as_echo_n "(cached) " >&6
5944 else
5945 pgac_save_CXXFLAGS=$CXXFLAGS
5946 pgac_save_CXX=$CXX
5947 CXX=${CXX}
5948 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5949 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5950 ac_cxx_werror_flag=yes
5951 ac_ext=cpp
5952 ac_cpp='$CXXCPP $CPPFLAGS'
5953 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5954 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5955 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5958 /* end confdefs.h. */
5961 main ()
5965 return 0;
5967 _ACEOF
5968 if ac_fn_cxx_try_compile "$LINENO"; then :
5969 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=yes
5970 else
5971 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=no
5973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5974 ac_ext=c
5975 ac_cpp='$CPP $CPPFLAGS'
5976 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5977 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5978 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5980 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5981 CXXFLAGS="$pgac_save_CXXFLAGS"
5982 CXX="$pgac_save_CXX"
5984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&5
5985 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&6; }
5986 if test x"$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" = x"yes"; then
5987 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5991 # This was included in -Wall/-Wformat in older GCC versions
5993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5994 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5995 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5996 $as_echo_n "(cached) " >&6
5997 else
5998 pgac_save_CFLAGS=$CFLAGS
5999 pgac_save_CC=$CC
6000 CC=${CC}
6001 CFLAGS="${CFLAGS} -Wformat-security"
6002 ac_save_c_werror_flag=$ac_c_werror_flag
6003 ac_c_werror_flag=yes
6004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6005 /* end confdefs.h. */
6008 main ()
6012 return 0;
6014 _ACEOF
6015 if ac_fn_c_try_compile "$LINENO"; then :
6016 pgac_cv_prog_CC_cflags__Wformat_security=yes
6017 else
6018 pgac_cv_prog_CC_cflags__Wformat_security=no
6020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6021 ac_c_werror_flag=$ac_save_c_werror_flag
6022 CFLAGS="$pgac_save_CFLAGS"
6023 CC="$pgac_save_CC"
6025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
6026 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
6027 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
6028 CFLAGS="${CFLAGS} -Wformat-security"
6032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
6033 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
6034 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
6035 $as_echo_n "(cached) " >&6
6036 else
6037 pgac_save_CXXFLAGS=$CXXFLAGS
6038 pgac_save_CXX=$CXX
6039 CXX=${CXX}
6040 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6041 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6042 ac_cxx_werror_flag=yes
6043 ac_ext=cpp
6044 ac_cpp='$CXXCPP $CPPFLAGS'
6045 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6046 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6047 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6050 /* end confdefs.h. */
6053 main ()
6057 return 0;
6059 _ACEOF
6060 if ac_fn_cxx_try_compile "$LINENO"; then :
6061 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
6062 else
6063 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
6065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6066 ac_ext=c
6067 ac_cpp='$CPP $CPPFLAGS'
6068 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6069 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6070 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6072 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6073 CXXFLAGS="$pgac_save_CXXFLAGS"
6074 CXX="$pgac_save_CXX"
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
6077 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
6078 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
6079 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6083 # Disable strict-aliasing rules; needed for gcc 3.3+
6085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6086 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6087 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6088 $as_echo_n "(cached) " >&6
6089 else
6090 pgac_save_CFLAGS=$CFLAGS
6091 pgac_save_CC=$CC
6092 CC=${CC}
6093 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6094 ac_save_c_werror_flag=$ac_c_werror_flag
6095 ac_c_werror_flag=yes
6096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6097 /* end confdefs.h. */
6100 main ()
6104 return 0;
6106 _ACEOF
6107 if ac_fn_c_try_compile "$LINENO"; then :
6108 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6109 else
6110 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6112 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6113 ac_c_werror_flag=$ac_save_c_werror_flag
6114 CFLAGS="$pgac_save_CFLAGS"
6115 CC="$pgac_save_CC"
6117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6118 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6119 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6120 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6125 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6126 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6127 $as_echo_n "(cached) " >&6
6128 else
6129 pgac_save_CXXFLAGS=$CXXFLAGS
6130 pgac_save_CXX=$CXX
6131 CXX=${CXX}
6132 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6133 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6134 ac_cxx_werror_flag=yes
6135 ac_ext=cpp
6136 ac_cpp='$CXXCPP $CPPFLAGS'
6137 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6138 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6139 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6142 /* end confdefs.h. */
6145 main ()
6149 return 0;
6151 _ACEOF
6152 if ac_fn_cxx_try_compile "$LINENO"; then :
6153 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6154 else
6155 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6158 ac_ext=c
6159 ac_cpp='$CPP $CPPFLAGS'
6160 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6161 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6162 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6164 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6165 CXXFLAGS="$pgac_save_CXXFLAGS"
6166 CXX="$pgac_save_CXX"
6168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6169 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6170 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6171 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6175 # Disable optimizations that assume no overflow; needed for gcc 4.3+
6177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
6178 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
6179 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
6180 $as_echo_n "(cached) " >&6
6181 else
6182 pgac_save_CFLAGS=$CFLAGS
6183 pgac_save_CC=$CC
6184 CC=${CC}
6185 CFLAGS="${CFLAGS} -fwrapv"
6186 ac_save_c_werror_flag=$ac_c_werror_flag
6187 ac_c_werror_flag=yes
6188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6189 /* end confdefs.h. */
6192 main ()
6196 return 0;
6198 _ACEOF
6199 if ac_fn_c_try_compile "$LINENO"; then :
6200 pgac_cv_prog_CC_cflags__fwrapv=yes
6201 else
6202 pgac_cv_prog_CC_cflags__fwrapv=no
6204 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6205 ac_c_werror_flag=$ac_save_c_werror_flag
6206 CFLAGS="$pgac_save_CFLAGS"
6207 CC="$pgac_save_CC"
6209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
6210 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
6211 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
6212 CFLAGS="${CFLAGS} -fwrapv"
6216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
6217 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
6218 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
6219 $as_echo_n "(cached) " >&6
6220 else
6221 pgac_save_CXXFLAGS=$CXXFLAGS
6222 pgac_save_CXX=$CXX
6223 CXX=${CXX}
6224 CXXFLAGS="${CXXFLAGS} -fwrapv"
6225 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6226 ac_cxx_werror_flag=yes
6227 ac_ext=cpp
6228 ac_cpp='$CXXCPP $CPPFLAGS'
6229 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6230 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6231 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6234 /* end confdefs.h. */
6237 main ()
6241 return 0;
6243 _ACEOF
6244 if ac_fn_cxx_try_compile "$LINENO"; then :
6245 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6246 else
6247 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6250 ac_ext=c
6251 ac_cpp='$CPP $CPPFLAGS'
6252 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6253 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6254 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6256 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6257 CXXFLAGS="$pgac_save_CXXFLAGS"
6258 CXX="$pgac_save_CXX"
6260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6261 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6262 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6263 CXXFLAGS="${CXXFLAGS} -fwrapv"
6267 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6270 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6271 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6272 $as_echo_n "(cached) " >&6
6273 else
6274 pgac_save_CFLAGS=$CFLAGS
6275 pgac_save_CC=$CC
6276 CC=${CC}
6277 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6278 ac_save_c_werror_flag=$ac_c_werror_flag
6279 ac_c_werror_flag=yes
6280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6281 /* end confdefs.h. */
6284 main ()
6288 return 0;
6290 _ACEOF
6291 if ac_fn_c_try_compile "$LINENO"; then :
6292 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6293 else
6294 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6296 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6297 ac_c_werror_flag=$ac_save_c_werror_flag
6298 CFLAGS="$pgac_save_CFLAGS"
6299 CC="$pgac_save_CC"
6301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6302 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6303 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6304 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6309 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6310 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6311 $as_echo_n "(cached) " >&6
6312 else
6313 pgac_save_CXXFLAGS=$CXXFLAGS
6314 pgac_save_CXX=$CXX
6315 CXX=${CXX}
6316 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6317 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6318 ac_cxx_werror_flag=yes
6319 ac_ext=cpp
6320 ac_cpp='$CXXCPP $CPPFLAGS'
6321 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6322 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6323 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6326 /* end confdefs.h. */
6329 main ()
6333 return 0;
6335 _ACEOF
6336 if ac_fn_cxx_try_compile "$LINENO"; then :
6337 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6338 else
6339 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6341 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6342 ac_ext=c
6343 ac_cpp='$CPP $CPPFLAGS'
6344 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6345 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6346 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6348 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6349 CXXFLAGS="$pgac_save_CXXFLAGS"
6350 CXX="$pgac_save_CXX"
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6353 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6354 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6355 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6359 # Optimization flags for specific files that benefit from loop unrolling
6360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6361 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6362 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6363 $as_echo_n "(cached) " >&6
6364 else
6365 pgac_save_CFLAGS=$CFLAGS
6366 pgac_save_CC=$CC
6367 CC=${CC}
6368 CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6369 ac_save_c_werror_flag=$ac_c_werror_flag
6370 ac_c_werror_flag=yes
6371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6372 /* end confdefs.h. */
6375 main ()
6379 return 0;
6381 _ACEOF
6382 if ac_fn_c_try_compile "$LINENO"; then :
6383 pgac_cv_prog_CC_cflags__funroll_loops=yes
6384 else
6385 pgac_cv_prog_CC_cflags__funroll_loops=no
6387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6388 ac_c_werror_flag=$ac_save_c_werror_flag
6389 CFLAGS="$pgac_save_CFLAGS"
6390 CC="$pgac_save_CC"
6392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6393 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6394 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6395 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6399 # Optimization flags for specific files that benefit from vectorization
6400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6401 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6402 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6403 $as_echo_n "(cached) " >&6
6404 else
6405 pgac_save_CFLAGS=$CFLAGS
6406 pgac_save_CC=$CC
6407 CC=${CC}
6408 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6409 ac_save_c_werror_flag=$ac_c_werror_flag
6410 ac_c_werror_flag=yes
6411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6412 /* end confdefs.h. */
6415 main ()
6419 return 0;
6421 _ACEOF
6422 if ac_fn_c_try_compile "$LINENO"; then :
6423 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6424 else
6425 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6427 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6428 ac_c_werror_flag=$ac_save_c_werror_flag
6429 CFLAGS="$pgac_save_CFLAGS"
6430 CC="$pgac_save_CC"
6432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6433 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6434 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6435 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6440 # The following tests want to suppress various unhelpful warnings by adding
6441 # -Wno-foo switches. But gcc won't complain about unrecognized -Wno-foo
6442 # switches, so we have to test for the positive form and if that works,
6443 # add the negative form. Note that tests of this form typically need to
6444 # be duplicated in the BITCODE_CFLAGS setup stanza below.
6446 # Suppress clang's unhelpful unused-command-line-argument warnings.
6447 NOT_THE_CFLAGS=""
6448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6449 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6450 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6451 $as_echo_n "(cached) " >&6
6452 else
6453 pgac_save_CFLAGS=$CFLAGS
6454 pgac_save_CC=$CC
6455 CC=${CC}
6456 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6457 ac_save_c_werror_flag=$ac_c_werror_flag
6458 ac_c_werror_flag=yes
6459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6460 /* end confdefs.h. */
6463 main ()
6467 return 0;
6469 _ACEOF
6470 if ac_fn_c_try_compile "$LINENO"; then :
6471 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6472 else
6473 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6476 ac_c_werror_flag=$ac_save_c_werror_flag
6477 CFLAGS="$pgac_save_CFLAGS"
6478 CC="$pgac_save_CC"
6480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6481 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6482 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6483 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6487 if test -n "$NOT_THE_CFLAGS"; then
6488 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6490 # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
6491 # of warnings when building plperl because of usages in the Perl headers.
6492 NOT_THE_CFLAGS=""
6493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
6494 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
6495 if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then :
6496 $as_echo_n "(cached) " >&6
6497 else
6498 pgac_save_CFLAGS=$CFLAGS
6499 pgac_save_CC=$CC
6500 CC=${CC}
6501 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6502 ac_save_c_werror_flag=$ac_c_werror_flag
6503 ac_c_werror_flag=yes
6504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6505 /* end confdefs.h. */
6508 main ()
6512 return 0;
6514 _ACEOF
6515 if ac_fn_c_try_compile "$LINENO"; then :
6516 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes
6517 else
6518 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no
6520 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6521 ac_c_werror_flag=$ac_save_c_werror_flag
6522 CFLAGS="$pgac_save_CFLAGS"
6523 CC="$pgac_save_CC"
6525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5
6526 $as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; }
6527 if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then
6528 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6532 if test -n "$NOT_THE_CFLAGS"; then
6533 CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
6535 # Similarly disable useless truncation warnings from gcc 8+
6536 NOT_THE_CFLAGS=""
6537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6538 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6539 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6540 $as_echo_n "(cached) " >&6
6541 else
6542 pgac_save_CFLAGS=$CFLAGS
6543 pgac_save_CC=$CC
6544 CC=${CC}
6545 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6546 ac_save_c_werror_flag=$ac_c_werror_flag
6547 ac_c_werror_flag=yes
6548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6549 /* end confdefs.h. */
6552 main ()
6556 return 0;
6558 _ACEOF
6559 if ac_fn_c_try_compile "$LINENO"; then :
6560 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6561 else
6562 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6565 ac_c_werror_flag=$ac_save_c_werror_flag
6566 CFLAGS="$pgac_save_CFLAGS"
6567 CC="$pgac_save_CC"
6569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6570 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6571 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6572 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6576 if test -n "$NOT_THE_CFLAGS"; then
6577 CFLAGS="$CFLAGS -Wno-format-truncation"
6579 NOT_THE_CFLAGS=""
6580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6581 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6582 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6583 $as_echo_n "(cached) " >&6
6584 else
6585 pgac_save_CFLAGS=$CFLAGS
6586 pgac_save_CC=$CC
6587 CC=${CC}
6588 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6589 ac_save_c_werror_flag=$ac_c_werror_flag
6590 ac_c_werror_flag=yes
6591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6592 /* end confdefs.h. */
6595 main ()
6599 return 0;
6601 _ACEOF
6602 if ac_fn_c_try_compile "$LINENO"; then :
6603 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6604 else
6605 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6607 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6608 ac_c_werror_flag=$ac_save_c_werror_flag
6609 CFLAGS="$pgac_save_CFLAGS"
6610 CC="$pgac_save_CC"
6612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6613 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6614 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6615 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6619 if test -n "$NOT_THE_CFLAGS"; then
6620 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6622 # Suppress clang 16's strict warnings about function casts
6623 NOT_THE_CFLAGS=""
6624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS" >&5
6625 $as_echo_n "checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS... " >&6; }
6626 if ${pgac_cv_prog_CC_cflags__Wcast_function_type_strict+:} false; then :
6627 $as_echo_n "(cached) " >&6
6628 else
6629 pgac_save_CFLAGS=$CFLAGS
6630 pgac_save_CC=$CC
6631 CC=${CC}
6632 CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6633 ac_save_c_werror_flag=$ac_c_werror_flag
6634 ac_c_werror_flag=yes
6635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6636 /* end confdefs.h. */
6639 main ()
6643 return 0;
6645 _ACEOF
6646 if ac_fn_c_try_compile "$LINENO"; then :
6647 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=yes
6648 else
6649 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=no
6651 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6652 ac_c_werror_flag=$ac_save_c_werror_flag
6653 CFLAGS="$pgac_save_CFLAGS"
6654 CC="$pgac_save_CC"
6656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&5
6657 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&6; }
6658 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" = x"yes"; then
6659 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6663 if test -n "$NOT_THE_CFLAGS"; then
6664 CFLAGS="$CFLAGS -Wno-cast-function-type-strict"
6666 elif test "$ICC" = yes; then
6667 # Intel's compiler has a bug/misoptimization in checking for
6668 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6671 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6672 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6673 $as_echo_n "(cached) " >&6
6674 else
6675 pgac_save_CFLAGS=$CFLAGS
6676 pgac_save_CC=$CC
6677 CC=${CC}
6678 CFLAGS="${CFLAGS} -mp1"
6679 ac_save_c_werror_flag=$ac_c_werror_flag
6680 ac_c_werror_flag=yes
6681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6682 /* end confdefs.h. */
6685 main ()
6689 return 0;
6691 _ACEOF
6692 if ac_fn_c_try_compile "$LINENO"; then :
6693 pgac_cv_prog_CC_cflags__mp1=yes
6694 else
6695 pgac_cv_prog_CC_cflags__mp1=no
6697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6698 ac_c_werror_flag=$ac_save_c_werror_flag
6699 CFLAGS="$pgac_save_CFLAGS"
6700 CC="$pgac_save_CC"
6702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6703 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6704 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6705 CFLAGS="${CFLAGS} -mp1"
6709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6710 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6711 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6712 $as_echo_n "(cached) " >&6
6713 else
6714 pgac_save_CXXFLAGS=$CXXFLAGS
6715 pgac_save_CXX=$CXX
6716 CXX=${CXX}
6717 CXXFLAGS="${CXXFLAGS} -mp1"
6718 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6719 ac_cxx_werror_flag=yes
6720 ac_ext=cpp
6721 ac_cpp='$CXXCPP $CPPFLAGS'
6722 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6723 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6724 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6727 /* end confdefs.h. */
6730 main ()
6734 return 0;
6736 _ACEOF
6737 if ac_fn_cxx_try_compile "$LINENO"; then :
6738 pgac_cv_prog_CXX_cxxflags__mp1=yes
6739 else
6740 pgac_cv_prog_CXX_cxxflags__mp1=no
6742 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6743 ac_ext=c
6744 ac_cpp='$CPP $CPPFLAGS'
6745 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6746 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6747 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6749 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6750 CXXFLAGS="$pgac_save_CXXFLAGS"
6751 CXX="$pgac_save_CXX"
6753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6754 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6755 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6756 CXXFLAGS="${CXXFLAGS} -mp1"
6760 # Make sure strict aliasing is off (though this is said to be the default)
6762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6763 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6764 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6765 $as_echo_n "(cached) " >&6
6766 else
6767 pgac_save_CFLAGS=$CFLAGS
6768 pgac_save_CC=$CC
6769 CC=${CC}
6770 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6771 ac_save_c_werror_flag=$ac_c_werror_flag
6772 ac_c_werror_flag=yes
6773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6774 /* end confdefs.h. */
6777 main ()
6781 return 0;
6783 _ACEOF
6784 if ac_fn_c_try_compile "$LINENO"; then :
6785 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6786 else
6787 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6790 ac_c_werror_flag=$ac_save_c_werror_flag
6791 CFLAGS="$pgac_save_CFLAGS"
6792 CC="$pgac_save_CC"
6794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6795 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6796 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6797 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6802 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6803 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6804 $as_echo_n "(cached) " >&6
6805 else
6806 pgac_save_CXXFLAGS=$CXXFLAGS
6807 pgac_save_CXX=$CXX
6808 CXX=${CXX}
6809 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6810 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6811 ac_cxx_werror_flag=yes
6812 ac_ext=cpp
6813 ac_cpp='$CXXCPP $CPPFLAGS'
6814 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6815 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6816 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6819 /* end confdefs.h. */
6822 main ()
6826 return 0;
6828 _ACEOF
6829 if ac_fn_cxx_try_compile "$LINENO"; then :
6830 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6831 else
6832 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6834 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6835 ac_ext=c
6836 ac_cpp='$CPP $CPPFLAGS'
6837 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6838 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6839 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6841 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6842 CXXFLAGS="$pgac_save_CXXFLAGS"
6843 CXX="$pgac_save_CXX"
6845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6846 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6847 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6848 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6854 # If the compiler knows how to hide symbols, add the switch needed for that to
6855 # CFLAGS_SL_MODULE and define HAVE_VISIBILITY_ATTRIBUTE.
6857 # This is done separately from the above because -fvisibility is supported by
6858 # quite a few different compilers, making the required repetition bothersome.
6860 # We might need to add a separate test to check if
6861 # __attribute__((visibility("hidden"))) is supported, if we encounter a
6862 # compiler that supports one of the supported variants of -fvisibility=hidden
6863 # but uses a different syntax to mark a symbol as exported.
6864 if test "$GCC" = yes -o "$SUN_STUDIO_CC" = yes ; then
6865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE" >&5
6866 $as_echo_n "checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
6867 if ${pgac_cv_prog_CC_cflags__fvisibility_hidden+:} false; then :
6868 $as_echo_n "(cached) " >&6
6869 else
6870 pgac_save_CFLAGS=$CFLAGS
6871 pgac_save_CC=$CC
6872 CC=${CC}
6873 CFLAGS="${CFLAGS_SL_MODULE} -fvisibility=hidden"
6874 ac_save_c_werror_flag=$ac_c_werror_flag
6875 ac_c_werror_flag=yes
6876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6877 /* end confdefs.h. */
6880 main ()
6884 return 0;
6886 _ACEOF
6887 if ac_fn_c_try_compile "$LINENO"; then :
6888 pgac_cv_prog_CC_cflags__fvisibility_hidden=yes
6889 else
6890 pgac_cv_prog_CC_cflags__fvisibility_hidden=no
6892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6893 ac_c_werror_flag=$ac_save_c_werror_flag
6894 CFLAGS="$pgac_save_CFLAGS"
6895 CC="$pgac_save_CC"
6897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fvisibility_hidden" >&5
6898 $as_echo "$pgac_cv_prog_CC_cflags__fvisibility_hidden" >&6; }
6899 if test x"$pgac_cv_prog_CC_cflags__fvisibility_hidden" = x"yes"; then
6900 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -fvisibility=hidden"
6904 # For C++ we additionally want -fvisibility-inlines-hidden
6905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
6906 $as_echo_n "checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
6907 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_hidden+:} false; then :
6908 $as_echo_n "(cached) " >&6
6909 else
6910 pgac_save_CXXFLAGS=$CXXFLAGS
6911 pgac_save_CXX=$CXX
6912 CXX=${CXX}
6913 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
6914 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6915 ac_cxx_werror_flag=yes
6916 ac_ext=cpp
6917 ac_cpp='$CXXCPP $CPPFLAGS'
6918 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6919 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6920 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6923 /* end confdefs.h. */
6926 main ()
6930 return 0;
6932 _ACEOF
6933 if ac_fn_cxx_try_compile "$LINENO"; then :
6934 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=yes
6935 else
6936 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=no
6938 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6939 ac_ext=c
6940 ac_cpp='$CPP $CPPFLAGS'
6941 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6942 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6943 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6945 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6946 CXXFLAGS="$pgac_save_CXXFLAGS"
6947 CXX="$pgac_save_CXX"
6949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&5
6950 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&6; }
6951 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" = x"yes"; then
6952 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
6955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE" >&5
6956 $as_echo_n "checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE... " >&6; }
6957 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden+:} false; then :
6958 $as_echo_n "(cached) " >&6
6959 else
6960 pgac_save_CXXFLAGS=$CXXFLAGS
6961 pgac_save_CXX=$CXX
6962 CXX=${CXX}
6963 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
6964 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6965 ac_cxx_werror_flag=yes
6966 ac_ext=cpp
6967 ac_cpp='$CXXCPP $CPPFLAGS'
6968 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6969 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6970 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6973 /* end confdefs.h. */
6976 main ()
6980 return 0;
6982 _ACEOF
6983 if ac_fn_cxx_try_compile "$LINENO"; then :
6984 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=yes
6985 else
6986 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=no
6988 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6989 ac_ext=c
6990 ac_cpp='$CPP $CPPFLAGS'
6991 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6992 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6993 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6995 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6996 CXXFLAGS="$pgac_save_CXXFLAGS"
6997 CXX="$pgac_save_CXX"
6999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&5
7000 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&6; }
7001 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" = x"yes"; then
7002 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
7005 have_visibility_attribute=$pgac_cv_prog_CC_cflags__fvisibility_hidden
7008 if test "$have_visibility_attribute" = "yes"; then
7010 $as_echo "#define HAVE_VISIBILITY_ATTRIBUTE 1" >>confdefs.h
7019 # Determine flags used to emit bitcode for JIT inlining.
7020 # 1. We must duplicate any behaviour-changing compiler flags used above,
7021 # to keep compatibility with the compiler used for normal Postgres code.
7022 # 2. We don't bother to duplicate extra-warnings switches --- seeing a
7023 # warning in the main build is enough.
7024 # 3. But we must duplicate -Wno-warning flags, else we'll see those anyway.
7025 if test "$with_llvm" = yes ; then
7026 CLANGXX="$CLANG -xc++"
7028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
7029 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
7030 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
7031 $as_echo_n "(cached) " >&6
7032 else
7033 pgac_save_CFLAGS=$CFLAGS
7034 pgac_save_CC=$CC
7035 CC=${CLANG}
7036 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7037 ac_save_c_werror_flag=$ac_c_werror_flag
7038 ac_c_werror_flag=yes
7039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7040 /* end confdefs.h. */
7043 main ()
7047 return 0;
7049 _ACEOF
7050 if ac_fn_c_try_compile "$LINENO"; then :
7051 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
7052 else
7053 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
7055 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7056 ac_c_werror_flag=$ac_save_c_werror_flag
7057 CFLAGS="$pgac_save_CFLAGS"
7058 CC="$pgac_save_CC"
7060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
7061 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
7062 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
7063 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
7067 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
7068 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
7069 $as_echo_n "(cached) " >&6
7070 else
7071 pgac_save_CXXFLAGS=$CXXFLAGS
7072 pgac_save_CXX=$CXX
7073 CXX=${CLANGXX}
7074 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7075 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7076 ac_cxx_werror_flag=yes
7077 ac_ext=cpp
7078 ac_cpp='$CXXCPP $CPPFLAGS'
7079 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7080 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7081 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7084 /* end confdefs.h. */
7087 main ()
7091 return 0;
7093 _ACEOF
7094 if ac_fn_cxx_try_compile "$LINENO"; then :
7095 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
7096 else
7097 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
7099 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7100 ac_ext=c
7101 ac_cpp='$CPP $CPPFLAGS'
7102 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7103 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7104 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7106 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7107 CXXFLAGS="$pgac_save_CXXFLAGS"
7108 CXX="$pgac_save_CXX"
7110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
7111 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
7112 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
7113 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
7117 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
7118 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
7119 $as_echo_n "(cached) " >&6
7120 else
7121 pgac_save_CFLAGS=$CFLAGS
7122 pgac_save_CC=$CC
7123 CC=${CLANG}
7124 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7125 ac_save_c_werror_flag=$ac_c_werror_flag
7126 ac_c_werror_flag=yes
7127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7128 /* end confdefs.h. */
7131 main ()
7135 return 0;
7137 _ACEOF
7138 if ac_fn_c_try_compile "$LINENO"; then :
7139 pgac_cv_prog_CLANG_cflags__fwrapv=yes
7140 else
7141 pgac_cv_prog_CLANG_cflags__fwrapv=no
7143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7144 ac_c_werror_flag=$ac_save_c_werror_flag
7145 CFLAGS="$pgac_save_CFLAGS"
7146 CC="$pgac_save_CC"
7148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
7149 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
7150 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
7151 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
7155 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
7156 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
7157 $as_echo_n "(cached) " >&6
7158 else
7159 pgac_save_CXXFLAGS=$CXXFLAGS
7160 pgac_save_CXX=$CXX
7161 CXX=${CLANGXX}
7162 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7163 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7164 ac_cxx_werror_flag=yes
7165 ac_ext=cpp
7166 ac_cpp='$CXXCPP $CPPFLAGS'
7167 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7168 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7169 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7172 /* end confdefs.h. */
7175 main ()
7179 return 0;
7181 _ACEOF
7182 if ac_fn_cxx_try_compile "$LINENO"; then :
7183 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
7184 else
7185 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
7187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7188 ac_ext=c
7189 ac_cpp='$CPP $CPPFLAGS'
7190 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7191 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7192 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7194 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7195 CXXFLAGS="$pgac_save_CXXFLAGS"
7196 CXX="$pgac_save_CXX"
7198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
7199 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
7200 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
7201 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
7205 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
7206 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
7207 $as_echo_n "(cached) " >&6
7208 else
7209 pgac_save_CFLAGS=$CFLAGS
7210 pgac_save_CC=$CC
7211 CC=${CLANG}
7212 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7213 ac_save_c_werror_flag=$ac_c_werror_flag
7214 ac_c_werror_flag=yes
7215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7216 /* end confdefs.h. */
7219 main ()
7223 return 0;
7225 _ACEOF
7226 if ac_fn_c_try_compile "$LINENO"; then :
7227 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7228 else
7229 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7231 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7232 ac_c_werror_flag=$ac_save_c_werror_flag
7233 CFLAGS="$pgac_save_CFLAGS"
7234 CC="$pgac_save_CC"
7236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7237 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7238 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7239 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7243 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7244 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7245 $as_echo_n "(cached) " >&6
7246 else
7247 pgac_save_CXXFLAGS=$CXXFLAGS
7248 pgac_save_CXX=$CXX
7249 CXX=${CLANGXX}
7250 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7251 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7252 ac_cxx_werror_flag=yes
7253 ac_ext=cpp
7254 ac_cpp='$CXXCPP $CPPFLAGS'
7255 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7256 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7257 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7260 /* end confdefs.h. */
7263 main ()
7267 return 0;
7269 _ACEOF
7270 if ac_fn_cxx_try_compile "$LINENO"; then :
7271 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7272 else
7273 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7275 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7276 ac_ext=c
7277 ac_cpp='$CPP $CPPFLAGS'
7278 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7279 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7280 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7282 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7283 CXXFLAGS="$pgac_save_CXXFLAGS"
7284 CXX="$pgac_save_CXX"
7286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7287 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7288 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7289 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS" >&5
7294 $as_echo_n "checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS... " >&6; }
7295 if ${pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers+:} false; then :
7296 $as_echo_n "(cached) " >&6
7297 else
7298 pgac_save_CFLAGS=$CFLAGS
7299 pgac_save_CC=$CC
7300 CC=${CLANG}
7301 CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7302 ac_save_c_werror_flag=$ac_c_werror_flag
7303 ac_c_werror_flag=yes
7304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7305 /* end confdefs.h. */
7308 main ()
7312 return 0;
7314 _ACEOF
7315 if ac_fn_c_try_compile "$LINENO"; then :
7316 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=yes
7317 else
7318 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=no
7320 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7321 ac_c_werror_flag=$ac_save_c_werror_flag
7322 CFLAGS="$pgac_save_CFLAGS"
7323 CC="$pgac_save_CC"
7325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&5
7326 $as_echo "$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&6; }
7327 if test x"$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" = x"yes"; then
7328 BITCODE_CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS" >&5
7332 $as_echo_n "checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS... " >&6; }
7333 if ${pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers+:} false; then :
7334 $as_echo_n "(cached) " >&6
7335 else
7336 pgac_save_CXXFLAGS=$CXXFLAGS
7337 pgac_save_CXX=$CXX
7338 CXX=${CLANGXX}
7339 CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7340 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7341 ac_cxx_werror_flag=yes
7342 ac_ext=cpp
7343 ac_cpp='$CXXCPP $CPPFLAGS'
7344 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7345 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7346 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7349 /* end confdefs.h. */
7352 main ()
7356 return 0;
7358 _ACEOF
7359 if ac_fn_cxx_try_compile "$LINENO"; then :
7360 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=yes
7361 else
7362 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=no
7364 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7365 ac_ext=c
7366 ac_cpp='$CPP $CPPFLAGS'
7367 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7368 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7369 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7371 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7372 CXXFLAGS="$pgac_save_CXXFLAGS"
7373 CXX="$pgac_save_CXX"
7375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&5
7376 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&6; }
7377 if test x"$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" = x"yes"; then
7378 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7382 NOT_THE_CFLAGS=""
7383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
7384 $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
7385 if ${pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument+:} false; then :
7386 $as_echo_n "(cached) " >&6
7387 else
7388 pgac_save_CFLAGS=$CFLAGS
7389 pgac_save_CC=$CC
7390 CC=${CLANG}
7391 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7392 ac_save_c_werror_flag=$ac_c_werror_flag
7393 ac_c_werror_flag=yes
7394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7395 /* end confdefs.h. */
7398 main ()
7402 return 0;
7404 _ACEOF
7405 if ac_fn_c_try_compile "$LINENO"; then :
7406 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=yes
7407 else
7408 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=no
7410 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7411 ac_c_werror_flag=$ac_save_c_werror_flag
7412 CFLAGS="$pgac_save_CFLAGS"
7413 CC="$pgac_save_CC"
7415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&5
7416 $as_echo "$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&6; }
7417 if test x"$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" = x"yes"; then
7418 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7421 if test -n "$NOT_THE_CFLAGS"; then
7422 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-unused-command-line-argument"
7424 NOT_THE_CFLAGS=""
7425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
7426 $as_echo_n "checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
7427 if ${pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro+:} false; then :
7428 $as_echo_n "(cached) " >&6
7429 else
7430 pgac_save_CFLAGS=$CFLAGS
7431 pgac_save_CC=$CC
7432 CC=${CLANG}
7433 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7434 ac_save_c_werror_flag=$ac_c_werror_flag
7435 ac_c_werror_flag=yes
7436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7437 /* end confdefs.h. */
7440 main ()
7444 return 0;
7446 _ACEOF
7447 if ac_fn_c_try_compile "$LINENO"; then :
7448 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=yes
7449 else
7450 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=no
7452 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7453 ac_c_werror_flag=$ac_save_c_werror_flag
7454 CFLAGS="$pgac_save_CFLAGS"
7455 CC="$pgac_save_CC"
7457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&5
7458 $as_echo "$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&6; }
7459 if test x"$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" = x"yes"; then
7460 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7463 if test -n "$NOT_THE_CFLAGS"; then
7464 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
7466 NOT_THE_CFLAGS=""
7467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
7468 $as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
7469 if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :
7470 $as_echo_n "(cached) " >&6
7471 else
7472 pgac_save_CFLAGS=$CFLAGS
7473 pgac_save_CC=$CC
7474 CC=${CLANG}
7475 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7476 ac_save_c_werror_flag=$ac_c_werror_flag
7477 ac_c_werror_flag=yes
7478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7479 /* end confdefs.h. */
7482 main ()
7486 return 0;
7488 _ACEOF
7489 if ac_fn_c_try_compile "$LINENO"; then :
7490 pgac_cv_prog_CLANG_cflags__Wformat_truncation=yes
7491 else
7492 pgac_cv_prog_CLANG_cflags__Wformat_truncation=no
7494 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7495 ac_c_werror_flag=$ac_save_c_werror_flag
7496 CFLAGS="$pgac_save_CFLAGS"
7497 CC="$pgac_save_CC"
7499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&5
7500 $as_echo "$pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&6; }
7501 if test x"$pgac_cv_prog_CLANG_cflags__Wformat_truncation" = x"yes"; then
7502 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7505 if test -n "$NOT_THE_CFLAGS"; then
7506 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"
7508 NOT_THE_CFLAGS=""
7509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
7510 $as_echo_n "checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
7511 if ${pgac_cv_prog_CLANG_cflags__Wstringop_truncation+:} false; then :
7512 $as_echo_n "(cached) " >&6
7513 else
7514 pgac_save_CFLAGS=$CFLAGS
7515 pgac_save_CC=$CC
7516 CC=${CLANG}
7517 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7518 ac_save_c_werror_flag=$ac_c_werror_flag
7519 ac_c_werror_flag=yes
7520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7521 /* end confdefs.h. */
7524 main ()
7528 return 0;
7530 _ACEOF
7531 if ac_fn_c_try_compile "$LINENO"; then :
7532 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=yes
7533 else
7534 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=no
7536 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7537 ac_c_werror_flag=$ac_save_c_werror_flag
7538 CFLAGS="$pgac_save_CFLAGS"
7539 CC="$pgac_save_CC"
7541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&5
7542 $as_echo "$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&6; }
7543 if test x"$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" = x"yes"; then
7544 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7547 if test -n "$NOT_THE_CFLAGS"; then
7548 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-stringop-truncation"
7552 # supply -g if --enable-debug
7553 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7554 CFLAGS="$CFLAGS -g"
7557 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7558 CXXFLAGS="$CXXFLAGS -g"
7561 # enable code coverage if --enable-coverage
7562 if test "$enable_coverage" = yes; then
7563 if test "$GCC" = yes; then
7564 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7565 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7566 else
7567 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7571 # enable profiling if --enable-profiling
7572 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7573 if test "$GCC" = yes; then
7575 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7577 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7578 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7579 else
7580 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7584 # On Solaris, we need this #define to get POSIX-conforming versions
7585 # of many interfaces (sigwait, getpwuid_r, ...).
7586 if test "$PORTNAME" = "solaris"; then
7587 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
7590 # We already have this in Makefile.win32, but configure needs it too
7591 if test "$PORTNAME" = "win32"; then
7592 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7595 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7596 # user-specified flags (if any) at the end. This lets users override
7597 # the automatic additions.
7598 CFLAGS="$CFLAGS $user_CFLAGS"
7599 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7600 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7601 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7606 # The template file must set up CFLAGS_SL; we don't support user override
7609 # Check if the compiler still works with the final flag settings
7610 # (note, we're not checking that for CXX, which is optional)
7611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7612 $as_echo_n "checking whether the C compiler still works... " >&6; }
7613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7614 /* end confdefs.h. */
7617 main ()
7619 return 0;
7621 return 0;
7623 _ACEOF
7624 if ac_fn_c_try_link "$LINENO"; then :
7625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7626 $as_echo "yes" >&6; }
7627 else
7628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7629 $as_echo "no" >&6; }
7630 as_fn_error $? "cannot proceed" "$LINENO" 5
7632 rm -f core conftest.err conftest.$ac_objext \
7633 conftest$ac_exeext conftest.$ac_ext
7635 # Defend against gcc -ffast-math
7636 if test "$GCC" = yes; then
7637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7638 /* end confdefs.h. */
7641 main ()
7643 #ifdef __FAST_MATH__
7644 choke me
7645 #endif
7647 return 0;
7649 _ACEOF
7650 if ac_fn_c_try_compile "$LINENO"; then :
7652 else
7653 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7655 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7658 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7659 # versions of clang do not understand -fexcess-precision=standard, the use of
7660 # x87 floating point operations leads to problems like isinf possibly returning
7661 # false for a value that is infinite when converted from the 80bit register to
7662 # the 8byte memory representation.
7664 # Only perform the test if the compiler doesn't understand
7665 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7666 # automatically.
7667 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7669 /* end confdefs.h. */
7672 main ()
7675 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7676 choke me
7677 #endif
7680 return 0;
7682 _ACEOF
7683 if ac_fn_c_try_compile "$LINENO"; then :
7685 else
7686 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7691 ac_ext=c
7692 ac_cpp='$CPP $CPPFLAGS'
7693 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7694 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7695 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7697 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7698 # On Suns, sometimes $CPP names a directory.
7699 if test -n "$CPP" && test -d "$CPP"; then
7700 CPP=
7702 if test -z "$CPP"; then
7703 if ${ac_cv_prog_CPP+:} false; then :
7704 $as_echo_n "(cached) " >&6
7705 else
7706 # Double quotes because CPP needs to be expanded
7707 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7709 ac_preproc_ok=false
7710 for ac_c_preproc_warn_flag in '' yes
7712 # Use a header file that comes with gcc, so configuring glibc
7713 # with a fresh cross-compiler works.
7714 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7715 # <limits.h> exists even on freestanding compilers.
7716 # On the NeXT, cc -E runs the code through the compiler's parser,
7717 # not just through cpp. "Syntax error" is here to catch this case.
7718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7719 /* end confdefs.h. */
7720 #ifdef __STDC__
7721 # include <limits.h>
7722 #else
7723 # include <assert.h>
7724 #endif
7725 Syntax error
7726 _ACEOF
7727 if ac_fn_c_try_cpp "$LINENO"; then :
7729 else
7730 # Broken: fails on valid input.
7731 continue
7733 rm -f conftest.err conftest.i conftest.$ac_ext
7735 # OK, works on sane cases. Now check whether nonexistent headers
7736 # can be detected and how.
7737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7738 /* end confdefs.h. */
7739 #include <ac_nonexistent.h>
7740 _ACEOF
7741 if ac_fn_c_try_cpp "$LINENO"; then :
7742 # Broken: success on invalid input.
7743 continue
7744 else
7745 # Passes both tests.
7746 ac_preproc_ok=:
7747 break
7749 rm -f conftest.err conftest.i conftest.$ac_ext
7751 done
7752 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7753 rm -f conftest.i conftest.err conftest.$ac_ext
7754 if $ac_preproc_ok; then :
7755 break
7758 done
7759 ac_cv_prog_CPP=$CPP
7762 CPP=$ac_cv_prog_CPP
7763 else
7764 ac_cv_prog_CPP=$CPP
7766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7767 $as_echo "$CPP" >&6; }
7768 ac_preproc_ok=false
7769 for ac_c_preproc_warn_flag in '' yes
7771 # Use a header file that comes with gcc, so configuring glibc
7772 # with a fresh cross-compiler works.
7773 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7774 # <limits.h> exists even on freestanding compilers.
7775 # On the NeXT, cc -E runs the code through the compiler's parser,
7776 # not just through cpp. "Syntax error" is here to catch this case.
7777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7778 /* end confdefs.h. */
7779 #ifdef __STDC__
7780 # include <limits.h>
7781 #else
7782 # include <assert.h>
7783 #endif
7784 Syntax error
7785 _ACEOF
7786 if ac_fn_c_try_cpp "$LINENO"; then :
7788 else
7789 # Broken: fails on valid input.
7790 continue
7792 rm -f conftest.err conftest.i conftest.$ac_ext
7794 # OK, works on sane cases. Now check whether nonexistent headers
7795 # can be detected and how.
7796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7797 /* end confdefs.h. */
7798 #include <ac_nonexistent.h>
7799 _ACEOF
7800 if ac_fn_c_try_cpp "$LINENO"; then :
7801 # Broken: success on invalid input.
7802 continue
7803 else
7804 # Passes both tests.
7805 ac_preproc_ok=:
7806 break
7808 rm -f conftest.err conftest.i conftest.$ac_ext
7810 done
7811 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7812 rm -f conftest.i conftest.err conftest.$ac_ext
7813 if $ac_preproc_ok; then :
7815 else
7816 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7817 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7818 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7819 See \`config.log' for more details" "$LINENO" 5; }
7822 ac_ext=c
7823 ac_cpp='$CPP $CPPFLAGS'
7824 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7825 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7826 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7832 # Set up TAS assembly code if needed; the template file has now had its
7833 # chance to request this.
7835 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7838 if test "$need_tas" = yes ; then
7839 TAS=tas.o
7840 else
7841 TAS=""
7846 cat >>confdefs.h <<_ACEOF
7847 #define DLSUFFIX "$DLSUFFIX"
7848 _ACEOF
7852 # Set up pkg_config in case we need it below
7861 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7862 if test -n "$ac_tool_prefix"; then
7863 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7864 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7866 $as_echo_n "checking for $ac_word... " >&6; }
7867 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7868 $as_echo_n "(cached) " >&6
7869 else
7870 case $PKG_CONFIG in
7871 [\\/]* | ?:[\\/]*)
7872 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7876 for as_dir in $PATH
7878 IFS=$as_save_IFS
7879 test -z "$as_dir" && as_dir=.
7880 for ac_exec_ext in '' $ac_executable_extensions; do
7881 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7882 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7883 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7884 break 2
7886 done
7887 done
7888 IFS=$as_save_IFS
7891 esac
7893 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7894 if test -n "$PKG_CONFIG"; then
7895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7896 $as_echo "$PKG_CONFIG" >&6; }
7897 else
7898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7899 $as_echo "no" >&6; }
7904 if test -z "$ac_cv_path_PKG_CONFIG"; then
7905 ac_pt_PKG_CONFIG=$PKG_CONFIG
7906 # Extract the first word of "pkg-config", so it can be a program name with args.
7907 set dummy pkg-config; ac_word=$2
7908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7909 $as_echo_n "checking for $ac_word... " >&6; }
7910 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7911 $as_echo_n "(cached) " >&6
7912 else
7913 case $ac_pt_PKG_CONFIG in
7914 [\\/]* | ?:[\\/]*)
7915 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7918 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7919 for as_dir in $PATH
7921 IFS=$as_save_IFS
7922 test -z "$as_dir" && as_dir=.
7923 for ac_exec_ext in '' $ac_executable_extensions; do
7924 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7925 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7926 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7927 break 2
7929 done
7930 done
7931 IFS=$as_save_IFS
7934 esac
7936 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7937 if test -n "$ac_pt_PKG_CONFIG"; then
7938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7939 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7940 else
7941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7942 $as_echo "no" >&6; }
7945 if test "x$ac_pt_PKG_CONFIG" = x; then
7946 PKG_CONFIG=""
7947 else
7948 case $cross_compiling:$ac_tool_warned in
7949 yes:)
7950 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7951 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7952 ac_tool_warned=yes ;;
7953 esac
7954 PKG_CONFIG=$ac_pt_PKG_CONFIG
7956 else
7957 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7961 if test -n "$PKG_CONFIG"; then
7962 _pkg_min_version=0.9.0
7963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7964 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7965 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7967 $as_echo "yes" >&6; }
7968 else
7969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7970 $as_echo "no" >&6; }
7971 PKG_CONFIG=""
7976 # Automatic dependency tracking
7980 # Check whether --enable-depend was given.
7981 if test "${enable_depend+set}" = set; then :
7982 enableval=$enable_depend;
7983 case $enableval in
7984 yes)
7985 autodepend=yes
7991 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7993 esac
7995 else
7996 enable_depend=no
8005 # Enable assert checks
8009 # Check whether --enable-cassert was given.
8010 if test "${enable_cassert+set}" = set; then :
8011 enableval=$enable_cassert;
8012 case $enableval in
8013 yes)
8015 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
8022 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
8024 esac
8026 else
8027 enable_cassert=no
8035 # Include directories
8037 ac_save_IFS=$IFS
8038 IFS="${IFS}${PATH_SEPARATOR}"
8039 # SRCH_INC comes from the template file
8040 for dir in $with_includes $SRCH_INC; do
8041 if test -d "$dir"; then
8042 INCLUDES="$INCLUDES -I$dir"
8043 else
8044 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
8045 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
8047 done
8048 IFS=$ac_save_IFS
8053 # Library directories
8055 ac_save_IFS=$IFS
8056 IFS="${IFS}${PATH_SEPARATOR}"
8057 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
8058 for dir in $LIBRARY_DIRS $SRCH_LIB; do
8059 if test -d "$dir"; then
8060 LIBDIRS="$LIBDIRS -L$dir"
8061 else
8062 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
8063 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
8065 done
8066 IFS=$ac_save_IFS
8069 # ICU
8071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
8072 $as_echo_n "checking whether to build with ICU support... " >&6; }
8076 # Check whether --with-icu was given.
8077 if test "${with_icu+set}" = set; then :
8078 withval=$with_icu;
8079 case $withval in
8080 yes)
8082 $as_echo "#define USE_ICU 1" >>confdefs.h
8089 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
8091 esac
8093 else
8094 with_icu=yes
8096 $as_echo "#define USE_ICU 1" >>confdefs.h
8101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
8102 $as_echo "$with_icu" >&6; }
8105 if test "$with_icu" = yes; then
8107 pkg_failed=no
8108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
8109 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
8111 if test -n "$ICU_CFLAGS"; then
8112 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
8113 elif test -n "$PKG_CONFIG"; then
8114 if test -n "$PKG_CONFIG" && \
8115 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8116 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8117 ac_status=$?
8118 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8119 test $ac_status = 0; }; then
8120 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
8121 test "x$?" != "x0" && pkg_failed=yes
8122 else
8123 pkg_failed=yes
8125 else
8126 pkg_failed=untried
8128 if test -n "$ICU_LIBS"; then
8129 pkg_cv_ICU_LIBS="$ICU_LIBS"
8130 elif test -n "$PKG_CONFIG"; then
8131 if test -n "$PKG_CONFIG" && \
8132 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8133 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8134 ac_status=$?
8135 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8136 test $ac_status = 0; }; then
8137 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
8138 test "x$?" != "x0" && pkg_failed=yes
8139 else
8140 pkg_failed=yes
8142 else
8143 pkg_failed=untried
8148 if test $pkg_failed = yes; then
8149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8150 $as_echo "no" >&6; }
8152 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8153 _pkg_short_errors_supported=yes
8154 else
8155 _pkg_short_errors_supported=no
8157 if test $_pkg_short_errors_supported = yes; then
8158 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8159 else
8160 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8162 # Put the nasty error message in config.log where it belongs
8163 echo "$ICU_PKG_ERRORS" >&5
8165 as_fn_error $? "ICU library not found
8166 If you have ICU already installed, see config.log for details on the
8167 failure. It is possible the compiler isn't looking in the proper directory.
8168 Use --without-icu to disable ICU support." "$LINENO" 5
8169 elif test $pkg_failed = untried; then
8170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8171 $as_echo "no" >&6; }
8172 as_fn_error $? "ICU library not found
8173 If you have ICU already installed, see config.log for details on the
8174 failure. It is possible the compiler isn't looking in the proper directory.
8175 Use --without-icu to disable ICU support." "$LINENO" 5
8176 else
8177 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
8178 ICU_LIBS=$pkg_cv_ICU_LIBS
8179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8180 $as_echo "yes" >&6; }
8186 # Optionally build Tcl modules (PL/Tcl)
8188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
8189 $as_echo_n "checking whether to build with Tcl... " >&6; }
8193 # Check whether --with-tcl was given.
8194 if test "${with_tcl+set}" = set; then :
8195 withval=$with_tcl;
8196 case $withval in
8197 yes)
8204 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
8206 esac
8208 else
8209 with_tcl=no
8214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
8215 $as_echo "$with_tcl" >&6; }
8218 # We see if the path to the Tcl/Tk configuration scripts is specified.
8219 # This will override the use of tclsh to find the paths to search.
8224 # Check whether --with-tclconfig was given.
8225 if test "${with_tclconfig+set}" = set; then :
8226 withval=$with_tclconfig;
8227 case $withval in
8228 yes)
8229 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8232 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8237 esac
8244 # Optionally build Perl modules (PL/Perl)
8246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
8247 $as_echo_n "checking whether to build Perl modules... " >&6; }
8251 # Check whether --with-perl was given.
8252 if test "${with_perl+set}" = set; then :
8253 withval=$with_perl;
8254 case $withval in
8255 yes)
8262 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
8264 esac
8266 else
8267 with_perl=no
8272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
8273 $as_echo "$with_perl" >&6; }
8277 # Optionally build Python modules (PL/Python)
8279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
8280 $as_echo_n "checking whether to build Python modules... " >&6; }
8284 # Check whether --with-python was given.
8285 if test "${with_python+set}" = set; then :
8286 withval=$with_python;
8287 case $withval in
8288 yes)
8295 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
8297 esac
8299 else
8300 with_python=no
8305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8306 $as_echo "$with_python" >&6; }
8310 # GSSAPI
8312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
8313 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
8317 # Check whether --with-gssapi was given.
8318 if test "${with_gssapi+set}" = set; then :
8319 withval=$with_gssapi;
8320 case $withval in
8321 yes)
8324 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
8326 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
8333 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
8335 esac
8337 else
8338 with_gssapi=no
8343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8344 $as_echo "$with_gssapi" >&6; }
8352 # Kerberos configuration parameters
8357 # Check whether --with-krb-srvnam was given.
8358 if test "${with_krb_srvnam+set}" = set; then :
8359 withval=$with_krb_srvnam;
8360 case $withval in
8361 yes)
8362 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8365 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8370 esac
8372 else
8373 with_krb_srvnam="postgres"
8379 cat >>confdefs.h <<_ACEOF
8380 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8381 _ACEOF
8386 # PAM
8388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8389 $as_echo_n "checking whether to build with PAM support... " >&6; }
8393 # Check whether --with-pam was given.
8394 if test "${with_pam+set}" = set; then :
8395 withval=$with_pam;
8396 case $withval in
8397 yes)
8399 $as_echo "#define USE_PAM 1" >>confdefs.h
8406 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8408 esac
8410 else
8411 with_pam=no
8416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8417 $as_echo "$with_pam" >&6; }
8421 # BSD AUTH
8423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8424 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8428 # Check whether --with-bsd-auth was given.
8429 if test "${with_bsd_auth+set}" = set; then :
8430 withval=$with_bsd_auth;
8431 case $withval in
8432 yes)
8434 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8441 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8443 esac
8445 else
8446 with_bsd_auth=no
8451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8452 $as_echo "$with_bsd_auth" >&6; }
8456 # LDAP
8458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8459 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8463 # Check whether --with-ldap was given.
8464 if test "${with_ldap+set}" = set; then :
8465 withval=$with_ldap;
8466 case $withval in
8467 yes)
8469 $as_echo "#define USE_LDAP 1" >>confdefs.h
8476 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8478 esac
8480 else
8481 with_ldap=no
8486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8487 $as_echo "$with_ldap" >&6; }
8492 # Bonjour
8494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8495 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8499 # Check whether --with-bonjour was given.
8500 if test "${with_bonjour+set}" = set; then :
8501 withval=$with_bonjour;
8502 case $withval in
8503 yes)
8505 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8512 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8514 esac
8516 else
8517 with_bonjour=no
8522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8523 $as_echo "$with_bonjour" >&6; }
8527 # SELinux
8529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8530 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8534 # Check whether --with-selinux was given.
8535 if test "${with_selinux+set}" = set; then :
8536 withval=$with_selinux;
8537 case $withval in
8538 yes)
8545 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8547 esac
8549 else
8550 with_selinux=no
8556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8557 $as_echo "$with_selinux" >&6; }
8560 # Systemd
8562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8563 $as_echo_n "checking whether to build with systemd support... " >&6; }
8567 # Check whether --with-systemd was given.
8568 if test "${with_systemd+set}" = set; then :
8569 withval=$with_systemd;
8570 case $withval in
8571 yes)
8573 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8580 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8582 esac
8584 else
8585 with_systemd=no
8591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8592 $as_echo "$with_systemd" >&6; }
8595 # Readline
8600 # Check whether --with-readline was given.
8601 if test "${with_readline+set}" = set; then :
8602 withval=$with_readline;
8603 case $withval in
8604 yes)
8611 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8613 esac
8615 else
8616 with_readline=yes
8621 # readline on MinGW has problems with backslashes in psql and other bugs.
8622 # This is particularly a problem with non-US code pages.
8623 # Therefore disable its use until we understand the cause. 2004-07-20
8624 if test "$PORTNAME" = "win32"; then
8625 if test "$with_readline" = yes; then
8626 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8627 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8628 with_readline=no
8635 # Prefer libedit
8640 # Check whether --with-libedit-preferred was given.
8641 if test "${with_libedit_preferred+set}" = set; then :
8642 withval=$with_libedit_preferred;
8643 case $withval in
8644 yes)
8651 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8653 esac
8655 else
8656 with_libedit_preferred=no
8664 # UUID library
8666 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8667 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8668 # UUID library. More than one of these might be present on a given platform,
8669 # so we make the user say which one she wants.
8674 # Check whether --with-uuid was given.
8675 if test "${with_uuid+set}" = set; then :
8676 withval=$with_uuid;
8677 case $withval in
8678 yes)
8679 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8682 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8687 esac
8692 if test x"$with_uuid" = x"" ; then
8693 with_uuid=no
8698 # Check whether --with-ossp-uuid was given.
8699 if test "${with_ossp_uuid+set}" = set; then :
8700 withval=$with_ossp_uuid;
8701 case $withval in
8702 yes)
8709 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8711 esac
8713 else
8714 with_ossp_uuid=no
8719 if test "$with_ossp_uuid" = yes ; then
8720 with_uuid=ossp
8723 if test "$with_uuid" != no ; then
8724 if test "$with_uuid" = bsd ; then
8726 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8728 elif test "$with_uuid" = e2fs ; then
8730 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8732 elif test "$with_uuid" = ossp ; then
8734 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8736 else
8737 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8744 # XML
8746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
8747 $as_echo_n "checking whether to build with XML support... " >&6; }
8751 # Check whether --with-libxml was given.
8752 if test "${with_libxml+set}" = set; then :
8753 withval=$with_libxml;
8754 case $withval in
8755 yes)
8757 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8764 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8766 esac
8768 else
8769 with_libxml=no
8774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
8775 $as_echo "$with_libxml" >&6; }
8778 if test "$with_libxml" = yes ; then
8779 # Check pkg-config, then xml2-config. But for backwards compatibility,
8780 # setting XML2_CONFIG overrides pkg-config.
8781 have_libxml2_pkg_config=no
8782 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
8784 pkg_failed=no
8785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
8786 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
8788 if test -n "$XML2_CFLAGS"; then
8789 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
8790 elif test -n "$PKG_CONFIG"; then
8791 if test -n "$PKG_CONFIG" && \
8792 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8793 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8794 ac_status=$?
8795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8796 test $ac_status = 0; }; then
8797 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
8798 test "x$?" != "x0" && pkg_failed=yes
8799 else
8800 pkg_failed=yes
8802 else
8803 pkg_failed=untried
8805 if test -n "$XML2_LIBS"; then
8806 pkg_cv_XML2_LIBS="$XML2_LIBS"
8807 elif test -n "$PKG_CONFIG"; then
8808 if test -n "$PKG_CONFIG" && \
8809 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8810 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8811 ac_status=$?
8812 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8813 test $ac_status = 0; }; then
8814 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
8815 test "x$?" != "x0" && pkg_failed=yes
8816 else
8817 pkg_failed=yes
8819 else
8820 pkg_failed=untried
8825 if test $pkg_failed = yes; then
8826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8827 $as_echo "no" >&6; }
8829 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8830 _pkg_short_errors_supported=yes
8831 else
8832 _pkg_short_errors_supported=no
8834 if test $_pkg_short_errors_supported = yes; then
8835 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8836 else
8837 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8839 # Put the nasty error message in config.log where it belongs
8840 echo "$XML2_PKG_ERRORS" >&5
8842 # do nothing
8843 elif test $pkg_failed = untried; then
8844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8845 $as_echo "no" >&6; }
8846 # do nothing
8847 else
8848 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
8849 XML2_LIBS=$pkg_cv_XML2_LIBS
8850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8851 $as_echo "yes" >&6; }
8852 have_libxml2_pkg_config=yes
8855 if test "$have_libxml2_pkg_config" = no ; then
8856 if test -z "$XML2_CONFIG"; then
8857 for ac_prog in xml2-config
8859 # Extract the first word of "$ac_prog", so it can be a program name with args.
8860 set dummy $ac_prog; ac_word=$2
8861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8862 $as_echo_n "checking for $ac_word... " >&6; }
8863 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8864 $as_echo_n "(cached) " >&6
8865 else
8866 case $XML2_CONFIG in
8867 [\\/]* | ?:[\\/]*)
8868 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8871 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8872 for as_dir in $PATH
8874 IFS=$as_save_IFS
8875 test -z "$as_dir" && as_dir=.
8876 for ac_exec_ext in '' $ac_executable_extensions; do
8877 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8878 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8879 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8880 break 2
8882 done
8883 done
8884 IFS=$as_save_IFS
8887 esac
8889 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8890 if test -n "$XML2_CONFIG"; then
8891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8892 $as_echo "$XML2_CONFIG" >&6; }
8893 else
8894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8895 $as_echo "no" >&6; }
8899 test -n "$XML2_CONFIG" && break
8900 done
8902 else
8903 # Report the value of XML2_CONFIG in configure's output in all cases.
8904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8905 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8907 $as_echo "$XML2_CONFIG" >&6; }
8910 if test -n "$XML2_CONFIG"; then
8911 XML2_CFLAGS=`$XML2_CONFIG --cflags`
8912 XML2_LIBS=`$XML2_CONFIG --libs`
8915 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
8916 for pgac_option in $XML2_CFLAGS; do
8917 case $pgac_option in
8918 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8919 esac
8920 done
8921 for pgac_option in $XML2_LIBS; do
8922 case $pgac_option in
8923 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8924 esac
8925 done
8930 # XSLT
8935 # Check whether --with-libxslt was given.
8936 if test "${with_libxslt+set}" = set; then :
8937 withval=$with_libxslt;
8938 case $withval in
8939 yes)
8941 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8948 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8950 esac
8952 else
8953 with_libxslt=no
8963 # tzdata
8968 # Check whether --with-system-tzdata was given.
8969 if test "${with_system_tzdata+set}" = set; then :
8970 withval=$with_system_tzdata;
8971 case $withval in
8972 yes)
8973 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8976 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8981 esac
8989 # Zlib
8994 # Check whether --with-zlib was given.
8995 if test "${with_zlib+set}" = set; then :
8996 withval=$with_zlib;
8997 case $withval in
8998 yes)
9005 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
9007 esac
9009 else
9010 with_zlib=yes
9018 # LZ4
9020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
9021 $as_echo_n "checking whether to build with LZ4 support... " >&6; }
9025 # Check whether --with-lz4 was given.
9026 if test "${with_lz4+set}" = set; then :
9027 withval=$with_lz4;
9028 case $withval in
9029 yes)
9031 $as_echo "#define USE_LZ4 1" >>confdefs.h
9038 as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
9040 esac
9042 else
9043 with_lz4=no
9048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
9049 $as_echo "$with_lz4" >&6; }
9052 if test "$with_lz4" = yes; then
9054 pkg_failed=no
9055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
9056 $as_echo_n "checking for liblz4... " >&6; }
9058 if test -n "$LZ4_CFLAGS"; then
9059 pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
9060 elif test -n "$PKG_CONFIG"; then
9061 if test -n "$PKG_CONFIG" && \
9062 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9063 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9064 ac_status=$?
9065 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9066 test $ac_status = 0; }; then
9067 pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
9068 test "x$?" != "x0" && pkg_failed=yes
9069 else
9070 pkg_failed=yes
9072 else
9073 pkg_failed=untried
9075 if test -n "$LZ4_LIBS"; then
9076 pkg_cv_LZ4_LIBS="$LZ4_LIBS"
9077 elif test -n "$PKG_CONFIG"; then
9078 if test -n "$PKG_CONFIG" && \
9079 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9080 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9081 ac_status=$?
9082 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9083 test $ac_status = 0; }; then
9084 pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
9085 test "x$?" != "x0" && pkg_failed=yes
9086 else
9087 pkg_failed=yes
9089 else
9090 pkg_failed=untried
9095 if test $pkg_failed = yes; then
9096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9097 $as_echo "no" >&6; }
9099 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9100 _pkg_short_errors_supported=yes
9101 else
9102 _pkg_short_errors_supported=no
9104 if test $_pkg_short_errors_supported = yes; then
9105 LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
9106 else
9107 LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
9109 # Put the nasty error message in config.log where it belongs
9110 echo "$LZ4_PKG_ERRORS" >&5
9112 as_fn_error $? "Package requirements (liblz4) were not met:
9114 $LZ4_PKG_ERRORS
9116 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9117 installed software in a non-standard prefix.
9119 Alternatively, you may set the environment variables LZ4_CFLAGS
9120 and LZ4_LIBS to avoid the need to call pkg-config.
9121 See the pkg-config man page for more details." "$LINENO" 5
9122 elif test $pkg_failed = untried; then
9123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9124 $as_echo "no" >&6; }
9125 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9126 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9127 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9128 is in your PATH or set the PKG_CONFIG environment variable to the full
9129 path to pkg-config.
9131 Alternatively, you may set the environment variables LZ4_CFLAGS
9132 and LZ4_LIBS to avoid the need to call pkg-config.
9133 See the pkg-config man page for more details.
9135 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9136 See \`config.log' for more details" "$LINENO" 5; }
9137 else
9138 LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
9139 LZ4_LIBS=$pkg_cv_LZ4_LIBS
9140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9141 $as_echo "yes" >&6; }
9144 # We only care about -I, -D, and -L switches;
9145 # note that -llz4 will be added by AC_CHECK_LIB below.
9146 for pgac_option in $LZ4_CFLAGS; do
9147 case $pgac_option in
9148 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9149 esac
9150 done
9151 for pgac_option in $LZ4_LIBS; do
9152 case $pgac_option in
9153 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9154 esac
9155 done
9159 # ZSTD
9161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ZSTD support" >&5
9162 $as_echo_n "checking whether to build with ZSTD support... " >&6; }
9166 # Check whether --with-zstd was given.
9167 if test "${with_zstd+set}" = set; then :
9168 withval=$with_zstd;
9169 case $withval in
9170 yes)
9172 $as_echo "#define USE_ZSTD 1" >>confdefs.h
9179 as_fn_error $? "no argument expected for --with-zstd option" "$LINENO" 5
9181 esac
9183 else
9184 with_zstd=no
9189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_zstd" >&5
9190 $as_echo "$with_zstd" >&6; }
9193 if test "$with_zstd" = yes; then
9195 pkg_failed=no
9196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd >= 1.4.0" >&5
9197 $as_echo_n "checking for libzstd >= 1.4.0... " >&6; }
9199 if test -n "$ZSTD_CFLAGS"; then
9200 pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
9201 elif test -n "$PKG_CONFIG"; then
9202 if test -n "$PKG_CONFIG" && \
9203 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9204 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9205 ac_status=$?
9206 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9207 test $ac_status = 0; }; then
9208 pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd >= 1.4.0" 2>/dev/null`
9209 test "x$?" != "x0" && pkg_failed=yes
9210 else
9211 pkg_failed=yes
9213 else
9214 pkg_failed=untried
9216 if test -n "$ZSTD_LIBS"; then
9217 pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
9218 elif test -n "$PKG_CONFIG"; then
9219 if test -n "$PKG_CONFIG" && \
9220 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9221 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9222 ac_status=$?
9223 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9224 test $ac_status = 0; }; then
9225 pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd >= 1.4.0" 2>/dev/null`
9226 test "x$?" != "x0" && pkg_failed=yes
9227 else
9228 pkg_failed=yes
9230 else
9231 pkg_failed=untried
9236 if test $pkg_failed = yes; then
9237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9238 $as_echo "no" >&6; }
9240 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9241 _pkg_short_errors_supported=yes
9242 else
9243 _pkg_short_errors_supported=no
9245 if test $_pkg_short_errors_supported = yes; then
9246 ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9247 else
9248 ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9250 # Put the nasty error message in config.log where it belongs
9251 echo "$ZSTD_PKG_ERRORS" >&5
9253 as_fn_error $? "Package requirements (libzstd >= 1.4.0) were not met:
9255 $ZSTD_PKG_ERRORS
9257 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9258 installed software in a non-standard prefix.
9260 Alternatively, you may set the environment variables ZSTD_CFLAGS
9261 and ZSTD_LIBS to avoid the need to call pkg-config.
9262 See the pkg-config man page for more details." "$LINENO" 5
9263 elif test $pkg_failed = untried; then
9264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9265 $as_echo "no" >&6; }
9266 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9267 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9268 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9269 is in your PATH or set the PKG_CONFIG environment variable to the full
9270 path to pkg-config.
9272 Alternatively, you may set the environment variables ZSTD_CFLAGS
9273 and ZSTD_LIBS to avoid the need to call pkg-config.
9274 See the pkg-config man page for more details.
9276 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9277 See \`config.log' for more details" "$LINENO" 5; }
9278 else
9279 ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
9280 ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
9281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9282 $as_echo "yes" >&6; }
9285 # We only care about -I, -D, and -L switches;
9286 # note that -lzstd will be added by AC_CHECK_LIB below.
9287 for pgac_option in $ZSTD_CFLAGS; do
9288 case $pgac_option in
9289 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9290 esac
9291 done
9292 for pgac_option in $ZSTD_LIBS; do
9293 case $pgac_option in
9294 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9295 esac
9296 done
9299 # Assignments
9302 CPPFLAGS="$CPPFLAGS $INCLUDES"
9303 LDFLAGS="$LDFLAGS $LIBDIRS"
9309 if test -n "$ac_tool_prefix"; then
9310 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9311 set dummy ${ac_tool_prefix}strip; ac_word=$2
9312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9313 $as_echo_n "checking for $ac_word... " >&6; }
9314 if ${ac_cv_prog_STRIP+:} false; then :
9315 $as_echo_n "(cached) " >&6
9316 else
9317 if test -n "$STRIP"; then
9318 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9319 else
9320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9321 for as_dir in $PATH
9323 IFS=$as_save_IFS
9324 test -z "$as_dir" && as_dir=.
9325 for ac_exec_ext in '' $ac_executable_extensions; do
9326 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9327 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9328 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9329 break 2
9331 done
9332 done
9333 IFS=$as_save_IFS
9337 STRIP=$ac_cv_prog_STRIP
9338 if test -n "$STRIP"; then
9339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9340 $as_echo "$STRIP" >&6; }
9341 else
9342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9343 $as_echo "no" >&6; }
9348 if test -z "$ac_cv_prog_STRIP"; then
9349 ac_ct_STRIP=$STRIP
9350 # Extract the first word of "strip", so it can be a program name with args.
9351 set dummy strip; ac_word=$2
9352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9353 $as_echo_n "checking for $ac_word... " >&6; }
9354 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9355 $as_echo_n "(cached) " >&6
9356 else
9357 if test -n "$ac_ct_STRIP"; then
9358 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9359 else
9360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9361 for as_dir in $PATH
9363 IFS=$as_save_IFS
9364 test -z "$as_dir" && as_dir=.
9365 for ac_exec_ext in '' $ac_executable_extensions; do
9366 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9367 ac_cv_prog_ac_ct_STRIP="strip"
9368 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9369 break 2
9371 done
9372 done
9373 IFS=$as_save_IFS
9377 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9378 if test -n "$ac_ct_STRIP"; then
9379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9380 $as_echo "$ac_ct_STRIP" >&6; }
9381 else
9382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9383 $as_echo "no" >&6; }
9386 if test "x$ac_ct_STRIP" = x; then
9387 STRIP=":"
9388 else
9389 case $cross_compiling:$ac_tool_warned in
9390 yes:)
9391 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9392 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9393 ac_tool_warned=yes ;;
9394 esac
9395 STRIP=$ac_ct_STRIP
9397 else
9398 STRIP="$ac_cv_prog_STRIP"
9402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9403 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9404 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9405 STRIP_STATIC_LIB="$STRIP --strip-unneeded"
9406 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9408 $as_echo "yes" >&6; }
9409 else
9410 case $host_os in
9411 darwin*)
9412 STRIP="$STRIP -x"
9413 STRIP_STATIC_LIB=$STRIP
9414 STRIP_SHARED_LIB=$STRIP
9415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9416 $as_echo "yes" >&6; }
9419 STRIP_STATIC_LIB=:
9420 STRIP_SHARED_LIB=:
9421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9422 $as_echo "no" >&6; }
9424 esac
9429 if test -n "$ac_tool_prefix"; then
9430 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9431 set dummy ${ac_tool_prefix}ar; ac_word=$2
9432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9433 $as_echo_n "checking for $ac_word... " >&6; }
9434 if ${ac_cv_prog_AR+:} false; then :
9435 $as_echo_n "(cached) " >&6
9436 else
9437 if test -n "$AR"; then
9438 ac_cv_prog_AR="$AR" # Let the user override the test.
9439 else
9440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9441 for as_dir in $PATH
9443 IFS=$as_save_IFS
9444 test -z "$as_dir" && as_dir=.
9445 for ac_exec_ext in '' $ac_executable_extensions; do
9446 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9447 ac_cv_prog_AR="${ac_tool_prefix}ar"
9448 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9449 break 2
9451 done
9452 done
9453 IFS=$as_save_IFS
9457 AR=$ac_cv_prog_AR
9458 if test -n "$AR"; then
9459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9460 $as_echo "$AR" >&6; }
9461 else
9462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9463 $as_echo "no" >&6; }
9468 if test -z "$ac_cv_prog_AR"; then
9469 ac_ct_AR=$AR
9470 # Extract the first word of "ar", so it can be a program name with args.
9471 set dummy ar; ac_word=$2
9472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9473 $as_echo_n "checking for $ac_word... " >&6; }
9474 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9475 $as_echo_n "(cached) " >&6
9476 else
9477 if test -n "$ac_ct_AR"; then
9478 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9479 else
9480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9481 for as_dir in $PATH
9483 IFS=$as_save_IFS
9484 test -z "$as_dir" && as_dir=.
9485 for ac_exec_ext in '' $ac_executable_extensions; do
9486 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9487 ac_cv_prog_ac_ct_AR="ar"
9488 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9489 break 2
9491 done
9492 done
9493 IFS=$as_save_IFS
9497 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9498 if test -n "$ac_ct_AR"; then
9499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9500 $as_echo "$ac_ct_AR" >&6; }
9501 else
9502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9503 $as_echo "no" >&6; }
9506 if test "x$ac_ct_AR" = x; then
9507 AR="ar"
9508 else
9509 case $cross_compiling:$ac_tool_warned in
9510 yes:)
9511 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9512 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9513 ac_tool_warned=yes ;;
9514 esac
9515 AR=$ac_ct_AR
9517 else
9518 AR="$ac_cv_prog_AR"
9521 if test "$PORTNAME" = "win32"; then
9522 if test -n "$ac_tool_prefix"; then
9523 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9524 set dummy ${ac_tool_prefix}windres; ac_word=$2
9525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9526 $as_echo_n "checking for $ac_word... " >&6; }
9527 if ${ac_cv_prog_WINDRES+:} false; then :
9528 $as_echo_n "(cached) " >&6
9529 else
9530 if test -n "$WINDRES"; then
9531 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9532 else
9533 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9534 for as_dir in $PATH
9536 IFS=$as_save_IFS
9537 test -z "$as_dir" && as_dir=.
9538 for ac_exec_ext in '' $ac_executable_extensions; do
9539 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9540 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9541 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9542 break 2
9544 done
9545 done
9546 IFS=$as_save_IFS
9550 WINDRES=$ac_cv_prog_WINDRES
9551 if test -n "$WINDRES"; then
9552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9553 $as_echo "$WINDRES" >&6; }
9554 else
9555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9556 $as_echo "no" >&6; }
9561 if test -z "$ac_cv_prog_WINDRES"; then
9562 ac_ct_WINDRES=$WINDRES
9563 # Extract the first word of "windres", so it can be a program name with args.
9564 set dummy windres; ac_word=$2
9565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9566 $as_echo_n "checking for $ac_word... " >&6; }
9567 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9568 $as_echo_n "(cached) " >&6
9569 else
9570 if test -n "$ac_ct_WINDRES"; then
9571 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9572 else
9573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9574 for as_dir in $PATH
9576 IFS=$as_save_IFS
9577 test -z "$as_dir" && as_dir=.
9578 for ac_exec_ext in '' $ac_executable_extensions; do
9579 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9580 ac_cv_prog_ac_ct_WINDRES="windres"
9581 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9582 break 2
9584 done
9585 done
9586 IFS=$as_save_IFS
9590 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9591 if test -n "$ac_ct_WINDRES"; then
9592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9593 $as_echo "$ac_ct_WINDRES" >&6; }
9594 else
9595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9596 $as_echo "no" >&6; }
9599 if test "x$ac_ct_WINDRES" = x; then
9600 WINDRES="windres"
9601 else
9602 case $cross_compiling:$ac_tool_warned in
9603 yes:)
9604 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9605 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9606 ac_tool_warned=yes ;;
9607 esac
9608 WINDRES=$ac_ct_WINDRES
9610 else
9611 WINDRES="$ac_cv_prog_WINDRES"
9616 # Find a good install program. We prefer a C program (faster),
9617 # so one script is as good as another. But avoid the broken or
9618 # incompatible versions:
9619 # SysV /etc/install, /usr/sbin/install
9620 # SunOS /usr/etc/install
9621 # IRIX /sbin/install
9622 # AIX /bin/install
9623 # AmigaOS /C/install, which installs bootblocks on floppy discs
9624 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9625 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9626 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9627 # OS/2's system install, which has a completely different semantic
9628 # ./install, which can be erroneously created by make from ./install.sh.
9629 # Reject install programs that cannot install multiple files.
9630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9631 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9632 if test -z "$INSTALL"; then
9633 if ${ac_cv_path_install+:} false; then :
9634 $as_echo_n "(cached) " >&6
9635 else
9636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9637 for as_dir in $PATH
9639 IFS=$as_save_IFS
9640 test -z "$as_dir" && as_dir=.
9641 # Account for people who put trailing slashes in PATH elements.
9642 case $as_dir/ in #((
9643 ./ | .// | /[cC]/* | \
9644 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9645 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9646 /usr/ucb/* ) ;;
9648 # OSF1 and SCO ODT 3.0 have their own names for install.
9649 # Don't use installbsd from OSF since it installs stuff as root
9650 # by default.
9651 for ac_prog in ginstall scoinst install; do
9652 for ac_exec_ext in '' $ac_executable_extensions; do
9653 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9654 if test $ac_prog = install &&
9655 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9656 # AIX install. It has an incompatible calling convention.
9658 elif test $ac_prog = install &&
9659 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9660 # program-specific install script used by HP pwplus--don't use.
9662 else
9663 rm -rf conftest.one conftest.two conftest.dir
9664 echo one > conftest.one
9665 echo two > conftest.two
9666 mkdir conftest.dir
9667 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9668 test -s conftest.one && test -s conftest.two &&
9669 test -s conftest.dir/conftest.one &&
9670 test -s conftest.dir/conftest.two
9671 then
9672 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9673 break 3
9677 done
9678 done
9680 esac
9682 done
9683 IFS=$as_save_IFS
9685 rm -rf conftest.one conftest.two conftest.dir
9688 if test "${ac_cv_path_install+set}" = set; then
9689 INSTALL=$ac_cv_path_install
9690 else
9691 # As a last resort, use the slow shell script. Don't cache a
9692 # value for INSTALL within a source directory, because that will
9693 # break other packages using the cache if that directory is
9694 # removed, or if the value is a relative name.
9695 INSTALL=$ac_install_sh
9698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9699 $as_echo "$INSTALL" >&6; }
9701 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9702 # It thinks the first close brace ends the variable substitution.
9703 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9705 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9707 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9709 # When Autoconf chooses install-sh as install program it tries to generate
9710 # a relative path to it in each makefile where it substitutes it. This clashes
9711 # with our Makefile.global concept. This workaround helps.
9712 case $INSTALL in
9713 *install-sh*) install_bin='';;
9714 *) install_bin=$INSTALL;;
9715 esac
9718 if test -z "$TAR"; then
9719 for ac_prog in tar
9721 # Extract the first word of "$ac_prog", so it can be a program name with args.
9722 set dummy $ac_prog; ac_word=$2
9723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9724 $as_echo_n "checking for $ac_word... " >&6; }
9725 if ${ac_cv_path_TAR+:} false; then :
9726 $as_echo_n "(cached) " >&6
9727 else
9728 case $TAR in
9729 [\\/]* | ?:[\\/]*)
9730 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9734 for as_dir in $PATH
9736 IFS=$as_save_IFS
9737 test -z "$as_dir" && as_dir=.
9738 for ac_exec_ext in '' $ac_executable_extensions; do
9739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9740 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9741 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9742 break 2
9744 done
9745 done
9746 IFS=$as_save_IFS
9749 esac
9751 TAR=$ac_cv_path_TAR
9752 if test -n "$TAR"; then
9753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9754 $as_echo "$TAR" >&6; }
9755 else
9756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9757 $as_echo "no" >&6; }
9761 test -n "$TAR" && break
9762 done
9764 else
9765 # Report the value of TAR in configure's output in all cases.
9766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9767 $as_echo_n "checking for TAR... " >&6; }
9768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9769 $as_echo "$TAR" >&6; }
9772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9773 $as_echo_n "checking whether ln -s works... " >&6; }
9774 LN_S=$as_ln_s
9775 if test "$LN_S" = "ln -s"; then
9776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9777 $as_echo "yes" >&6; }
9778 else
9779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9780 $as_echo "no, using $LN_S" >&6; }
9783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9784 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9785 if test -z "$MKDIR_P"; then
9786 if ${ac_cv_path_mkdir+:} false; then :
9787 $as_echo_n "(cached) " >&6
9788 else
9789 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9790 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9792 IFS=$as_save_IFS
9793 test -z "$as_dir" && as_dir=.
9794 for ac_prog in mkdir gmkdir; do
9795 for ac_exec_ext in '' $ac_executable_extensions; do
9796 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9797 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9798 'mkdir (GNU coreutils) '* | \
9799 'mkdir (coreutils) '* | \
9800 'mkdir (fileutils) '4.1*)
9801 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9802 break 3;;
9803 esac
9804 done
9805 done
9806 done
9807 IFS=$as_save_IFS
9811 test -d ./--version && rmdir ./--version
9812 if test "${ac_cv_path_mkdir+set}" = set; then
9813 MKDIR_P="$ac_cv_path_mkdir -p"
9814 else
9815 # As a last resort, use the slow shell script. Don't cache a
9816 # value for MKDIR_P within a source directory, because that will
9817 # break other packages using the cache if that directory is
9818 # removed, or if the value is a relative name.
9819 MKDIR_P="$ac_install_sh -d"
9822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9823 $as_echo "$MKDIR_P" >&6; }
9825 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9826 # a relative path to it in each makefile where it substitutes it. This clashes
9827 # with our Makefile.global concept. This workaround helps.
9828 case $MKDIR_P in
9829 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9830 esac
9832 if test -z "$BISON"; then
9833 for ac_prog in bison
9835 # Extract the first word of "$ac_prog", so it can be a program name with args.
9836 set dummy $ac_prog; ac_word=$2
9837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9838 $as_echo_n "checking for $ac_word... " >&6; }
9839 if ${ac_cv_path_BISON+:} false; then :
9840 $as_echo_n "(cached) " >&6
9841 else
9842 case $BISON in
9843 [\\/]* | ?:[\\/]*)
9844 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9847 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9848 for as_dir in $PATH
9850 IFS=$as_save_IFS
9851 test -z "$as_dir" && as_dir=.
9852 for ac_exec_ext in '' $ac_executable_extensions; do
9853 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9854 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9855 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9856 break 2
9858 done
9859 done
9860 IFS=$as_save_IFS
9863 esac
9865 BISON=$ac_cv_path_BISON
9866 if test -n "$BISON"; then
9867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9868 $as_echo "$BISON" >&6; }
9869 else
9870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9871 $as_echo "no" >&6; }
9875 test -n "$BISON" && break
9876 done
9878 else
9879 # Report the value of BISON in configure's output in all cases.
9880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9881 $as_echo_n "checking for BISON... " >&6; }
9882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9883 $as_echo "$BISON" >&6; }
9887 if test "$BISON"; then
9888 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9889 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9890 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9891 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 2.3) exit 0; else exit 1;}'
9892 then
9893 as_fn_error $? "
9894 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9895 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." "$LINENO" 5
9897 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9898 # of the now preferred %name-prefix "base_yy", but the latter
9899 # doesn't work with Bison 2.3 or less. So for now we silence the
9900 # deprecation warnings.
9901 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9902 then
9903 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9907 if test -z "$BISON"; then
9908 as_fn_error $? "bison not found" "$LINENO" 5
9912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9913 $as_echo_n "checking for flex... " >&6; }
9914 if ${pgac_cv_path_flex+:} false; then :
9915 $as_echo_n "(cached) " >&6
9916 else
9917 # Let the user override the test
9918 if test -n "$FLEX"; then
9919 pgac_cv_path_flex=$FLEX
9920 else
9921 pgac_save_IFS=$IFS
9922 IFS=$PATH_SEPARATOR
9923 for pgac_dir in $PATH; do
9924 IFS=$pgac_save_IFS
9925 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9926 pgac_dir=`pwd`
9928 for pgac_prog in flex lex; do
9929 pgac_candidate="$pgac_dir/$pgac_prog"
9930 if test -f "$pgac_candidate" \
9931 && $pgac_candidate --version </dev/null >/dev/null 2>&1
9932 then
9933 echo '%%' > conftest.l
9934 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9935 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9936 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;}'
9937 then
9938 pgac_cv_path_flex=$pgac_candidate
9939 break 2
9940 else
9941 as_fn_error $? "
9942 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9943 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." "$LINENO" 5
9947 done
9948 done
9949 rm -f conftest.l lex.yy.c
9950 : ${pgac_cv_path_flex=no}
9954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9955 $as_echo "$pgac_cv_path_flex" >&6; }
9956 if test x"$pgac_cv_path_flex" = x"no"; then
9957 as_fn_error $? "flex not found" "$LINENO" 5
9958 else
9959 FLEX=$pgac_cv_path_flex
9960 pgac_flex_version=`$FLEX --version 2>/dev/null`
9961 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9962 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9969 if test -z "$PERL"; then
9970 for ac_prog in perl
9972 # Extract the first word of "$ac_prog", so it can be a program name with args.
9973 set dummy $ac_prog; ac_word=$2
9974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9975 $as_echo_n "checking for $ac_word... " >&6; }
9976 if ${ac_cv_path_PERL+:} false; then :
9977 $as_echo_n "(cached) " >&6
9978 else
9979 case $PERL in
9980 [\\/]* | ?:[\\/]*)
9981 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9985 for as_dir in $PATH
9987 IFS=$as_save_IFS
9988 test -z "$as_dir" && as_dir=.
9989 for ac_exec_ext in '' $ac_executable_extensions; do
9990 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9991 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9992 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9993 break 2
9995 done
9996 done
9997 IFS=$as_save_IFS
10000 esac
10002 PERL=$ac_cv_path_PERL
10003 if test -n "$PERL"; then
10004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10005 $as_echo "$PERL" >&6; }
10006 else
10007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10008 $as_echo "no" >&6; }
10012 test -n "$PERL" && break
10013 done
10015 else
10016 # Report the value of PERL in configure's output in all cases.
10017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
10018 $as_echo_n "checking for PERL... " >&6; }
10019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10020 $as_echo "$PERL" >&6; }
10024 if test "$PERL"; then
10025 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'`
10026 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
10027 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
10028 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
10029 $AWK '{ if ($1 == 5 && ($2 >= 14)) exit 1; else exit 0;}'
10030 then
10031 as_fn_error $? "
10032 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10033 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." "$LINENO" 5
10037 if test -z "$PERL"; then
10038 as_fn_error $? "Perl not found" "$LINENO" 5
10041 if test "$with_perl" = yes; then
10042 if test -z "$PERL"; then
10043 as_fn_error $? "Perl not found" "$LINENO" 5
10046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
10047 $as_echo_n "checking for Perl archlibexp... " >&6; }
10048 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
10049 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
10050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
10051 $as_echo "$perl_archlibexp" >&6; }
10052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
10053 $as_echo_n "checking for Perl privlibexp... " >&6; }
10054 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
10055 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
10056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
10057 $as_echo "$perl_privlibexp" >&6; }
10058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
10059 $as_echo_n "checking for Perl useshrplib... " >&6; }
10060 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
10061 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
10062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
10063 $as_echo "$perl_useshrplib" >&6; }
10064 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
10065 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
10066 You might have to rebuild your Perl installation. Refer to the
10067 documentation for details. Use --without-perl to disable building
10068 PL/Perl." "$LINENO" 5
10070 # On most platforms, archlibexp is also where the Perl include files live ...
10071 perl_includespec="-I$perl_archlibexp/CORE"
10072 # ... but on newer macOS versions, we must use -iwithsysroot to look
10073 # under $PG_SYSROOT
10074 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
10075 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
10076 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
10080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
10081 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
10082 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10084 $as_echo "$perl_ccflags" >&6; }
10085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10086 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10087 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10089 $as_echo "$perl_embed_ccflags" >&6; }
10092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10093 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10094 if test "$PORTNAME" = "win32" ; then
10095 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10096 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10097 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10098 else
10099 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10100 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10101 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10104 else
10105 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10106 pgac_tmp2=`$PERL -MConfig -e 'print "$Config{ccdlflags} $Config{ldflags}"'`
10107 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%"`
10109 if test -z "$perl_embed_ldflags" ; then
10110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10111 $as_echo "no" >&6; }
10112 as_fn_error $? "could not determine flags for linking embedded Perl.
10113 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10114 installed." "$LINENO" 5
10115 else
10116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10117 $as_echo "$perl_embed_ldflags" >&6; }
10122 if test "$with_python" = yes; then
10123 if test -z "$PYTHON"; then
10124 for ac_prog in python3 python
10126 # Extract the first word of "$ac_prog", so it can be a program name with args.
10127 set dummy $ac_prog; ac_word=$2
10128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10129 $as_echo_n "checking for $ac_word... " >&6; }
10130 if ${ac_cv_path_PYTHON+:} false; then :
10131 $as_echo_n "(cached) " >&6
10132 else
10133 case $PYTHON in
10134 [\\/]* | ?:[\\/]*)
10135 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10138 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10139 for as_dir in $PATH
10141 IFS=$as_save_IFS
10142 test -z "$as_dir" && as_dir=.
10143 for ac_exec_ext in '' $ac_executable_extensions; do
10144 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10145 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10146 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10147 break 2
10149 done
10150 done
10151 IFS=$as_save_IFS
10154 esac
10156 PYTHON=$ac_cv_path_PYTHON
10157 if test -n "$PYTHON"; then
10158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10159 $as_echo "$PYTHON" >&6; }
10160 else
10161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10162 $as_echo "no" >&6; }
10166 test -n "$PYTHON" && break
10167 done
10169 else
10170 # Report the value of PYTHON in configure's output in all cases.
10171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10172 $as_echo_n "checking for PYTHON... " >&6; }
10173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10174 $as_echo "$PYTHON" >&6; }
10177 if test x"$PYTHON" = x""; then
10178 as_fn_error $? "Python not found" "$LINENO" 5
10182 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10183 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10184 $as_echo "$as_me: using python $python_fullversion" >&6;}
10185 # python_fullversion is typically n.n.n plus some trailing junk
10186 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10187 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10188 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10189 # Reject unsupported Python versions as soon as practical.
10190 if test "$python_majorversion" -lt 3; then
10191 as_fn_error $? "Python version $python_version is too old (version 3 or later is required)" "$LINENO" 5
10194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
10195 $as_echo_n "checking for Python sysconfig module... " >&6; }
10196 if "${PYTHON}" -c 'import sysconfig' 2>&5
10197 then
10198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10199 $as_echo "yes" >&6; }
10200 else
10201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10202 $as_echo "no" >&6; }
10203 as_fn_error $? "sysconfig module not found" "$LINENO" 5
10206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10207 $as_echo_n "checking Python configuration directory... " >&6; }
10208 python_configdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBPL'))))"`
10209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10210 $as_echo "$python_configdir" >&6; }
10212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directory" >&5
10213 $as_echo_n "checking Python include directory... " >&6; }
10214 python_includespec=`${PYTHON} -c "import sysconfig; print('-I' + sysconfig.get_config_var('INCLUDEPY'))"`
10215 if test "$PORTNAME" = win32 ; then
10216 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10219 $as_echo "$python_includespec" >&6; }
10223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10224 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10226 python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10227 python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
10229 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10230 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10231 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10232 then
10233 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10234 found_shlib=1
10235 else
10236 # Otherwise, guess the base name of the shlib.
10237 # LDVERSION was added in Python 3.2, before that use VERSION,
10238 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10239 python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
10240 if test x"${python_ldversion}" != x""; then
10241 ldlibrary="python${python_ldversion}"
10242 else
10243 python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
10244 if test x"${python_version_var}" != x""; then
10245 ldlibrary="python${python_version_var}"
10246 else
10247 ldlibrary="python${python_version}"
10250 # Search for a likely-looking file.
10251 found_shlib=0
10252 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10254 if test -e "$d/lib${ldlibrary}${DLSUFFIX}"; then
10255 python_libdir="$d"
10256 found_shlib=1
10257 break 2
10259 done
10260 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10261 # (".so.n.n") as well. However, check this only after failing to find
10262 # ".so" anywhere, because yet other platforms (Debian) put the .so
10263 # symlink in a different directory from the underlying versioned shlib.
10264 if test "$found_shlib" != 1; then
10265 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10267 for f in "$d/lib${ldlibrary}.so."* ; do
10268 if test -e "$f"; then
10269 python_libdir="$d"
10270 found_shlib=1
10271 break 2
10273 done
10274 done
10276 # As usual, Windows has its own ideas. Possible default library
10277 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10278 # and the "lib" prefix might not be there.
10279 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10280 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10282 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10283 if test -e "$f"; then
10284 python_libdir="$d"
10285 found_shlib=1
10286 break 2
10288 done
10289 done
10292 if test "$found_shlib" != 1; then
10293 as_fn_error $? "could not find shared library for Python
10294 You might have to rebuild your Python installation. Refer to the
10295 documentation for details. Use --without-python to disable building
10296 PL/Python." "$LINENO" 5
10298 python_libspec="-L${python_libdir} -l${ldlibrary}"
10300 python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10303 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10309 if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then
10310 if test -z "$ZIC"; then
10311 for ac_prog in zic
10313 # Extract the first word of "$ac_prog", so it can be a program name with args.
10314 set dummy $ac_prog; ac_word=$2
10315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10316 $as_echo_n "checking for $ac_word... " >&6; }
10317 if ${ac_cv_path_ZIC+:} false; then :
10318 $as_echo_n "(cached) " >&6
10319 else
10320 case $ZIC in
10321 [\\/]* | ?:[\\/]*)
10322 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10326 for as_dir in $PATH
10328 IFS=$as_save_IFS
10329 test -z "$as_dir" && as_dir=.
10330 for ac_exec_ext in '' $ac_executable_extensions; do
10331 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10332 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10333 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10334 break 2
10336 done
10337 done
10338 IFS=$as_save_IFS
10341 esac
10343 ZIC=$ac_cv_path_ZIC
10344 if test -n "$ZIC"; then
10345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10346 $as_echo "$ZIC" >&6; }
10347 else
10348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10349 $as_echo "no" >&6; }
10353 test -n "$ZIC" && break
10354 done
10356 else
10357 # Report the value of ZIC in configure's output in all cases.
10358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10359 $as_echo_n "checking for ZIC... " >&6; }
10360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10361 $as_echo "$ZIC" >&6; }
10364 if test -z "$ZIC"; then
10365 as_fn_error $? "
10366 When cross-compiling, either use the option --with-system-tzdata to use
10367 existing time-zone data, or set the environment variable ZIC to a zic
10368 program to use during the build." "$LINENO" 5
10373 # Pthreads
10375 # For each platform, we need to know about any special compile and link
10376 # libraries, and whether the normal C function names are thread-safe.
10377 # WIN32 doesn't need the pthread tests; it always uses threads
10379 # These tests are run before the library-tests, because linking with the
10380 # other libraries can pull in the pthread functions as a side-effect. We
10381 # want to use the -pthread or similar flags directly, and not rely on
10382 # the side-effects of linking with some other library.
10384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10385 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10386 if ${ac_cv_path_SED+:} false; then :
10387 $as_echo_n "(cached) " >&6
10388 else
10389 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10390 for ac_i in 1 2 3 4 5 6 7; do
10391 ac_script="$ac_script$as_nl$ac_script"
10392 done
10393 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10394 { ac_script=; unset ac_script;}
10395 if test -z "$SED"; then
10396 ac_path_SED_found=false
10397 # Loop through the user's path and test for each of PROGNAME-LIST
10398 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10399 for as_dir in $PATH
10401 IFS=$as_save_IFS
10402 test -z "$as_dir" && as_dir=.
10403 for ac_prog in sed gsed; do
10404 for ac_exec_ext in '' $ac_executable_extensions; do
10405 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10406 as_fn_executable_p "$ac_path_SED" || continue
10407 # Check for GNU ac_path_SED and select it if it is found.
10408 # Check for GNU $ac_path_SED
10409 case `"$ac_path_SED" --version 2>&1` in
10410 *GNU*)
10411 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10413 ac_count=0
10414 $as_echo_n 0123456789 >"conftest.in"
10415 while :
10417 cat "conftest.in" "conftest.in" >"conftest.tmp"
10418 mv "conftest.tmp" "conftest.in"
10419 cp "conftest.in" "conftest.nl"
10420 $as_echo '' >> "conftest.nl"
10421 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10422 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10423 as_fn_arith $ac_count + 1 && ac_count=$as_val
10424 if test $ac_count -gt ${ac_path_SED_max-0}; then
10425 # Best one so far, save it but keep looking for a better one
10426 ac_cv_path_SED="$ac_path_SED"
10427 ac_path_SED_max=$ac_count
10429 # 10*(2^10) chars as input seems more than enough
10430 test $ac_count -gt 10 && break
10431 done
10432 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10433 esac
10435 $ac_path_SED_found && break 3
10436 done
10437 done
10438 done
10439 IFS=$as_save_IFS
10440 if test -z "$ac_cv_path_SED"; then
10441 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10443 else
10444 ac_cv_path_SED=$SED
10448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10449 $as_echo "$ac_cv_path_SED" >&6; }
10450 SED="$ac_cv_path_SED"
10451 rm -f conftest.sed
10454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10455 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10456 if ${ac_cv_path_GREP+:} false; then :
10457 $as_echo_n "(cached) " >&6
10458 else
10459 if test -z "$GREP"; then
10460 ac_path_GREP_found=false
10461 # Loop through the user's path and test for each of PROGNAME-LIST
10462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10463 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10465 IFS=$as_save_IFS
10466 test -z "$as_dir" && as_dir=.
10467 for ac_prog in grep ggrep; do
10468 for ac_exec_ext in '' $ac_executable_extensions; do
10469 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10470 as_fn_executable_p "$ac_path_GREP" || continue
10471 # Check for GNU ac_path_GREP and select it if it is found.
10472 # Check for GNU $ac_path_GREP
10473 case `"$ac_path_GREP" --version 2>&1` in
10474 *GNU*)
10475 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10477 ac_count=0
10478 $as_echo_n 0123456789 >"conftest.in"
10479 while :
10481 cat "conftest.in" "conftest.in" >"conftest.tmp"
10482 mv "conftest.tmp" "conftest.in"
10483 cp "conftest.in" "conftest.nl"
10484 $as_echo 'GREP' >> "conftest.nl"
10485 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10486 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10487 as_fn_arith $ac_count + 1 && ac_count=$as_val
10488 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10489 # Best one so far, save it but keep looking for a better one
10490 ac_cv_path_GREP="$ac_path_GREP"
10491 ac_path_GREP_max=$ac_count
10493 # 10*(2^10) chars as input seems more than enough
10494 test $ac_count -gt 10 && break
10495 done
10496 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10497 esac
10499 $ac_path_GREP_found && break 3
10500 done
10501 done
10502 done
10503 IFS=$as_save_IFS
10504 if test -z "$ac_cv_path_GREP"; then
10505 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10507 else
10508 ac_cv_path_GREP=$GREP
10512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10513 $as_echo "$ac_cv_path_GREP" >&6; }
10514 GREP="$ac_cv_path_GREP"
10517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10518 $as_echo_n "checking for egrep... " >&6; }
10519 if ${ac_cv_path_EGREP+:} false; then :
10520 $as_echo_n "(cached) " >&6
10521 else
10522 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10523 then ac_cv_path_EGREP="$GREP -E"
10524 else
10525 if test -z "$EGREP"; then
10526 ac_path_EGREP_found=false
10527 # Loop through the user's path and test for each of PROGNAME-LIST
10528 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10529 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10531 IFS=$as_save_IFS
10532 test -z "$as_dir" && as_dir=.
10533 for ac_prog in egrep; do
10534 for ac_exec_ext in '' $ac_executable_extensions; do
10535 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10536 as_fn_executable_p "$ac_path_EGREP" || continue
10537 # Check for GNU ac_path_EGREP and select it if it is found.
10538 # Check for GNU $ac_path_EGREP
10539 case `"$ac_path_EGREP" --version 2>&1` in
10540 *GNU*)
10541 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10543 ac_count=0
10544 $as_echo_n 0123456789 >"conftest.in"
10545 while :
10547 cat "conftest.in" "conftest.in" >"conftest.tmp"
10548 mv "conftest.tmp" "conftest.in"
10549 cp "conftest.in" "conftest.nl"
10550 $as_echo 'EGREP' >> "conftest.nl"
10551 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10552 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10553 as_fn_arith $ac_count + 1 && ac_count=$as_val
10554 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10555 # Best one so far, save it but keep looking for a better one
10556 ac_cv_path_EGREP="$ac_path_EGREP"
10557 ac_path_EGREP_max=$ac_count
10559 # 10*(2^10) chars as input seems more than enough
10560 test $ac_count -gt 10 && break
10561 done
10562 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10563 esac
10565 $ac_path_EGREP_found && break 3
10566 done
10567 done
10568 done
10569 IFS=$as_save_IFS
10570 if test -z "$ac_cv_path_EGREP"; then
10571 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10573 else
10574 ac_cv_path_EGREP=$EGREP
10579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10580 $as_echo "$ac_cv_path_EGREP" >&6; }
10581 EGREP="$ac_cv_path_EGREP"
10584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10585 $as_echo_n "checking for ANSI C header files... " >&6; }
10586 if ${ac_cv_header_stdc+:} false; then :
10587 $as_echo_n "(cached) " >&6
10588 else
10589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10590 /* end confdefs.h. */
10591 #include <stdlib.h>
10592 #include <stdarg.h>
10593 #include <string.h>
10594 #include <float.h>
10597 main ()
10601 return 0;
10603 _ACEOF
10604 if ac_fn_c_try_compile "$LINENO"; then :
10605 ac_cv_header_stdc=yes
10606 else
10607 ac_cv_header_stdc=no
10609 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10611 if test $ac_cv_header_stdc = yes; then
10612 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10614 /* end confdefs.h. */
10615 #include <string.h>
10617 _ACEOF
10618 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10619 $EGREP "memchr" >/dev/null 2>&1; then :
10621 else
10622 ac_cv_header_stdc=no
10624 rm -f conftest*
10628 if test $ac_cv_header_stdc = yes; then
10629 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10631 /* end confdefs.h. */
10632 #include <stdlib.h>
10634 _ACEOF
10635 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10636 $EGREP "free" >/dev/null 2>&1; then :
10638 else
10639 ac_cv_header_stdc=no
10641 rm -f conftest*
10645 if test $ac_cv_header_stdc = yes; then
10646 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10647 if test "$cross_compiling" = yes; then :
10649 else
10650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10651 /* end confdefs.h. */
10652 #include <ctype.h>
10653 #include <stdlib.h>
10654 #if ((' ' & 0x0FF) == 0x020)
10655 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10656 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10657 #else
10658 # define ISLOWER(c) \
10659 (('a' <= (c) && (c) <= 'i') \
10660 || ('j' <= (c) && (c) <= 'r') \
10661 || ('s' <= (c) && (c) <= 'z'))
10662 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10663 #endif
10665 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10667 main ()
10669 int i;
10670 for (i = 0; i < 256; i++)
10671 if (XOR (islower (i), ISLOWER (i))
10672 || toupper (i) != TOUPPER (i))
10673 return 2;
10674 return 0;
10676 _ACEOF
10677 if ac_fn_c_try_run "$LINENO"; then :
10679 else
10680 ac_cv_header_stdc=no
10682 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10683 conftest.$ac_objext conftest.beam conftest.$ac_ext
10688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10689 $as_echo "$ac_cv_header_stdc" >&6; }
10690 if test $ac_cv_header_stdc = yes; then
10692 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10696 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10697 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10698 inttypes.h stdint.h unistd.h
10699 do :
10700 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10701 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10703 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10704 cat >>confdefs.h <<_ACEOF
10705 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10706 _ACEOF
10710 done
10713 if test "$PORTNAME" != "win32"; then :
10714 # then
10719 ac_ext=c
10720 ac_cpp='$CPP $CPPFLAGS'
10721 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10722 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10723 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10725 ax_pthread_ok=no
10727 # We used to check for pthread.h first, but this fails if pthread.h
10728 # requires special compiler flags (e.g. on Tru64 or Sequent).
10729 # It gets checked for in the link test anyway.
10731 # First of all, check if the user has set any of the PTHREAD_LIBS,
10732 # etcetera environment variables, and if threads linking works using
10733 # them:
10734 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10735 ax_pthread_save_CC="$CC"
10736 ax_pthread_save_CFLAGS="$CFLAGS"
10737 ax_pthread_save_LIBS="$LIBS"
10738 if test "x$PTHREAD_CC" != "x"; then :
10739 CC="$PTHREAD_CC"
10741 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10742 LIBS="$PTHREAD_LIBS $LIBS"
10743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10744 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10746 /* end confdefs.h. */
10748 /* Override any GCC internal prototype to avoid an error.
10749 Use char because int might match the return type of a GCC
10750 builtin and then its argument prototype would still apply. */
10751 #ifdef __cplusplus
10752 extern "C"
10753 #endif
10754 char pthread_join ();
10756 main ()
10758 return pthread_join ();
10760 return 0;
10762 _ACEOF
10763 if ac_fn_c_try_link "$LINENO"; then :
10764 ax_pthread_ok=yes
10766 rm -f core conftest.err conftest.$ac_objext \
10767 conftest$ac_exeext conftest.$ac_ext
10768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10769 $as_echo "$ax_pthread_ok" >&6; }
10770 if test "x$ax_pthread_ok" = "xno"; then
10771 PTHREAD_LIBS=""
10772 PTHREAD_CFLAGS=""
10774 CC="$ax_pthread_save_CC"
10775 CFLAGS="$ax_pthread_save_CFLAGS"
10776 LIBS="$ax_pthread_save_LIBS"
10779 # We must check for the threads library under a number of different
10780 # names; the ordering is very important because some systems
10781 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10782 # libraries is broken (non-POSIX).
10784 # Create a list of thread flags to try. Items starting with a "-" are
10785 # C compiler flags, and other items are library names, except for "none"
10786 # which indicates that we try without any flags at all, and "pthread-config"
10787 # which is a program returning the flags for the Pth emulation library.
10789 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10791 # The ordering *is* (sometimes) important. Some notes on the
10792 # individual items follow:
10794 # pthreads: AIX (must check this before -lpthread)
10795 # none: in case threads are in libc; should be tried before -Kthread and
10796 # other compiler flags to prevent continual compiler warnings
10797 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10798 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10799 # (Note: HP C rejects this with "bad form for `-t' option")
10800 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10801 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10802 # doesn't hurt to check since this sometimes defines pthreads and
10803 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
10804 # is present but should not be used directly; and before -mthreads,
10805 # because the compiler interprets this as "-mt" + "-hreads")
10806 # -mthreads: Mingw32/gcc, Lynx/gcc
10807 # pthread: Linux, etcetera
10808 # --thread-safe: KAI C++
10809 # pthread-config: use pthread-config program (for GNU Pth library)
10811 case $host_os in
10813 freebsd*)
10815 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10816 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10818 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10821 hpux*)
10823 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10824 # multi-threading and also sets -lpthread."
10826 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10829 openedition*)
10831 # IBM z/OS requires a feature-test macro to be defined in order to
10832 # enable POSIX threads at all, so give the user a hint if this is
10833 # not set. (We don't define these ourselves, as they can affect
10834 # other portions of the system API in unpredictable ways.)
10836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10837 /* end confdefs.h. */
10839 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10840 AX_PTHREAD_ZOS_MISSING
10841 # endif
10843 _ACEOF
10844 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10845 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10846 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10847 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10849 rm -f conftest*
10853 solaris*)
10855 # On Solaris (at least, for some versions), libc contains stubbed
10856 # (non-functional) versions of the pthreads routines, so link-based
10857 # tests will erroneously succeed. (N.B.: The stubs are missing
10858 # pthread_cleanup_push, or rather a function called by this macro,
10859 # so we could check for that, but who knows whether they'll stub
10860 # that too in a future libc.) So we'll check first for the
10861 # standard Solaris way of linking pthreads (-mt -lpthread).
10863 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10865 esac
10867 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10869 if test "x$GCC" = "xyes"; then :
10870 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10873 # The presence of a feature test macro requesting re-entrant function
10874 # definitions is, on some systems, a strong hint that pthreads support is
10875 # correctly enabled
10877 case $host_os in
10878 darwin* | hpux* | linux* | osf* | solaris*)
10879 ax_pthread_check_macro="_REENTRANT"
10882 aix*)
10883 ax_pthread_check_macro="_THREAD_SAFE"
10887 ax_pthread_check_macro="--"
10889 esac
10890 if test "x$ax_pthread_check_macro" = "x--"; then :
10891 ax_pthread_check_cond=0
10892 else
10893 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10896 # Are we compiling with Clang?
10898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10899 $as_echo_n "checking whether $CC is Clang... " >&6; }
10900 if ${ax_cv_PTHREAD_CLANG+:} false; then :
10901 $as_echo_n "(cached) " >&6
10902 else
10903 ax_cv_PTHREAD_CLANG=no
10904 # Note that Autoconf sets GCC=yes for Clang as well as GCC
10905 if test "x$GCC" = "xyes"; then
10906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10907 /* end confdefs.h. */
10908 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10909 # if defined(__clang__) && defined(__llvm__)
10910 AX_PTHREAD_CC_IS_CLANG
10911 # endif
10913 _ACEOF
10914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10915 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10916 ax_cv_PTHREAD_CLANG=yes
10918 rm -f conftest*
10923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10924 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10925 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10927 ax_pthread_clang_warning=no
10929 # Clang needs special handling, because older versions handle the -pthread
10930 # option in a rather... idiosyncratic way
10932 if test "x$ax_pthread_clang" = "xyes"; then
10934 # Clang takes -pthread; it has never supported any other flag
10936 # (Note 1: This will need to be revisited if a system that Clang
10937 # supports has POSIX threads in a separate library. This tends not
10938 # to be the way of modern systems, but it's conceivable.)
10940 # (Note 2: On some systems, notably Darwin, -pthread is not needed
10941 # to get POSIX threads support; the API is always present and
10942 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
10943 # -pthread does define _REENTRANT, and while the Darwin headers
10944 # ignore this macro, third-party headers might not.)
10946 PTHREAD_CFLAGS="-pthread"
10947 PTHREAD_LIBS=
10949 ax_pthread_ok=yes
10951 # However, older versions of Clang make a point of warning the user
10952 # that, in an invocation where only linking and no compilation is
10953 # taking place, the -pthread option has no effect ("argument unused
10954 # during compilation"). They expect -pthread to be passed in only
10955 # when source code is being compiled.
10957 # Problem is, this is at odds with the way Automake and most other
10958 # C build frameworks function, which is that the same flags used in
10959 # compilation (CFLAGS) are also used in linking. Many systems
10960 # supported by AX_PTHREAD require exactly this for POSIX threads
10961 # support, and in fact it is often not straightforward to specify a
10962 # flag that is used only in the compilation phase and not in
10963 # linking. Such a scenario is extremely rare in practice.
10965 # Even though use of the -pthread flag in linking would only print
10966 # a warning, this can be a nuisance for well-run software projects
10967 # that build with -Werror. So if the active version of Clang has
10968 # this misfeature, we search for an option to squash it.
10970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10971 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10972 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10973 $as_echo_n "(cached) " >&6
10974 else
10975 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10976 # Create an alternate version of $ac_link that compiles and
10977 # links in two steps (.c -> .o, .o -> exe) instead of one
10978 # (.c -> exe), because the warning occurs only in the second
10979 # step
10980 ax_pthread_save_ac_link="$ac_link"
10981 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10982 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
10983 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10984 ax_pthread_save_CFLAGS="$CFLAGS"
10985 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10986 if test "x$ax_pthread_try" = "xunknown"; then :
10987 break
10989 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10990 ac_link="$ax_pthread_save_ac_link"
10991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10992 /* end confdefs.h. */
10993 int main(void){return 0;}
10994 _ACEOF
10995 if ac_fn_c_try_link "$LINENO"; then :
10996 ac_link="$ax_pthread_2step_ac_link"
10997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10998 /* end confdefs.h. */
10999 int main(void){return 0;}
11000 _ACEOF
11001 if ac_fn_c_try_link "$LINENO"; then :
11002 break
11004 rm -f core conftest.err conftest.$ac_objext \
11005 conftest$ac_exeext conftest.$ac_ext
11008 rm -f core conftest.err conftest.$ac_objext \
11009 conftest$ac_exeext conftest.$ac_ext
11010 done
11011 ac_link="$ax_pthread_save_ac_link"
11012 CFLAGS="$ax_pthread_save_CFLAGS"
11013 if test "x$ax_pthread_try" = "x"; then :
11014 ax_pthread_try=no
11016 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
11019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
11020 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
11022 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
11023 no | unknown) ;;
11024 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
11025 esac
11027 fi # $ax_pthread_clang = yes
11029 if test "x$ax_pthread_ok" = "xno"; then
11030 for ax_pthread_try_flag in $ax_pthread_flags; do
11032 case $ax_pthread_try_flag in
11033 none)
11034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
11035 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
11038 -mt,pthread)
11039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
11040 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
11041 PTHREAD_CFLAGS="-mt"
11042 PTHREAD_LIBS="-lpthread"
11046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
11047 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
11048 PTHREAD_CFLAGS="$ax_pthread_try_flag"
11051 pthread-config)
11052 # Extract the first word of "pthread-config", so it can be a program name with args.
11053 set dummy pthread-config; ac_word=$2
11054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11055 $as_echo_n "checking for $ac_word... " >&6; }
11056 if ${ac_cv_prog_ax_pthread_config+:} false; then :
11057 $as_echo_n "(cached) " >&6
11058 else
11059 if test -n "$ax_pthread_config"; then
11060 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
11061 else
11062 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11063 for as_dir in $PATH
11065 IFS=$as_save_IFS
11066 test -z "$as_dir" && as_dir=.
11067 for ac_exec_ext in '' $ac_executable_extensions; do
11068 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11069 ac_cv_prog_ax_pthread_config="yes"
11070 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11071 break 2
11073 done
11074 done
11075 IFS=$as_save_IFS
11077 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
11080 ax_pthread_config=$ac_cv_prog_ax_pthread_config
11081 if test -n "$ax_pthread_config"; then
11082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11083 $as_echo "$ax_pthread_config" >&6; }
11084 else
11085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11086 $as_echo "no" >&6; }
11090 if test "x$ax_pthread_config" = "xno"; then :
11091 continue
11093 PTHREAD_CFLAGS="`pthread-config --cflags`"
11094 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11099 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11100 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11102 esac
11104 ax_pthread_save_CFLAGS="$CFLAGS"
11105 ax_pthread_save_LIBS="$LIBS"
11106 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11107 LIBS="$PTHREAD_LIBS $LIBS"
11109 # Check for various functions. We must include pthread.h,
11110 # since some functions may be macros. (On the Sequent, we
11111 # need a special flag -Kthread to make this header compile.)
11112 # We check for pthread_join because it is in -lpthread on IRIX
11113 # while pthread_create is in libc. We check for pthread_attr_init
11114 # due to DEC craziness with -lpthreads. We check for
11115 # pthread_cleanup_push because it is one of the few pthread
11116 # functions on Solaris that doesn't have a non-functional libc stub.
11117 # We try pthread_create on general principles.
11119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11120 /* end confdefs.h. */
11121 #include <pthread.h>
11122 # if $ax_pthread_check_cond
11123 # error "$ax_pthread_check_macro must be defined"
11124 # endif
11125 static void routine(void *a) { a = 0; }
11126 static void *start_routine(void *a) { return a; }
11128 main ()
11130 pthread_t th; pthread_attr_t attr;
11131 pthread_create(&th, 0, start_routine, 0);
11132 pthread_join(th, 0);
11133 pthread_attr_init(&attr);
11134 pthread_cleanup_push(routine, 0);
11135 pthread_cleanup_pop(0) /* ; */
11137 return 0;
11139 _ACEOF
11140 if ac_fn_c_try_link "$LINENO"; then :
11141 ax_pthread_ok=yes
11143 rm -f core conftest.err conftest.$ac_objext \
11144 conftest$ac_exeext conftest.$ac_ext
11146 CFLAGS="$ax_pthread_save_CFLAGS"
11147 LIBS="$ax_pthread_save_LIBS"
11149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11150 $as_echo "$ax_pthread_ok" >&6; }
11151 if test "x$ax_pthread_ok" = "xyes"; then :
11152 break
11155 PTHREAD_LIBS=""
11156 PTHREAD_CFLAGS=""
11157 done
11160 # Various other checks:
11161 if test "x$ax_pthread_ok" = "xyes"; then
11162 ax_pthread_save_CFLAGS="$CFLAGS"
11163 ax_pthread_save_LIBS="$LIBS"
11164 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11165 LIBS="$PTHREAD_LIBS $LIBS"
11167 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11169 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11170 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11171 $as_echo_n "(cached) " >&6
11172 else
11173 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11174 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11176 /* end confdefs.h. */
11177 #include <pthread.h>
11179 main ()
11181 int attr = $ax_pthread_attr; return attr /* ; */
11183 return 0;
11185 _ACEOF
11186 if ac_fn_c_try_link "$LINENO"; then :
11187 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11189 rm -f core conftest.err conftest.$ac_objext \
11190 conftest$ac_exeext conftest.$ac_ext
11191 done
11194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11195 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11196 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11197 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11198 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11200 cat >>confdefs.h <<_ACEOF
11201 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11202 _ACEOF
11204 ax_pthread_joinable_attr_defined=yes
11208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11209 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11210 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11211 $as_echo_n "(cached) " >&6
11212 else
11213 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11214 case $host_os in
11215 solaris*)
11216 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11218 esac
11221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11222 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11223 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11224 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11225 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11226 ax_pthread_special_flags_added=yes
11229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11230 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11231 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11232 $as_echo_n "(cached) " >&6
11233 else
11234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11235 /* end confdefs.h. */
11236 #include <pthread.h>
11238 main ()
11240 int i = PTHREAD_PRIO_INHERIT;
11242 return 0;
11244 _ACEOF
11245 if ac_fn_c_try_link "$LINENO"; then :
11246 ax_cv_PTHREAD_PRIO_INHERIT=yes
11247 else
11248 ax_cv_PTHREAD_PRIO_INHERIT=no
11250 rm -f core conftest.err conftest.$ac_objext \
11251 conftest$ac_exeext conftest.$ac_ext
11254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11255 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11256 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11257 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11259 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11261 ax_pthread_prio_inherit_defined=yes
11265 CFLAGS="$ax_pthread_save_CFLAGS"
11266 LIBS="$ax_pthread_save_LIBS"
11268 # More AIX lossage: compile with *_r variant
11269 if test "x$GCC" != "xyes"; then
11270 case $host_os in
11271 aix*)
11272 case "x/$CC" in #(
11273 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11274 #handle absolute path differently from PATH based program lookup
11275 case "x$CC" in #(
11276 x/*) :
11277 if as_fn_executable_p ${CC}_r; then :
11278 PTHREAD_CC="${CC}_r"
11279 fi ;; #(
11280 *) :
11281 for ac_prog in ${CC}_r
11283 # Extract the first word of "$ac_prog", so it can be a program name with args.
11284 set dummy $ac_prog; ac_word=$2
11285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11286 $as_echo_n "checking for $ac_word... " >&6; }
11287 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11288 $as_echo_n "(cached) " >&6
11289 else
11290 if test -n "$PTHREAD_CC"; then
11291 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11292 else
11293 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11294 for as_dir in $PATH
11296 IFS=$as_save_IFS
11297 test -z "$as_dir" && as_dir=.
11298 for ac_exec_ext in '' $ac_executable_extensions; do
11299 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11300 ac_cv_prog_PTHREAD_CC="$ac_prog"
11301 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11302 break 2
11304 done
11305 done
11306 IFS=$as_save_IFS
11310 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11311 if test -n "$PTHREAD_CC"; then
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11313 $as_echo "$PTHREAD_CC" >&6; }
11314 else
11315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11316 $as_echo "no" >&6; }
11320 test -n "$PTHREAD_CC" && break
11321 done
11322 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11324 esac ;; #(
11325 *) :
11327 esac
11329 esac
11333 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11339 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11340 if test "x$ax_pthread_ok" = "xyes"; then
11342 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11345 else
11346 ax_pthread_ok=no
11349 ac_ext=c
11350 ac_cpp='$CPP $CPPFLAGS'
11351 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11352 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11353 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11355 # set thread flags
11357 # Some platforms use these, so just define them. They can't hurt if they
11358 # are not supported.
11359 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE"
11361 # Check for *_r functions
11362 _CFLAGS="$CFLAGS"
11363 _LIBS="$LIBS"
11364 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11365 LIBS="$LIBS $PTHREAD_LIBS"
11367 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11368 if test "x$ac_cv_header_pthread_h" = xyes; then :
11370 else
11371 as_fn_error $? "
11372 pthread.h not found" "$LINENO" 5
11377 for ac_func in strerror_r
11378 do :
11379 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
11380 if test "x$ac_cv_func_strerror_r" = xyes; then :
11381 cat >>confdefs.h <<_ACEOF
11382 #define HAVE_STRERROR_R 1
11383 _ACEOF
11386 done
11389 # Do test here with the proper thread flags
11390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11391 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11392 if ${pgac_cv_func_strerror_r_int+:} false; then :
11393 $as_echo_n "(cached) " >&6
11394 else
11395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11396 /* end confdefs.h. */
11397 #include <string.h>
11399 main ()
11401 char buf[100];
11402 switch (strerror_r(1, buf, sizeof(buf)))
11403 { case 0: break; default: break; }
11406 return 0;
11408 _ACEOF
11409 if ac_fn_c_try_compile "$LINENO"; then :
11410 pgac_cv_func_strerror_r_int=yes
11411 else
11412 pgac_cv_func_strerror_r_int=no
11414 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11417 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11418 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11420 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11425 CFLAGS="$_CFLAGS"
11426 LIBS="$_LIBS"
11429 else
11430 # else
11431 # do not use values from template file
11432 PTHREAD_CFLAGS=
11433 PTHREAD_LIBS=
11435 fi # fi
11442 ## Libraries
11444 ## Most libraries are included only if they demonstrably provide a function
11445 ## we need, but libm is an exception: always include it, because there are
11446 ## too many compilers that play cute optimization games that will break
11447 ## probes for standard functions such as pow().
11450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11451 $as_echo_n "checking for main in -lm... " >&6; }
11452 if ${ac_cv_lib_m_main+:} false; then :
11453 $as_echo_n "(cached) " >&6
11454 else
11455 ac_check_lib_save_LIBS=$LIBS
11456 LIBS="-lm $LIBS"
11457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11458 /* end confdefs.h. */
11462 main ()
11464 return main ();
11466 return 0;
11468 _ACEOF
11469 if ac_fn_c_try_link "$LINENO"; then :
11470 ac_cv_lib_m_main=yes
11471 else
11472 ac_cv_lib_m_main=no
11474 rm -f core conftest.err conftest.$ac_objext \
11475 conftest$ac_exeext conftest.$ac_ext
11476 LIBS=$ac_check_lib_save_LIBS
11478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11479 $as_echo "$ac_cv_lib_m_main" >&6; }
11480 if test "x$ac_cv_lib_m_main" = xyes; then :
11481 cat >>confdefs.h <<_ACEOF
11482 #define HAVE_LIBM 1
11483 _ACEOF
11485 LIBS="-lm $LIBS"
11489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11490 $as_echo_n "checking for library containing setproctitle... " >&6; }
11491 if ${ac_cv_search_setproctitle+:} false; then :
11492 $as_echo_n "(cached) " >&6
11493 else
11494 ac_func_search_save_LIBS=$LIBS
11495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11496 /* end confdefs.h. */
11498 /* Override any GCC internal prototype to avoid an error.
11499 Use char because int might match the return type of a GCC
11500 builtin and then its argument prototype would still apply. */
11501 #ifdef __cplusplus
11502 extern "C"
11503 #endif
11504 char setproctitle ();
11506 main ()
11508 return setproctitle ();
11510 return 0;
11512 _ACEOF
11513 for ac_lib in '' util; do
11514 if test -z "$ac_lib"; then
11515 ac_res="none required"
11516 else
11517 ac_res=-l$ac_lib
11518 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11520 if ac_fn_c_try_link "$LINENO"; then :
11521 ac_cv_search_setproctitle=$ac_res
11523 rm -f core conftest.err conftest.$ac_objext \
11524 conftest$ac_exeext
11525 if ${ac_cv_search_setproctitle+:} false; then :
11526 break
11528 done
11529 if ${ac_cv_search_setproctitle+:} false; then :
11531 else
11532 ac_cv_search_setproctitle=no
11534 rm conftest.$ac_ext
11535 LIBS=$ac_func_search_save_LIBS
11537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11538 $as_echo "$ac_cv_search_setproctitle" >&6; }
11539 ac_res=$ac_cv_search_setproctitle
11540 if test "$ac_res" != no; then :
11541 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11545 # gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
11546 # when enabling asan the dlopen check doesn't notice that -ldl is actually
11547 # required. Just checking for dlsym() ought to suffice.
11548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
11549 $as_echo_n "checking for library containing dlsym... " >&6; }
11550 if ${ac_cv_search_dlsym+:} false; then :
11551 $as_echo_n "(cached) " >&6
11552 else
11553 ac_func_search_save_LIBS=$LIBS
11554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11555 /* end confdefs.h. */
11557 /* Override any GCC internal prototype to avoid an error.
11558 Use char because int might match the return type of a GCC
11559 builtin and then its argument prototype would still apply. */
11560 #ifdef __cplusplus
11561 extern "C"
11562 #endif
11563 char dlsym ();
11565 main ()
11567 return dlsym ();
11569 return 0;
11571 _ACEOF
11572 for ac_lib in '' dl; do
11573 if test -z "$ac_lib"; then
11574 ac_res="none required"
11575 else
11576 ac_res=-l$ac_lib
11577 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11579 if ac_fn_c_try_link "$LINENO"; then :
11580 ac_cv_search_dlsym=$ac_res
11582 rm -f core conftest.err conftest.$ac_objext \
11583 conftest$ac_exeext
11584 if ${ac_cv_search_dlsym+:} false; then :
11585 break
11587 done
11588 if ${ac_cv_search_dlsym+:} false; then :
11590 else
11591 ac_cv_search_dlsym=no
11593 rm conftest.$ac_ext
11594 LIBS=$ac_func_search_save_LIBS
11596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
11597 $as_echo "$ac_cv_search_dlsym" >&6; }
11598 ac_res=$ac_cv_search_dlsym
11599 if test "$ac_res" != no; then :
11600 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11605 $as_echo_n "checking for library containing socket... " >&6; }
11606 if ${ac_cv_search_socket+:} false; then :
11607 $as_echo_n "(cached) " >&6
11608 else
11609 ac_func_search_save_LIBS=$LIBS
11610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11611 /* end confdefs.h. */
11613 /* Override any GCC internal prototype to avoid an error.
11614 Use char because int might match the return type of a GCC
11615 builtin and then its argument prototype would still apply. */
11616 #ifdef __cplusplus
11617 extern "C"
11618 #endif
11619 char socket ();
11621 main ()
11623 return socket ();
11625 return 0;
11627 _ACEOF
11628 for ac_lib in '' socket ws2_32; do
11629 if test -z "$ac_lib"; then
11630 ac_res="none required"
11631 else
11632 ac_res=-l$ac_lib
11633 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11635 if ac_fn_c_try_link "$LINENO"; then :
11636 ac_cv_search_socket=$ac_res
11638 rm -f core conftest.err conftest.$ac_objext \
11639 conftest$ac_exeext
11640 if ${ac_cv_search_socket+:} false; then :
11641 break
11643 done
11644 if ${ac_cv_search_socket+:} false; then :
11646 else
11647 ac_cv_search_socket=no
11649 rm conftest.$ac_ext
11650 LIBS=$ac_func_search_save_LIBS
11652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11653 $as_echo "$ac_cv_search_socket" >&6; }
11654 ac_res=$ac_cv_search_socket
11655 if test "$ac_res" != no; then :
11656 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11661 $as_echo_n "checking for library containing getopt_long... " >&6; }
11662 if ${ac_cv_search_getopt_long+:} false; then :
11663 $as_echo_n "(cached) " >&6
11664 else
11665 ac_func_search_save_LIBS=$LIBS
11666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11667 /* end confdefs.h. */
11669 /* Override any GCC internal prototype to avoid an error.
11670 Use char because int might match the return type of a GCC
11671 builtin and then its argument prototype would still apply. */
11672 #ifdef __cplusplus
11673 extern "C"
11674 #endif
11675 char getopt_long ();
11677 main ()
11679 return getopt_long ();
11681 return 0;
11683 _ACEOF
11684 for ac_lib in '' getopt gnugetopt; do
11685 if test -z "$ac_lib"; then
11686 ac_res="none required"
11687 else
11688 ac_res=-l$ac_lib
11689 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11691 if ac_fn_c_try_link "$LINENO"; then :
11692 ac_cv_search_getopt_long=$ac_res
11694 rm -f core conftest.err conftest.$ac_objext \
11695 conftest$ac_exeext
11696 if ${ac_cv_search_getopt_long+:} false; then :
11697 break
11699 done
11700 if ${ac_cv_search_getopt_long+:} false; then :
11702 else
11703 ac_cv_search_getopt_long=no
11705 rm conftest.$ac_ext
11706 LIBS=$ac_func_search_save_LIBS
11708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11709 $as_echo "$ac_cv_search_getopt_long" >&6; }
11710 ac_res=$ac_cv_search_getopt_long
11711 if test "$ac_res" != no; then :
11712 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11717 $as_echo_n "checking for library containing shm_open... " >&6; }
11718 if ${ac_cv_search_shm_open+:} false; then :
11719 $as_echo_n "(cached) " >&6
11720 else
11721 ac_func_search_save_LIBS=$LIBS
11722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11723 /* end confdefs.h. */
11725 /* Override any GCC internal prototype to avoid an error.
11726 Use char because int might match the return type of a GCC
11727 builtin and then its argument prototype would still apply. */
11728 #ifdef __cplusplus
11729 extern "C"
11730 #endif
11731 char shm_open ();
11733 main ()
11735 return shm_open ();
11737 return 0;
11739 _ACEOF
11740 for ac_lib in '' rt; do
11741 if test -z "$ac_lib"; then
11742 ac_res="none required"
11743 else
11744 ac_res=-l$ac_lib
11745 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11747 if ac_fn_c_try_link "$LINENO"; then :
11748 ac_cv_search_shm_open=$ac_res
11750 rm -f core conftest.err conftest.$ac_objext \
11751 conftest$ac_exeext
11752 if ${ac_cv_search_shm_open+:} false; then :
11753 break
11755 done
11756 if ${ac_cv_search_shm_open+:} false; then :
11758 else
11759 ac_cv_search_shm_open=no
11761 rm conftest.$ac_ext
11762 LIBS=$ac_func_search_save_LIBS
11764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11765 $as_echo "$ac_cv_search_shm_open" >&6; }
11766 ac_res=$ac_cv_search_shm_open
11767 if test "$ac_res" != no; then :
11768 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11773 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11774 if ${ac_cv_search_shm_unlink+:} false; then :
11775 $as_echo_n "(cached) " >&6
11776 else
11777 ac_func_search_save_LIBS=$LIBS
11778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11779 /* end confdefs.h. */
11781 /* Override any GCC internal prototype to avoid an error.
11782 Use char because int might match the return type of a GCC
11783 builtin and then its argument prototype would still apply. */
11784 #ifdef __cplusplus
11785 extern "C"
11786 #endif
11787 char shm_unlink ();
11789 main ()
11791 return shm_unlink ();
11793 return 0;
11795 _ACEOF
11796 for ac_lib in '' rt; do
11797 if test -z "$ac_lib"; then
11798 ac_res="none required"
11799 else
11800 ac_res=-l$ac_lib
11801 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11803 if ac_fn_c_try_link "$LINENO"; then :
11804 ac_cv_search_shm_unlink=$ac_res
11806 rm -f core conftest.err conftest.$ac_objext \
11807 conftest$ac_exeext
11808 if ${ac_cv_search_shm_unlink+:} false; then :
11809 break
11811 done
11812 if ${ac_cv_search_shm_unlink+:} false; then :
11814 else
11815 ac_cv_search_shm_unlink=no
11817 rm conftest.$ac_ext
11818 LIBS=$ac_func_search_save_LIBS
11820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11821 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11822 ac_res=$ac_cv_search_shm_unlink
11823 if test "$ac_res" != no; then :
11824 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11829 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11830 if ${ac_cv_search_clock_gettime+:} false; then :
11831 $as_echo_n "(cached) " >&6
11832 else
11833 ac_func_search_save_LIBS=$LIBS
11834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11835 /* end confdefs.h. */
11837 /* Override any GCC internal prototype to avoid an error.
11838 Use char because int might match the return type of a GCC
11839 builtin and then its argument prototype would still apply. */
11840 #ifdef __cplusplus
11841 extern "C"
11842 #endif
11843 char clock_gettime ();
11845 main ()
11847 return clock_gettime ();
11849 return 0;
11851 _ACEOF
11852 for ac_lib in '' rt; do
11853 if test -z "$ac_lib"; then
11854 ac_res="none required"
11855 else
11856 ac_res=-l$ac_lib
11857 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11859 if ac_fn_c_try_link "$LINENO"; then :
11860 ac_cv_search_clock_gettime=$ac_res
11862 rm -f core conftest.err conftest.$ac_objext \
11863 conftest$ac_exeext
11864 if ${ac_cv_search_clock_gettime+:} false; then :
11865 break
11867 done
11868 if ${ac_cv_search_clock_gettime+:} false; then :
11870 else
11871 ac_cv_search_clock_gettime=no
11873 rm conftest.$ac_ext
11874 LIBS=$ac_func_search_save_LIBS
11876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11877 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11878 ac_res=$ac_cv_search_clock_gettime
11879 if test "$ac_res" != no; then :
11880 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11884 # Cygwin:
11885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11886 $as_echo_n "checking for library containing shmget... " >&6; }
11887 if ${ac_cv_search_shmget+:} false; then :
11888 $as_echo_n "(cached) " >&6
11889 else
11890 ac_func_search_save_LIBS=$LIBS
11891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11892 /* end confdefs.h. */
11894 /* Override any GCC internal prototype to avoid an error.
11895 Use char because int might match the return type of a GCC
11896 builtin and then its argument prototype would still apply. */
11897 #ifdef __cplusplus
11898 extern "C"
11899 #endif
11900 char shmget ();
11902 main ()
11904 return shmget ();
11906 return 0;
11908 _ACEOF
11909 for ac_lib in '' cygipc; do
11910 if test -z "$ac_lib"; then
11911 ac_res="none required"
11912 else
11913 ac_res=-l$ac_lib
11914 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11916 if ac_fn_c_try_link "$LINENO"; then :
11917 ac_cv_search_shmget=$ac_res
11919 rm -f core conftest.err conftest.$ac_objext \
11920 conftest$ac_exeext
11921 if ${ac_cv_search_shmget+:} false; then :
11922 break
11924 done
11925 if ${ac_cv_search_shmget+:} false; then :
11927 else
11928 ac_cv_search_shmget=no
11930 rm conftest.$ac_ext
11931 LIBS=$ac_func_search_save_LIBS
11933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11934 $as_echo "$ac_cv_search_shmget" >&6; }
11935 ac_res=$ac_cv_search_shmget
11936 if test "$ac_res" != no; then :
11937 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11941 # *BSD:
11942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
11943 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
11944 if ${ac_cv_search_backtrace_symbols+:} false; then :
11945 $as_echo_n "(cached) " >&6
11946 else
11947 ac_func_search_save_LIBS=$LIBS
11948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11949 /* end confdefs.h. */
11951 /* Override any GCC internal prototype to avoid an error.
11952 Use char because int might match the return type of a GCC
11953 builtin and then its argument prototype would still apply. */
11954 #ifdef __cplusplus
11955 extern "C"
11956 #endif
11957 char backtrace_symbols ();
11959 main ()
11961 return backtrace_symbols ();
11963 return 0;
11965 _ACEOF
11966 for ac_lib in '' execinfo; do
11967 if test -z "$ac_lib"; then
11968 ac_res="none required"
11969 else
11970 ac_res=-l$ac_lib
11971 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11973 if ac_fn_c_try_link "$LINENO"; then :
11974 ac_cv_search_backtrace_symbols=$ac_res
11976 rm -f core conftest.err conftest.$ac_objext \
11977 conftest$ac_exeext
11978 if ${ac_cv_search_backtrace_symbols+:} false; then :
11979 break
11981 done
11982 if ${ac_cv_search_backtrace_symbols+:} false; then :
11984 else
11985 ac_cv_search_backtrace_symbols=no
11987 rm conftest.$ac_ext
11988 LIBS=$ac_func_search_save_LIBS
11990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
11991 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
11992 ac_res=$ac_cv_search_backtrace_symbols
11993 if test "$ac_res" != no; then :
11994 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
12000 $as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
12001 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12002 $as_echo_n "(cached) " >&6
12003 else
12004 ac_func_search_save_LIBS=$LIBS
12005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12006 /* end confdefs.h. */
12008 /* Override any GCC internal prototype to avoid an error.
12009 Use char because int might match the return type of a GCC
12010 builtin and then its argument prototype would still apply. */
12011 #ifdef __cplusplus
12012 extern "C"
12013 #endif
12014 char pthread_barrier_wait ();
12016 main ()
12018 return pthread_barrier_wait ();
12020 return 0;
12022 _ACEOF
12023 for ac_lib in '' pthread; do
12024 if test -z "$ac_lib"; then
12025 ac_res="none required"
12026 else
12027 ac_res=-l$ac_lib
12028 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12030 if ac_fn_c_try_link "$LINENO"; then :
12031 ac_cv_search_pthread_barrier_wait=$ac_res
12033 rm -f core conftest.err conftest.$ac_objext \
12034 conftest$ac_exeext
12035 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12036 break
12038 done
12039 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12041 else
12042 ac_cv_search_pthread_barrier_wait=no
12044 rm conftest.$ac_ext
12045 LIBS=$ac_func_search_save_LIBS
12047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_barrier_wait" >&5
12048 $as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
12049 ac_res=$ac_cv_search_pthread_barrier_wait
12050 if test "$ac_res" != no; then :
12051 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12056 if test "$with_readline" = yes; then
12059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
12060 $as_echo_n "checking for library containing readline... " >&6; }
12061 if ${pgac_cv_check_readline+:} false; then :
12062 $as_echo_n "(cached) " >&6
12063 else
12064 pgac_cv_check_readline=no
12065 pgac_save_LIBS=$LIBS
12066 if test x"$with_libedit_preferred" != x"yes"
12067 then READLINE_ORDER="-lreadline -ledit"
12068 else READLINE_ORDER="-ledit -lreadline"
12070 for pgac_rllib in $READLINE_ORDER ; do
12071 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
12072 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
12073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12074 /* end confdefs.h. */
12076 /* Override any GCC internal prototype to avoid an error.
12077 Use char because int might match the return type of a GCC
12078 builtin and then its argument prototype would still apply. */
12079 #ifdef __cplusplus
12080 extern "C"
12081 #endif
12082 char readline ();
12084 main ()
12086 return readline ();
12088 return 0;
12090 _ACEOF
12091 if ac_fn_c_try_link "$LINENO"; then :
12093 # Older NetBSD and OpenBSD have a broken linker that does not
12094 # recognize dependent libraries; assume curses is needed if we didn't
12095 # find any dependency.
12096 case $host_os in
12097 netbsd* | openbsd*)
12098 if test x"$pgac_lib" = x"" ; then
12099 pgac_lib=" -lcurses"
12100 fi ;;
12101 esac
12103 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12104 break
12107 rm -f core conftest.err conftest.$ac_objext \
12108 conftest$ac_exeext conftest.$ac_ext
12109 done
12110 if test "$pgac_cv_check_readline" != no ; then
12111 break
12113 done
12114 LIBS=$pgac_save_LIBS
12117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12118 $as_echo "$pgac_cv_check_readline" >&6; }
12119 if test "$pgac_cv_check_readline" != no ; then
12120 LIBS="$pgac_cv_check_readline $LIBS"
12122 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12127 if test x"$pgac_cv_check_readline" = x"no"; then
12128 as_fn_error $? "readline library not found
12129 If you have readline already installed, see config.log for details on the
12130 failure. It is possible the compiler isn't looking in the proper directory.
12131 Use --without-readline to disable readline support." "$LINENO" 5
12135 if test "$with_zlib" = yes; then
12136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12137 $as_echo_n "checking for inflate in -lz... " >&6; }
12138 if ${ac_cv_lib_z_inflate+:} false; then :
12139 $as_echo_n "(cached) " >&6
12140 else
12141 ac_check_lib_save_LIBS=$LIBS
12142 LIBS="-lz $LIBS"
12143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12144 /* end confdefs.h. */
12146 /* Override any GCC internal prototype to avoid an error.
12147 Use char because int might match the return type of a GCC
12148 builtin and then its argument prototype would still apply. */
12149 #ifdef __cplusplus
12150 extern "C"
12151 #endif
12152 char inflate ();
12154 main ()
12156 return inflate ();
12158 return 0;
12160 _ACEOF
12161 if ac_fn_c_try_link "$LINENO"; then :
12162 ac_cv_lib_z_inflate=yes
12163 else
12164 ac_cv_lib_z_inflate=no
12166 rm -f core conftest.err conftest.$ac_objext \
12167 conftest$ac_exeext conftest.$ac_ext
12168 LIBS=$ac_check_lib_save_LIBS
12170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12171 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12172 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12173 cat >>confdefs.h <<_ACEOF
12174 #define HAVE_LIBZ 1
12175 _ACEOF
12177 LIBS="-lz $LIBS"
12179 else
12180 as_fn_error $? "zlib library not found
12181 If you have zlib already installed, see config.log for details on the
12182 failure. It is possible the compiler isn't looking in the proper directory.
12183 Use --without-zlib to disable zlib support." "$LINENO" 5
12188 if test "$enable_spinlocks" = yes; then
12190 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
12192 else
12193 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12194 *** Not using spinlocks will cause poor performance." >&5
12195 $as_echo "$as_me: WARNING:
12196 *** Not using spinlocks will cause poor performance." >&2;}
12199 if test "$enable_atomics" = yes; then
12201 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
12203 else
12204 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12205 *** Not using atomic operations will cause poor performance." >&5
12206 $as_echo "$as_me: WARNING:
12207 *** Not using atomic operations will cause poor performance." >&2;}
12210 if test "$with_gssapi" = yes ; then
12211 if test "$PORTNAME" != "win32"; then
12212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_store_cred_into" >&5
12213 $as_echo_n "checking for library containing gss_store_cred_into... " >&6; }
12214 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12215 $as_echo_n "(cached) " >&6
12216 else
12217 ac_func_search_save_LIBS=$LIBS
12218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12219 /* end confdefs.h. */
12221 /* Override any GCC internal prototype to avoid an error.
12222 Use char because int might match the return type of a GCC
12223 builtin and then its argument prototype would still apply. */
12224 #ifdef __cplusplus
12225 extern "C"
12226 #endif
12227 char gss_store_cred_into ();
12229 main ()
12231 return gss_store_cred_into ();
12233 return 0;
12235 _ACEOF
12236 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12237 if test -z "$ac_lib"; then
12238 ac_res="none required"
12239 else
12240 ac_res=-l$ac_lib
12241 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12243 if ac_fn_c_try_link "$LINENO"; then :
12244 ac_cv_search_gss_store_cred_into=$ac_res
12246 rm -f core conftest.err conftest.$ac_objext \
12247 conftest$ac_exeext
12248 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12249 break
12251 done
12252 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12254 else
12255 ac_cv_search_gss_store_cred_into=no
12257 rm conftest.$ac_ext
12258 LIBS=$ac_func_search_save_LIBS
12260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_store_cred_into" >&5
12261 $as_echo "$ac_cv_search_gss_store_cred_into" >&6; }
12262 ac_res=$ac_cv_search_gss_store_cred_into
12263 if test "$ac_res" != no; then :
12264 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12266 else
12267 as_fn_error $? "could not find function 'gss_store_cred_into' required for GSSAPI" "$LINENO" 5
12270 else
12271 LIBS="$LIBS -lgssapi32"
12276 # SSL Library
12278 # There is currently only one supported SSL/TLS library: OpenSSL.
12283 # Check whether --with-ssl was given.
12284 if test "${with_ssl+set}" = set; then :
12285 withval=$with_ssl;
12286 case $withval in
12287 yes)
12288 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12291 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12296 esac
12301 if test x"$with_ssl" = x"" ; then
12302 with_ssl=no
12307 # Check whether --with-openssl was given.
12308 if test "${with_openssl+set}" = set; then :
12309 withval=$with_openssl;
12310 case $withval in
12311 yes)
12318 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12320 esac
12322 else
12323 with_openssl=no
12328 if test "$with_openssl" = yes ; then
12329 with_ssl=openssl
12332 if test "$with_ssl" = openssl ; then
12333 # Minimum required OpenSSL version is 1.0.2
12335 $as_echo "#define OPENSSL_API_COMPAT 0x10002000L" >>confdefs.h
12337 if test "$PORTNAME" != "win32"; then
12338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12339 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12340 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12341 $as_echo_n "(cached) " >&6
12342 else
12343 ac_check_lib_save_LIBS=$LIBS
12344 LIBS="-lcrypto $LIBS"
12345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12346 /* end confdefs.h. */
12348 /* Override any GCC internal prototype to avoid an error.
12349 Use char because int might match the return type of a GCC
12350 builtin and then its argument prototype would still apply. */
12351 #ifdef __cplusplus
12352 extern "C"
12353 #endif
12354 char CRYPTO_new_ex_data ();
12356 main ()
12358 return CRYPTO_new_ex_data ();
12360 return 0;
12362 _ACEOF
12363 if ac_fn_c_try_link "$LINENO"; then :
12364 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12365 else
12366 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12368 rm -f core conftest.err conftest.$ac_objext \
12369 conftest$ac_exeext conftest.$ac_ext
12370 LIBS=$ac_check_lib_save_LIBS
12372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12373 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12374 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12375 cat >>confdefs.h <<_ACEOF
12376 #define HAVE_LIBCRYPTO 1
12377 _ACEOF
12379 LIBS="-lcrypto $LIBS"
12381 else
12382 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12386 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12387 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12388 $as_echo_n "(cached) " >&6
12389 else
12390 ac_check_lib_save_LIBS=$LIBS
12391 LIBS="-lssl $LIBS"
12392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12393 /* end confdefs.h. */
12395 /* Override any GCC internal prototype to avoid an error.
12396 Use char because int might match the return type of a GCC
12397 builtin and then its argument prototype would still apply. */
12398 #ifdef __cplusplus
12399 extern "C"
12400 #endif
12401 char SSL_new ();
12403 main ()
12405 return SSL_new ();
12407 return 0;
12409 _ACEOF
12410 if ac_fn_c_try_link "$LINENO"; then :
12411 ac_cv_lib_ssl_SSL_new=yes
12412 else
12413 ac_cv_lib_ssl_SSL_new=no
12415 rm -f core conftest.err conftest.$ac_objext \
12416 conftest$ac_exeext conftest.$ac_ext
12417 LIBS=$ac_check_lib_save_LIBS
12419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12420 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12421 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12422 cat >>confdefs.h <<_ACEOF
12423 #define HAVE_LIBSSL 1
12424 _ACEOF
12426 LIBS="-lssl $LIBS"
12428 else
12429 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12432 else
12433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12434 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12435 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12436 $as_echo_n "(cached) " >&6
12437 else
12438 ac_func_search_save_LIBS=$LIBS
12439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12440 /* end confdefs.h. */
12442 /* Override any GCC internal prototype to avoid an error.
12443 Use char because int might match the return type of a GCC
12444 builtin and then its argument prototype would still apply. */
12445 #ifdef __cplusplus
12446 extern "C"
12447 #endif
12448 char CRYPTO_new_ex_data ();
12450 main ()
12452 return CRYPTO_new_ex_data ();
12454 return 0;
12456 _ACEOF
12457 for ac_lib in '' eay32 crypto; do
12458 if test -z "$ac_lib"; then
12459 ac_res="none required"
12460 else
12461 ac_res=-l$ac_lib
12462 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12464 if ac_fn_c_try_link "$LINENO"; then :
12465 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12467 rm -f core conftest.err conftest.$ac_objext \
12468 conftest$ac_exeext
12469 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12470 break
12472 done
12473 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12475 else
12476 ac_cv_search_CRYPTO_new_ex_data=no
12478 rm conftest.$ac_ext
12479 LIBS=$ac_func_search_save_LIBS
12481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12482 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12483 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12484 if test "$ac_res" != no; then :
12485 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12487 else
12488 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12492 $as_echo_n "checking for library containing SSL_new... " >&6; }
12493 if ${ac_cv_search_SSL_new+:} false; then :
12494 $as_echo_n "(cached) " >&6
12495 else
12496 ac_func_search_save_LIBS=$LIBS
12497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12498 /* end confdefs.h. */
12500 /* Override any GCC internal prototype to avoid an error.
12501 Use char because int might match the return type of a GCC
12502 builtin and then its argument prototype would still apply. */
12503 #ifdef __cplusplus
12504 extern "C"
12505 #endif
12506 char SSL_new ();
12508 main ()
12510 return SSL_new ();
12512 return 0;
12514 _ACEOF
12515 for ac_lib in '' ssleay32 ssl; do
12516 if test -z "$ac_lib"; then
12517 ac_res="none required"
12518 else
12519 ac_res=-l$ac_lib
12520 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12522 if ac_fn_c_try_link "$LINENO"; then :
12523 ac_cv_search_SSL_new=$ac_res
12525 rm -f core conftest.err conftest.$ac_objext \
12526 conftest$ac_exeext
12527 if ${ac_cv_search_SSL_new+:} false; then :
12528 break
12530 done
12531 if ${ac_cv_search_SSL_new+:} false; then :
12533 else
12534 ac_cv_search_SSL_new=no
12536 rm conftest.$ac_ext
12537 LIBS=$ac_func_search_save_LIBS
12539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12540 $as_echo "$ac_cv_search_SSL_new" >&6; }
12541 ac_res=$ac_cv_search_SSL_new
12542 if test "$ac_res" != no; then :
12543 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12545 else
12546 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12550 # Function introduced in OpenSSL 1.0.2, not in LibreSSL.
12551 for ac_func in SSL_CTX_set_cert_cb
12552 do :
12553 ac_fn_c_check_func "$LINENO" "SSL_CTX_set_cert_cb" "ac_cv_func_SSL_CTX_set_cert_cb"
12554 if test "x$ac_cv_func_SSL_CTX_set_cert_cb" = xyes; then :
12555 cat >>confdefs.h <<_ACEOF
12556 #define HAVE_SSL_CTX_SET_CERT_CB 1
12557 _ACEOF
12560 done
12562 # Functions introduced in OpenSSL 1.1.0. We used to check for
12563 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12564 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12565 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12566 # functions.
12567 for ac_func in OPENSSL_init_ssl BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free
12568 do :
12569 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12570 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12571 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12572 cat >>confdefs.h <<_ACEOF
12573 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12574 _ACEOF
12577 done
12579 # OpenSSL versions before 1.1.0 required setting callback functions, for
12580 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12581 # function was removed.
12582 for ac_func in CRYPTO_lock
12583 do :
12584 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12585 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12586 cat >>confdefs.h <<_ACEOF
12587 #define HAVE_CRYPTO_LOCK 1
12588 _ACEOF
12591 done
12593 # Function introduced in OpenSSL 1.1.1.
12594 for ac_func in X509_get_signature_info
12595 do :
12596 ac_fn_c_check_func "$LINENO" "X509_get_signature_info" "ac_cv_func_X509_get_signature_info"
12597 if test "x$ac_cv_func_X509_get_signature_info" = xyes; then :
12598 cat >>confdefs.h <<_ACEOF
12599 #define HAVE_X509_GET_SIGNATURE_INFO 1
12600 _ACEOF
12603 done
12606 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
12608 elif test "$with_ssl" != no ; then
12609 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
12613 if test "$with_pam" = yes ; then
12614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12615 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12616 if ${ac_cv_lib_pam_pam_start+:} false; then :
12617 $as_echo_n "(cached) " >&6
12618 else
12619 ac_check_lib_save_LIBS=$LIBS
12620 LIBS="-lpam $LIBS"
12621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12622 /* end confdefs.h. */
12624 /* Override any GCC internal prototype to avoid an error.
12625 Use char because int might match the return type of a GCC
12626 builtin and then its argument prototype would still apply. */
12627 #ifdef __cplusplus
12628 extern "C"
12629 #endif
12630 char pam_start ();
12632 main ()
12634 return pam_start ();
12636 return 0;
12638 _ACEOF
12639 if ac_fn_c_try_link "$LINENO"; then :
12640 ac_cv_lib_pam_pam_start=yes
12641 else
12642 ac_cv_lib_pam_pam_start=no
12644 rm -f core conftest.err conftest.$ac_objext \
12645 conftest$ac_exeext conftest.$ac_ext
12646 LIBS=$ac_check_lib_save_LIBS
12648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12649 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12650 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12651 cat >>confdefs.h <<_ACEOF
12652 #define HAVE_LIBPAM 1
12653 _ACEOF
12655 LIBS="-lpam $LIBS"
12657 else
12658 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12663 if test "$with_libxml" = yes ; then
12664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12665 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12666 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12667 $as_echo_n "(cached) " >&6
12668 else
12669 ac_check_lib_save_LIBS=$LIBS
12670 LIBS="-lxml2 $LIBS"
12671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12672 /* end confdefs.h. */
12674 /* Override any GCC internal prototype to avoid an error.
12675 Use char because int might match the return type of a GCC
12676 builtin and then its argument prototype would still apply. */
12677 #ifdef __cplusplus
12678 extern "C"
12679 #endif
12680 char xmlSaveToBuffer ();
12682 main ()
12684 return xmlSaveToBuffer ();
12686 return 0;
12688 _ACEOF
12689 if ac_fn_c_try_link "$LINENO"; then :
12690 ac_cv_lib_xml2_xmlSaveToBuffer=yes
12691 else
12692 ac_cv_lib_xml2_xmlSaveToBuffer=no
12694 rm -f core conftest.err conftest.$ac_objext \
12695 conftest$ac_exeext conftest.$ac_ext
12696 LIBS=$ac_check_lib_save_LIBS
12698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12699 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12700 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12701 cat >>confdefs.h <<_ACEOF
12702 #define HAVE_LIBXML2 1
12703 _ACEOF
12705 LIBS="-lxml2 $LIBS"
12707 else
12708 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12713 if test "$with_libxslt" = yes ; then
12714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12715 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12716 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12717 $as_echo_n "(cached) " >&6
12718 else
12719 ac_check_lib_save_LIBS=$LIBS
12720 LIBS="-lxslt $LIBS"
12721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12722 /* end confdefs.h. */
12724 /* Override any GCC internal prototype to avoid an error.
12725 Use char because int might match the return type of a GCC
12726 builtin and then its argument prototype would still apply. */
12727 #ifdef __cplusplus
12728 extern "C"
12729 #endif
12730 char xsltCleanupGlobals ();
12732 main ()
12734 return xsltCleanupGlobals ();
12736 return 0;
12738 _ACEOF
12739 if ac_fn_c_try_link "$LINENO"; then :
12740 ac_cv_lib_xslt_xsltCleanupGlobals=yes
12741 else
12742 ac_cv_lib_xslt_xsltCleanupGlobals=no
12744 rm -f core conftest.err conftest.$ac_objext \
12745 conftest$ac_exeext conftest.$ac_ext
12746 LIBS=$ac_check_lib_save_LIBS
12748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12749 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12750 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12751 cat >>confdefs.h <<_ACEOF
12752 #define HAVE_LIBXSLT 1
12753 _ACEOF
12755 LIBS="-lxslt $LIBS"
12757 else
12758 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12763 if test "$with_lz4" = yes ; then
12764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
12765 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
12766 if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
12767 $as_echo_n "(cached) " >&6
12768 else
12769 ac_check_lib_save_LIBS=$LIBS
12770 LIBS="-llz4 $LIBS"
12771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12772 /* end confdefs.h. */
12774 /* Override any GCC internal prototype to avoid an error.
12775 Use char because int might match the return type of a GCC
12776 builtin and then its argument prototype would still apply. */
12777 #ifdef __cplusplus
12778 extern "C"
12779 #endif
12780 char LZ4_compress_default ();
12782 main ()
12784 return LZ4_compress_default ();
12786 return 0;
12788 _ACEOF
12789 if ac_fn_c_try_link "$LINENO"; then :
12790 ac_cv_lib_lz4_LZ4_compress_default=yes
12791 else
12792 ac_cv_lib_lz4_LZ4_compress_default=no
12794 rm -f core conftest.err conftest.$ac_objext \
12795 conftest$ac_exeext conftest.$ac_ext
12796 LIBS=$ac_check_lib_save_LIBS
12798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5
12799 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
12800 if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
12801 cat >>confdefs.h <<_ACEOF
12802 #define HAVE_LIBLZ4 1
12803 _ACEOF
12805 LIBS="-llz4 $LIBS"
12807 else
12808 as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
12813 if test "$with_zstd" = yes ; then
12814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5
12815 $as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; }
12816 if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then :
12817 $as_echo_n "(cached) " >&6
12818 else
12819 ac_check_lib_save_LIBS=$LIBS
12820 LIBS="-lzstd $LIBS"
12821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12822 /* end confdefs.h. */
12824 /* Override any GCC internal prototype to avoid an error.
12825 Use char because int might match the return type of a GCC
12826 builtin and then its argument prototype would still apply. */
12827 #ifdef __cplusplus
12828 extern "C"
12829 #endif
12830 char ZSTD_compress ();
12832 main ()
12834 return ZSTD_compress ();
12836 return 0;
12838 _ACEOF
12839 if ac_fn_c_try_link "$LINENO"; then :
12840 ac_cv_lib_zstd_ZSTD_compress=yes
12841 else
12842 ac_cv_lib_zstd_ZSTD_compress=no
12844 rm -f core conftest.err conftest.$ac_objext \
12845 conftest$ac_exeext conftest.$ac_ext
12846 LIBS=$ac_check_lib_save_LIBS
12848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5
12849 $as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; }
12850 if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then :
12851 cat >>confdefs.h <<_ACEOF
12852 #define HAVE_LIBZSTD 1
12853 _ACEOF
12855 LIBS="-lzstd $LIBS"
12857 else
12858 as_fn_error $? "library 'zstd' is required for ZSTD support" "$LINENO" 5
12863 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12864 if test "$with_ldap" = yes ; then
12865 _LIBS="$LIBS"
12866 if test "$PORTNAME" != "win32"; then
12867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12868 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12869 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12870 $as_echo_n "(cached) " >&6
12871 else
12872 ac_check_lib_save_LIBS=$LIBS
12873 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12875 /* end confdefs.h. */
12877 /* Override any GCC internal prototype to avoid an error.
12878 Use char because int might match the return type of a GCC
12879 builtin and then its argument prototype would still apply. */
12880 #ifdef __cplusplus
12881 extern "C"
12882 #endif
12883 char ldap_bind ();
12885 main ()
12887 return ldap_bind ();
12889 return 0;
12891 _ACEOF
12892 if ac_fn_c_try_link "$LINENO"; then :
12893 ac_cv_lib_ldap_ldap_bind=yes
12894 else
12895 ac_cv_lib_ldap_ldap_bind=no
12897 rm -f core conftest.err conftest.$ac_objext \
12898 conftest$ac_exeext conftest.$ac_ext
12899 LIBS=$ac_check_lib_save_LIBS
12901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12902 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12903 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12904 cat >>confdefs.h <<_ACEOF
12905 #define HAVE_LIBLDAP 1
12906 _ACEOF
12908 LIBS="-lldap $LIBS"
12910 else
12911 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12914 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12915 # This test is carried out against libldap.
12916 for ac_func in ldap_initialize
12917 do :
12918 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12919 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12920 cat >>confdefs.h <<_ACEOF
12921 #define HAVE_LDAP_INITIALIZE 1
12922 _ACEOF
12925 done
12927 # The separate ldap_r library only exists in OpenLDAP < 2.5, and if we
12928 # have 2.5 or later, we shouldn't even probe for ldap_r (we might find a
12929 # library from a separate OpenLDAP installation). The most reliable
12930 # way to check that is to check for a function introduced in 2.5.
12931 ac_fn_c_check_func "$LINENO" "ldap_verify_credentials" "ac_cv_func_ldap_verify_credentials"
12932 if test "x$ac_cv_func_ldap_verify_credentials" = xyes; then :
12933 thread_safe_libldap=yes
12934 else
12935 thread_safe_libldap=no
12938 if test "$thread_safe_libldap" = no; then
12939 # Use ldap_r for FE if available, else assume ldap is thread-safe.
12940 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
12941 LIBS="$_LIBS"
12942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
12943 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
12944 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
12945 $as_echo_n "(cached) " >&6
12946 else
12947 ac_check_lib_save_LIBS=$LIBS
12948 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12950 /* end confdefs.h. */
12952 /* Override any GCC internal prototype to avoid an error.
12953 Use char because int might match the return type of a GCC
12954 builtin and then its argument prototype would still apply. */
12955 #ifdef __cplusplus
12956 extern "C"
12957 #endif
12958 char ldap_bind ();
12960 main ()
12962 return ldap_bind ();
12964 return 0;
12966 _ACEOF
12967 if ac_fn_c_try_link "$LINENO"; then :
12968 ac_cv_lib_ldap_r_ldap_bind=yes
12969 else
12970 ac_cv_lib_ldap_r_ldap_bind=no
12972 rm -f core conftest.err conftest.$ac_objext \
12973 conftest$ac_exeext conftest.$ac_ext
12974 LIBS=$ac_check_lib_save_LIBS
12976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
12977 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
12978 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
12979 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12980 else
12981 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12984 else
12985 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12987 else
12988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12989 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12990 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12991 $as_echo_n "(cached) " >&6
12992 else
12993 ac_check_lib_save_LIBS=$LIBS
12994 LIBS="-lwldap32 $LIBS"
12995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12996 /* end confdefs.h. */
12998 /* Override any GCC internal prototype to avoid an error.
12999 Use char because int might match the return type of a GCC
13000 builtin and then its argument prototype would still apply. */
13001 #ifdef __cplusplus
13002 extern "C"
13003 #endif
13004 char ldap_bind ();
13006 main ()
13008 return ldap_bind ();
13010 return 0;
13012 _ACEOF
13013 if ac_fn_c_try_link "$LINENO"; then :
13014 ac_cv_lib_wldap32_ldap_bind=yes
13015 else
13016 ac_cv_lib_wldap32_ldap_bind=no
13018 rm -f core conftest.err conftest.$ac_objext \
13019 conftest$ac_exeext conftest.$ac_ext
13020 LIBS=$ac_check_lib_save_LIBS
13022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
13023 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
13024 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
13025 cat >>confdefs.h <<_ACEOF
13026 #define HAVE_LIBWLDAP32 1
13027 _ACEOF
13029 LIBS="-lwldap32 $LIBS"
13031 else
13032 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13035 LDAP_LIBS_FE="-lwldap32"
13036 LDAP_LIBS_BE="-lwldap32"
13038 LIBS="$_LIBS"
13043 # for contrib/sepgsql
13044 if test "$with_selinux" = yes; then
13045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
13046 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
13047 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
13048 $as_echo_n "(cached) " >&6
13049 else
13050 ac_check_lib_save_LIBS=$LIBS
13051 LIBS="-lselinux $LIBS"
13052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13053 /* end confdefs.h. */
13055 /* Override any GCC internal prototype to avoid an error.
13056 Use char because int might match the return type of a GCC
13057 builtin and then its argument prototype would still apply. */
13058 #ifdef __cplusplus
13059 extern "C"
13060 #endif
13061 char security_compute_create_name ();
13063 main ()
13065 return security_compute_create_name ();
13067 return 0;
13069 _ACEOF
13070 if ac_fn_c_try_link "$LINENO"; then :
13071 ac_cv_lib_selinux_security_compute_create_name=yes
13072 else
13073 ac_cv_lib_selinux_security_compute_create_name=no
13075 rm -f core conftest.err conftest.$ac_objext \
13076 conftest$ac_exeext conftest.$ac_ext
13077 LIBS=$ac_check_lib_save_LIBS
13079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
13080 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
13081 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
13082 cat >>confdefs.h <<_ACEOF
13083 #define HAVE_LIBSELINUX 1
13084 _ACEOF
13086 LIBS="-lselinux $LIBS"
13088 else
13089 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
13094 # for contrib/uuid-ossp
13095 if test "$with_uuid" = bsd ; then
13096 # On BSD, the UUID functions are in libc
13097 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
13098 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
13099 UUID_LIBS=""
13100 else
13101 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
13104 elif test "$with_uuid" = e2fs ; then
13105 # On macOS, the UUID functions are in libc
13106 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
13107 if test "x$ac_cv_func_uuid_generate" = xyes; then :
13108 UUID_LIBS=""
13109 else
13110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
13111 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
13112 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
13113 $as_echo_n "(cached) " >&6
13114 else
13115 ac_check_lib_save_LIBS=$LIBS
13116 LIBS="-luuid $LIBS"
13117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13118 /* end confdefs.h. */
13120 /* Override any GCC internal prototype to avoid an error.
13121 Use char because int might match the return type of a GCC
13122 builtin and then its argument prototype would still apply. */
13123 #ifdef __cplusplus
13124 extern "C"
13125 #endif
13126 char uuid_generate ();
13128 main ()
13130 return uuid_generate ();
13132 return 0;
13134 _ACEOF
13135 if ac_fn_c_try_link "$LINENO"; then :
13136 ac_cv_lib_uuid_uuid_generate=yes
13137 else
13138 ac_cv_lib_uuid_uuid_generate=no
13140 rm -f core conftest.err conftest.$ac_objext \
13141 conftest$ac_exeext conftest.$ac_ext
13142 LIBS=$ac_check_lib_save_LIBS
13144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13145 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13146 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13147 UUID_LIBS="-luuid"
13148 else
13149 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13154 elif test "$with_uuid" = ossp ; then
13155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13156 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13157 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13158 $as_echo_n "(cached) " >&6
13159 else
13160 ac_check_lib_save_LIBS=$LIBS
13161 LIBS="-lossp-uuid $LIBS"
13162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13163 /* end confdefs.h. */
13165 /* Override any GCC internal prototype to avoid an error.
13166 Use char because int might match the return type of a GCC
13167 builtin and then its argument prototype would still apply. */
13168 #ifdef __cplusplus
13169 extern "C"
13170 #endif
13171 char uuid_export ();
13173 main ()
13175 return uuid_export ();
13177 return 0;
13179 _ACEOF
13180 if ac_fn_c_try_link "$LINENO"; then :
13181 ac_cv_lib_ossp_uuid_uuid_export=yes
13182 else
13183 ac_cv_lib_ossp_uuid_uuid_export=no
13185 rm -f core conftest.err conftest.$ac_objext \
13186 conftest$ac_exeext conftest.$ac_ext
13187 LIBS=$ac_check_lib_save_LIBS
13189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13190 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13191 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13192 UUID_LIBS="-lossp-uuid"
13193 else
13194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13195 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13196 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13197 $as_echo_n "(cached) " >&6
13198 else
13199 ac_check_lib_save_LIBS=$LIBS
13200 LIBS="-luuid $LIBS"
13201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13202 /* end confdefs.h. */
13204 /* Override any GCC internal prototype to avoid an error.
13205 Use char because int might match the return type of a GCC
13206 builtin and then its argument prototype would still apply. */
13207 #ifdef __cplusplus
13208 extern "C"
13209 #endif
13210 char uuid_export ();
13212 main ()
13214 return uuid_export ();
13216 return 0;
13218 _ACEOF
13219 if ac_fn_c_try_link "$LINENO"; then :
13220 ac_cv_lib_uuid_uuid_export=yes
13221 else
13222 ac_cv_lib_uuid_uuid_export=no
13224 rm -f core conftest.err conftest.$ac_objext \
13225 conftest$ac_exeext conftest.$ac_ext
13226 LIBS=$ac_check_lib_save_LIBS
13228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13229 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13230 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13231 UUID_LIBS="-luuid"
13232 else
13233 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13243 ## Header files
13246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13247 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13248 if ${ac_cv_header_stdbool_h+:} false; then :
13249 $as_echo_n "(cached) " >&6
13250 else
13251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13252 /* end confdefs.h. */
13254 #include <stdbool.h>
13255 #ifndef bool
13256 "error: bool is not defined"
13257 #endif
13258 #ifndef false
13259 "error: false is not defined"
13260 #endif
13261 #if false
13262 "error: false is not 0"
13263 #endif
13264 #ifndef true
13265 "error: true is not defined"
13266 #endif
13267 #if true != 1
13268 "error: true is not 1"
13269 #endif
13270 #ifndef __bool_true_false_are_defined
13271 "error: __bool_true_false_are_defined is not defined"
13272 #endif
13274 struct s { _Bool s: 1; _Bool t; } s;
13276 char a[true == 1 ? 1 : -1];
13277 char b[false == 0 ? 1 : -1];
13278 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13279 char d[(bool) 0.5 == true ? 1 : -1];
13280 /* See body of main program for 'e'. */
13281 char f[(_Bool) 0.0 == false ? 1 : -1];
13282 char g[true];
13283 char h[sizeof (_Bool)];
13284 char i[sizeof s.t];
13285 enum { j = false, k = true, l = false * true, m = true * 256 };
13286 /* The following fails for
13287 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13288 _Bool n[m];
13289 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13290 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13291 /* Catch a bug in an HP-UX C compiler. See
13292 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13293 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13295 _Bool q = true;
13296 _Bool *pq = &q;
13299 main ()
13302 bool e = &s;
13303 *pq |= q;
13304 *pq |= ! q;
13305 /* Refer to every declared value, to avoid compiler optimizations. */
13306 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13307 + !m + !n + !o + !p + !q + !pq);
13310 return 0;
13312 _ACEOF
13313 if ac_fn_c_try_compile "$LINENO"; then :
13314 ac_cv_header_stdbool_h=yes
13315 else
13316 ac_cv_header_stdbool_h=no
13318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13321 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13322 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13323 if test "x$ac_cv_type__Bool" = xyes; then :
13325 cat >>confdefs.h <<_ACEOF
13326 #define HAVE__BOOL 1
13327 _ACEOF
13333 if test $ac_cv_header_stdbool_h = yes; then
13335 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13340 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
13341 do :
13342 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13343 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13344 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13345 cat >>confdefs.h <<_ACEOF
13346 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13347 _ACEOF
13351 done
13354 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13355 for ac_header in readline/readline.h
13356 do :
13357 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13358 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13359 cat >>confdefs.h <<_ACEOF
13360 #define HAVE_READLINE_READLINE_H 1
13361 _ACEOF
13363 else
13364 for ac_header in readline.h
13365 do :
13366 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13367 if test "x$ac_cv_header_readline_h" = xyes; then :
13368 cat >>confdefs.h <<_ACEOF
13369 #define HAVE_READLINE_H 1
13370 _ACEOF
13372 else
13373 as_fn_error $? "readline header not found
13374 If you have readline already installed, see config.log for details on the
13375 failure. It is possible the compiler isn't looking in the proper directory.
13376 Use --without-readline to disable readline support." "$LINENO" 5
13379 done
13383 done
13385 for ac_header in readline/history.h
13386 do :
13387 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13388 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13389 cat >>confdefs.h <<_ACEOF
13390 #define HAVE_READLINE_HISTORY_H 1
13391 _ACEOF
13393 else
13394 for ac_header in history.h
13395 do :
13396 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13397 if test "x$ac_cv_header_history_h" = xyes; then :
13398 cat >>confdefs.h <<_ACEOF
13399 #define HAVE_HISTORY_H 1
13400 _ACEOF
13402 else
13403 as_fn_error $? "history header not found
13404 If you have readline already installed, see config.log for details on the
13405 failure. It is possible the compiler isn't looking in the proper directory.
13406 Use --without-readline to disable readline support." "$LINENO" 5
13409 done
13413 done
13417 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13418 # Some installations of libedit usurp /usr/include/readline/, which seems
13419 # bad practice, since in combined installations readline will have its headers
13420 # there. We might have to resort to AC_EGREP checks to make sure we found
13421 # the proper header...
13422 for ac_header in editline/readline.h
13423 do :
13424 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13425 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13426 cat >>confdefs.h <<_ACEOF
13427 #define HAVE_EDITLINE_READLINE_H 1
13428 _ACEOF
13430 else
13431 for ac_header in readline.h
13432 do :
13433 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13434 if test "x$ac_cv_header_readline_h" = xyes; then :
13435 cat >>confdefs.h <<_ACEOF
13436 #define HAVE_READLINE_H 1
13437 _ACEOF
13439 else
13440 for ac_header in readline/readline.h
13441 do :
13442 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13443 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13444 cat >>confdefs.h <<_ACEOF
13445 #define HAVE_READLINE_READLINE_H 1
13446 _ACEOF
13448 else
13449 as_fn_error $? "readline header not found
13450 If you have libedit already installed, see config.log for details on the
13451 failure. It is possible the compiler isn't looking in the proper directory.
13452 Use --without-readline to disable libedit support." "$LINENO" 5
13455 done
13459 done
13463 done
13465 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13466 # not be there at all. Hence, don't complain if not found. We must check
13467 # though, since in yet other versions it is an independent header.
13468 for ac_header in editline/history.h
13469 do :
13470 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13471 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13472 cat >>confdefs.h <<_ACEOF
13473 #define HAVE_EDITLINE_HISTORY_H 1
13474 _ACEOF
13476 else
13477 for ac_header in history.h
13478 do :
13479 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13480 if test "x$ac_cv_header_history_h" = xyes; then :
13481 cat >>confdefs.h <<_ACEOF
13482 #define HAVE_HISTORY_H 1
13483 _ACEOF
13485 else
13486 for ac_header in readline/history.h
13487 do :
13488 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13489 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13490 cat >>confdefs.h <<_ACEOF
13491 #define HAVE_READLINE_HISTORY_H 1
13492 _ACEOF
13496 done
13500 done
13504 done
13508 if test "$with_zlib" = yes; then
13509 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13510 if test "x$ac_cv_header_zlib_h" = xyes; then :
13512 else
13513 as_fn_error $? "zlib header not found
13514 If you have zlib already installed, see config.log for details on the
13515 failure. It is possible the compiler isn't looking in the proper directory.
13516 Use --without-zlib to disable zlib support." "$LINENO" 5
13522 if test -z "$LZ4"; then
13523 for ac_prog in lz4
13525 # Extract the first word of "$ac_prog", so it can be a program name with args.
13526 set dummy $ac_prog; ac_word=$2
13527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13528 $as_echo_n "checking for $ac_word... " >&6; }
13529 if ${ac_cv_path_LZ4+:} false; then :
13530 $as_echo_n "(cached) " >&6
13531 else
13532 case $LZ4 in
13533 [\\/]* | ?:[\\/]*)
13534 ac_cv_path_LZ4="$LZ4" # Let the user override the test with a path.
13537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13538 for as_dir in $PATH
13540 IFS=$as_save_IFS
13541 test -z "$as_dir" && as_dir=.
13542 for ac_exec_ext in '' $ac_executable_extensions; do
13543 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13544 ac_cv_path_LZ4="$as_dir/$ac_word$ac_exec_ext"
13545 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13546 break 2
13548 done
13549 done
13550 IFS=$as_save_IFS
13553 esac
13555 LZ4=$ac_cv_path_LZ4
13556 if test -n "$LZ4"; then
13557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13558 $as_echo "$LZ4" >&6; }
13559 else
13560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13561 $as_echo "no" >&6; }
13565 test -n "$LZ4" && break
13566 done
13568 else
13569 # Report the value of LZ4 in configure's output in all cases.
13570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4" >&5
13571 $as_echo_n "checking for LZ4... " >&6; }
13572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13573 $as_echo "$LZ4" >&6; }
13576 if test "$with_lz4" = yes; then
13577 ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
13578 if test "x$ac_cv_header_lz4_h" = xyes; then :
13580 else
13581 as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
13587 if test -z "$ZSTD"; then
13588 for ac_prog in zstd
13590 # Extract the first word of "$ac_prog", so it can be a program name with args.
13591 set dummy $ac_prog; ac_word=$2
13592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13593 $as_echo_n "checking for $ac_word... " >&6; }
13594 if ${ac_cv_path_ZSTD+:} false; then :
13595 $as_echo_n "(cached) " >&6
13596 else
13597 case $ZSTD in
13598 [\\/]* | ?:[\\/]*)
13599 ac_cv_path_ZSTD="$ZSTD" # Let the user override the test with a path.
13602 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13603 for as_dir in $PATH
13605 IFS=$as_save_IFS
13606 test -z "$as_dir" && as_dir=.
13607 for ac_exec_ext in '' $ac_executable_extensions; do
13608 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13609 ac_cv_path_ZSTD="$as_dir/$ac_word$ac_exec_ext"
13610 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13611 break 2
13613 done
13614 done
13615 IFS=$as_save_IFS
13618 esac
13620 ZSTD=$ac_cv_path_ZSTD
13621 if test -n "$ZSTD"; then
13622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13623 $as_echo "$ZSTD" >&6; }
13624 else
13625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13626 $as_echo "no" >&6; }
13630 test -n "$ZSTD" && break
13631 done
13633 else
13634 # Report the value of ZSTD in configure's output in all cases.
13635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD" >&5
13636 $as_echo_n "checking for ZSTD... " >&6; }
13637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13638 $as_echo "$ZSTD" >&6; }
13641 if test "$with_zstd" = yes; then
13642 ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default"
13643 if test "x$ac_cv_header_zstd_h" = xyes; then :
13645 else
13646 as_fn_error $? "zstd.h header file is required for ZSTD" "$LINENO" 5
13652 if test "$with_gssapi" = yes ; then
13653 for ac_header in gssapi/gssapi.h
13654 do :
13655 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13656 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13657 cat >>confdefs.h <<_ACEOF
13658 #define HAVE_GSSAPI_GSSAPI_H 1
13659 _ACEOF
13661 else
13662 for ac_header in gssapi.h
13663 do :
13664 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13665 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13666 cat >>confdefs.h <<_ACEOF
13667 #define HAVE_GSSAPI_H 1
13668 _ACEOF
13670 else
13671 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13674 done
13678 done
13680 for ac_header in gssapi/gssapi_ext.h
13681 do :
13682 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi_ext.h" "ac_cv_header_gssapi_gssapi_ext_h" "$ac_includes_default"
13683 if test "x$ac_cv_header_gssapi_gssapi_ext_h" = xyes; then :
13684 cat >>confdefs.h <<_ACEOF
13685 #define HAVE_GSSAPI_GSSAPI_EXT_H 1
13686 _ACEOF
13688 else
13689 for ac_header in gssapi_ext.h
13690 do :
13691 ac_fn_c_check_header_mongrel "$LINENO" "gssapi_ext.h" "ac_cv_header_gssapi_ext_h" "$ac_includes_default"
13692 if test "x$ac_cv_header_gssapi_ext_h" = xyes; then :
13693 cat >>confdefs.h <<_ACEOF
13694 #define HAVE_GSSAPI_EXT_H 1
13695 _ACEOF
13697 else
13698 as_fn_error $? "gssapi_ext.h header file is required for GSSAPI" "$LINENO" 5
13701 done
13705 done
13709 if test -z "$OPENSSL"; then
13710 for ac_prog in openssl
13712 # Extract the first word of "$ac_prog", so it can be a program name with args.
13713 set dummy $ac_prog; ac_word=$2
13714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13715 $as_echo_n "checking for $ac_word... " >&6; }
13716 if ${ac_cv_path_OPENSSL+:} false; then :
13717 $as_echo_n "(cached) " >&6
13718 else
13719 case $OPENSSL in
13720 [\\/]* | ?:[\\/]*)
13721 ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a path.
13724 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13725 for as_dir in $PATH
13727 IFS=$as_save_IFS
13728 test -z "$as_dir" && as_dir=.
13729 for ac_exec_ext in '' $ac_executable_extensions; do
13730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13731 ac_cv_path_OPENSSL="$as_dir/$ac_word$ac_exec_ext"
13732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13733 break 2
13735 done
13736 done
13737 IFS=$as_save_IFS
13740 esac
13742 OPENSSL=$ac_cv_path_OPENSSL
13743 if test -n "$OPENSSL"; then
13744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
13745 $as_echo "$OPENSSL" >&6; }
13746 else
13747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13748 $as_echo "no" >&6; }
13752 test -n "$OPENSSL" && break
13753 done
13755 else
13756 # Report the value of OPENSSL in configure's output in all cases.
13757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
13758 $as_echo_n "checking for OPENSSL... " >&6; }
13759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
13760 $as_echo "$OPENSSL" >&6; }
13763 pgac_openssl_version="$($OPENSSL version 2> /dev/null || echo openssl not found)"
13764 { $as_echo "$as_me:${as_lineno-$LINENO}: using openssl: $pgac_openssl_version" >&5
13765 $as_echo "$as_me: using openssl: $pgac_openssl_version" >&6;}
13766 if test "$with_ssl" = openssl ; then
13767 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13768 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13770 else
13771 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13775 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13776 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13778 else
13779 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13785 if test "$with_pam" = yes ; then
13786 for ac_header in security/pam_appl.h
13787 do :
13788 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13789 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13790 cat >>confdefs.h <<_ACEOF
13791 #define HAVE_SECURITY_PAM_APPL_H 1
13792 _ACEOF
13794 else
13795 for ac_header in pam/pam_appl.h
13796 do :
13797 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13798 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13799 cat >>confdefs.h <<_ACEOF
13800 #define HAVE_PAM_PAM_APPL_H 1
13801 _ACEOF
13803 else
13804 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13807 done
13811 done
13815 if test "$with_bsd_auth" = yes ; then
13816 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13817 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13819 else
13820 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13826 if test "$with_systemd" = yes ; then
13827 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13828 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13830 else
13831 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13837 if test "$with_libxml" = yes ; then
13838 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13839 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13841 else
13842 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13848 if test "$with_libxslt" = yes ; then
13849 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13850 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13852 else
13853 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13859 if test "$with_ldap" = yes ; then
13860 if test "$PORTNAME" != "win32"; then
13861 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13862 if test "x$ac_cv_header_ldap_h" = xyes; then :
13864 else
13865 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13870 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13871 if ${pgac_cv_ldap_safe+:} false; then :
13872 $as_echo_n "(cached) " >&6
13873 else
13874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13875 /* end confdefs.h. */
13876 #include <ldap.h>
13877 #if !defined(LDAP_VENDOR_VERSION) || \
13878 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13879 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13880 choke me
13881 #endif
13883 main ()
13887 return 0;
13889 _ACEOF
13890 if ac_fn_c_try_compile "$LINENO"; then :
13891 pgac_cv_ldap_safe=yes
13892 else
13893 pgac_cv_ldap_safe=no
13895 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13898 $as_echo "$pgac_cv_ldap_safe" >&6; }
13900 if test "$pgac_cv_ldap_safe" != yes; then
13901 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13902 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13903 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13904 *** also uses LDAP will crash on exit." >&5
13905 $as_echo "$as_me: WARNING:
13906 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13907 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13908 *** also uses LDAP will crash on exit." >&2;}
13910 else
13911 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13912 #include <windows.h>
13915 if test "x$ac_cv_header_winldap_h" = xyes; then :
13917 else
13918 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13925 if test "$with_bonjour" = yes ; then
13926 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13927 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13929 else
13930 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13936 # for contrib/uuid-ossp
13937 if test "$with_uuid" = bsd ; then
13938 for ac_header in uuid.h
13939 do :
13940 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13941 if test "x$ac_cv_header_uuid_h" = xyes; then :
13942 cat >>confdefs.h <<_ACEOF
13943 #define HAVE_UUID_H 1
13944 _ACEOF
13945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13946 /* end confdefs.h. */
13947 #include <uuid.h>
13949 _ACEOF
13950 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13951 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13953 else
13954 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13956 rm -f conftest*
13958 else
13959 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13962 done
13964 elif test "$with_uuid" = e2fs ; then
13965 for ac_header in uuid/uuid.h
13966 do :
13967 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13968 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13969 cat >>confdefs.h <<_ACEOF
13970 #define HAVE_UUID_UUID_H 1
13971 _ACEOF
13972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13973 /* end confdefs.h. */
13974 #include <uuid/uuid.h>
13976 _ACEOF
13977 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13978 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13980 else
13981 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13983 rm -f conftest*
13985 else
13986 for ac_header in uuid.h
13987 do :
13988 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13989 if test "x$ac_cv_header_uuid_h" = xyes; then :
13990 cat >>confdefs.h <<_ACEOF
13991 #define HAVE_UUID_H 1
13992 _ACEOF
13993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13994 /* end confdefs.h. */
13995 #include <uuid.h>
13997 _ACEOF
13998 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13999 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14001 else
14002 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
14004 rm -f conftest*
14006 else
14007 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
14010 done
14014 done
14016 elif test "$with_uuid" = ossp ; then
14017 for ac_header in ossp/uuid.h
14018 do :
14019 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
14020 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
14021 cat >>confdefs.h <<_ACEOF
14022 #define HAVE_OSSP_UUID_H 1
14023 _ACEOF
14024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14025 /* end confdefs.h. */
14026 #include <ossp/uuid.h>
14028 _ACEOF
14029 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14030 $EGREP "uuid_export" >/dev/null 2>&1; then :
14032 else
14033 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
14035 rm -f conftest*
14037 else
14038 for ac_header in uuid.h
14039 do :
14040 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14041 if test "x$ac_cv_header_uuid_h" = xyes; then :
14042 cat >>confdefs.h <<_ACEOF
14043 #define HAVE_UUID_H 1
14044 _ACEOF
14045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14046 /* end confdefs.h. */
14047 #include <uuid.h>
14049 _ACEOF
14050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14051 $EGREP "uuid_export" >/dev/null 2>&1; then :
14053 else
14054 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
14056 rm -f conftest*
14058 else
14059 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
14062 done
14066 done
14070 if test "$PORTNAME" = "win32" ; then
14071 for ac_header in crtdefs.h
14072 do :
14073 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
14074 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
14075 cat >>confdefs.h <<_ACEOF
14076 #define HAVE_CRTDEFS_H 1
14077 _ACEOF
14081 done
14086 ## Types, structures, compiler characteristics
14089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14090 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14091 if ${ac_cv_c_bigendian+:} false; then :
14092 $as_echo_n "(cached) " >&6
14093 else
14094 ac_cv_c_bigendian=unknown
14095 # See if we're dealing with a universal compiler.
14096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14097 /* end confdefs.h. */
14098 #ifndef __APPLE_CC__
14099 not a universal capable compiler
14100 #endif
14101 typedef int dummy;
14103 _ACEOF
14104 if ac_fn_c_try_compile "$LINENO"; then :
14106 # Check for potential -arch flags. It is not universal unless
14107 # there are at least two -arch flags with different values.
14108 ac_arch=
14109 ac_prev=
14110 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14111 if test -n "$ac_prev"; then
14112 case $ac_word in
14113 i?86 | x86_64 | ppc | ppc64)
14114 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14115 ac_arch=$ac_word
14116 else
14117 ac_cv_c_bigendian=universal
14118 break
14121 esac
14122 ac_prev=
14123 elif test "x$ac_word" = "x-arch"; then
14124 ac_prev=arch
14126 done
14128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14129 if test $ac_cv_c_bigendian = unknown; then
14130 # See if sys/param.h defines the BYTE_ORDER macro.
14131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14132 /* end confdefs.h. */
14133 #include <sys/types.h>
14134 #include <sys/param.h>
14137 main ()
14139 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14140 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14141 && LITTLE_ENDIAN)
14142 bogus endian macros
14143 #endif
14146 return 0;
14148 _ACEOF
14149 if ac_fn_c_try_compile "$LINENO"; then :
14150 # It does; now see whether it defined to BIG_ENDIAN or not.
14151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14152 /* end confdefs.h. */
14153 #include <sys/types.h>
14154 #include <sys/param.h>
14157 main ()
14159 #if BYTE_ORDER != BIG_ENDIAN
14160 not big endian
14161 #endif
14164 return 0;
14166 _ACEOF
14167 if ac_fn_c_try_compile "$LINENO"; then :
14168 ac_cv_c_bigendian=yes
14169 else
14170 ac_cv_c_bigendian=no
14172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14176 if test $ac_cv_c_bigendian = unknown; then
14177 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14179 /* end confdefs.h. */
14180 #include <limits.h>
14183 main ()
14185 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14186 bogus endian macros
14187 #endif
14190 return 0;
14192 _ACEOF
14193 if ac_fn_c_try_compile "$LINENO"; then :
14194 # It does; now see whether it defined to _BIG_ENDIAN or not.
14195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14196 /* end confdefs.h. */
14197 #include <limits.h>
14200 main ()
14202 #ifndef _BIG_ENDIAN
14203 not big endian
14204 #endif
14207 return 0;
14209 _ACEOF
14210 if ac_fn_c_try_compile "$LINENO"; then :
14211 ac_cv_c_bigendian=yes
14212 else
14213 ac_cv_c_bigendian=no
14215 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14219 if test $ac_cv_c_bigendian = unknown; then
14220 # Compile a test program.
14221 if test "$cross_compiling" = yes; then :
14222 # Try to guess by grepping values from an object file.
14223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14224 /* end confdefs.h. */
14225 short int ascii_mm[] =
14226 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14227 short int ascii_ii[] =
14228 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14229 int use_ascii (int i) {
14230 return ascii_mm[i] + ascii_ii[i];
14232 short int ebcdic_ii[] =
14233 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14234 short int ebcdic_mm[] =
14235 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14236 int use_ebcdic (int i) {
14237 return ebcdic_mm[i] + ebcdic_ii[i];
14239 extern int foo;
14242 main ()
14244 return use_ascii (foo) == use_ebcdic (foo);
14246 return 0;
14248 _ACEOF
14249 if ac_fn_c_try_compile "$LINENO"; then :
14250 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14251 ac_cv_c_bigendian=yes
14253 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14254 if test "$ac_cv_c_bigendian" = unknown; then
14255 ac_cv_c_bigendian=no
14256 else
14257 # finding both strings is unlikely to happen, but who knows?
14258 ac_cv_c_bigendian=unknown
14262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14263 else
14264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14265 /* end confdefs.h. */
14266 $ac_includes_default
14268 main ()
14271 /* Are we little or big endian? From Harbison&Steele. */
14272 union
14274 long int l;
14275 char c[sizeof (long int)];
14276 } u;
14277 u.l = 1;
14278 return u.c[sizeof (long int) - 1] == 1;
14281 return 0;
14283 _ACEOF
14284 if ac_fn_c_try_run "$LINENO"; then :
14285 ac_cv_c_bigendian=no
14286 else
14287 ac_cv_c_bigendian=yes
14289 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14290 conftest.$ac_objext conftest.beam conftest.$ac_ext
14295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14296 $as_echo "$ac_cv_c_bigendian" >&6; }
14297 case $ac_cv_c_bigendian in #(
14298 yes)
14299 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14300 ;; #(
14302 ;; #(
14303 universal)
14305 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14307 ;; #(
14309 as_fn_error $? "unknown endianness
14310 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14311 esac
14313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14314 $as_echo_n "checking for inline... " >&6; }
14315 if ${ac_cv_c_inline+:} false; then :
14316 $as_echo_n "(cached) " >&6
14317 else
14318 ac_cv_c_inline=no
14319 for ac_kw in inline __inline__ __inline; do
14320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14321 /* end confdefs.h. */
14322 #ifndef __cplusplus
14323 typedef int foo_t;
14324 static $ac_kw foo_t static_foo () {return 0; }
14325 $ac_kw foo_t foo () {return 0; }
14326 #endif
14328 _ACEOF
14329 if ac_fn_c_try_compile "$LINENO"; then :
14330 ac_cv_c_inline=$ac_kw
14332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14333 test "$ac_cv_c_inline" != no && break
14334 done
14337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14338 $as_echo "$ac_cv_c_inline" >&6; }
14340 case $ac_cv_c_inline in
14341 inline | yes) ;;
14343 case $ac_cv_c_inline in
14344 no) ac_val=;;
14345 *) ac_val=$ac_cv_c_inline;;
14346 esac
14347 cat >>confdefs.h <<_ACEOF
14348 #ifndef __cplusplus
14349 #define inline $ac_val
14350 #endif
14351 _ACEOF
14353 esac
14355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14356 $as_echo_n "checking for printf format archetype... " >&6; }
14357 if ${pgac_cv_printf_archetype+:} false; then :
14358 $as_echo_n "(cached) " >&6
14359 else
14360 pgac_cv_printf_archetype=gnu_printf
14361 ac_save_c_werror_flag=$ac_c_werror_flag
14362 ac_c_werror_flag=yes
14363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14364 /* end confdefs.h. */
14365 extern void pgac_write(int ignore, const char *fmt,...)
14366 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14368 main ()
14370 pgac_write(0, "error %s: %m", "foo");
14372 return 0;
14374 _ACEOF
14375 if ac_fn_c_try_compile "$LINENO"; then :
14376 ac_archetype_ok=yes
14377 else
14378 ac_archetype_ok=no
14380 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14381 ac_c_werror_flag=$ac_save_c_werror_flag
14383 if [ "$ac_archetype_ok" = no ]; then
14384 pgac_cv_printf_archetype=__syslog__
14385 ac_save_c_werror_flag=$ac_c_werror_flag
14386 ac_c_werror_flag=yes
14387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14388 /* end confdefs.h. */
14389 extern void pgac_write(int ignore, const char *fmt,...)
14390 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14392 main ()
14394 pgac_write(0, "error %s: %m", "foo");
14396 return 0;
14398 _ACEOF
14399 if ac_fn_c_try_compile "$LINENO"; then :
14400 ac_archetype_ok=yes
14401 else
14402 ac_archetype_ok=no
14404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14405 ac_c_werror_flag=$ac_save_c_werror_flag
14407 if [ "$ac_archetype_ok" = no ]; then
14408 pgac_cv_printf_archetype=printf
14412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14413 $as_echo "$pgac_cv_printf_archetype" >&6; }
14415 cat >>confdefs.h <<_ACEOF
14416 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14417 _ACEOF
14420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14421 $as_echo_n "checking for _Static_assert... " >&6; }
14422 if ${pgac_cv__static_assert+:} false; then :
14423 $as_echo_n "(cached) " >&6
14424 else
14425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14426 /* end confdefs.h. */
14429 main ()
14431 ({ _Static_assert(1, "foo"); })
14433 return 0;
14435 _ACEOF
14436 if ac_fn_c_try_link "$LINENO"; then :
14437 pgac_cv__static_assert=yes
14438 else
14439 pgac_cv__static_assert=no
14441 rm -f core conftest.err conftest.$ac_objext \
14442 conftest$ac_exeext conftest.$ac_ext
14444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14445 $as_echo "$pgac_cv__static_assert" >&6; }
14446 if test x"$pgac_cv__static_assert" = xyes ; then
14448 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14452 $as_echo_n "checking for typeof... " >&6; }
14453 if ${pgac_cv_c_typeof+:} false; then :
14454 $as_echo_n "(cached) " >&6
14455 else
14456 pgac_cv_c_typeof=no
14457 for pgac_kw in typeof __typeof__ decltype; do
14458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14459 /* end confdefs.h. */
14462 main ()
14464 int x = 0;
14465 $pgac_kw(x) y;
14466 y = x;
14467 return y;
14469 return 0;
14471 _ACEOF
14472 if ac_fn_c_try_compile "$LINENO"; then :
14473 pgac_cv_c_typeof=$pgac_kw
14475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14476 test "$pgac_cv_c_typeof" != no && break
14477 done
14479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14480 $as_echo "$pgac_cv_c_typeof" >&6; }
14481 if test "$pgac_cv_c_typeof" != no; then
14483 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14485 if test "$pgac_cv_c_typeof" != typeof; then
14487 cat >>confdefs.h <<_ACEOF
14488 #define typeof $pgac_cv_c_typeof
14489 _ACEOF
14493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14494 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14495 if ${pgac_cv__types_compatible+:} false; then :
14496 $as_echo_n "(cached) " >&6
14497 else
14498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14499 /* end confdefs.h. */
14502 main ()
14504 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14506 return 0;
14508 _ACEOF
14509 if ac_fn_c_try_compile "$LINENO"; then :
14510 pgac_cv__types_compatible=yes
14511 else
14512 pgac_cv__types_compatible=no
14514 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14517 $as_echo "$pgac_cv__types_compatible" >&6; }
14518 if test x"$pgac_cv__types_compatible" = xyes ; then
14520 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14524 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14525 if ${pgac_cv__builtin_constant_p+:} false; then :
14526 $as_echo_n "(cached) " >&6
14527 else
14528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14529 /* end confdefs.h. */
14530 static int x;
14531 static int y[__builtin_constant_p(x) ? x : 1];
14532 static int z[__builtin_constant_p("string literal") ? 1 : x];
14535 _ACEOF
14536 if ac_fn_c_try_compile "$LINENO"; then :
14537 pgac_cv__builtin_constant_p=yes
14538 else
14539 pgac_cv__builtin_constant_p=no
14541 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14544 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14545 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14547 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14551 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14552 if ${pgac_cv__builtin_unreachable+:} false; then :
14553 $as_echo_n "(cached) " >&6
14554 else
14555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14556 /* end confdefs.h. */
14559 main ()
14561 __builtin_unreachable();
14563 return 0;
14565 _ACEOF
14566 if ac_fn_c_try_link "$LINENO"; then :
14567 pgac_cv__builtin_unreachable=yes
14568 else
14569 pgac_cv__builtin_unreachable=no
14571 rm -f core conftest.err conftest.$ac_objext \
14572 conftest$ac_exeext conftest.$ac_ext
14574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14575 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14576 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14578 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14582 $as_echo_n "checking for computed goto support... " >&6; }
14583 if ${pgac_cv_computed_goto+:} false; then :
14584 $as_echo_n "(cached) " >&6
14585 else
14586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14587 /* end confdefs.h. */
14590 main ()
14592 void *labeladdrs[] = {&&my_label};
14593 goto *labeladdrs[0];
14594 my_label:
14595 return 1;
14598 return 0;
14600 _ACEOF
14601 if ac_fn_c_try_compile "$LINENO"; then :
14602 pgac_cv_computed_goto=yes
14603 else
14604 pgac_cv_computed_goto=no
14606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14609 $as_echo "$pgac_cv_computed_goto" >&6; }
14610 if test x"$pgac_cv_computed_goto" = xyes ; then
14612 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14615 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14616 #include <time.h>
14619 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14621 cat >>confdefs.h <<_ACEOF
14622 #define HAVE_STRUCT_TM_TM_ZONE 1
14623 _ACEOF
14629 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14630 #include <sys/ipc.h>
14631 #include <sys/sem.h>
14634 if test "x$ac_cv_type_union_semun" = xyes; then :
14636 cat >>confdefs.h <<_ACEOF
14637 #define HAVE_UNION_SEMUN 1
14638 _ACEOF
14643 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/socket.h>
14645 if test "x$ac_cv_type_socklen_t" = xyes; then :
14647 cat >>confdefs.h <<_ACEOF
14648 #define HAVE_SOCKLEN_T 1
14649 _ACEOF
14654 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14655 #include <sys/socket.h>
14658 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14660 cat >>confdefs.h <<_ACEOF
14661 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14662 _ACEOF
14668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14669 $as_echo_n "checking for locale_t... " >&6; }
14670 if ${pgac_cv_type_locale_t+:} false; then :
14671 $as_echo_n "(cached) " >&6
14672 else
14673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14674 /* end confdefs.h. */
14675 #include <locale.h>
14676 locale_t x;
14678 main ()
14682 return 0;
14684 _ACEOF
14685 if ac_fn_c_try_compile "$LINENO"; then :
14686 pgac_cv_type_locale_t=yes
14687 else
14688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14689 /* end confdefs.h. */
14690 #include <xlocale.h>
14691 locale_t x;
14693 main ()
14697 return 0;
14699 _ACEOF
14700 if ac_fn_c_try_compile "$LINENO"; then :
14701 pgac_cv_type_locale_t='yes (in xlocale.h)'
14702 else
14703 pgac_cv_type_locale_t=no
14705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14710 $as_echo "$pgac_cv_type_locale_t" >&6; }
14711 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14713 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14717 # MSVC doesn't cope well with defining restrict to __restrict, the
14718 # spelling it understands, because it conflicts with
14719 # __declspec(restrict). Therefore we define pg_restrict to the
14720 # appropriate definition, which presumably won't conflict.
14721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14722 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14723 if ${ac_cv_c_restrict+:} false; then :
14724 $as_echo_n "(cached) " >&6
14725 else
14726 ac_cv_c_restrict=no
14727 # The order here caters to the fact that C++ does not require restrict.
14728 for ac_kw in __restrict __restrict__ _Restrict restrict; do
14729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14730 /* end confdefs.h. */
14731 typedef int * int_ptr;
14732 int foo (int_ptr $ac_kw ip) {
14733 return ip[0];
14736 main ()
14738 int s[1];
14739 int * $ac_kw t = s;
14740 t[0] = 0;
14741 return foo(t)
14743 return 0;
14745 _ACEOF
14746 if ac_fn_c_try_compile "$LINENO"; then :
14747 ac_cv_c_restrict=$ac_kw
14749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14750 test "$ac_cv_c_restrict" != no && break
14751 done
14754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14755 $as_echo "$ac_cv_c_restrict" >&6; }
14757 case $ac_cv_c_restrict in
14758 restrict) ;;
14759 no) $as_echo "#define restrict /**/" >>confdefs.h
14761 *) cat >>confdefs.h <<_ACEOF
14762 #define restrict $ac_cv_c_restrict
14763 _ACEOF
14765 esac
14767 if test "$ac_cv_c_restrict" = "no"; then
14768 pg_restrict=""
14769 else
14770 pg_restrict="$ac_cv_c_restrict"
14773 cat >>confdefs.h <<_ACEOF
14774 #define pg_restrict $pg_restrict
14775 _ACEOF
14778 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14779 #include <getopt.h>
14780 #endif
14782 if test "x$ac_cv_type_struct_option" = xyes; then :
14784 cat >>confdefs.h <<_ACEOF
14785 #define HAVE_STRUCT_OPTION 1
14786 _ACEOF
14792 case $host_cpu in
14793 x86_64)
14794 # On x86_64, check if we can compile a popcntq instruction
14795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
14796 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
14797 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
14798 $as_echo_n "(cached) " >&6
14799 else
14800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14801 /* end confdefs.h. */
14804 main ()
14806 long long x = 1; long long r;
14807 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
14809 return 0;
14811 _ACEOF
14812 if ac_fn_c_try_compile "$LINENO"; then :
14813 pgac_cv_have_x86_64_popcntq=yes
14814 else
14815 pgac_cv_have_x86_64_popcntq=no
14817 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
14820 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
14821 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
14823 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
14827 ppc*|powerpc*)
14828 # On PPC, check if compiler accepts "i"(x) when __builtin_constant_p(x).
14829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
14830 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
14831 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
14832 $as_echo_n "(cached) " >&6
14833 else
14834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14835 /* end confdefs.h. */
14836 static inline int
14837 addi(int ra, int si)
14839 int res = 0;
14840 if (__builtin_constant_p(si))
14841 __asm__ __volatile__(
14842 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
14843 return res;
14845 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
14847 main ()
14851 return 0;
14853 _ACEOF
14854 if ac_fn_c_try_compile "$LINENO"; then :
14855 pgac_cv_have_i_constraint__builtin_constant_p=yes
14856 else
14857 pgac_cv_have_i_constraint__builtin_constant_p=no
14859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
14862 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
14863 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
14865 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
14869 esac
14871 # Check largefile support. You might think this is a system service not a
14872 # compiler characteristic, but you'd be wrong. We must check this before
14873 # probing existence of related functions such as fseeko, since the largefile
14874 # defines can affect what is generated for that.
14875 if test "$PORTNAME" != "win32"; then
14876 # Check whether --enable-largefile was given.
14877 if test "${enable_largefile+set}" = set; then :
14878 enableval=$enable_largefile;
14881 if test "$enable_largefile" != no; then
14883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14884 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14885 if ${ac_cv_sys_largefile_CC+:} false; then :
14886 $as_echo_n "(cached) " >&6
14887 else
14888 ac_cv_sys_largefile_CC=no
14889 if test "$GCC" != yes; then
14890 ac_save_CC=$CC
14891 while :; do
14892 # IRIX 6.2 and later do not support large files by default,
14893 # so use the C compiler's -n32 option if that helps.
14894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14895 /* end confdefs.h. */
14896 #include <sys/types.h>
14897 /* Check that off_t can represent 2**63 - 1 correctly.
14898 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14899 since some C++ compilers masquerading as C compilers
14900 incorrectly reject 9223372036854775807. */
14901 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14902 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14903 && LARGE_OFF_T % 2147483647 == 1)
14904 ? 1 : -1];
14906 main ()
14910 return 0;
14912 _ACEOF
14913 if ac_fn_c_try_compile "$LINENO"; then :
14914 break
14916 rm -f core conftest.err conftest.$ac_objext
14917 CC="$CC -n32"
14918 if ac_fn_c_try_compile "$LINENO"; then :
14919 ac_cv_sys_largefile_CC=' -n32'; break
14921 rm -f core conftest.err conftest.$ac_objext
14922 break
14923 done
14924 CC=$ac_save_CC
14925 rm -f conftest.$ac_ext
14928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14929 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14930 if test "$ac_cv_sys_largefile_CC" != no; then
14931 CC=$CC$ac_cv_sys_largefile_CC
14934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14935 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14936 if ${ac_cv_sys_file_offset_bits+:} false; then :
14937 $as_echo_n "(cached) " >&6
14938 else
14939 while :; do
14940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14941 /* end confdefs.h. */
14942 #include <sys/types.h>
14943 /* Check that off_t can represent 2**63 - 1 correctly.
14944 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14945 since some C++ compilers masquerading as C compilers
14946 incorrectly reject 9223372036854775807. */
14947 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14948 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14949 && LARGE_OFF_T % 2147483647 == 1)
14950 ? 1 : -1];
14952 main ()
14956 return 0;
14958 _ACEOF
14959 if ac_fn_c_try_compile "$LINENO"; then :
14960 ac_cv_sys_file_offset_bits=no; break
14962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14964 /* end confdefs.h. */
14965 #define _FILE_OFFSET_BITS 64
14966 #include <sys/types.h>
14967 /* Check that off_t can represent 2**63 - 1 correctly.
14968 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14969 since some C++ compilers masquerading as C compilers
14970 incorrectly reject 9223372036854775807. */
14971 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14972 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14973 && LARGE_OFF_T % 2147483647 == 1)
14974 ? 1 : -1];
14976 main ()
14980 return 0;
14982 _ACEOF
14983 if ac_fn_c_try_compile "$LINENO"; then :
14984 ac_cv_sys_file_offset_bits=64; break
14986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14987 ac_cv_sys_file_offset_bits=unknown
14988 break
14989 done
14991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14992 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14993 case $ac_cv_sys_file_offset_bits in #(
14994 no | unknown) ;;
14996 cat >>confdefs.h <<_ACEOF
14997 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14998 _ACEOF
15000 esac
15001 rm -rf conftest*
15002 if test $ac_cv_sys_file_offset_bits = unknown; then
15003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15004 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15005 if ${ac_cv_sys_large_files+:} false; then :
15006 $as_echo_n "(cached) " >&6
15007 else
15008 while :; do
15009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15010 /* end confdefs.h. */
15011 #include <sys/types.h>
15012 /* Check that off_t can represent 2**63 - 1 correctly.
15013 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15014 since some C++ compilers masquerading as C compilers
15015 incorrectly reject 9223372036854775807. */
15016 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15017 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15018 && LARGE_OFF_T % 2147483647 == 1)
15019 ? 1 : -1];
15021 main ()
15025 return 0;
15027 _ACEOF
15028 if ac_fn_c_try_compile "$LINENO"; then :
15029 ac_cv_sys_large_files=no; break
15031 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15033 /* end confdefs.h. */
15034 #define _LARGE_FILES 1
15035 #include <sys/types.h>
15036 /* Check that off_t can represent 2**63 - 1 correctly.
15037 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15038 since some C++ compilers masquerading as C compilers
15039 incorrectly reject 9223372036854775807. */
15040 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15041 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15042 && LARGE_OFF_T % 2147483647 == 1)
15043 ? 1 : -1];
15045 main ()
15049 return 0;
15051 _ACEOF
15052 if ac_fn_c_try_compile "$LINENO"; then :
15053 ac_cv_sys_large_files=1; break
15055 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15056 ac_cv_sys_large_files=unknown
15057 break
15058 done
15060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15061 $as_echo "$ac_cv_sys_large_files" >&6; }
15062 case $ac_cv_sys_large_files in #(
15063 no | unknown) ;;
15065 cat >>confdefs.h <<_ACEOF
15066 #define _LARGE_FILES $ac_cv_sys_large_files
15067 _ACEOF
15069 esac
15070 rm -rf conftest*
15079 # The cast to long int works around a bug in the HP C Compiler
15080 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15081 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15082 # This bug is HP SR number 8606223364.
15083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15084 $as_echo_n "checking size of off_t... " >&6; }
15085 if ${ac_cv_sizeof_off_t+:} false; then :
15086 $as_echo_n "(cached) " >&6
15087 else
15088 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
15090 else
15091 if test "$ac_cv_type_off_t" = yes; then
15092 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15093 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15094 as_fn_error 77 "cannot compute sizeof (off_t)
15095 See \`config.log' for more details" "$LINENO" 5; }
15096 else
15097 ac_cv_sizeof_off_t=0
15102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15103 $as_echo "$ac_cv_sizeof_off_t" >&6; }
15107 cat >>confdefs.h <<_ACEOF
15108 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15109 _ACEOF
15113 # If we don't have largefile support, can't handle segment size >= 2GB.
15114 if test "$ac_cv_sizeof_off_t" -lt 8; then
15115 if expr $RELSEG_SIZE '*' $blocksize '>=' 2 '*' 1024 '*' 1024; then
15116 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15120 # The cast to long int works around a bug in the HP C Compiler
15121 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15122 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15123 # This bug is HP SR number 8606223364.
15124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
15125 $as_echo_n "checking size of bool... " >&6; }
15126 if ${ac_cv_sizeof_bool+:} false; then :
15127 $as_echo_n "(cached) " >&6
15128 else
15129 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
15130 #include <stdbool.h>
15131 #endif
15132 "; then :
15134 else
15135 if test "$ac_cv_type_bool" = yes; then
15136 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15137 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15138 as_fn_error 77 "cannot compute sizeof (bool)
15139 See \`config.log' for more details" "$LINENO" 5; }
15140 else
15141 ac_cv_sizeof_bool=0
15146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15147 $as_echo "$ac_cv_sizeof_bool" >&6; }
15151 cat >>confdefs.h <<_ACEOF
15152 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15153 _ACEOF
15157 if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
15159 $as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
15165 ## Functions, global variables
15168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15169 $as_echo_n "checking for int timezone... " >&6; }
15170 if ${pgac_cv_var_int_timezone+:} false; then :
15171 $as_echo_n "(cached) " >&6
15172 else
15173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15174 /* end confdefs.h. */
15175 #include <time.h>
15176 int res;
15178 main ()
15180 #ifndef __CYGWIN__
15181 res = timezone / 60;
15182 #else
15183 res = _timezone / 60;
15184 #endif
15186 return 0;
15188 _ACEOF
15189 if ac_fn_c_try_link "$LINENO"; then :
15190 pgac_cv_var_int_timezone=yes
15191 else
15192 pgac_cv_var_int_timezone=no
15194 rm -f core conftest.err conftest.$ac_objext \
15195 conftest$ac_exeext conftest.$ac_ext
15197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15198 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15199 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15201 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15205 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15206 if ${pgac_cv_func_wcstombs_l+:} false; then :
15207 $as_echo_n "(cached) " >&6
15208 else
15209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15210 /* end confdefs.h. */
15211 #include <stdlib.h>
15212 #include <locale.h>
15214 main ()
15216 #ifndef wcstombs_l
15217 (void) wcstombs_l;
15218 #endif
15220 return 0;
15222 _ACEOF
15223 if ac_fn_c_try_compile "$LINENO"; then :
15224 pgac_cv_func_wcstombs_l='yes'
15225 else
15226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15227 /* end confdefs.h. */
15228 #include <stdlib.h>
15229 #include <locale.h>
15230 #include <xlocale.h>
15232 main ()
15234 #ifndef wcstombs_l
15235 (void) wcstombs_l;
15236 #endif
15238 return 0;
15240 _ACEOF
15241 if ac_fn_c_try_compile "$LINENO"; then :
15242 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15243 else
15244 pgac_cv_func_wcstombs_l='no'
15246 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15248 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15251 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15252 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15254 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15258 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15259 # symbols that that library has no business exposing to the world. Pending
15260 # acquisition of a clue by those developers, ignore libedit (including its
15261 # possible alias of libreadline) while checking for everything else.
15262 LIBS_including_readline="$LIBS"
15263 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15265 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
15266 do :
15267 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15268 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15269 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15270 cat >>confdefs.h <<_ACEOF
15271 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15272 _ACEOF
15275 done
15278 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15280 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15281 if ${pgac_cv__builtin_bswap16+:} false; then :
15282 $as_echo_n "(cached) " >&6
15283 else
15284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15285 /* end confdefs.h. */
15288 call__builtin_bswap16(int x)
15290 return __builtin_bswap16(x);
15293 main ()
15297 return 0;
15299 _ACEOF
15300 if ac_fn_c_try_link "$LINENO"; then :
15301 pgac_cv__builtin_bswap16=yes
15302 else
15303 pgac_cv__builtin_bswap16=no
15305 rm -f core conftest.err conftest.$ac_objext \
15306 conftest$ac_exeext conftest.$ac_ext
15308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15309 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15310 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15312 cat >>confdefs.h <<_ACEOF
15313 #define HAVE__BUILTIN_BSWAP16 1
15314 _ACEOF
15317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15318 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15319 if ${pgac_cv__builtin_bswap32+:} false; then :
15320 $as_echo_n "(cached) " >&6
15321 else
15322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15323 /* end confdefs.h. */
15326 call__builtin_bswap32(int x)
15328 return __builtin_bswap32(x);
15331 main ()
15335 return 0;
15337 _ACEOF
15338 if ac_fn_c_try_link "$LINENO"; then :
15339 pgac_cv__builtin_bswap32=yes
15340 else
15341 pgac_cv__builtin_bswap32=no
15343 rm -f core conftest.err conftest.$ac_objext \
15344 conftest$ac_exeext conftest.$ac_ext
15346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15347 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15348 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15350 cat >>confdefs.h <<_ACEOF
15351 #define HAVE__BUILTIN_BSWAP32 1
15352 _ACEOF
15355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15356 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15357 if ${pgac_cv__builtin_bswap64+:} false; then :
15358 $as_echo_n "(cached) " >&6
15359 else
15360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15361 /* end confdefs.h. */
15364 call__builtin_bswap64(long int x)
15366 return __builtin_bswap64(x);
15369 main ()
15373 return 0;
15375 _ACEOF
15376 if ac_fn_c_try_link "$LINENO"; then :
15377 pgac_cv__builtin_bswap64=yes
15378 else
15379 pgac_cv__builtin_bswap64=no
15381 rm -f core conftest.err conftest.$ac_objext \
15382 conftest$ac_exeext conftest.$ac_ext
15384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15385 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15386 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15388 cat >>confdefs.h <<_ACEOF
15389 #define HAVE__BUILTIN_BSWAP64 1
15390 _ACEOF
15393 # We assume that we needn't test all widths of these explicitly:
15394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15395 $as_echo_n "checking for __builtin_clz... " >&6; }
15396 if ${pgac_cv__builtin_clz+:} false; then :
15397 $as_echo_n "(cached) " >&6
15398 else
15399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15400 /* end confdefs.h. */
15403 call__builtin_clz(unsigned int x)
15405 return __builtin_clz(x);
15408 main ()
15412 return 0;
15414 _ACEOF
15415 if ac_fn_c_try_link "$LINENO"; then :
15416 pgac_cv__builtin_clz=yes
15417 else
15418 pgac_cv__builtin_clz=no
15420 rm -f core conftest.err conftest.$ac_objext \
15421 conftest$ac_exeext conftest.$ac_ext
15423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15424 $as_echo "$pgac_cv__builtin_clz" >&6; }
15425 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15427 cat >>confdefs.h <<_ACEOF
15428 #define HAVE__BUILTIN_CLZ 1
15429 _ACEOF
15432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15433 $as_echo_n "checking for __builtin_ctz... " >&6; }
15434 if ${pgac_cv__builtin_ctz+:} false; then :
15435 $as_echo_n "(cached) " >&6
15436 else
15437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15438 /* end confdefs.h. */
15441 call__builtin_ctz(unsigned int x)
15443 return __builtin_ctz(x);
15446 main ()
15450 return 0;
15452 _ACEOF
15453 if ac_fn_c_try_link "$LINENO"; then :
15454 pgac_cv__builtin_ctz=yes
15455 else
15456 pgac_cv__builtin_ctz=no
15458 rm -f core conftest.err conftest.$ac_objext \
15459 conftest$ac_exeext conftest.$ac_ext
15461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15462 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15463 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15465 cat >>confdefs.h <<_ACEOF
15466 #define HAVE__BUILTIN_CTZ 1
15467 _ACEOF
15470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15471 $as_echo_n "checking for __builtin_popcount... " >&6; }
15472 if ${pgac_cv__builtin_popcount+:} false; then :
15473 $as_echo_n "(cached) " >&6
15474 else
15475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15476 /* end confdefs.h. */
15479 call__builtin_popcount(unsigned int x)
15481 return __builtin_popcount(x);
15484 main ()
15488 return 0;
15490 _ACEOF
15491 if ac_fn_c_try_link "$LINENO"; then :
15492 pgac_cv__builtin_popcount=yes
15493 else
15494 pgac_cv__builtin_popcount=no
15496 rm -f core conftest.err conftest.$ac_objext \
15497 conftest$ac_exeext conftest.$ac_ext
15499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15500 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15501 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15503 cat >>confdefs.h <<_ACEOF
15504 #define HAVE__BUILTIN_POPCOUNT 1
15505 _ACEOF
15508 # __builtin_frame_address may draw a diagnostic for non-constant argument,
15509 # so it needs a different test function.
15510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
15511 $as_echo_n "checking for __builtin_frame_address... " >&6; }
15512 if ${pgac_cv__builtin_frame_address+:} false; then :
15513 $as_echo_n "(cached) " >&6
15514 else
15515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15516 /* end confdefs.h. */
15518 void *
15519 call__builtin_frame_address(void)
15521 return __builtin_frame_address(0);
15524 main ()
15528 return 0;
15530 _ACEOF
15531 if ac_fn_c_try_link "$LINENO"; then :
15532 pgac_cv__builtin_frame_address=yes
15533 else
15534 pgac_cv__builtin_frame_address=no
15536 rm -f core conftest.err conftest.$ac_objext \
15537 conftest$ac_exeext conftest.$ac_ext
15539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5
15540 $as_echo "$pgac_cv__builtin_frame_address" >&6; }
15541 if test x"${pgac_cv__builtin_frame_address}" = xyes ; then
15543 cat >>confdefs.h <<_ACEOF
15544 #define HAVE__BUILTIN_FRAME_ADDRESS 1
15545 _ACEOF
15549 # We require 64-bit fseeko() to be available, but run this check anyway
15550 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
15551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15552 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15553 if ${ac_cv_sys_largefile_source+:} false; then :
15554 $as_echo_n "(cached) " >&6
15555 else
15556 while :; do
15557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15558 /* end confdefs.h. */
15559 #include <sys/types.h> /* for off_t */
15560 #include <stdio.h>
15562 main ()
15564 int (*fp) (FILE *, off_t, int) = fseeko;
15565 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15567 return 0;
15569 _ACEOF
15570 if ac_fn_c_try_link "$LINENO"; then :
15571 ac_cv_sys_largefile_source=no; break
15573 rm -f core conftest.err conftest.$ac_objext \
15574 conftest$ac_exeext conftest.$ac_ext
15575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15576 /* end confdefs.h. */
15577 #define _LARGEFILE_SOURCE 1
15578 #include <sys/types.h> /* for off_t */
15579 #include <stdio.h>
15581 main ()
15583 int (*fp) (FILE *, off_t, int) = fseeko;
15584 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15586 return 0;
15588 _ACEOF
15589 if ac_fn_c_try_link "$LINENO"; then :
15590 ac_cv_sys_largefile_source=1; break
15592 rm -f core conftest.err conftest.$ac_objext \
15593 conftest$ac_exeext conftest.$ac_ext
15594 ac_cv_sys_largefile_source=unknown
15595 break
15596 done
15598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15599 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15600 case $ac_cv_sys_largefile_source in #(
15601 no | unknown) ;;
15603 cat >>confdefs.h <<_ACEOF
15604 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15605 _ACEOF
15607 esac
15608 rm -rf conftest*
15610 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15611 # in glibc 2.1.3, but that breaks too many other things.
15612 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15613 if test $ac_cv_sys_largefile_source != unknown; then
15615 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15620 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15621 # by calling it, 2009-04-02
15622 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15623 # The Clang compiler raises a warning for an undeclared identifier that matches
15624 # a compiler builtin function. All extant Clang versions are affected, as of
15625 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
15626 # C and Objective C languages, but Clang does report an error under C++ and
15627 # Objective C++.
15629 # Passing -fno-builtin to the compiler would suppress this problem. That
15630 # strategy would have the advantage of being insensitive to stray warnings, but
15631 # it would make tests less realistic.
15632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15633 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15634 if ${ac_cv_c_decl_report+:} false; then :
15635 $as_echo_n "(cached) " >&6
15636 else
15637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15638 /* end confdefs.h. */
15641 main ()
15643 (void) strchr;
15645 return 0;
15647 _ACEOF
15648 if ac_fn_c_try_compile "$LINENO"; then :
15649 if test -s conftest.err; then :
15650 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15651 # valid AC_CHECK_DECL input. No library function is consistently available
15652 # on freestanding implementations, so test against a dummy declaration.
15653 # Include always-available headers on the off chance that they somehow
15654 # elicit warnings.
15655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15656 /* end confdefs.h. */
15657 #include <float.h>
15658 #include <limits.h>
15659 #include <stdarg.h>
15660 #include <stddef.h>
15661 extern void ac_decl (int, char *);
15663 main ()
15665 #ifdef __cplusplus
15666 (void) ac_decl ((int) 0, (char *) 0);
15667 (void) ac_decl;
15668 #else
15669 (void) ac_decl;
15670 #endif
15673 return 0;
15675 _ACEOF
15676 if ac_fn_c_try_compile "$LINENO"; then :
15677 if test -s conftest.err; then :
15678 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15679 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15680 as_fn_error $? "cannot detect from compiler exit status or warnings
15681 See \`config.log' for more details" "$LINENO" 5; }
15682 else
15683 ac_cv_c_decl_report=warning
15685 else
15686 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15687 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15688 as_fn_error $? "cannot compile a simple declaration test
15689 See \`config.log' for more details" "$LINENO" 5; }
15691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15692 else
15693 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15694 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15695 as_fn_error $? "compiler does not report undeclared identifiers
15696 See \`config.log' for more details" "$LINENO" 5; }
15698 else
15699 ac_cv_c_decl_report=error
15701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15704 $as_echo "$ac_cv_c_decl_report" >&6; }
15706 case $ac_cv_c_decl_report in
15707 warning) ac_c_decl_warn_flag=yes ;;
15708 *) ac_c_decl_warn_flag= ;;
15709 esac
15711 if test "$PORTNAME" != "solaris"; then :
15713 for ac_func in posix_fadvise
15714 do :
15715 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15716 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15717 cat >>confdefs.h <<_ACEOF
15718 #define HAVE_POSIX_FADVISE 1
15719 _ACEOF
15722 done
15724 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15726 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15727 ac_have_decl=1
15728 else
15729 ac_have_decl=0
15732 cat >>confdefs.h <<_ACEOF
15733 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15734 _ACEOF
15737 fi # fi
15739 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15741 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15742 ac_have_decl=1
15743 else
15744 ac_have_decl=0
15747 cat >>confdefs.h <<_ACEOF
15748 #define HAVE_DECL_FDATASYNC $ac_have_decl
15749 _ACEOF
15751 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15752 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15753 ac_have_decl=1
15754 else
15755 ac_have_decl=0
15758 cat >>confdefs.h <<_ACEOF
15759 #define HAVE_DECL_STRLCAT $ac_have_decl
15760 _ACEOF
15761 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15762 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15763 ac_have_decl=1
15764 else
15765 ac_have_decl=0
15768 cat >>confdefs.h <<_ACEOF
15769 #define HAVE_DECL_STRLCPY $ac_have_decl
15770 _ACEOF
15771 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15772 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15773 ac_have_decl=1
15774 else
15775 ac_have_decl=0
15778 cat >>confdefs.h <<_ACEOF
15779 #define HAVE_DECL_STRNLEN $ac_have_decl
15780 _ACEOF
15783 # We can't use AC_CHECK_FUNCS to detect these functions, because it
15784 # won't handle deployment target restrictions on macOS
15785 ac_fn_c_check_decl "$LINENO" "preadv" "ac_cv_have_decl_preadv" "#include <sys/uio.h>
15787 if test "x$ac_cv_have_decl_preadv" = xyes; then :
15788 ac_have_decl=1
15789 else
15790 ac_have_decl=0
15793 cat >>confdefs.h <<_ACEOF
15794 #define HAVE_DECL_PREADV $ac_have_decl
15795 _ACEOF
15797 ac_fn_c_check_decl "$LINENO" "pwritev" "ac_cv_have_decl_pwritev" "#include <sys/uio.h>
15799 if test "x$ac_cv_have_decl_pwritev" = xyes; then :
15800 ac_have_decl=1
15801 else
15802 ac_have_decl=0
15805 cat >>confdefs.h <<_ACEOF
15806 #define HAVE_DECL_PWRITEV $ac_have_decl
15807 _ACEOF
15810 # This is probably only present on macOS, but may as well check always
15811 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15813 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15814 ac_have_decl=1
15815 else
15816 ac_have_decl=0
15819 cat >>confdefs.h <<_ACEOF
15820 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15821 _ACEOF
15824 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
15825 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
15826 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
15828 else
15829 case " $LIBOBJS " in
15830 *" explicit_bzero.$ac_objext "* ) ;;
15831 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
15833 esac
15837 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15838 if test "x$ac_cv_func_getopt" = xyes; then :
15839 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15841 else
15842 case " $LIBOBJS " in
15843 *" getopt.$ac_objext "* ) ;;
15844 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15846 esac
15850 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15851 if test "x$ac_cv_func_getpeereid" = xyes; then :
15852 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15854 else
15855 case " $LIBOBJS " in
15856 *" getpeereid.$ac_objext "* ) ;;
15857 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15859 esac
15863 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15864 if test "x$ac_cv_func_inet_aton" = xyes; then :
15865 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15867 else
15868 case " $LIBOBJS " in
15869 *" inet_aton.$ac_objext "* ) ;;
15870 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15872 esac
15876 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15877 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15878 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15880 else
15881 case " $LIBOBJS " in
15882 *" mkdtemp.$ac_objext "* ) ;;
15883 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15885 esac
15889 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15890 if test "x$ac_cv_func_strlcat" = xyes; then :
15891 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15893 else
15894 case " $LIBOBJS " in
15895 *" strlcat.$ac_objext "* ) ;;
15896 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15898 esac
15902 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15903 if test "x$ac_cv_func_strlcpy" = xyes; then :
15904 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15906 else
15907 case " $LIBOBJS " in
15908 *" strlcpy.$ac_objext "* ) ;;
15909 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15911 esac
15915 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15916 if test "x$ac_cv_func_strnlen" = xyes; then :
15917 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15919 else
15920 case " $LIBOBJS " in
15921 *" strnlen.$ac_objext "* ) ;;
15922 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15924 esac
15930 ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
15931 if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
15932 $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
15934 else
15935 case " $LIBOBJS " in
15936 *" pthread_barrier_wait.$ac_objext "* ) ;;
15937 *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
15939 esac
15945 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
15946 # Cygwin and (apparently, based on test results) Mingw both
15947 # have a broken strtof(), so substitute its implementation.
15948 # That's not a perfect fix, since it doesn't avoid double-rounding,
15949 # but we have no better options.
15950 case " $LIBOBJS " in
15951 *" strtof.$ac_objext "* ) ;;
15952 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
15954 esac
15956 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
15957 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
15960 # Similarly, use system's getopt_long() only if system provides struct option.
15961 if test x"$ac_cv_type_struct_option" = xyes ; then
15962 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15963 if test "x$ac_cv_func_getopt_long" = xyes; then :
15964 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15966 else
15967 case " $LIBOBJS " in
15968 *" getopt_long.$ac_objext "* ) ;;
15969 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15971 esac
15976 else
15977 case " $LIBOBJS " in
15978 *" getopt_long.$ac_objext "* ) ;;
15979 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15981 esac
15985 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
15986 # (i.e., allow '-' as a flag character), so use our version on those platforms.
15987 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
15988 case " $LIBOBJS " in
15989 *" getopt.$ac_objext "* ) ;;
15990 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15992 esac
15996 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15997 # so always use our version on Windows.
15998 if test "$PORTNAME" = "win32"; then
15999 case " $LIBOBJS " in
16000 *" getopt.$ac_objext "* ) ;;
16001 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16003 esac
16005 case " $LIBOBJS " in
16006 *" getopt_long.$ac_objext "* ) ;;
16007 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16009 esac
16013 # Win32 (really MinGW) support
16014 if test "$PORTNAME" = "win32"; then
16015 for ac_func in _configthreadlocale
16016 do :
16017 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16018 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16019 cat >>confdefs.h <<_ACEOF
16020 #define HAVE__CONFIGTHREADLOCALE 1
16021 _ACEOF
16024 done
16026 case " $LIBOBJS " in
16027 *" dirmod.$ac_objext "* ) ;;
16028 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16030 esac
16032 case " $LIBOBJS " in
16033 *" kill.$ac_objext "* ) ;;
16034 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16036 esac
16038 case " $LIBOBJS " in
16039 *" open.$ac_objext "* ) ;;
16040 *) LIBOBJS="$LIBOBJS open.$ac_objext"
16042 esac
16044 case " $LIBOBJS " in
16045 *" system.$ac_objext "* ) ;;
16046 *) LIBOBJS="$LIBOBJS system.$ac_objext"
16048 esac
16050 case " $LIBOBJS " in
16051 *" win32common.$ac_objext "* ) ;;
16052 *) LIBOBJS="$LIBOBJS win32common.$ac_objext"
16054 esac
16056 case " $LIBOBJS " in
16057 *" win32dlopen.$ac_objext "* ) ;;
16058 *) LIBOBJS="$LIBOBJS win32dlopen.$ac_objext"
16060 esac
16062 case " $LIBOBJS " in
16063 *" win32env.$ac_objext "* ) ;;
16064 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16066 esac
16068 case " $LIBOBJS " in
16069 *" win32error.$ac_objext "* ) ;;
16070 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16072 esac
16074 case " $LIBOBJS " in
16075 *" win32fdatasync.$ac_objext "* ) ;;
16076 *) LIBOBJS="$LIBOBJS win32fdatasync.$ac_objext"
16078 esac
16080 case " $LIBOBJS " in
16081 *" win32gai_strerror.$ac_objext "* ) ;;
16082 *) LIBOBJS="$LIBOBJS win32gai_strerror.$ac_objext"
16084 esac
16086 case " $LIBOBJS " in
16087 *" win32getrusage.$ac_objext "* ) ;;
16088 *) LIBOBJS="$LIBOBJS win32getrusage.$ac_objext"
16090 esac
16092 case " $LIBOBJS " in
16093 *" win32link.$ac_objext "* ) ;;
16094 *) LIBOBJS="$LIBOBJS win32link.$ac_objext"
16096 esac
16098 case " $LIBOBJS " in
16099 *" win32ntdll.$ac_objext "* ) ;;
16100 *) LIBOBJS="$LIBOBJS win32ntdll.$ac_objext"
16102 esac
16104 case " $LIBOBJS " in
16105 *" win32pread.$ac_objext "* ) ;;
16106 *) LIBOBJS="$LIBOBJS win32pread.$ac_objext"
16108 esac
16110 case " $LIBOBJS " in
16111 *" win32pwrite.$ac_objext "* ) ;;
16112 *) LIBOBJS="$LIBOBJS win32pwrite.$ac_objext"
16114 esac
16116 case " $LIBOBJS " in
16117 *" win32security.$ac_objext "* ) ;;
16118 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16120 esac
16122 case " $LIBOBJS " in
16123 *" win32setlocale.$ac_objext "* ) ;;
16124 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16126 esac
16128 case " $LIBOBJS " in
16129 *" win32stat.$ac_objext "* ) ;;
16130 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
16132 esac
16135 # Cygwin needs only a bit of that
16136 if test "$PORTNAME" = "cygwin"; then
16137 case " $LIBOBJS " in
16138 *" dirmod.$ac_objext "* ) ;;
16139 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16141 esac
16145 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16146 if test "x$ac_cv_func_syslog" = xyes; then :
16147 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16148 if test "x$ac_cv_header_syslog_h" = xyes; then :
16150 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16159 $as_echo_n "checking for opterr... " >&6; }
16160 if ${pgac_cv_var_int_opterr+:} false; then :
16161 $as_echo_n "(cached) " >&6
16162 else
16163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16164 /* end confdefs.h. */
16165 #include <unistd.h>
16167 main ()
16169 extern int opterr; opterr = 1;
16171 return 0;
16173 _ACEOF
16174 if ac_fn_c_try_link "$LINENO"; then :
16175 pgac_cv_var_int_opterr=yes
16176 else
16177 pgac_cv_var_int_opterr=no
16179 rm -f core conftest.err conftest.$ac_objext \
16180 conftest$ac_exeext conftest.$ac_ext
16182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16183 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16184 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16186 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16191 $as_echo_n "checking for optreset... " >&6; }
16192 if ${pgac_cv_var_int_optreset+:} false; then :
16193 $as_echo_n "(cached) " >&6
16194 else
16195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16196 /* end confdefs.h. */
16197 #include <unistd.h>
16199 main ()
16201 extern int optreset; optreset = 1;
16203 return 0;
16205 _ACEOF
16206 if ac_fn_c_try_link "$LINENO"; then :
16207 pgac_cv_var_int_optreset=yes
16208 else
16209 pgac_cv_var_int_optreset=no
16211 rm -f core conftest.err conftest.$ac_objext \
16212 conftest$ac_exeext conftest.$ac_ext
16214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16215 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16216 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16218 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16222 if test "$with_icu" = yes; then
16223 ac_save_CPPFLAGS=$CPPFLAGS
16224 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16226 # Verify we have ICU's header files
16227 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16228 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16230 else
16231 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16236 CPPFLAGS=$ac_save_CPPFLAGS
16239 if test "$with_llvm" = yes; then
16241 # Check which functionality is present
16242 SAVE_CPPFLAGS="$CPPFLAGS"
16243 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16244 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16246 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16247 ac_have_decl=1
16248 else
16249 ac_have_decl=0
16252 cat >>confdefs.h <<_ACEOF
16253 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16254 _ACEOF
16255 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16257 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16258 ac_have_decl=1
16259 else
16260 ac_have_decl=0
16263 cat >>confdefs.h <<_ACEOF
16264 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16265 _ACEOF
16267 CPPFLAGS="$SAVE_CPPFLAGS"
16271 # Lastly, restore full LIBS list and check for readline/libedit symbols
16272 LIBS="$LIBS_including_readline"
16274 if test "$with_readline" = yes; then
16275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
16276 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
16277 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
16278 $as_echo_n "(cached) " >&6
16279 else
16280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16281 /* end confdefs.h. */
16282 #include <stdio.h>
16283 #if defined(HAVE_READLINE_READLINE_H)
16284 #include <readline/readline.h>
16285 #elif defined(HAVE_EDITLINE_READLINE_H)
16286 #include <editline/readline.h>
16287 #elif defined(HAVE_READLINE_H)
16288 #include <readline.h>
16289 #endif
16292 main ()
16294 rl_completion_suppress_quote = 1;
16296 return 0;
16298 _ACEOF
16299 if ac_fn_c_try_link "$LINENO"; then :
16300 pgac_cv_var_rl_completion_suppress_quote=yes
16301 else
16302 pgac_cv_var_rl_completion_suppress_quote=no
16304 rm -f core conftest.err conftest.$ac_objext \
16305 conftest$ac_exeext conftest.$ac_ext
16307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
16308 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
16309 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
16311 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
16314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
16315 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
16316 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
16317 $as_echo_n "(cached) " >&6
16318 else
16319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16320 /* end confdefs.h. */
16321 #include <stdio.h>
16322 #if defined(HAVE_READLINE_READLINE_H)
16323 #include <readline/readline.h>
16324 #elif defined(HAVE_EDITLINE_READLINE_H)
16325 #include <editline/readline.h>
16326 #elif defined(HAVE_READLINE_H)
16327 #include <readline.h>
16328 #endif
16331 main ()
16333 rl_filename_quote_characters = "x";
16335 return 0;
16337 _ACEOF
16338 if ac_fn_c_try_link "$LINENO"; then :
16339 pgac_cv_var_rl_filename_quote_characters=yes
16340 else
16341 pgac_cv_var_rl_filename_quote_characters=no
16343 rm -f core conftest.err conftest.$ac_objext \
16344 conftest$ac_exeext conftest.$ac_ext
16346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
16347 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
16348 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
16350 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
16353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
16354 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
16355 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
16356 $as_echo_n "(cached) " >&6
16357 else
16358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16359 /* end confdefs.h. */
16360 #include <stdio.h>
16361 #if defined(HAVE_READLINE_READLINE_H)
16362 #include <readline/readline.h>
16363 #elif defined(HAVE_EDITLINE_READLINE_H)
16364 #include <editline/readline.h>
16365 #elif defined(HAVE_READLINE_H)
16366 #include <readline.h>
16367 #endif
16370 main ()
16372 rl_filename_quoting_function = 0;
16374 return 0;
16376 _ACEOF
16377 if ac_fn_c_try_link "$LINENO"; then :
16378 pgac_cv_var_rl_filename_quoting_function=yes
16379 else
16380 pgac_cv_var_rl_filename_quoting_function=no
16382 rm -f core conftest.err conftest.$ac_objext \
16383 conftest$ac_exeext conftest.$ac_ext
16385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
16386 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
16387 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
16389 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
16393 for ac_func in append_history history_truncate_file rl_completion_matches rl_filename_completion_function rl_reset_screen_size rl_variable_bind
16394 do :
16395 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16396 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16397 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16398 cat >>confdefs.h <<_ACEOF
16399 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16400 _ACEOF
16403 done
16408 # This test makes sure that run tests work at all. Sometimes a shared
16409 # library is found by the linker, but the runtime linker can't find it.
16410 # This check should come after all modifications of compiler or linker
16411 # variables, and before any other run tests.
16412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16413 $as_echo_n "checking test program... " >&6; }
16414 if test "$cross_compiling" = yes; then :
16415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16416 $as_echo "cross-compiling" >&6; }
16417 else
16418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16419 /* end confdefs.h. */
16420 int main() { return 0; }
16421 _ACEOF
16422 if ac_fn_c_try_run "$LINENO"; then :
16423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16424 $as_echo "ok" >&6; }
16425 else
16426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16427 $as_echo "failed" >&6; }
16428 as_fn_error $? "
16429 Could not execute a simple test program. This may be a problem
16430 related to locating shared libraries. Check the file 'config.log'
16431 for the exact reason." "$LINENO" 5
16433 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16434 conftest.$ac_objext conftest.beam conftest.$ac_ext
16438 # --------------------
16439 # Run tests below here
16440 # --------------------
16443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16444 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16445 if ${pgac_cv_type_long_int_64+:} false; then :
16446 $as_echo_n "(cached) " >&6
16447 else
16448 if test "$cross_compiling" = yes; then :
16449 # If cross-compiling, check the size reported by the compiler and
16450 # trust that the arithmetic works.
16451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16452 /* end confdefs.h. */
16455 main ()
16457 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16458 test_array [0] = 0;
16459 return test_array [0];
16462 return 0;
16464 _ACEOF
16465 if ac_fn_c_try_compile "$LINENO"; then :
16466 pgac_cv_type_long_int_64=yes
16467 else
16468 pgac_cv_type_long_int_64=no
16470 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16471 else
16472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16473 /* end confdefs.h. */
16474 typedef long int ac_int64;
16477 * These are globals to discourage the compiler from folding all the
16478 * arithmetic tests down to compile-time constants.
16480 ac_int64 a = 20000001;
16481 ac_int64 b = 40000005;
16483 int does_int64_work()
16485 ac_int64 c,d;
16487 if (sizeof(ac_int64) != 8)
16488 return 0; /* definitely not the right size */
16490 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16491 c = a * b;
16492 d = (c + b) / b;
16493 if (d != a+1)
16494 return 0;
16495 return 1;
16499 main() {
16500 return (! does_int64_work());
16502 _ACEOF
16503 if ac_fn_c_try_run "$LINENO"; then :
16504 pgac_cv_type_long_int_64=yes
16505 else
16506 pgac_cv_type_long_int_64=no
16508 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16509 conftest.$ac_objext conftest.beam conftest.$ac_ext
16513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16514 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16516 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16517 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16519 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16524 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16525 pg_int64_type="long int"
16526 else
16527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16528 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16529 if ${pgac_cv_type_long_long_int_64+:} false; then :
16530 $as_echo_n "(cached) " >&6
16531 else
16532 if test "$cross_compiling" = yes; then :
16533 # If cross-compiling, check the size reported by the compiler and
16534 # trust that the arithmetic works.
16535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16536 /* end confdefs.h. */
16539 main ()
16541 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16542 test_array [0] = 0;
16543 return test_array [0];
16546 return 0;
16548 _ACEOF
16549 if ac_fn_c_try_compile "$LINENO"; then :
16550 pgac_cv_type_long_long_int_64=yes
16551 else
16552 pgac_cv_type_long_long_int_64=no
16554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16555 else
16556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16557 /* end confdefs.h. */
16558 typedef long long int ac_int64;
16561 * These are globals to discourage the compiler from folding all the
16562 * arithmetic tests down to compile-time constants.
16564 ac_int64 a = 20000001;
16565 ac_int64 b = 40000005;
16567 int does_int64_work()
16569 ac_int64 c,d;
16571 if (sizeof(ac_int64) != 8)
16572 return 0; /* definitely not the right size */
16574 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16575 c = a * b;
16576 d = (c + b) / b;
16577 if (d != a+1)
16578 return 0;
16579 return 1;
16583 main() {
16584 return (! does_int64_work());
16586 _ACEOF
16587 if ac_fn_c_try_run "$LINENO"; then :
16588 pgac_cv_type_long_long_int_64=yes
16589 else
16590 pgac_cv_type_long_long_int_64=no
16592 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16593 conftest.$ac_objext conftest.beam conftest.$ac_ext
16597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16598 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16600 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16601 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16603 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16607 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16608 pg_int64_type="long long int"
16609 else
16610 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16615 cat >>confdefs.h <<_ACEOF
16616 #define PG_INT64_TYPE $pg_int64_type
16617 _ACEOF
16620 # Select the printf length modifier that goes with that, too.
16621 if test x"$pg_int64_type" = x"long long int" ; then
16622 INT64_MODIFIER='"ll"'
16623 else
16624 INT64_MODIFIER='"l"'
16628 cat >>confdefs.h <<_ACEOF
16629 #define INT64_MODIFIER $INT64_MODIFIER
16630 _ACEOF
16633 # has to be down here, rather than with the other builtins, because
16634 # the test uses PG_INT64_TYPE.
16635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16636 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16637 if ${pgac_cv__builtin_op_overflow+:} false; then :
16638 $as_echo_n "(cached) " >&6
16639 else
16640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16641 /* end confdefs.h. */
16643 PG_INT64_TYPE a = 1;
16644 PG_INT64_TYPE b = 1;
16645 PG_INT64_TYPE result;
16646 int oflo;
16649 main ()
16651 oflo = __builtin_mul_overflow(a, b, &result);
16653 return 0;
16655 _ACEOF
16656 if ac_fn_c_try_link "$LINENO"; then :
16657 pgac_cv__builtin_op_overflow=yes
16658 else
16659 pgac_cv__builtin_op_overflow=no
16661 rm -f core conftest.err conftest.$ac_objext \
16662 conftest$ac_exeext conftest.$ac_ext
16664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16665 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16666 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16668 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16672 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16673 # The cast to long int works around a bug in the HP C Compiler
16674 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16675 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16676 # This bug is HP SR number 8606223364.
16677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16678 $as_echo_n "checking size of void *... " >&6; }
16679 if ${ac_cv_sizeof_void_p+:} false; then :
16680 $as_echo_n "(cached) " >&6
16681 else
16682 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
16684 else
16685 if test "$ac_cv_type_void_p" = yes; then
16686 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16687 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16688 as_fn_error 77 "cannot compute sizeof (void *)
16689 See \`config.log' for more details" "$LINENO" 5; }
16690 else
16691 ac_cv_sizeof_void_p=0
16696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16697 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16701 cat >>confdefs.h <<_ACEOF
16702 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16703 _ACEOF
16706 # The cast to long int works around a bug in the HP C Compiler
16707 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16708 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16709 # This bug is HP SR number 8606223364.
16710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16711 $as_echo_n "checking size of size_t... " >&6; }
16712 if ${ac_cv_sizeof_size_t+:} false; then :
16713 $as_echo_n "(cached) " >&6
16714 else
16715 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
16717 else
16718 if test "$ac_cv_type_size_t" = yes; then
16719 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16720 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16721 as_fn_error 77 "cannot compute sizeof (size_t)
16722 See \`config.log' for more details" "$LINENO" 5; }
16723 else
16724 ac_cv_sizeof_size_t=0
16729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16730 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16734 cat >>confdefs.h <<_ACEOF
16735 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16736 _ACEOF
16739 # The cast to long int works around a bug in the HP C Compiler
16740 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16741 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16742 # This bug is HP SR number 8606223364.
16743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16744 $as_echo_n "checking size of long... " >&6; }
16745 if ${ac_cv_sizeof_long+:} false; then :
16746 $as_echo_n "(cached) " >&6
16747 else
16748 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
16750 else
16751 if test "$ac_cv_type_long" = yes; then
16752 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16753 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16754 as_fn_error 77 "cannot compute sizeof (long)
16755 See \`config.log' for more details" "$LINENO" 5; }
16756 else
16757 ac_cv_sizeof_long=0
16762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16763 $as_echo "$ac_cv_sizeof_long" >&6; }
16767 cat >>confdefs.h <<_ACEOF
16768 #define SIZEOF_LONG $ac_cv_sizeof_long
16769 _ACEOF
16773 # Determine memory alignment requirements for the basic C data types.
16775 # The cast to long int works around a bug in the HP C Compiler,
16776 # see AC_CHECK_SIZEOF for more information.
16777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16778 $as_echo_n "checking alignment of short... " >&6; }
16779 if ${ac_cv_alignof_short+:} false; then :
16780 $as_echo_n "(cached) " >&6
16781 else
16782 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
16783 #ifndef offsetof
16784 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16785 #endif
16786 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16788 else
16789 if test "$ac_cv_type_short" = yes; then
16790 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16791 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16792 as_fn_error 77 "cannot compute alignment of short
16793 See \`config.log' for more details" "$LINENO" 5; }
16794 else
16795 ac_cv_alignof_short=0
16800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16801 $as_echo "$ac_cv_alignof_short" >&6; }
16805 cat >>confdefs.h <<_ACEOF
16806 #define ALIGNOF_SHORT $ac_cv_alignof_short
16807 _ACEOF
16810 # The cast to long int works around a bug in the HP C Compiler,
16811 # see AC_CHECK_SIZEOF for more information.
16812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16813 $as_echo_n "checking alignment of int... " >&6; }
16814 if ${ac_cv_alignof_int+:} false; then :
16815 $as_echo_n "(cached) " >&6
16816 else
16817 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
16818 #ifndef offsetof
16819 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16820 #endif
16821 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16823 else
16824 if test "$ac_cv_type_int" = yes; then
16825 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16826 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16827 as_fn_error 77 "cannot compute alignment of int
16828 See \`config.log' for more details" "$LINENO" 5; }
16829 else
16830 ac_cv_alignof_int=0
16835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16836 $as_echo "$ac_cv_alignof_int" >&6; }
16840 cat >>confdefs.h <<_ACEOF
16841 #define ALIGNOF_INT $ac_cv_alignof_int
16842 _ACEOF
16845 # The cast to long int works around a bug in the HP C Compiler,
16846 # see AC_CHECK_SIZEOF for more information.
16847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16848 $as_echo_n "checking alignment of long... " >&6; }
16849 if ${ac_cv_alignof_long+:} false; then :
16850 $as_echo_n "(cached) " >&6
16851 else
16852 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
16853 #ifndef offsetof
16854 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16855 #endif
16856 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16858 else
16859 if test "$ac_cv_type_long" = yes; then
16860 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16861 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16862 as_fn_error 77 "cannot compute alignment of long
16863 See \`config.log' for more details" "$LINENO" 5; }
16864 else
16865 ac_cv_alignof_long=0
16870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16871 $as_echo "$ac_cv_alignof_long" >&6; }
16875 cat >>confdefs.h <<_ACEOF
16876 #define ALIGNOF_LONG $ac_cv_alignof_long
16877 _ACEOF
16880 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16881 # The cast to long int works around a bug in the HP C Compiler,
16882 # see AC_CHECK_SIZEOF for more information.
16883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16884 $as_echo_n "checking alignment of long long int... " >&6; }
16885 if ${ac_cv_alignof_long_long_int+:} false; then :
16886 $as_echo_n "(cached) " >&6
16887 else
16888 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
16889 #ifndef offsetof
16890 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16891 #endif
16892 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16894 else
16895 if test "$ac_cv_type_long_long_int" = yes; then
16896 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16897 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16898 as_fn_error 77 "cannot compute alignment of long long int
16899 See \`config.log' for more details" "$LINENO" 5; }
16900 else
16901 ac_cv_alignof_long_long_int=0
16906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16907 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
16911 cat >>confdefs.h <<_ACEOF
16912 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16913 _ACEOF
16917 # The cast to long int works around a bug in the HP C Compiler,
16918 # see AC_CHECK_SIZEOF for more information.
16919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16920 $as_echo_n "checking alignment of double... " >&6; }
16921 if ${ac_cv_alignof_double+:} false; then :
16922 $as_echo_n "(cached) " >&6
16923 else
16924 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
16925 #ifndef offsetof
16926 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16927 #endif
16928 typedef struct { char x; double y; } ac__type_alignof_;"; then :
16930 else
16931 if test "$ac_cv_type_double" = yes; then
16932 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16933 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16934 as_fn_error 77 "cannot compute alignment of double
16935 See \`config.log' for more details" "$LINENO" 5; }
16936 else
16937 ac_cv_alignof_double=0
16942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
16943 $as_echo "$ac_cv_alignof_double" >&6; }
16947 cat >>confdefs.h <<_ACEOF
16948 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
16949 _ACEOF
16953 # Compute maximum alignment of any basic type.
16955 # We require 'double' to have the strictest alignment among the basic types,
16956 # because otherwise the C ABI might impose 8-byte alignment on some of the
16957 # other C types that correspond to TYPALIGN_DOUBLE SQL types. That could
16958 # cause a mismatch between the tuple layout and the C struct layout of a
16959 # catalog tuple. We used to carefully order catalog columns such that any
16960 # fixed-width, attalign=4 columns were at offsets divisible by 8 regardless
16961 # of MAXIMUM_ALIGNOF to avoid that, but we no longer support any platforms
16962 # where TYPALIGN_DOUBLE != MAXIMUM_ALIGNOF.
16964 # We assume without checking that long's alignment is at least as strong as
16965 # char, short, or int. Note that we intentionally do not consider any types
16966 # wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8 would be too
16967 # much of a penalty for disk and memory space.
16969 MAX_ALIGNOF=$ac_cv_alignof_double
16971 if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
16972 as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5
16974 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $ac_cv_alignof_long_long_int -gt $MAX_ALIGNOF ; then
16975 as_fn_error $? "alignment of 'long long int' is greater than the alignment of 'double'" "$LINENO" 5
16978 cat >>confdefs.h <<_ACEOF
16979 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
16980 _ACEOF
16984 # Some platforms predefine the types int8, int16, etc. Only check
16985 # a (hopefully) representative subset.
16986 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
16988 if test "x$ac_cv_type_int8" = xyes; then :
16990 cat >>confdefs.h <<_ACEOF
16991 #define HAVE_INT8 1
16992 _ACEOF
16996 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
16998 if test "x$ac_cv_type_uint8" = xyes; then :
17000 cat >>confdefs.h <<_ACEOF
17001 #define HAVE_UINT8 1
17002 _ACEOF
17006 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17008 if test "x$ac_cv_type_int64" = xyes; then :
17010 cat >>confdefs.h <<_ACEOF
17011 #define HAVE_INT64 1
17012 _ACEOF
17016 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17018 if test "x$ac_cv_type_uint64" = xyes; then :
17020 cat >>confdefs.h <<_ACEOF
17021 #define HAVE_UINT64 1
17022 _ACEOF
17028 # Some compilers offer a 128-bit integer scalar type.
17029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17030 $as_echo_n "checking for __int128... " >&6; }
17031 if ${pgac_cv__128bit_int+:} false; then :
17032 $as_echo_n "(cached) " >&6
17033 else
17034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17035 /* end confdefs.h. */
17038 * We don't actually run this test, just link it to verify that any support
17039 * functions needed for __int128 are present.
17041 * These are globals to discourage the compiler from folding all the
17042 * arithmetic tests down to compile-time constants. We do not have
17043 * convenient support for 128bit literals at this point...
17045 __int128 a = 48828125;
17046 __int128 b = 97656250;
17049 main ()
17052 __int128 c,d;
17053 a = (a << 12) + 1; /* 200000000001 */
17054 b = (b << 12) + 5; /* 400000000005 */
17055 /* try the most relevant arithmetic ops */
17056 c = a * b;
17057 d = (c + b) / b;
17058 /* must use the results, else compiler may optimize arithmetic away */
17059 if (d != a+1)
17060 return 1;
17063 return 0;
17065 _ACEOF
17066 if ac_fn_c_try_link "$LINENO"; then :
17067 pgac_cv__128bit_int=yes
17068 else
17069 pgac_cv__128bit_int=no
17071 rm -f core conftest.err conftest.$ac_objext \
17072 conftest$ac_exeext conftest.$ac_ext
17074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17075 $as_echo "$pgac_cv__128bit_int" >&6; }
17076 if test x"$pgac_cv__128bit_int" = xyes ; then
17077 # Use of non-default alignment with __int128 tickles bugs in some compilers.
17078 # If not cross-compiling, we can test for bugs and disable use of __int128
17079 # with buggy compilers. If cross-compiling, hope for the best.
17080 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17082 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17083 if ${pgac_cv__128bit_int_bug+:} false; then :
17084 $as_echo_n "(cached) " >&6
17085 else
17086 if test "$cross_compiling" = yes; then :
17087 pgac_cv__128bit_int_bug="assuming ok"
17088 else
17089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17090 /* end confdefs.h. */
17092 /* This must match the corresponding code in c.h: */
17093 #if defined(__GNUC__) || defined(__SUNPRO_C)
17094 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17095 #elif defined(_MSC_VER)
17096 #define pg_attribute_aligned(a) __declspec(align(a))
17097 #endif
17098 typedef __int128 int128a
17099 #if defined(pg_attribute_aligned)
17100 pg_attribute_aligned(8)
17101 #endif
17103 int128a holder;
17104 void pass_by_val(void *buffer, int128a par) { holder = par; }
17107 main ()
17110 long int i64 = 97656225L << 12;
17111 int128a q;
17112 pass_by_val(main, (int128a) i64);
17113 q = (int128a) i64;
17114 if (q != holder)
17115 return 1;
17118 return 0;
17120 _ACEOF
17121 if ac_fn_c_try_run "$LINENO"; then :
17122 pgac_cv__128bit_int_bug=ok
17123 else
17124 pgac_cv__128bit_int_bug=broken
17126 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17127 conftest.$ac_objext conftest.beam conftest.$ac_ext
17131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17132 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17133 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17135 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17137 # The cast to long int works around a bug in the HP C Compiler,
17138 # see AC_CHECK_SIZEOF for more information.
17139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17140 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17141 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17142 $as_echo_n "(cached) " >&6
17143 else
17144 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
17145 #ifndef offsetof
17146 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17147 #endif
17148 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17150 else
17151 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17152 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17153 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17154 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17155 See \`config.log' for more details" "$LINENO" 5; }
17156 else
17157 ac_cv_alignof_PG_INT128_TYPE=0
17162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17163 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17167 cat >>confdefs.h <<_ACEOF
17168 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17169 _ACEOF
17175 # Check for various atomic operations now that we have checked how to declare
17176 # 64bit integers.
17177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17178 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17179 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17180 $as_echo_n "(cached) " >&6
17181 else
17182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17183 /* end confdefs.h. */
17186 main ()
17188 char lock = 0;
17189 __sync_lock_test_and_set(&lock, 1);
17190 __sync_lock_release(&lock);
17192 return 0;
17194 _ACEOF
17195 if ac_fn_c_try_link "$LINENO"; then :
17196 pgac_cv_gcc_sync_char_tas="yes"
17197 else
17198 pgac_cv_gcc_sync_char_tas="no"
17200 rm -f core conftest.err conftest.$ac_objext \
17201 conftest$ac_exeext conftest.$ac_ext
17203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17204 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17205 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17207 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17211 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17212 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17213 $as_echo_n "(cached) " >&6
17214 else
17215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17216 /* end confdefs.h. */
17219 main ()
17221 int lock = 0;
17222 __sync_lock_test_and_set(&lock, 1);
17223 __sync_lock_release(&lock);
17225 return 0;
17227 _ACEOF
17228 if ac_fn_c_try_link "$LINENO"; then :
17229 pgac_cv_gcc_sync_int32_tas="yes"
17230 else
17231 pgac_cv_gcc_sync_int32_tas="no"
17233 rm -f core conftest.err conftest.$ac_objext \
17234 conftest$ac_exeext conftest.$ac_ext
17236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17237 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17238 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17240 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17244 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17245 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17246 $as_echo_n "(cached) " >&6
17247 else
17248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17249 /* end confdefs.h. */
17252 main ()
17254 int val = 0;
17255 __sync_val_compare_and_swap(&val, 0, 37);
17257 return 0;
17259 _ACEOF
17260 if ac_fn_c_try_link "$LINENO"; then :
17261 pgac_cv_gcc_sync_int32_cas="yes"
17262 else
17263 pgac_cv_gcc_sync_int32_cas="no"
17265 rm -f core conftest.err conftest.$ac_objext \
17266 conftest$ac_exeext conftest.$ac_ext
17268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17269 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17270 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17272 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17276 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17277 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17278 $as_echo_n "(cached) " >&6
17279 else
17280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17281 /* end confdefs.h. */
17284 main ()
17286 PG_INT64_TYPE lock = 0;
17287 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17289 return 0;
17291 _ACEOF
17292 if ac_fn_c_try_link "$LINENO"; then :
17293 pgac_cv_gcc_sync_int64_cas="yes"
17294 else
17295 pgac_cv_gcc_sync_int64_cas="no"
17297 rm -f core conftest.err conftest.$ac_objext \
17298 conftest$ac_exeext conftest.$ac_ext
17300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17301 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17302 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17304 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17308 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17309 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17310 $as_echo_n "(cached) " >&6
17311 else
17312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17313 /* end confdefs.h. */
17316 main ()
17318 int val = 0;
17319 int expect = 0;
17320 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17322 return 0;
17324 _ACEOF
17325 if ac_fn_c_try_link "$LINENO"; then :
17326 pgac_cv_gcc_atomic_int32_cas="yes"
17327 else
17328 pgac_cv_gcc_atomic_int32_cas="no"
17330 rm -f core conftest.err conftest.$ac_objext \
17331 conftest$ac_exeext conftest.$ac_ext
17333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17334 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17335 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17337 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17341 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17342 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17343 $as_echo_n "(cached) " >&6
17344 else
17345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17346 /* end confdefs.h. */
17349 main ()
17351 PG_INT64_TYPE val = 0;
17352 PG_INT64_TYPE expect = 0;
17353 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17355 return 0;
17357 _ACEOF
17358 if ac_fn_c_try_link "$LINENO"; then :
17359 pgac_cv_gcc_atomic_int64_cas="yes"
17360 else
17361 pgac_cv_gcc_atomic_int64_cas="no"
17363 rm -f core conftest.err conftest.$ac_objext \
17364 conftest$ac_exeext conftest.$ac_ext
17366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17367 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17368 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17370 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17375 # Check for x86 cpuid instruction
17376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17377 $as_echo_n "checking for __get_cpuid... " >&6; }
17378 if ${pgac_cv__get_cpuid+:} false; then :
17379 $as_echo_n "(cached) " >&6
17380 else
17381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17382 /* end confdefs.h. */
17383 #include <cpuid.h>
17385 main ()
17387 unsigned int exx[4] = {0, 0, 0, 0};
17388 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17391 return 0;
17393 _ACEOF
17394 if ac_fn_c_try_link "$LINENO"; then :
17395 pgac_cv__get_cpuid="yes"
17396 else
17397 pgac_cv__get_cpuid="no"
17399 rm -f core conftest.err conftest.$ac_objext \
17400 conftest$ac_exeext conftest.$ac_ext
17402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17403 $as_echo "$pgac_cv__get_cpuid" >&6; }
17404 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17406 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid_count" >&5
17411 $as_echo_n "checking for __get_cpuid_count... " >&6; }
17412 if ${pgac_cv__get_cpuid_count+:} false; then :
17413 $as_echo_n "(cached) " >&6
17414 else
17415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17416 /* end confdefs.h. */
17417 #include <cpuid.h>
17419 main ()
17421 unsigned int exx[4] = {0, 0, 0, 0};
17422 __get_cpuid_count(7, 0, &exx[0], &exx[1], &exx[2], &exx[3]);
17425 return 0;
17427 _ACEOF
17428 if ac_fn_c_try_link "$LINENO"; then :
17429 pgac_cv__get_cpuid_count="yes"
17430 else
17431 pgac_cv__get_cpuid_count="no"
17433 rm -f core conftest.err conftest.$ac_objext \
17434 conftest$ac_exeext conftest.$ac_ext
17436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid_count" >&5
17437 $as_echo "$pgac_cv__get_cpuid_count" >&6; }
17438 if test x"$pgac_cv__get_cpuid_count" = x"yes"; then
17440 $as_echo "#define HAVE__GET_CPUID_COUNT 1" >>confdefs.h
17444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17445 $as_echo_n "checking for __cpuid... " >&6; }
17446 if ${pgac_cv__cpuid+:} false; then :
17447 $as_echo_n "(cached) " >&6
17448 else
17449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17450 /* end confdefs.h. */
17451 #include <intrin.h>
17453 main ()
17455 unsigned int exx[4] = {0, 0, 0, 0};
17456 __get_cpuid(exx[0], 1);
17459 return 0;
17461 _ACEOF
17462 if ac_fn_c_try_link "$LINENO"; then :
17463 pgac_cv__cpuid="yes"
17464 else
17465 pgac_cv__cpuid="no"
17467 rm -f core conftest.err conftest.$ac_objext \
17468 conftest$ac_exeext conftest.$ac_ext
17470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17471 $as_echo "$pgac_cv__cpuid" >&6; }
17472 if test x"$pgac_cv__cpuid" = x"yes"; then
17474 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuidex" >&5
17479 $as_echo_n "checking for __cpuidex... " >&6; }
17480 if ${pgac_cv__cpuidex+:} false; then :
17481 $as_echo_n "(cached) " >&6
17482 else
17483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17484 /* end confdefs.h. */
17485 #include <intrin.h>
17487 main ()
17489 unsigned int exx[4] = {0, 0, 0, 0};
17490 __get_cpuidex(exx[0], 7, 0);
17493 return 0;
17495 _ACEOF
17496 if ac_fn_c_try_link "$LINENO"; then :
17497 pgac_cv__cpuidex="yes"
17498 else
17499 pgac_cv__cpuidex="no"
17501 rm -f core conftest.err conftest.$ac_objext \
17502 conftest$ac_exeext conftest.$ac_ext
17504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuidex" >&5
17505 $as_echo "$pgac_cv__cpuidex" >&6; }
17506 if test x"$pgac_cv__cpuidex" = x"yes"; then
17508 $as_echo "#define HAVE__CPUIDEX 1" >>confdefs.h
17512 # Check for XSAVE intrinsics
17514 CFLAGS_XSAVE=""
17515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xgetbv with CFLAGS=" >&5
17516 $as_echo_n "checking for _xgetbv with CFLAGS=... " >&6; }
17517 if ${pgac_cv_xsave_intrinsics_+:} false; then :
17518 $as_echo_n "(cached) " >&6
17519 else
17520 pgac_save_CFLAGS=$CFLAGS
17521 CFLAGS="$pgac_save_CFLAGS "
17522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17523 /* end confdefs.h. */
17524 #include <immintrin.h>
17526 main ()
17528 return _xgetbv(0) & 0xe0;
17530 return 0;
17532 _ACEOF
17533 if ac_fn_c_try_link "$LINENO"; then :
17534 pgac_cv_xsave_intrinsics_=yes
17535 else
17536 pgac_cv_xsave_intrinsics_=no
17538 rm -f core conftest.err conftest.$ac_objext \
17539 conftest$ac_exeext conftest.$ac_ext
17540 CFLAGS="$pgac_save_CFLAGS"
17542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_xsave_intrinsics_" >&5
17543 $as_echo "$pgac_cv_xsave_intrinsics_" >&6; }
17544 if test x"$pgac_cv_xsave_intrinsics_" = x"yes"; then
17545 CFLAGS_XSAVE=""
17546 pgac_xsave_intrinsics=yes
17549 if test x"$pgac_xsave_intrinsics" != x"yes"; then
17550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xgetbv with CFLAGS=-mxsave" >&5
17551 $as_echo_n "checking for _xgetbv with CFLAGS=-mxsave... " >&6; }
17552 if ${pgac_cv_xsave_intrinsics__mxsave+:} false; then :
17553 $as_echo_n "(cached) " >&6
17554 else
17555 pgac_save_CFLAGS=$CFLAGS
17556 CFLAGS="$pgac_save_CFLAGS -mxsave"
17557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17558 /* end confdefs.h. */
17559 #include <immintrin.h>
17561 main ()
17563 return _xgetbv(0) & 0xe0;
17565 return 0;
17567 _ACEOF
17568 if ac_fn_c_try_link "$LINENO"; then :
17569 pgac_cv_xsave_intrinsics__mxsave=yes
17570 else
17571 pgac_cv_xsave_intrinsics__mxsave=no
17573 rm -f core conftest.err conftest.$ac_objext \
17574 conftest$ac_exeext conftest.$ac_ext
17575 CFLAGS="$pgac_save_CFLAGS"
17577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_xsave_intrinsics__mxsave" >&5
17578 $as_echo "$pgac_cv_xsave_intrinsics__mxsave" >&6; }
17579 if test x"$pgac_cv_xsave_intrinsics__mxsave" = x"yes"; then
17580 CFLAGS_XSAVE="-mxsave"
17581 pgac_xsave_intrinsics=yes
17585 if test x"$pgac_xsave_intrinsics" = x"yes"; then
17587 $as_echo "#define HAVE_XSAVE_INTRINSICS 1" >>confdefs.h
17592 # Check for AVX-512 popcount intrinsics
17594 CFLAGS_POPCNT=""
17595 PG_POPCNT_OBJS=""
17596 if test x"$host_cpu" = x"x86_64"; then
17597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm512_popcnt_epi64 with CFLAGS=" >&5
17598 $as_echo_n "checking for _mm512_popcnt_epi64 with CFLAGS=... " >&6; }
17599 if ${pgac_cv_avx512_popcnt_intrinsics_+:} false; then :
17600 $as_echo_n "(cached) " >&6
17601 else
17602 pgac_save_CFLAGS=$CFLAGS
17603 CFLAGS="$pgac_save_CFLAGS "
17604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17605 /* end confdefs.h. */
17606 #include <immintrin.h>
17608 main ()
17610 const char buf[sizeof(__m512i)];
17611 PG_INT64_TYPE popcnt = 0;
17612 __m512i accum = _mm512_setzero_si512();
17613 const __m512i val = _mm512_maskz_loadu_epi8((__mmask64) 0xf0f0f0f0f0f0f0f0, (const __m512i *) buf);
17614 const __m512i cnt = _mm512_popcnt_epi64(val);
17615 accum = _mm512_add_epi64(accum, cnt);
17616 popcnt = _mm512_reduce_add_epi64(accum);
17617 /* return computed value, to prevent the above being optimized away */
17618 return popcnt == 0;
17620 return 0;
17622 _ACEOF
17623 if ac_fn_c_try_link "$LINENO"; then :
17624 pgac_cv_avx512_popcnt_intrinsics_=yes
17625 else
17626 pgac_cv_avx512_popcnt_intrinsics_=no
17628 rm -f core conftest.err conftest.$ac_objext \
17629 conftest$ac_exeext conftest.$ac_ext
17630 CFLAGS="$pgac_save_CFLAGS"
17632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_avx512_popcnt_intrinsics_" >&5
17633 $as_echo "$pgac_cv_avx512_popcnt_intrinsics_" >&6; }
17634 if test x"$pgac_cv_avx512_popcnt_intrinsics_" = x"yes"; then
17635 CFLAGS_POPCNT=""
17636 pgac_avx512_popcnt_intrinsics=yes
17639 if test x"$pgac_avx512_popcnt_intrinsics" != x"yes"; then
17640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm512_popcnt_epi64 with CFLAGS=-mavx512vpopcntdq -mavx512bw" >&5
17641 $as_echo_n "checking for _mm512_popcnt_epi64 with CFLAGS=-mavx512vpopcntdq -mavx512bw... " >&6; }
17642 if ${pgac_cv_avx512_popcnt_intrinsics__mavx512vpopcntdq__mavx512bw+:} false; then :
17643 $as_echo_n "(cached) " >&6
17644 else
17645 pgac_save_CFLAGS=$CFLAGS
17646 CFLAGS="$pgac_save_CFLAGS -mavx512vpopcntdq -mavx512bw"
17647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17648 /* end confdefs.h. */
17649 #include <immintrin.h>
17651 main ()
17653 const char buf[sizeof(__m512i)];
17654 PG_INT64_TYPE popcnt = 0;
17655 __m512i accum = _mm512_setzero_si512();
17656 const __m512i val = _mm512_maskz_loadu_epi8((__mmask64) 0xf0f0f0f0f0f0f0f0, (const __m512i *) buf);
17657 const __m512i cnt = _mm512_popcnt_epi64(val);
17658 accum = _mm512_add_epi64(accum, cnt);
17659 popcnt = _mm512_reduce_add_epi64(accum);
17660 /* return computed value, to prevent the above being optimized away */
17661 return popcnt == 0;
17663 return 0;
17665 _ACEOF
17666 if ac_fn_c_try_link "$LINENO"; then :
17667 pgac_cv_avx512_popcnt_intrinsics__mavx512vpopcntdq__mavx512bw=yes
17668 else
17669 pgac_cv_avx512_popcnt_intrinsics__mavx512vpopcntdq__mavx512bw=no
17671 rm -f core conftest.err conftest.$ac_objext \
17672 conftest$ac_exeext conftest.$ac_ext
17673 CFLAGS="$pgac_save_CFLAGS"
17675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_avx512_popcnt_intrinsics__mavx512vpopcntdq__mavx512bw" >&5
17676 $as_echo "$pgac_cv_avx512_popcnt_intrinsics__mavx512vpopcntdq__mavx512bw" >&6; }
17677 if test x"$pgac_cv_avx512_popcnt_intrinsics__mavx512vpopcntdq__mavx512bw" = x"yes"; then
17678 CFLAGS_POPCNT="-mavx512vpopcntdq -mavx512bw"
17679 pgac_avx512_popcnt_intrinsics=yes
17683 if test x"$pgac_avx512_popcnt_intrinsics" = x"yes"; then
17684 PG_POPCNT_OBJS="pg_popcount_avx512.o pg_popcount_avx512_choose.o"
17686 $as_echo "#define USE_AVX512_POPCNT_WITH_RUNTIME_CHECK 1" >>confdefs.h
17693 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17695 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17696 # with the default compiler flags. If not, check if adding the -msse4.2
17697 # flag helps. CFLAGS_CRC is set to -msse4.2 if that's required.
17698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17699 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17700 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17701 $as_echo_n "(cached) " >&6
17702 else
17703 pgac_save_CFLAGS=$CFLAGS
17704 CFLAGS="$pgac_save_CFLAGS "
17705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17706 /* end confdefs.h. */
17707 #include <nmmintrin.h>
17709 main ()
17711 unsigned int crc = 0;
17712 crc = _mm_crc32_u8(crc, 0);
17713 crc = _mm_crc32_u32(crc, 0);
17714 /* return computed value, to prevent the above being optimized away */
17715 return crc == 0;
17717 return 0;
17719 _ACEOF
17720 if ac_fn_c_try_link "$LINENO"; then :
17721 pgac_cv_sse42_crc32_intrinsics_=yes
17722 else
17723 pgac_cv_sse42_crc32_intrinsics_=no
17725 rm -f core conftest.err conftest.$ac_objext \
17726 conftest$ac_exeext conftest.$ac_ext
17727 CFLAGS="$pgac_save_CFLAGS"
17729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17730 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17731 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17732 CFLAGS_CRC=""
17733 pgac_sse42_crc32_intrinsics=yes
17736 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17738 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17739 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17740 $as_echo_n "(cached) " >&6
17741 else
17742 pgac_save_CFLAGS=$CFLAGS
17743 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17745 /* end confdefs.h. */
17746 #include <nmmintrin.h>
17748 main ()
17750 unsigned int crc = 0;
17751 crc = _mm_crc32_u8(crc, 0);
17752 crc = _mm_crc32_u32(crc, 0);
17753 /* return computed value, to prevent the above being optimized away */
17754 return crc == 0;
17756 return 0;
17758 _ACEOF
17759 if ac_fn_c_try_link "$LINENO"; then :
17760 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17761 else
17762 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17764 rm -f core conftest.err conftest.$ac_objext \
17765 conftest$ac_exeext conftest.$ac_ext
17766 CFLAGS="$pgac_save_CFLAGS"
17768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17769 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17770 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17771 CFLAGS_CRC="-msse4.2"
17772 pgac_sse42_crc32_intrinsics=yes
17777 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17778 # define __SSE4_2__ in that case.
17779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17780 /* end confdefs.h. */
17783 main ()
17786 #ifndef __SSE4_2__
17787 #error __SSE4_2__ not defined
17788 #endif
17791 return 0;
17793 _ACEOF
17794 if ac_fn_c_try_compile "$LINENO"; then :
17795 SSE4_2_TARGETED=1
17797 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17799 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17801 # First check if __crc32c* intrinsics can be used with the default compiler
17802 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17803 # CFLAGS_CRC is set if the extra flag is required.
17804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17805 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17806 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17807 $as_echo_n "(cached) " >&6
17808 else
17809 pgac_save_CFLAGS=$CFLAGS
17810 CFLAGS="$pgac_save_CFLAGS "
17811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17812 /* end confdefs.h. */
17813 #include <arm_acle.h>
17815 main ()
17817 unsigned int crc = 0;
17818 crc = __crc32cb(crc, 0);
17819 crc = __crc32ch(crc, 0);
17820 crc = __crc32cw(crc, 0);
17821 crc = __crc32cd(crc, 0);
17822 /* return computed value, to prevent the above being optimized away */
17823 return crc == 0;
17825 return 0;
17827 _ACEOF
17828 if ac_fn_c_try_link "$LINENO"; then :
17829 pgac_cv_armv8_crc32c_intrinsics_=yes
17830 else
17831 pgac_cv_armv8_crc32c_intrinsics_=no
17833 rm -f core conftest.err conftest.$ac_objext \
17834 conftest$ac_exeext conftest.$ac_ext
17835 CFLAGS="$pgac_save_CFLAGS"
17837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17838 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17839 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17840 CFLAGS_CRC=""
17841 pgac_armv8_crc32c_intrinsics=yes
17844 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17846 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17847 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17848 $as_echo_n "(cached) " >&6
17849 else
17850 pgac_save_CFLAGS=$CFLAGS
17851 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17853 /* end confdefs.h. */
17854 #include <arm_acle.h>
17856 main ()
17858 unsigned int crc = 0;
17859 crc = __crc32cb(crc, 0);
17860 crc = __crc32ch(crc, 0);
17861 crc = __crc32cw(crc, 0);
17862 crc = __crc32cd(crc, 0);
17863 /* return computed value, to prevent the above being optimized away */
17864 return crc == 0;
17866 return 0;
17868 _ACEOF
17869 if ac_fn_c_try_link "$LINENO"; then :
17870 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17871 else
17872 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17874 rm -f core conftest.err conftest.$ac_objext \
17875 conftest$ac_exeext conftest.$ac_ext
17876 CFLAGS="$pgac_save_CFLAGS"
17878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17879 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17880 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17881 CFLAGS_CRC="-march=armv8-a+crc"
17882 pgac_armv8_crc32c_intrinsics=yes
17887 # Check for LoongArch CRC intrinsics to do CRC calculations.
17889 # Check if __builtin_loongarch_crcc_* intrinsics can be used
17890 # with the default compiler flags.
17891 { $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
17892 $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; }
17893 if ${pgac_cv_loongarch_crc32c_intrinsics+:} false; then :
17894 $as_echo_n "(cached) " >&6
17895 else
17896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17897 /* end confdefs.h. */
17900 main ()
17902 unsigned int crc = 0;
17903 crc = __builtin_loongarch_crcc_w_b_w(0, crc);
17904 crc = __builtin_loongarch_crcc_w_h_w(0, crc);
17905 crc = __builtin_loongarch_crcc_w_w_w(0, crc);
17906 crc = __builtin_loongarch_crcc_w_d_w(0, crc);
17907 /* return computed value, to prevent the above being optimized away */
17908 return crc == 0;
17910 return 0;
17912 _ACEOF
17913 if ac_fn_c_try_link "$LINENO"; then :
17914 pgac_cv_loongarch_crc32c_intrinsics=yes
17915 else
17916 pgac_cv_loongarch_crc32c_intrinsics=no
17918 rm -f core conftest.err conftest.$ac_objext \
17919 conftest$ac_exeext conftest.$ac_ext
17921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_loongarch_crc32c_intrinsics" >&5
17922 $as_echo "$pgac_cv_loongarch_crc32c_intrinsics" >&6; }
17923 if test x"$pgac_cv_loongarch_crc32c_intrinsics" = x"yes"; then
17924 pgac_loongarch_crc32c_intrinsics=yes
17930 # Select CRC-32C implementation.
17932 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17933 # use the special CRC instructions for calculating CRC-32C. If we're not
17934 # targeting such a processor, but we can nevertheless produce code that uses
17935 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17936 # implementations and select which one to use at runtime, depending on whether
17937 # SSE 4.2 is supported by the processor we're running on.
17939 # Similarly, if we are targeting an ARM processor that has the CRC
17940 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17941 # we're not targeting such a processor, but can nevertheless produce code that
17942 # uses the CRC instructions, compile both, and select at runtime.
17944 # You can skip the runtime check by setting the appropriate USE_*_CRC32 flag to 1
17945 # in the template or configure command line.
17947 # If we are targeting a LoongArch processor, CRC instructions are
17948 # always available (at least on 64 bit), so no runtime check is needed.
17949 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
17950 # Use Intel SSE 4.2 if available.
17951 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17952 USE_SSE42_CRC32C=1
17953 else
17954 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17955 # the runtime check.
17956 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
17957 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17958 else
17959 # Use ARM CRC Extension if available.
17960 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_CRC" = x""; then
17961 USE_ARMV8_CRC32C=1
17962 else
17963 # ARM CRC Extension, with runtime check?
17964 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17965 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17966 else
17967 # LoongArch CRCC instructions.
17968 if test x"$pgac_loongarch_crc32c_intrinsics" = x"yes"; then
17969 USE_LOONGARCH_CRC32C=1
17970 else
17971 # fall back to slicing-by-8 algorithm, which doesn't require any
17972 # special CPU support.
17973 USE_SLICING_BY_8_CRC32C=1
17981 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17983 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17984 if test x"$USE_SSE42_CRC32C" = x"1"; then
17986 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17988 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17990 $as_echo "SSE 4.2" >&6; }
17991 else
17992 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17994 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17996 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17998 $as_echo "SSE 4.2 with runtime check" >&6; }
17999 else
18000 if test x"$USE_ARMV8_CRC32C" = x"1"; then
18002 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
18004 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
18005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
18006 $as_echo "ARMv8 CRC instructions" >&6; }
18007 else
18008 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18010 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18012 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
18013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
18014 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
18015 else
18016 if test x"$USE_LOONGARCH_CRC32C" = x"1"; then
18018 $as_echo "#define USE_LOONGARCH_CRC32C 1" >>confdefs.h
18020 PG_CRC32C_OBJS="pg_crc32c_loongarch.o"
18021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: LoongArch CRCC instructions" >&5
18022 $as_echo "LoongArch CRCC instructions" >&6; }
18023 else
18025 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
18027 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
18028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
18029 $as_echo "slicing-by-8" >&6; }
18038 # Select semaphore implementation type.
18039 if test "$PORTNAME" != "win32"; then
18040 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
18041 # Need sem_open for this
18042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
18043 $as_echo_n "checking for library containing sem_open... " >&6; }
18044 if ${ac_cv_search_sem_open+:} false; then :
18045 $as_echo_n "(cached) " >&6
18046 else
18047 ac_func_search_save_LIBS=$LIBS
18048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18049 /* end confdefs.h. */
18051 /* Override any GCC internal prototype to avoid an error.
18052 Use char because int might match the return type of a GCC
18053 builtin and then its argument prototype would still apply. */
18054 #ifdef __cplusplus
18055 extern "C"
18056 #endif
18057 char sem_open ();
18059 main ()
18061 return sem_open ();
18063 return 0;
18065 _ACEOF
18066 for ac_lib in '' rt pthread; do
18067 if test -z "$ac_lib"; then
18068 ac_res="none required"
18069 else
18070 ac_res=-l$ac_lib
18071 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18073 if ac_fn_c_try_link "$LINENO"; then :
18074 ac_cv_search_sem_open=$ac_res
18076 rm -f core conftest.err conftest.$ac_objext \
18077 conftest$ac_exeext
18078 if ${ac_cv_search_sem_open+:} false; then :
18079 break
18081 done
18082 if ${ac_cv_search_sem_open+:} false; then :
18084 else
18085 ac_cv_search_sem_open=no
18087 rm conftest.$ac_ext
18088 LIBS=$ac_func_search_save_LIBS
18090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18091 $as_echo "$ac_cv_search_sem_open" >&6; }
18092 ac_res=$ac_cv_search_sem_open
18093 if test "$ac_res" != no; then :
18094 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18095 USE_NAMED_POSIX_SEMAPHORES=1
18099 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18100 # Need sem_init for this
18101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18102 $as_echo_n "checking for library containing sem_init... " >&6; }
18103 if ${ac_cv_search_sem_init+:} false; then :
18104 $as_echo_n "(cached) " >&6
18105 else
18106 ac_func_search_save_LIBS=$LIBS
18107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18108 /* end confdefs.h. */
18110 /* Override any GCC internal prototype to avoid an error.
18111 Use char because int might match the return type of a GCC
18112 builtin and then its argument prototype would still apply. */
18113 #ifdef __cplusplus
18114 extern "C"
18115 #endif
18116 char sem_init ();
18118 main ()
18120 return sem_init ();
18122 return 0;
18124 _ACEOF
18125 for ac_lib in '' rt pthread; do
18126 if test -z "$ac_lib"; then
18127 ac_res="none required"
18128 else
18129 ac_res=-l$ac_lib
18130 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18132 if ac_fn_c_try_link "$LINENO"; then :
18133 ac_cv_search_sem_init=$ac_res
18135 rm -f core conftest.err conftest.$ac_objext \
18136 conftest$ac_exeext
18137 if ${ac_cv_search_sem_init+:} false; then :
18138 break
18140 done
18141 if ${ac_cv_search_sem_init+:} false; then :
18143 else
18144 ac_cv_search_sem_init=no
18146 rm conftest.$ac_ext
18147 LIBS=$ac_func_search_save_LIBS
18149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18150 $as_echo "$ac_cv_search_sem_init" >&6; }
18151 ac_res=$ac_cv_search_sem_init
18152 if test "$ac_res" != no; then :
18153 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18154 USE_UNNAMED_POSIX_SEMAPHORES=1
18158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18159 $as_echo_n "checking which semaphore API to use... " >&6; }
18160 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18162 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18164 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18165 sematype="named POSIX"
18166 else
18167 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18169 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18171 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18172 sematype="unnamed POSIX"
18173 else
18175 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18177 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18178 sematype="System V"
18181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18182 $as_echo "$sematype" >&6; }
18183 else
18185 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18187 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18191 # Select shared-memory implementation type.
18192 if test "$PORTNAME" != "win32"; then
18194 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18196 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18197 else
18199 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18201 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18204 # Select random number source. If a TLS library is used then it will be the
18205 # first choice, else the native platform sources (Windows API or /dev/urandom)
18206 # will be used.
18207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18208 $as_echo_n "checking which random number source to use... " >&6; }
18209 if test x"$with_ssl" = x"openssl" ; then
18210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18211 $as_echo "OpenSSL" >&6; }
18212 elif test x"$PORTNAME" = x"win32" ; then
18213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18214 $as_echo "Windows native" >&6; }
18215 elif test x"$cross_compiling" = x"yes"; then
18216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming /dev/urandom" >&5
18217 $as_echo "assuming /dev/urandom" >&6; }
18218 else
18219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18220 $as_echo "/dev/urandom" >&6; }
18221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18222 $as_echo_n "checking for /dev/urandom... " >&6; }
18223 if ${ac_cv_file__dev_urandom+:} false; then :
18224 $as_echo_n "(cached) " >&6
18225 else
18226 test "$cross_compiling" = yes &&
18227 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18228 if test -r "/dev/urandom"; then
18229 ac_cv_file__dev_urandom=yes
18230 else
18231 ac_cv_file__dev_urandom=no
18234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18235 $as_echo "$ac_cv_file__dev_urandom" >&6; }
18236 if test "x$ac_cv_file__dev_urandom" = xyes; then :
18241 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
18242 as_fn_error $? "
18243 no source of strong random numbers was found
18244 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
18248 # If not set in template file, set bytes to use libc memset()
18249 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18250 MEMSET_LOOP_LIMIT=1024
18253 cat >>confdefs.h <<_ACEOF
18254 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18255 _ACEOF
18259 if test "$enable_nls" = yes ; then
18261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18262 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18263 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18264 $as_echo_n "(cached) " >&6
18265 else
18266 ac_func_search_save_LIBS=$LIBS
18267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18268 /* end confdefs.h. */
18270 /* Override any GCC internal prototype to avoid an error.
18271 Use char because int might match the return type of a GCC
18272 builtin and then its argument prototype would still apply. */
18273 #ifdef __cplusplus
18274 extern "C"
18275 #endif
18276 char bind_textdomain_codeset ();
18278 main ()
18280 return bind_textdomain_codeset ();
18282 return 0;
18284 _ACEOF
18285 for ac_lib in '' intl; do
18286 if test -z "$ac_lib"; then
18287 ac_res="none required"
18288 else
18289 ac_res=-l$ac_lib
18290 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18292 if ac_fn_c_try_link "$LINENO"; then :
18293 ac_cv_search_bind_textdomain_codeset=$ac_res
18295 rm -f core conftest.err conftest.$ac_objext \
18296 conftest$ac_exeext
18297 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18298 break
18300 done
18301 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18303 else
18304 ac_cv_search_bind_textdomain_codeset=no
18306 rm conftest.$ac_ext
18307 LIBS=$ac_func_search_save_LIBS
18309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18310 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18311 ac_res=$ac_cv_search_bind_textdomain_codeset
18312 if test "$ac_res" != no; then :
18313 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18315 else
18316 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18319 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18320 if test "x$ac_cv_header_libintl_h" = xyes; then :
18322 else
18323 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18327 if test -z "$MSGFMT"; then
18328 for ac_prog in msgfmt
18330 # Extract the first word of "$ac_prog", so it can be a program name with args.
18331 set dummy $ac_prog; ac_word=$2
18332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18333 $as_echo_n "checking for $ac_word... " >&6; }
18334 if ${ac_cv_path_MSGFMT+:} false; then :
18335 $as_echo_n "(cached) " >&6
18336 else
18337 case $MSGFMT in
18338 [\\/]* | ?:[\\/]*)
18339 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18342 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18343 for as_dir in $PATH
18345 IFS=$as_save_IFS
18346 test -z "$as_dir" && as_dir=.
18347 for ac_exec_ext in '' $ac_executable_extensions; do
18348 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18349 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18350 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18351 break 2
18353 done
18354 done
18355 IFS=$as_save_IFS
18358 esac
18360 MSGFMT=$ac_cv_path_MSGFMT
18361 if test -n "$MSGFMT"; then
18362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18363 $as_echo "$MSGFMT" >&6; }
18364 else
18365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18366 $as_echo "no" >&6; }
18370 test -n "$MSGFMT" && break
18371 done
18373 else
18374 # Report the value of MSGFMT in configure's output in all cases.
18375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18376 $as_echo_n "checking for MSGFMT... " >&6; }
18377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18378 $as_echo "$MSGFMT" >&6; }
18381 if test -z "$MSGFMT"; then
18382 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18385 $as_echo_n "checking for msgfmt flags... " >&6; }
18386 if ${pgac_cv_msgfmt_flags+:} false; then :
18387 $as_echo_n "(cached) " >&6
18388 else
18389 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18390 pgac_cv_msgfmt_flags=-c
18393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18394 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18395 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18397 if test -z "$MSGMERGE"; then
18398 for ac_prog in msgmerge
18400 # Extract the first word of "$ac_prog", so it can be a program name with args.
18401 set dummy $ac_prog; ac_word=$2
18402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18403 $as_echo_n "checking for $ac_word... " >&6; }
18404 if ${ac_cv_path_MSGMERGE+:} false; then :
18405 $as_echo_n "(cached) " >&6
18406 else
18407 case $MSGMERGE in
18408 [\\/]* | ?:[\\/]*)
18409 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18412 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18413 for as_dir in $PATH
18415 IFS=$as_save_IFS
18416 test -z "$as_dir" && as_dir=.
18417 for ac_exec_ext in '' $ac_executable_extensions; do
18418 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18419 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18420 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18421 break 2
18423 done
18424 done
18425 IFS=$as_save_IFS
18428 esac
18430 MSGMERGE=$ac_cv_path_MSGMERGE
18431 if test -n "$MSGMERGE"; then
18432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18433 $as_echo "$MSGMERGE" >&6; }
18434 else
18435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18436 $as_echo "no" >&6; }
18440 test -n "$MSGMERGE" && break
18441 done
18443 else
18444 # Report the value of MSGMERGE in configure's output in all cases.
18445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18446 $as_echo_n "checking for MSGMERGE... " >&6; }
18447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18448 $as_echo "$MSGMERGE" >&6; }
18451 if test -z "$XGETTEXT"; then
18452 for ac_prog in xgettext
18454 # Extract the first word of "$ac_prog", so it can be a program name with args.
18455 set dummy $ac_prog; ac_word=$2
18456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18457 $as_echo_n "checking for $ac_word... " >&6; }
18458 if ${ac_cv_path_XGETTEXT+:} false; then :
18459 $as_echo_n "(cached) " >&6
18460 else
18461 case $XGETTEXT in
18462 [\\/]* | ?:[\\/]*)
18463 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18466 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18467 for as_dir in $PATH
18469 IFS=$as_save_IFS
18470 test -z "$as_dir" && as_dir=.
18471 for ac_exec_ext in '' $ac_executable_extensions; do
18472 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18473 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18474 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18475 break 2
18477 done
18478 done
18479 IFS=$as_save_IFS
18482 esac
18484 XGETTEXT=$ac_cv_path_XGETTEXT
18485 if test -n "$XGETTEXT"; then
18486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18487 $as_echo "$XGETTEXT" >&6; }
18488 else
18489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18490 $as_echo "no" >&6; }
18494 test -n "$XGETTEXT" && break
18495 done
18497 else
18498 # Report the value of XGETTEXT in configure's output in all cases.
18499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18500 $as_echo_n "checking for XGETTEXT... " >&6; }
18501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18502 $as_echo "$XGETTEXT" >&6; }
18508 # Check for Tcl configuration script tclConfig.sh
18509 if test "$with_tcl" = yes; then
18510 if test -z "$TCLSH"; then
18511 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18513 # Extract the first word of "$ac_prog", so it can be a program name with args.
18514 set dummy $ac_prog; ac_word=$2
18515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18516 $as_echo_n "checking for $ac_word... " >&6; }
18517 if ${ac_cv_path_TCLSH+:} false; then :
18518 $as_echo_n "(cached) " >&6
18519 else
18520 case $TCLSH in
18521 [\\/]* | ?:[\\/]*)
18522 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18525 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18526 for as_dir in $PATH
18528 IFS=$as_save_IFS
18529 test -z "$as_dir" && as_dir=.
18530 for ac_exec_ext in '' $ac_executable_extensions; do
18531 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18532 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18533 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18534 break 2
18536 done
18537 done
18538 IFS=$as_save_IFS
18541 esac
18543 TCLSH=$ac_cv_path_TCLSH
18544 if test -n "$TCLSH"; then
18545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18546 $as_echo "$TCLSH" >&6; }
18547 else
18548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18549 $as_echo "no" >&6; }
18553 test -n "$TCLSH" && break
18554 done
18556 else
18557 # Report the value of TCLSH in configure's output in all cases.
18558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18559 $as_echo_n "checking for TCLSH... " >&6; }
18560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18561 $as_echo "$TCLSH" >&6; }
18564 if test x"$TCLSH" = x""; then
18565 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18569 $as_echo_n "checking for tclConfig.sh... " >&6; }
18570 # Let user override test
18571 if test -z "$TCL_CONFIG_SH"; then
18572 pgac_test_dirs="$with_tclconfig"
18574 set X $pgac_test_dirs; shift
18575 if test $# -eq 0; then
18576 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18577 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18578 # On newer macOS, $auto_path frequently doesn't include the place
18579 # where tclConfig.sh actually lives. Append that to the end, so as not
18580 # to break cases where a non-default Tcl installation is being used.
18581 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18582 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18584 set X $pgac_test_dirs; shift
18587 for pgac_dir do
18588 if test -r "$pgac_dir/tclConfig.sh"; then
18589 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18590 break
18592 done
18595 if test -z "$TCL_CONFIG_SH"; then
18596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18597 $as_echo "no" >&6; }
18598 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18599 else
18600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18601 $as_echo "$TCL_CONFIG_SH" >&6; }
18606 . "$TCL_CONFIG_SH"
18607 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18608 eval TCL_LIBS=\"$TCL_LIBS\"
18609 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18610 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18612 if test "$TCL_SHARED_BUILD" != 1; then
18613 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18614 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18616 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18617 ac_save_CPPFLAGS=$CPPFLAGS
18618 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18619 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18620 if test "x$ac_cv_header_tcl_h" = xyes; then :
18622 else
18623 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18627 CPPFLAGS=$ac_save_CPPFLAGS
18630 # check for <perl.h>
18631 if test "$with_perl" = yes; then
18632 ac_save_CPPFLAGS=$CPPFLAGS
18633 CPPFLAGS="$CPPFLAGS $perl_includespec"
18634 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18636 if test "x$ac_cv_header_perl_h" = xyes; then :
18638 else
18639 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18643 # While we're at it, check that we can link to libperl.
18644 # On most platforms, if perl.h is there then libperl.so will be too, but at
18645 # this writing Debian packages them separately. There is no known reason to
18646 # waste cycles on separate probes for the Tcl or Python libraries, though.
18647 # On some Red Hat platforms, the link attempt can fail if we don't use
18648 # CFLAGS_SL while building the test program.
18649 ac_save_CFLAGS=$CFLAGS
18650 CFLAGS="$CFLAGS $CFLAGS_SL"
18651 pgac_save_LIBS=$LIBS
18652 LIBS="$perl_embed_ldflags"
18653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18654 $as_echo_n "checking for libperl... " >&6; }
18655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18656 /* end confdefs.h. */
18658 #include <EXTERN.h>
18659 #include <perl.h>
18662 main ()
18664 perl_alloc();
18666 return 0;
18668 _ACEOF
18669 if ac_fn_c_try_link "$LINENO"; then :
18670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18671 $as_echo "yes" >&6; }
18672 else
18673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18674 $as_echo "no" >&6; }
18675 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18677 rm -f core conftest.err conftest.$ac_objext \
18678 conftest$ac_exeext conftest.$ac_ext
18679 LIBS=$pgac_save_LIBS
18680 CFLAGS=$ac_save_CFLAGS
18681 CPPFLAGS=$ac_save_CPPFLAGS
18684 # check for <Python.h>
18685 if test "$with_python" = yes; then
18686 ac_save_CPPFLAGS=$CPPFLAGS
18687 CPPFLAGS="$python_includespec $CPPFLAGS"
18688 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18689 if test "x$ac_cv_header_Python_h" = xyes; then :
18691 else
18692 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18696 CPPFLAGS=$ac_save_CPPFLAGS
18700 # Check for documentation-building tools
18702 if test -z "$XMLLINT"; then
18703 for ac_prog in xmllint
18705 # Extract the first word of "$ac_prog", so it can be a program name with args.
18706 set dummy $ac_prog; ac_word=$2
18707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18708 $as_echo_n "checking for $ac_word... " >&6; }
18709 if ${ac_cv_path_XMLLINT+:} false; then :
18710 $as_echo_n "(cached) " >&6
18711 else
18712 case $XMLLINT in
18713 [\\/]* | ?:[\\/]*)
18714 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18717 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18718 for as_dir in $PATH
18720 IFS=$as_save_IFS
18721 test -z "$as_dir" && as_dir=.
18722 for ac_exec_ext in '' $ac_executable_extensions; do
18723 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18724 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18726 break 2
18728 done
18729 done
18730 IFS=$as_save_IFS
18733 esac
18735 XMLLINT=$ac_cv_path_XMLLINT
18736 if test -n "$XMLLINT"; then
18737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18738 $as_echo "$XMLLINT" >&6; }
18739 else
18740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18741 $as_echo "no" >&6; }
18745 test -n "$XMLLINT" && break
18746 done
18748 else
18749 # Report the value of XMLLINT in configure's output in all cases.
18750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18751 $as_echo_n "checking for XMLLINT... " >&6; }
18752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18753 $as_echo "$XMLLINT" >&6; }
18756 if test -z "$XSLTPROC"; then
18757 for ac_prog in xsltproc
18759 # Extract the first word of "$ac_prog", so it can be a program name with args.
18760 set dummy $ac_prog; ac_word=$2
18761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18762 $as_echo_n "checking for $ac_word... " >&6; }
18763 if ${ac_cv_path_XSLTPROC+:} false; then :
18764 $as_echo_n "(cached) " >&6
18765 else
18766 case $XSLTPROC in
18767 [\\/]* | ?:[\\/]*)
18768 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18771 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18772 for as_dir in $PATH
18774 IFS=$as_save_IFS
18775 test -z "$as_dir" && as_dir=.
18776 for ac_exec_ext in '' $ac_executable_extensions; do
18777 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18778 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18779 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18780 break 2
18782 done
18783 done
18784 IFS=$as_save_IFS
18787 esac
18789 XSLTPROC=$ac_cv_path_XSLTPROC
18790 if test -n "$XSLTPROC"; then
18791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18792 $as_echo "$XSLTPROC" >&6; }
18793 else
18794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18795 $as_echo "no" >&6; }
18799 test -n "$XSLTPROC" && break
18800 done
18802 else
18803 # Report the value of XSLTPROC in configure's output in all cases.
18804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18805 $as_echo_n "checking for XSLTPROC... " >&6; }
18806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18807 $as_echo "$XSLTPROC" >&6; }
18810 if test -z "$FOP"; then
18811 for ac_prog in fop
18813 # Extract the first word of "$ac_prog", so it can be a program name with args.
18814 set dummy $ac_prog; ac_word=$2
18815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18816 $as_echo_n "checking for $ac_word... " >&6; }
18817 if ${ac_cv_path_FOP+:} false; then :
18818 $as_echo_n "(cached) " >&6
18819 else
18820 case $FOP in
18821 [\\/]* | ?:[\\/]*)
18822 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18825 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18826 for as_dir in $PATH
18828 IFS=$as_save_IFS
18829 test -z "$as_dir" && as_dir=.
18830 for ac_exec_ext in '' $ac_executable_extensions; do
18831 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18832 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18833 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18834 break 2
18836 done
18837 done
18838 IFS=$as_save_IFS
18841 esac
18843 FOP=$ac_cv_path_FOP
18844 if test -n "$FOP"; then
18845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18846 $as_echo "$FOP" >&6; }
18847 else
18848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18849 $as_echo "no" >&6; }
18853 test -n "$FOP" && break
18854 done
18856 else
18857 # Report the value of FOP in configure's output in all cases.
18858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18859 $as_echo_n "checking for FOP... " >&6; }
18860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18861 $as_echo "$FOP" >&6; }
18864 if test -z "$DBTOEPUB"; then
18865 for ac_prog in dbtoepub
18867 # Extract the first word of "$ac_prog", so it can be a program name with args.
18868 set dummy $ac_prog; ac_word=$2
18869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18870 $as_echo_n "checking for $ac_word... " >&6; }
18871 if ${ac_cv_path_DBTOEPUB+:} false; then :
18872 $as_echo_n "(cached) " >&6
18873 else
18874 case $DBTOEPUB in
18875 [\\/]* | ?:[\\/]*)
18876 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18880 for as_dir in $PATH
18882 IFS=$as_save_IFS
18883 test -z "$as_dir" && as_dir=.
18884 for ac_exec_ext in '' $ac_executable_extensions; do
18885 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18886 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18888 break 2
18890 done
18891 done
18892 IFS=$as_save_IFS
18895 esac
18897 DBTOEPUB=$ac_cv_path_DBTOEPUB
18898 if test -n "$DBTOEPUB"; then
18899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18900 $as_echo "$DBTOEPUB" >&6; }
18901 else
18902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18903 $as_echo "no" >&6; }
18907 test -n "$DBTOEPUB" && break
18908 done
18910 else
18911 # Report the value of DBTOEPUB in configure's output in all cases.
18912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18913 $as_echo_n "checking for DBTOEPUB... " >&6; }
18914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18915 $as_echo "$DBTOEPUB" >&6; }
18920 # Check for test tools
18922 if test "$enable_tap_tests" = yes; then
18923 # Make sure we know where prove is.
18924 if test -z "$PROVE"; then
18925 for ac_prog in prove
18927 # Extract the first word of "$ac_prog", so it can be a program name with args.
18928 set dummy $ac_prog; ac_word=$2
18929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18930 $as_echo_n "checking for $ac_word... " >&6; }
18931 if ${ac_cv_path_PROVE+:} false; then :
18932 $as_echo_n "(cached) " >&6
18933 else
18934 case $PROVE in
18935 [\\/]* | ?:[\\/]*)
18936 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18940 for as_dir in $PATH
18942 IFS=$as_save_IFS
18943 test -z "$as_dir" && as_dir=.
18944 for ac_exec_ext in '' $ac_executable_extensions; do
18945 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18946 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18947 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18948 break 2
18950 done
18951 done
18952 IFS=$as_save_IFS
18955 esac
18957 PROVE=$ac_cv_path_PROVE
18958 if test -n "$PROVE"; then
18959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18960 $as_echo "$PROVE" >&6; }
18961 else
18962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18963 $as_echo "no" >&6; }
18967 test -n "$PROVE" && break
18968 done
18970 else
18971 # Report the value of PROVE in configure's output in all cases.
18972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18973 $as_echo_n "checking for PROVE... " >&6; }
18974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18975 $as_echo "$PROVE" >&6; }
18978 if test -z "$PROVE"; then
18979 as_fn_error $? "prove not found" "$LINENO" 5
18981 # Check for necessary Perl modules. You might think we should use
18982 # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
18983 # installation than perl, eg on MSys, so we have to check using prove.
18984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
18985 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
18986 __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__
18987 modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
18988 if test $? -eq 0; then
18989 # log the module version details, but don't show them interactively
18990 echo "$modulestderr" >&5
18991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18992 $as_echo "yes" >&6; }
18993 else
18994 # on failure, though, show the results to the user
18995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modulestderr" >&5
18996 $as_echo "$modulestderr" >&6; }
18997 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
19001 # If compiler will take -Wl,--as-needed (or various platform-specific
19002 # spellings thereof) then add that to LDFLAGS. This is much easier than
19003 # trying to filter LIBS to the minimum for each executable.
19004 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
19005 # libreadline; therefore we postpone testing it until we know what library
19006 # dependencies readline has. The test code will try to link with $LIBS.
19007 if test "$with_readline" = yes; then
19008 link_test_func=readline
19009 else
19010 link_test_func=exit
19013 if test "$PORTNAME" = "darwin"; then
19014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS" >&5
19015 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS... " >&6; }
19016 if ${pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs+:} false; then :
19017 $as_echo_n "(cached) " >&6
19018 else
19019 pgac_save_LDFLAGS=$LDFLAGS
19020 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19021 if test "$cross_compiling" = yes; then :
19022 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs="assuming no"
19023 else
19024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19025 /* end confdefs.h. */
19026 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19028 main ()
19032 return 0;
19034 _ACEOF
19035 if ac_fn_c_try_run "$LINENO"; then :
19036 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=yes
19037 else
19038 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=no
19040 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19041 conftest.$ac_objext conftest.beam conftest.$ac_ext
19044 LDFLAGS="$pgac_save_LDFLAGS"
19046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&5
19047 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&6; }
19048 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" = x"yes"; then
19049 LDFLAGS="${LDFLAGS} -Wl,-dead_strip_dylibs"
19053 elif test "$PORTNAME" = "openbsd"; then
19054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS" >&5
19055 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS... " >&6; }
19056 if ${pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic+:} false; then :
19057 $as_echo_n "(cached) " >&6
19058 else
19059 pgac_save_LDFLAGS=$LDFLAGS
19060 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19061 if test "$cross_compiling" = yes; then :
19062 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic="assuming no"
19063 else
19064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19065 /* end confdefs.h. */
19066 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19068 main ()
19072 return 0;
19074 _ACEOF
19075 if ac_fn_c_try_run "$LINENO"; then :
19076 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=yes
19077 else
19078 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=no
19080 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19081 conftest.$ac_objext conftest.beam conftest.$ac_ext
19084 LDFLAGS="$pgac_save_LDFLAGS"
19086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&5
19087 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&6; }
19088 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" = x"yes"; then
19089 LDFLAGS="${LDFLAGS} -Wl,-Bdynamic"
19093 else
19094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed, for LDFLAGS" >&5
19095 $as_echo_n "checking whether $CC supports -Wl,--as-needed, for LDFLAGS... " >&6; }
19096 if ${pgac_cv_prog_cc_LDFLAGS__Wl___as_needed+:} false; then :
19097 $as_echo_n "(cached) " >&6
19098 else
19099 pgac_save_LDFLAGS=$LDFLAGS
19100 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19101 if test "$cross_compiling" = yes; then :
19102 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed="assuming no"
19103 else
19104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19105 /* end confdefs.h. */
19106 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19108 main ()
19112 return 0;
19114 _ACEOF
19115 if ac_fn_c_try_run "$LINENO"; then :
19116 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=yes
19117 else
19118 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=no
19120 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19121 conftest.$ac_objext conftest.beam conftest.$ac_ext
19124 LDFLAGS="$pgac_save_LDFLAGS"
19126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&5
19127 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&6; }
19128 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" = x"yes"; then
19129 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
19135 # For linkers that understand --export-dynamic, add that to the LDFLAGS_EX_BE
19136 # (backend specific ldflags). One some platforms this will always fail (e.g.,
19137 # windows), but on others it depends on the choice of linker (e.g., solaris).
19138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE" >&5
19139 $as_echo_n "checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE... " >&6; }
19140 if ${pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic+:} false; then :
19141 $as_echo_n "(cached) " >&6
19142 else
19143 pgac_save_LDFLAGS=$LDFLAGS
19144 LDFLAGS="$pgac_save_LDFLAGS -Wl,--export-dynamic"
19145 if test "$cross_compiling" = yes; then :
19146 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic="assuming no"
19147 else
19148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19149 /* end confdefs.h. */
19150 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19152 main ()
19156 return 0;
19158 _ACEOF
19159 if ac_fn_c_try_run "$LINENO"; then :
19160 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=yes
19161 else
19162 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=no
19164 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19165 conftest.$ac_objext conftest.beam conftest.$ac_ext
19168 LDFLAGS="$pgac_save_LDFLAGS"
19170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&5
19171 $as_echo "$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&6; }
19172 if test x"$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" = x"yes"; then
19173 LDFLAGS_EX_BE="${LDFLAGS_EX_BE} -Wl,--export-dynamic"
19178 # Create compiler version string
19179 if test x"$GCC" = x"yes" ; then
19180 cc_string=`${CC} --version | sed q`
19181 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19182 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19183 cc_string=`${CC} -V 2>&1 | sed q`
19184 else
19185 cc_string=$CC
19189 cat >>confdefs.h <<_ACEOF
19190 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19191 _ACEOF
19194 # Supply a numeric version string for use by 3rd party add-ons
19195 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19196 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
19197 $AWK '{printf "%d%04d", $1, $2}'`"
19199 cat >>confdefs.h <<_ACEOF
19200 #define PG_VERSION_NUM $PG_VERSION_NUM
19201 _ACEOF
19205 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19206 # literally, so that it's possible to override it at build time using
19207 # a command like "make ... PG_SYSROOT=path". This has to be done after
19208 # we've finished all configure checks that depend on CPPFLAGS.
19209 # The same for LDFLAGS, too.
19210 if test x"$PG_SYSROOT" != x; then
19211 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19212 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19217 # Begin output steps
19219 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19220 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19221 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19222 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19223 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19224 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19225 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19226 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19227 # Currently only used when LLVM is used
19228 if test "$with_llvm" = yes ; then
19229 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19230 $as_echo "$as_me: using CXX=$CXX" >&6;}
19231 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19232 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19233 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19234 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19235 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19236 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19237 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19238 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19241 # prepare build tree if outside source tree
19242 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19243 # Note 2: /bin/pwd might be better than shell's built-in at getting
19244 # a symlink-free name.
19245 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19246 vpath_build=no
19247 else
19248 vpath_build=yes
19249 if test "$no_create" != yes; then
19250 $as_echo_n "preparing build tree... " >&6
19251 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19252 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19253 || as_fn_error $? "failed" "$LINENO" 5
19254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19255 $as_echo "done" >&6; }
19261 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19264 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}"
19267 if test "$PORTNAME" = "win32"; then
19268 ac_config_commands="$ac_config_commands check_win32_symlinks"
19272 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19275 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19278 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19281 cat >confcache <<\_ACEOF
19282 # This file is a shell script that caches the results of configure
19283 # tests run on this system so they can be shared between configure
19284 # scripts and configure runs, see configure's option --config-cache.
19285 # It is not useful on other systems. If it contains results you don't
19286 # want to keep, you may remove or edit it.
19288 # config.status only pays attention to the cache file if you give it
19289 # the --recheck option to rerun configure.
19291 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19292 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19293 # following values.
19295 _ACEOF
19297 # The following way of writing the cache mishandles newlines in values,
19298 # but we know of no workaround that is simple, portable, and efficient.
19299 # So, we kill variables containing newlines.
19300 # Ultrix sh set writes to stderr and can't be redirected directly,
19301 # and sets the high bit in the cache file unless we assign to the vars.
19303 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19304 eval ac_val=\$$ac_var
19305 case $ac_val in #(
19306 *${as_nl}*)
19307 case $ac_var in #(
19308 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19309 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19310 esac
19311 case $ac_var in #(
19312 _ | IFS | as_nl) ;; #(
19313 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19314 *) { eval $ac_var=; unset $ac_var;} ;;
19315 esac ;;
19316 esac
19317 done
19319 (set) 2>&1 |
19320 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19321 *${as_nl}ac_space=\ *)
19322 # `set' does not quote correctly, so add quotes: double-quote
19323 # substitution turns \\\\ into \\, and sed turns \\ into \.
19324 sed -n \
19325 "s/'/'\\\\''/g;
19326 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19327 ;; #(
19329 # `set' quotes correctly as required by POSIX, so do not add quotes.
19330 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19332 esac |
19333 sort
19335 sed '
19336 /^ac_cv_env_/b end
19337 t clear
19338 :clear
19339 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19340 t end
19341 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19342 :end' >>confcache
19343 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19344 if test -w "$cache_file"; then
19345 if test "x$cache_file" != "x/dev/null"; then
19346 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19347 $as_echo "$as_me: updating cache $cache_file" >&6;}
19348 if test ! -f "$cache_file" || test -h "$cache_file"; then
19349 cat confcache >"$cache_file"
19350 else
19351 case $cache_file in #(
19352 */* | ?:*)
19353 mv -f confcache "$cache_file"$$ &&
19354 mv -f "$cache_file"$$ "$cache_file" ;; #(
19356 mv -f confcache "$cache_file" ;;
19357 esac
19360 else
19361 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19362 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19365 rm -f confcache
19367 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19368 # Let make expand exec_prefix.
19369 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19371 DEFS=-DHAVE_CONFIG_H
19373 ac_libobjs=
19374 ac_ltlibobjs=
19376 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19377 # 1. Remove the extension, and $U if already installed.
19378 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19379 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19380 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19381 # will be set to the directory where LIBOBJS objects are built.
19382 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19383 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19384 done
19385 LIBOBJS=$ac_libobjs
19387 LTLIBOBJS=$ac_ltlibobjs
19392 : "${CONFIG_STATUS=./config.status}"
19393 ac_write_fail=0
19394 ac_clean_files_save=$ac_clean_files
19395 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19396 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19397 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19398 as_write_fail=0
19399 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19400 #! $SHELL
19401 # Generated by $as_me.
19402 # Run this file to recreate the current configuration.
19403 # Compiler output produced by configure, useful for debugging
19404 # configure, is in config.log if it exists.
19406 debug=false
19407 ac_cs_recheck=false
19408 ac_cs_silent=false
19410 SHELL=\${CONFIG_SHELL-$SHELL}
19411 export SHELL
19412 _ASEOF
19413 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19414 ## -------------------- ##
19415 ## M4sh Initialization. ##
19416 ## -------------------- ##
19418 # Be more Bourne compatible
19419 DUALCASE=1; export DUALCASE # for MKS sh
19420 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19421 emulate sh
19422 NULLCMD=:
19423 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19424 # is contrary to our usage. Disable this feature.
19425 alias -g '${1+"$@"}'='"$@"'
19426 setopt NO_GLOB_SUBST
19427 else
19428 case `(set -o) 2>/dev/null` in #(
19429 *posix*) :
19430 set -o posix ;; #(
19431 *) :
19433 esac
19437 as_nl='
19439 export as_nl
19440 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19441 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19442 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19443 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19444 # Prefer a ksh shell builtin over an external printf program on Solaris,
19445 # but without wasting forks for bash or zsh.
19446 if test -z "$BASH_VERSION$ZSH_VERSION" \
19447 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19448 as_echo='print -r --'
19449 as_echo_n='print -rn --'
19450 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19451 as_echo='printf %s\n'
19452 as_echo_n='printf %s'
19453 else
19454 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19455 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19456 as_echo_n='/usr/ucb/echo -n'
19457 else
19458 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19459 as_echo_n_body='eval
19460 arg=$1;
19461 case $arg in #(
19462 *"$as_nl"*)
19463 expr "X$arg" : "X\\(.*\\)$as_nl";
19464 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19465 esac;
19466 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19468 export as_echo_n_body
19469 as_echo_n='sh -c $as_echo_n_body as_echo'
19471 export as_echo_body
19472 as_echo='sh -c $as_echo_body as_echo'
19475 # The user is always right.
19476 if test "${PATH_SEPARATOR+set}" != set; then
19477 PATH_SEPARATOR=:
19478 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19479 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19480 PATH_SEPARATOR=';'
19485 # IFS
19486 # We need space, tab and new line, in precisely that order. Quoting is
19487 # there to prevent editors from complaining about space-tab.
19488 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19489 # splitting by setting IFS to empty value.)
19490 IFS=" "" $as_nl"
19492 # Find who we are. Look in the path if we contain no directory separator.
19493 as_myself=
19494 case $0 in #((
19495 *[\\/]* ) as_myself=$0 ;;
19496 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19497 for as_dir in $PATH
19499 IFS=$as_save_IFS
19500 test -z "$as_dir" && as_dir=.
19501 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19502 done
19503 IFS=$as_save_IFS
19506 esac
19507 # We did not find ourselves, most probably we were run as `sh COMMAND'
19508 # in which case we are not to be found in the path.
19509 if test "x$as_myself" = x; then
19510 as_myself=$0
19512 if test ! -f "$as_myself"; then
19513 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19514 exit 1
19517 # Unset variables that we do not need and which cause bugs (e.g. in
19518 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19519 # suppresses any "Segmentation fault" message there. '((' could
19520 # trigger a bug in pdksh 5.2.14.
19521 for as_var in BASH_ENV ENV MAIL MAILPATH
19522 do eval test x\${$as_var+set} = xset \
19523 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19524 done
19525 PS1='$ '
19526 PS2='> '
19527 PS4='+ '
19529 # NLS nuisances.
19530 LC_ALL=C
19531 export LC_ALL
19532 LANGUAGE=C
19533 export LANGUAGE
19535 # CDPATH.
19536 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19539 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19540 # ----------------------------------------
19541 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19542 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19543 # script with STATUS, using 1 if that was 0.
19544 as_fn_error ()
19546 as_status=$1; test $as_status -eq 0 && as_status=1
19547 if test "$4"; then
19548 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19549 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19551 $as_echo "$as_me: error: $2" >&2
19552 as_fn_exit $as_status
19553 } # as_fn_error
19556 # as_fn_set_status STATUS
19557 # -----------------------
19558 # Set $? to STATUS, without forking.
19559 as_fn_set_status ()
19561 return $1
19562 } # as_fn_set_status
19564 # as_fn_exit STATUS
19565 # -----------------
19566 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19567 as_fn_exit ()
19569 set +e
19570 as_fn_set_status $1
19571 exit $1
19572 } # as_fn_exit
19574 # as_fn_unset VAR
19575 # ---------------
19576 # Portably unset VAR.
19577 as_fn_unset ()
19579 { eval $1=; unset $1;}
19581 as_unset=as_fn_unset
19582 # as_fn_append VAR VALUE
19583 # ----------------------
19584 # Append the text in VALUE to the end of the definition contained in VAR. Take
19585 # advantage of any shell optimizations that allow amortized linear growth over
19586 # repeated appends, instead of the typical quadratic growth present in naive
19587 # implementations.
19588 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19589 eval 'as_fn_append ()
19591 eval $1+=\$2
19593 else
19594 as_fn_append ()
19596 eval $1=\$$1\$2
19598 fi # as_fn_append
19600 # as_fn_arith ARG...
19601 # ------------------
19602 # Perform arithmetic evaluation on the ARGs, and store the result in the
19603 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19604 # must be portable across $(()) and expr.
19605 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19606 eval 'as_fn_arith ()
19608 as_val=$(( $* ))
19610 else
19611 as_fn_arith ()
19613 as_val=`expr "$@" || test $? -eq 1`
19615 fi # as_fn_arith
19618 if expr a : '\(a\)' >/dev/null 2>&1 &&
19619 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19620 as_expr=expr
19621 else
19622 as_expr=false
19625 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19626 as_basename=basename
19627 else
19628 as_basename=false
19631 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19632 as_dirname=dirname
19633 else
19634 as_dirname=false
19637 as_me=`$as_basename -- "$0" ||
19638 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19639 X"$0" : 'X\(//\)$' \| \
19640 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19641 $as_echo X/"$0" |
19642 sed '/^.*\/\([^/][^/]*\)\/*$/{
19643 s//\1/
19646 /^X\/\(\/\/\)$/{
19647 s//\1/
19650 /^X\/\(\/\).*/{
19651 s//\1/
19654 s/.*/./; q'`
19656 # Avoid depending upon Character Ranges.
19657 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19658 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19659 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19660 as_cr_digits='0123456789'
19661 as_cr_alnum=$as_cr_Letters$as_cr_digits
19663 ECHO_C= ECHO_N= ECHO_T=
19664 case `echo -n x` in #(((((
19665 -n*)
19666 case `echo 'xy\c'` in
19667 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19668 xy) ECHO_C='\c';;
19669 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19670 ECHO_T=' ';;
19671 esac;;
19673 ECHO_N='-n';;
19674 esac
19676 rm -f conf$$ conf$$.exe conf$$.file
19677 if test -d conf$$.dir; then
19678 rm -f conf$$.dir/conf$$.file
19679 else
19680 rm -f conf$$.dir
19681 mkdir conf$$.dir 2>/dev/null
19683 if (echo >conf$$.file) 2>/dev/null; then
19684 if ln -s conf$$.file conf$$ 2>/dev/null; then
19685 as_ln_s='ln -s'
19686 # ... but there are two gotchas:
19687 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19688 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19689 # In both cases, we have to default to `cp -pR'.
19690 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19691 as_ln_s='cp -pR'
19692 elif ln conf$$.file conf$$ 2>/dev/null; then
19693 as_ln_s=ln
19694 else
19695 as_ln_s='cp -pR'
19697 else
19698 as_ln_s='cp -pR'
19700 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19701 rmdir conf$$.dir 2>/dev/null
19704 # as_fn_mkdir_p
19705 # -------------
19706 # Create "$as_dir" as a directory, including parents if necessary.
19707 as_fn_mkdir_p ()
19710 case $as_dir in #(
19711 -*) as_dir=./$as_dir;;
19712 esac
19713 test -d "$as_dir" || eval $as_mkdir_p || {
19714 as_dirs=
19715 while :; do
19716 case $as_dir in #(
19717 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19718 *) as_qdir=$as_dir;;
19719 esac
19720 as_dirs="'$as_qdir' $as_dirs"
19721 as_dir=`$as_dirname -- "$as_dir" ||
19722 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19723 X"$as_dir" : 'X\(//\)[^/]' \| \
19724 X"$as_dir" : 'X\(//\)$' \| \
19725 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19726 $as_echo X"$as_dir" |
19727 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19728 s//\1/
19731 /^X\(\/\/\)[^/].*/{
19732 s//\1/
19735 /^X\(\/\/\)$/{
19736 s//\1/
19739 /^X\(\/\).*/{
19740 s//\1/
19743 s/.*/./; q'`
19744 test -d "$as_dir" && break
19745 done
19746 test -z "$as_dirs" || eval "mkdir $as_dirs"
19747 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19750 } # as_fn_mkdir_p
19751 if mkdir -p . 2>/dev/null; then
19752 as_mkdir_p='mkdir -p "$as_dir"'
19753 else
19754 test -d ./-p && rmdir ./-p
19755 as_mkdir_p=false
19759 # as_fn_executable_p FILE
19760 # -----------------------
19761 # Test if FILE is an executable regular file.
19762 as_fn_executable_p ()
19764 test -f "$1" && test -x "$1"
19765 } # as_fn_executable_p
19766 as_test_x='test -x'
19767 as_executable_p=as_fn_executable_p
19769 # Sed expression to map a string onto a valid CPP name.
19770 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19772 # Sed expression to map a string onto a valid variable name.
19773 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19776 exec 6>&1
19777 ## ----------------------------------- ##
19778 ## Main body of $CONFIG_STATUS script. ##
19779 ## ----------------------------------- ##
19780 _ASEOF
19781 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19783 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19784 # Save the log message, to keep $0 and so on meaningful, and to
19785 # report actual input values of CONFIG_FILES etc. instead of their
19786 # values after options handling.
19787 ac_log="
19788 This file was extended by PostgreSQL $as_me 17devel, which was
19789 generated by GNU Autoconf 2.69. Invocation command line was
19791 CONFIG_FILES = $CONFIG_FILES
19792 CONFIG_HEADERS = $CONFIG_HEADERS
19793 CONFIG_LINKS = $CONFIG_LINKS
19794 CONFIG_COMMANDS = $CONFIG_COMMANDS
19795 $ $0 $@
19797 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19800 _ACEOF
19802 case $ac_config_files in *"
19803 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19804 esac
19806 case $ac_config_headers in *"
19807 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19808 esac
19811 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19812 # Files that config.status was made for.
19813 config_files="$ac_config_files"
19814 config_headers="$ac_config_headers"
19815 config_links="$ac_config_links"
19816 config_commands="$ac_config_commands"
19818 _ACEOF
19820 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19821 ac_cs_usage="\
19822 \`$as_me' instantiates files and other configuration actions
19823 from templates according to the current configuration. Unless the files
19824 and actions are specified as TAGs, all are instantiated by default.
19826 Usage: $0 [OPTION]... [TAG]...
19828 -h, --help print this help, then exit
19829 -V, --version print version number and configuration settings, then exit
19830 --config print configuration, then exit
19831 -q, --quiet, --silent
19832 do not print progress messages
19833 -d, --debug don't remove temporary files
19834 --recheck update $as_me by reconfiguring in the same conditions
19835 --file=FILE[:TEMPLATE]
19836 instantiate the configuration file FILE
19837 --header=FILE[:TEMPLATE]
19838 instantiate the configuration header FILE
19840 Configuration files:
19841 $config_files
19843 Configuration headers:
19844 $config_headers
19846 Configuration links:
19847 $config_links
19849 Configuration commands:
19850 $config_commands
19852 Report bugs to <pgsql-bugs@lists.postgresql.org>.
19853 PostgreSQL home page: <https://www.postgresql.org/>."
19855 _ACEOF
19856 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19857 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19858 ac_cs_version="\\
19859 PostgreSQL config.status 17devel
19860 configured by $0, generated by GNU Autoconf 2.69,
19861 with options \\"\$ac_cs_config\\"
19863 Copyright (C) 2012 Free Software Foundation, Inc.
19864 This config.status script is free software; the Free Software Foundation
19865 gives unlimited permission to copy, distribute and modify it."
19867 ac_pwd='$ac_pwd'
19868 srcdir='$srcdir'
19869 INSTALL='$INSTALL'
19870 MKDIR_P='$MKDIR_P'
19871 AWK='$AWK'
19872 test -n "\$AWK" || AWK=awk
19873 _ACEOF
19875 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19876 # The default lists apply if the user does not specify any file.
19877 ac_need_defaults=:
19878 while test $# != 0
19880 case $1 in
19881 --*=?*)
19882 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19883 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19884 ac_shift=:
19886 --*=)
19887 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19888 ac_optarg=
19889 ac_shift=:
19892 ac_option=$1
19893 ac_optarg=$2
19894 ac_shift=shift
19896 esac
19898 case $ac_option in
19899 # Handling of the options.
19900 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19901 ac_cs_recheck=: ;;
19902 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19903 $as_echo "$ac_cs_version"; exit ;;
19904 --config | --confi | --conf | --con | --co | --c )
19905 $as_echo "$ac_cs_config"; exit ;;
19906 --debug | --debu | --deb | --de | --d | -d )
19907 debug=: ;;
19908 --file | --fil | --fi | --f )
19909 $ac_shift
19910 case $ac_optarg in
19911 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19912 '') as_fn_error $? "missing file argument" ;;
19913 esac
19914 as_fn_append CONFIG_FILES " '$ac_optarg'"
19915 ac_need_defaults=false;;
19916 --header | --heade | --head | --hea )
19917 $ac_shift
19918 case $ac_optarg in
19919 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19920 esac
19921 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19922 ac_need_defaults=false;;
19923 --he | --h)
19924 # Conflict between --help and --header
19925 as_fn_error $? "ambiguous option: \`$1'
19926 Try \`$0 --help' for more information.";;
19927 --help | --hel | -h )
19928 $as_echo "$ac_cs_usage"; exit ;;
19929 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19930 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19931 ac_cs_silent=: ;;
19933 # This is an error.
19934 -*) as_fn_error $? "unrecognized option: \`$1'
19935 Try \`$0 --help' for more information." ;;
19937 *) as_fn_append ac_config_targets " $1"
19938 ac_need_defaults=false ;;
19940 esac
19941 shift
19942 done
19944 ac_configure_extra_args=
19946 if $ac_cs_silent; then
19947 exec 6>/dev/null
19948 ac_configure_extra_args="$ac_configure_extra_args --silent"
19951 _ACEOF
19952 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19953 if \$ac_cs_recheck; then
19954 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19955 shift
19956 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19957 CONFIG_SHELL='$SHELL'
19958 export CONFIG_SHELL
19959 exec "\$@"
19962 _ACEOF
19963 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19964 exec 5>>config.log
19966 echo
19967 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19968 ## Running $as_me. ##
19969 _ASBOX
19970 $as_echo "$ac_log"
19971 } >&5
19973 _ACEOF
19974 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19975 _ACEOF
19977 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19979 # Handling of arguments.
19980 for ac_config_target in $ac_config_targets
19982 case $ac_config_target in
19983 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19984 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19985 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19986 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19987 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19988 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19989 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19990 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19991 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19992 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19993 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19995 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19996 esac
19997 done
20000 # If the user did not use the arguments to specify the items to instantiate,
20001 # then the envvar interface is used. Set only those that are not.
20002 # We use the long form for the default assignment because of an extremely
20003 # bizarre bug on SunOS 4.1.3.
20004 if $ac_need_defaults; then
20005 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20006 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20007 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20008 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20011 # Have a temporary directory for convenience. Make it in the build tree
20012 # simply because there is no reason against having it here, and in addition,
20013 # creating and moving files from /tmp can sometimes cause problems.
20014 # Hook for its removal unless debugging.
20015 # Note that there is a small window in which the directory will not be cleaned:
20016 # after its creation but before its name has been assigned to `$tmp'.
20017 $debug ||
20019 tmp= ac_tmp=
20020 trap 'exit_status=$?
20021 : "${ac_tmp:=$tmp}"
20022 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20024 trap 'as_fn_exit 1' 1 2 13 15
20026 # Create a (secure) tmp directory for tmp files.
20029 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20030 test -d "$tmp"
20031 } ||
20033 tmp=./conf$$-$RANDOM
20034 (umask 077 && mkdir "$tmp")
20035 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20036 ac_tmp=$tmp
20038 # Set up the scripts for CONFIG_FILES section.
20039 # No need to generate them if there are no CONFIG_FILES.
20040 # This happens for instance with `./config.status config.h'.
20041 if test -n "$CONFIG_FILES"; then
20044 ac_cr=`echo X | tr X '\015'`
20045 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20046 # But we know of no other shell where ac_cr would be empty at this
20047 # point, so we can use a bashism as a fallback.
20048 if test "x$ac_cr" = x; then
20049 eval ac_cr=\$\'\\r\'
20051 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20052 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20053 ac_cs_awk_cr='\\r'
20054 else
20055 ac_cs_awk_cr=$ac_cr
20058 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20059 _ACEOF
20063 echo "cat >conf$$subs.awk <<_ACEOF" &&
20064 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20065 echo "_ACEOF"
20066 } >conf$$subs.sh ||
20067 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20068 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20069 ac_delim='%!_!# '
20070 for ac_last_try in false false false false false :; do
20071 . ./conf$$subs.sh ||
20072 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20074 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20075 if test $ac_delim_n = $ac_delim_num; then
20076 break
20077 elif $ac_last_try; then
20078 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20079 else
20080 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20082 done
20083 rm -f conf$$subs.sh
20085 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20086 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20087 _ACEOF
20088 sed -n '
20090 s/^/S["/; s/!.*/"]=/
20093 s/^[^!]*!//
20094 :repl
20095 t repl
20096 s/'"$ac_delim"'$//
20097 t delim
20100 s/\(.\{148\}\)..*/\1/
20101 t more1
20102 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20105 b repl
20106 :more1
20107 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20110 s/.\{148\}//
20111 t nl
20112 :delim
20114 s/\(.\{148\}\)..*/\1/
20115 t more2
20116 s/["\\]/\\&/g; s/^/"/; s/$/"/
20119 :more2
20120 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20123 s/.\{148\}//
20124 t delim
20125 ' <conf$$subs.awk | sed '
20126 /^[^""]/{
20128 s/\n//
20130 ' >>$CONFIG_STATUS || ac_write_fail=1
20131 rm -f conf$$subs.awk
20132 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20133 _ACAWK
20134 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20135 for (key in S) S_is_set[key] = 1
20136 FS = "\a"
20140 line = $ 0
20141 nfields = split(line, field, "@")
20142 substed = 0
20143 len = length(field[1])
20144 for (i = 2; i < nfields; i++) {
20145 key = field[i]
20146 keylen = length(key)
20147 if (S_is_set[key]) {
20148 value = S[key]
20149 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20150 len += length(value) + length(field[++i])
20151 substed = 1
20152 } else
20153 len += 1 + keylen
20156 print line
20159 _ACAWK
20160 _ACEOF
20161 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20162 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20163 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20164 else
20166 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20167 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20168 _ACEOF
20170 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20171 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20172 # trailing colons and then remove the whole line if VPATH becomes empty
20173 # (actually we leave an empty line to preserve line numbers).
20174 if test "x$srcdir" = x.; then
20175 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20177 s///
20178 s/^/:/
20179 s/[ ]*$/:/
20180 s/:\$(srcdir):/:/g
20181 s/:\${srcdir}:/:/g
20182 s/:@srcdir@:/:/g
20183 s/^:*//
20184 s/:*$//
20186 s/\(=[ ]*\).*/\1/
20188 s/\n//
20189 s/^[^=]*=[ ]*$//
20193 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20194 fi # test -n "$CONFIG_FILES"
20196 # Set up the scripts for CONFIG_HEADERS section.
20197 # No need to generate them if there are no CONFIG_HEADERS.
20198 # This happens for instance with `./config.status Makefile'.
20199 if test -n "$CONFIG_HEADERS"; then
20200 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20201 BEGIN {
20202 _ACEOF
20204 # Transform confdefs.h into an awk script `defines.awk', embedded as
20205 # here-document in config.status, that substitutes the proper values into
20206 # config.h.in to produce config.h.
20208 # Create a delimiter string that does not exist in confdefs.h, to ease
20209 # handling of long lines.
20210 ac_delim='%!_!# '
20211 for ac_last_try in false false :; do
20212 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20213 if test -z "$ac_tt"; then
20214 break
20215 elif $ac_last_try; then
20216 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20217 else
20218 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20220 done
20222 # For the awk script, D is an array of macro values keyed by name,
20223 # likewise P contains macro parameters if any. Preserve backslash
20224 # newline sequences.
20226 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20227 sed -n '
20228 s/.\{148\}/&'"$ac_delim"'/g
20229 t rset
20230 :rset
20231 s/^[ ]*#[ ]*define[ ][ ]*/ /
20232 t def
20234 :def
20235 s/\\$//
20236 t bsnl
20237 s/["\\]/\\&/g
20238 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20239 D["\1"]=" \3"/p
20240 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20242 :bsnl
20243 s/["\\]/\\&/g
20244 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20245 D["\1"]=" \3\\\\\\n"\\/p
20246 t cont
20247 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20248 t cont
20250 :cont
20252 s/.\{148\}/&'"$ac_delim"'/g
20253 t clear
20254 :clear
20255 s/\\$//
20256 t bsnlc
20257 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20259 :bsnlc
20260 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20261 b cont
20262 ' <confdefs.h | sed '
20263 s/'"$ac_delim"'/"\\\
20264 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20266 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20267 for (key in D) D_is_set[key] = 1
20268 FS = "\a"
20270 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20271 line = \$ 0
20272 split(line, arg, " ")
20273 if (arg[1] == "#") {
20274 defundef = arg[2]
20275 mac1 = arg[3]
20276 } else {
20277 defundef = substr(arg[1], 2)
20278 mac1 = arg[2]
20280 split(mac1, mac2, "(") #)
20281 macro = mac2[1]
20282 prefix = substr(line, 1, index(line, defundef) - 1)
20283 if (D_is_set[macro]) {
20284 # Preserve the white space surrounding the "#".
20285 print prefix "define", macro P[macro] D[macro]
20286 next
20287 } else {
20288 # Replace #undef with comments. This is necessary, for example,
20289 # in the case of _POSIX_SOURCE, which is predefined and required
20290 # on some systems where configure will not decide to define it.
20291 if (defundef == "undef") {
20292 print "/*", prefix defundef, macro, "*/"
20293 next
20297 { print }
20298 _ACAWK
20299 _ACEOF
20300 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20301 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20302 fi # test -n "$CONFIG_HEADERS"
20305 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20306 shift
20307 for ac_tag
20309 case $ac_tag in
20310 :[FHLC]) ac_mode=$ac_tag; continue;;
20311 esac
20312 case $ac_mode$ac_tag in
20313 :[FHL]*:*);;
20314 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20315 :[FH]-) ac_tag=-:-;;
20316 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20317 esac
20318 ac_save_IFS=$IFS
20319 IFS=:
20320 set x $ac_tag
20321 IFS=$ac_save_IFS
20322 shift
20323 ac_file=$1
20324 shift
20326 case $ac_mode in
20327 :L) ac_source=$1;;
20328 :[FH])
20329 ac_file_inputs=
20330 for ac_f
20332 case $ac_f in
20333 -) ac_f="$ac_tmp/stdin";;
20334 *) # Look for the file first in the build tree, then in the source tree
20335 # (if the path is not absolute). The absolute path cannot be DOS-style,
20336 # because $ac_f cannot contain `:'.
20337 test -f "$ac_f" ||
20338 case $ac_f in
20339 [\\/$]*) false;;
20340 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20341 esac ||
20342 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20343 esac
20344 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20345 as_fn_append ac_file_inputs " '$ac_f'"
20346 done
20348 # Let's still pretend it is `configure' which instantiates (i.e., don't
20349 # use $as_me), people would be surprised to read:
20350 # /* config.h. Generated by config.status. */
20351 configure_input='Generated from '`
20352 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20353 `' by configure.'
20354 if test x"$ac_file" != x-; then
20355 configure_input="$ac_file. $configure_input"
20356 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20357 $as_echo "$as_me: creating $ac_file" >&6;}
20359 # Neutralize special characters interpreted by sed in replacement strings.
20360 case $configure_input in #(
20361 *\&* | *\|* | *\\* )
20362 ac_sed_conf_input=`$as_echo "$configure_input" |
20363 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20364 *) ac_sed_conf_input=$configure_input;;
20365 esac
20367 case $ac_tag in
20368 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20369 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20370 esac
20372 esac
20374 ac_dir=`$as_dirname -- "$ac_file" ||
20375 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20376 X"$ac_file" : 'X\(//\)[^/]' \| \
20377 X"$ac_file" : 'X\(//\)$' \| \
20378 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20379 $as_echo X"$ac_file" |
20380 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20381 s//\1/
20384 /^X\(\/\/\)[^/].*/{
20385 s//\1/
20388 /^X\(\/\/\)$/{
20389 s//\1/
20392 /^X\(\/\).*/{
20393 s//\1/
20396 s/.*/./; q'`
20397 as_dir="$ac_dir"; as_fn_mkdir_p
20398 ac_builddir=.
20400 case "$ac_dir" in
20401 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20403 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20404 # A ".." for each directory in $ac_dir_suffix.
20405 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20406 case $ac_top_builddir_sub in
20407 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20408 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20409 esac ;;
20410 esac
20411 ac_abs_top_builddir=$ac_pwd
20412 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20413 # for backward compatibility:
20414 ac_top_builddir=$ac_top_build_prefix
20416 case $srcdir in
20417 .) # We are building in place.
20418 ac_srcdir=.
20419 ac_top_srcdir=$ac_top_builddir_sub
20420 ac_abs_top_srcdir=$ac_pwd ;;
20421 [\\/]* | ?:[\\/]* ) # Absolute name.
20422 ac_srcdir=$srcdir$ac_dir_suffix;
20423 ac_top_srcdir=$srcdir
20424 ac_abs_top_srcdir=$srcdir ;;
20425 *) # Relative name.
20426 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20427 ac_top_srcdir=$ac_top_build_prefix$srcdir
20428 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20429 esac
20430 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20433 case $ac_mode in
20436 # CONFIG_FILE
20439 case $INSTALL in
20440 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20441 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20442 esac
20443 ac_MKDIR_P=$MKDIR_P
20444 case $MKDIR_P in
20445 [\\/$]* | ?:[\\/]* ) ;;
20446 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20447 esac
20448 _ACEOF
20450 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20451 # If the template does not know about datarootdir, expand it.
20452 # FIXME: This hack should be removed a few years after 2.60.
20453 ac_datarootdir_hack=; ac_datarootdir_seen=
20454 ac_sed_dataroot='
20455 /datarootdir/ {
20459 /@datadir@/p
20460 /@docdir@/p
20461 /@infodir@/p
20462 /@localedir@/p
20463 /@mandir@/p'
20464 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20465 *datarootdir*) ac_datarootdir_seen=yes;;
20466 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20467 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20468 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20469 _ACEOF
20470 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20471 ac_datarootdir_hack='
20472 s&@datadir@&$datadir&g
20473 s&@docdir@&$docdir&g
20474 s&@infodir@&$infodir&g
20475 s&@localedir@&$localedir&g
20476 s&@mandir@&$mandir&g
20477 s&\\\${datarootdir}&$datarootdir&g' ;;
20478 esac
20479 _ACEOF
20481 # Neutralize VPATH when `$srcdir' = `.'.
20482 # Shell code in configure.ac might set extrasub.
20483 # FIXME: do we really want to maintain this feature?
20484 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20485 ac_sed_extra="$ac_vpsub
20486 $extrasub
20487 _ACEOF
20488 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20490 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20491 s|@configure_input@|$ac_sed_conf_input|;t t
20492 s&@top_builddir@&$ac_top_builddir_sub&;t t
20493 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20494 s&@srcdir@&$ac_srcdir&;t t
20495 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20496 s&@top_srcdir@&$ac_top_srcdir&;t t
20497 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20498 s&@builddir@&$ac_builddir&;t t
20499 s&@abs_builddir@&$ac_abs_builddir&;t t
20500 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20501 s&@INSTALL@&$ac_INSTALL&;t t
20502 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20503 $ac_datarootdir_hack
20505 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20506 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20508 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20509 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20510 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20511 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20512 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20513 which seems to be undefined. Please make sure it is defined" >&5
20514 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20515 which seems to be undefined. Please make sure it is defined" >&2;}
20517 rm -f "$ac_tmp/stdin"
20518 case $ac_file in
20519 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20520 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20521 esac \
20522 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20526 # CONFIG_HEADER
20528 if test x"$ac_file" != x-; then
20530 $as_echo "/* $configure_input */" \
20531 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20532 } >"$ac_tmp/config.h" \
20533 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20534 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20535 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20536 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20537 else
20538 rm -f "$ac_file"
20539 mv "$ac_tmp/config.h" "$ac_file" \
20540 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20542 else
20543 $as_echo "/* $configure_input */" \
20544 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20545 || as_fn_error $? "could not create -" "$LINENO" 5
20550 # CONFIG_LINK
20553 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20555 else
20556 # Prefer the file from the source tree if names are identical.
20557 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20558 ac_source=$srcdir/$ac_source
20561 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20562 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20564 if test ! -r "$ac_source"; then
20565 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20567 rm -f "$ac_file"
20569 # Try a relative symlink, then a hard link, then a copy.
20570 case $ac_source in
20571 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20572 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20573 esac
20574 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20575 ln "$ac_source" "$ac_file" 2>/dev/null ||
20576 cp -p "$ac_source" "$ac_file" ||
20577 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20580 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20581 $as_echo "$as_me: executing $ac_file commands" >&6;}
20583 esac
20586 case $ac_file$ac_mode in
20587 "check_win32_symlinks":C)
20588 # Links sometimes fail undetected on Mingw -
20589 # so here we detect it and warn the user
20590 for FILE in $CONFIG_LINKS
20592 # test -e works for symlinks in the MinGW console
20593 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20594 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20595 done
20597 "src/include/pg_config.h":H)
20598 # Update timestamp for pg_config.h (see Makefile.global)
20599 echo >src/include/stamp-h
20601 "src/include/pg_config_ext.h":H)
20602 # Update timestamp for pg_config_ext.h (see Makefile.global)
20603 echo >src/include/stamp-ext-h
20605 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20607 esac
20608 done # for ac_tag
20611 as_fn_exit 0
20612 _ACEOF
20613 ac_clean_files=$ac_clean_files_save
20615 test $ac_write_fail = 0 ||
20616 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20619 # configure is writing to config.log, and then calls config.status.
20620 # config.status does its own redirection, appending to config.log.
20621 # Unfortunately, on DOS this fails, as config.log is still kept open
20622 # by configure, so config.status won't be able to write to it; its
20623 # output is simply discarded. So we exec the FD to /dev/null,
20624 # effectively closing config.log, so it can be properly (re)opened and
20625 # appended to by config.status. When coming back to configure, we
20626 # need to make the FD available again.
20627 if test "$no_create" != yes; then
20628 ac_cs_success=:
20629 ac_config_status_args=
20630 test "$silent" = yes &&
20631 ac_config_status_args="$ac_config_status_args --quiet"
20632 exec 5>/dev/null
20633 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20634 exec 5>>config.log
20635 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20636 # would make configure fail if this is the last instruction.
20637 $ac_cs_success || as_fn_exit 1
20639 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20640 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20641 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20645 # Ensure that any meson build directories would reconfigure and see that
20646 # there's a conflicting in-tree build and can error out.
20647 if test "$vpath_build"="no"; then
20648 touch meson.build