libpq: Change some static functions to extern
[pgsql.git] / configure
blob2a1ee251f2d7206790f56e536ed2faee0b192e39
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 17devel.
5 # Report bugs to <pgsql-bugs@lists.postgresql.org>.
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
14 # Copyright (c) 1996-2024, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22 emulate sh
23 NULLCMD=:
24 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
27 setopt NO_GLOB_SUBST
28 else
29 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
34 esac
38 as_nl='
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54 else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
86 # IFS
87 # We need space, tab and new line, in precisely that order. Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" "" $as_nl"
93 # Find who we are. Look in the path if we contain no directory separator.
94 as_myself=
95 case $0 in #((
96 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
104 IFS=$as_save_IFS
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111 as_myself=$0
113 if test ! -f "$as_myself"; then
114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there. '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139 # Use a proper internal environment variable to ensure we don't fall
140 # into an infinite loop, continuously re-executing ourselves.
141 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
142 _as_can_reexec=no; export _as_can_reexec;
143 # We cannot yet assume a decent shell, so we have to provide a
144 # neutralization value for shells without unset; and this also
145 # works around shells that cannot unset nonexistent variables.
146 # Preserve -v and -x to the replacement shell.
147 BASH_ENV=/dev/null
148 ENV=/dev/null
149 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
150 case $- in # ((((
151 *v*x* | *x*v* ) as_opts=-vx ;;
152 *v* ) as_opts=-v ;;
153 *x* ) as_opts=-x ;;
154 * ) as_opts= ;;
155 esac
156 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
157 # Admittedly, this is quite paranoid, since all the known shells bail
158 # out after a failed `exec'.
159 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 as_fn_exit 255
162 # We don't want this to propagate to other subprocesses.
163 { _as_can_reexec=; unset _as_can_reexec;}
164 if test "x$CONFIG_SHELL" = x; then
165 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166 emulate sh
167 NULLCMD=:
168 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
169 # is contrary to our usage. Disable this feature.
170 alias -g '\${1+\"\$@\"}'='\"\$@\"'
171 setopt NO_GLOB_SUBST
172 else
173 case \`(set -o) 2>/dev/null\` in #(
174 *posix*) :
175 set -o posix ;; #(
176 *) :
178 esac
181 as_required="as_fn_return () { (exit \$1); }
182 as_fn_success () { as_fn_return 0; }
183 as_fn_failure () { as_fn_return 1; }
184 as_fn_ret_success () { return 0; }
185 as_fn_ret_failure () { return 1; }
187 exitcode=0
188 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
194 else
195 exitcode=1; echo positional parameters were not saved.
197 test x\$exitcode = x0 || exit 1
198 test -x / || exit 1"
199 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
200 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
201 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
202 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
203 test \$(( 1 + 1 )) = 2 || exit 1"
204 if (eval "$as_required") 2>/dev/null; then :
205 as_have_required=yes
206 else
207 as_have_required=no
209 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
211 else
212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
213 as_found=false
214 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
216 IFS=$as_save_IFS
217 test -z "$as_dir" && as_dir=.
218 as_found=:
219 case $as_dir in #(
221 for as_base in sh bash ksh sh5; do
222 # Try only shells that exist, to save several forks.
223 as_shell=$as_dir/$as_base
224 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
225 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 CONFIG_SHELL=$as_shell as_have_required=yes
227 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
228 break 2
231 done;;
232 esac
233 as_found=false
234 done
235 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
236 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
237 CONFIG_SHELL=$SHELL as_have_required=yes
238 fi; }
239 IFS=$as_save_IFS
242 if test "x$CONFIG_SHELL" != x; then :
243 export CONFIG_SHELL
244 # We cannot yet assume a decent shell, so we have to provide a
245 # neutralization value for shells without unset; and this also
246 # works around shells that cannot unset nonexistent variables.
247 # Preserve -v and -x to the replacement shell.
248 BASH_ENV=/dev/null
249 ENV=/dev/null
250 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
251 case $- in # ((((
252 *v*x* | *x*v* ) as_opts=-vx ;;
253 *v* ) as_opts=-v ;;
254 *x* ) as_opts=-x ;;
255 * ) as_opts= ;;
256 esac
257 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
258 # Admittedly, this is quite paranoid, since all the known shells bail
259 # out after a failed `exec'.
260 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
261 exit 255
264 if test x$as_have_required = xno; then :
265 $as_echo "$0: This script requires a shell more modern than all"
266 $as_echo "$0: the shells that I found on your system."
267 if test x${ZSH_VERSION+set} = xset ; then
268 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
270 else
271 $as_echo "$0: Please tell bug-autoconf@gnu.org and
272 $0: pgsql-bugs@lists.postgresql.org about your system,
273 $0: including any error possibly output before this
274 $0: message. Then install a modern shell, or manually run
275 $0: the script under such a shell if you do have one."
277 exit 1
281 SHELL=${CONFIG_SHELL-/bin/sh}
282 export SHELL
283 # Unset more variables known to interfere with behavior of common tools.
284 CLICOLOR_FORCE= GREP_OPTIONS=
285 unset CLICOLOR_FORCE GREP_OPTIONS
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
295 { eval $1=; unset $1;}
297 as_unset=as_fn_unset
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
304 return $1
305 } # as_fn_set_status
307 # as_fn_exit STATUS
308 # -----------------
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310 as_fn_exit ()
312 set +e
313 as_fn_set_status $1
314 exit $1
315 } # as_fn_exit
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
323 case $as_dir in #(
324 -*) as_dir=./$as_dir;;
325 esac
326 test -d "$as_dir" || eval $as_mkdir_p || {
327 as_dirs=
328 while :; do
329 case $as_dir in #(
330 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331 *) as_qdir=$as_dir;;
332 esac
333 as_dirs="'$as_qdir' $as_dirs"
334 as_dir=`$as_dirname -- "$as_dir" ||
335 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
336 X"$as_dir" : 'X\(//\)[^/]' \| \
337 X"$as_dir" : 'X\(//\)$' \| \
338 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
339 $as_echo X"$as_dir" |
340 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
341 s//\1/
344 /^X\(\/\/\)[^/].*/{
345 s//\1/
348 /^X\(\/\/\)$/{
349 s//\1/
352 /^X\(\/\).*/{
353 s//\1/
356 s/.*/./; q'`
357 test -d "$as_dir" && break
358 done
359 test -z "$as_dirs" || eval "mkdir $as_dirs"
360 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
363 } # as_fn_mkdir_p
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
370 test -f "$1" && test -x "$1"
371 } # as_fn_executable_p
372 # as_fn_append VAR VALUE
373 # ----------------------
374 # Append the text in VALUE to the end of the definition contained in VAR. Take
375 # advantage of any shell optimizations that allow amortized linear growth over
376 # repeated appends, instead of the typical quadratic growth present in naive
377 # implementations.
378 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379 eval 'as_fn_append ()
381 eval $1+=\$2
383 else
384 as_fn_append ()
386 eval $1=\$$1\$2
388 fi # as_fn_append
390 # as_fn_arith ARG...
391 # ------------------
392 # Perform arithmetic evaluation on the ARGs, and store the result in the
393 # global $as_val. Take advantage of shells that can avoid forks. The arguments
394 # must be portable across $(()) and expr.
395 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
396 eval 'as_fn_arith ()
398 as_val=$(( $* ))
400 else
401 as_fn_arith ()
403 as_val=`expr "$@" || test $? -eq 1`
405 fi # as_fn_arith
408 # as_fn_error STATUS ERROR [LINENO LOG_FD]
409 # ----------------------------------------
410 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
411 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
412 # script with STATUS, using 1 if that was 0.
413 as_fn_error ()
415 as_status=$1; test $as_status -eq 0 && as_status=1
416 if test "$4"; then
417 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
418 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
420 $as_echo "$as_me: error: $2" >&2
421 as_fn_exit $as_status
422 } # as_fn_error
424 if expr a : '\(a\)' >/dev/null 2>&1 &&
425 test "X`expr 00001 : '.*\(...\)'`" = X001; then
426 as_expr=expr
427 else
428 as_expr=false
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432 as_basename=basename
433 else
434 as_basename=false
437 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
438 as_dirname=dirname
439 else
440 as_dirname=false
443 as_me=`$as_basename -- "$0" ||
444 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445 X"$0" : 'X\(//\)$' \| \
446 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
447 $as_echo X/"$0" |
448 sed '/^.*\/\([^/][^/]*\)\/*$/{
449 s//\1/
452 /^X\/\(\/\/\)$/{
453 s//\1/
456 /^X\/\(\/\).*/{
457 s//\1/
460 s/.*/./; q'`
462 # Avoid depending upon Character Ranges.
463 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466 as_cr_digits='0123456789'
467 as_cr_alnum=$as_cr_Letters$as_cr_digits
470 as_lineno_1=$LINENO as_lineno_1a=$LINENO
471 as_lineno_2=$LINENO as_lineno_2a=$LINENO
472 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
473 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
474 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
475 sed -n '
477 /[$]LINENO/=
478 ' <$as_myself |
479 sed '
480 s/[$]LINENO.*/&-/
481 t lineno
483 :lineno
485 :loop
486 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
487 t loop
488 s/-\n.*//
489 ' >$as_me.lineno &&
490 chmod +x "$as_me.lineno" ||
491 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
493 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
494 # already done that, so ensure we don't try to do so again and fall
495 # in an infinite loop. This has already happened in practice.
496 _as_can_reexec=no; export _as_can_reexec
497 # Don't try to exec as it changes $[0], causing all sort of problems
498 # (the dirname of $[0] is not the place where we might find the
499 # original and so on. Autoconf is especially sensitive to this).
500 . "./$as_me.lineno"
501 # Exit status is that of the last command.
502 exit
505 ECHO_C= ECHO_N= ECHO_T=
506 case `echo -n x` in #(((((
507 -n*)
508 case `echo 'xy\c'` in
509 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
510 xy) ECHO_C='\c';;
511 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
512 ECHO_T=' ';;
513 esac;;
515 ECHO_N='-n';;
516 esac
518 rm -f conf$$ conf$$.exe conf$$.file
519 if test -d conf$$.dir; then
520 rm -f conf$$.dir/conf$$.file
521 else
522 rm -f conf$$.dir
523 mkdir conf$$.dir 2>/dev/null
525 if (echo >conf$$.file) 2>/dev/null; then
526 if ln -s conf$$.file conf$$ 2>/dev/null; then
527 as_ln_s='ln -s'
528 # ... but there are two gotchas:
529 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
530 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
531 # In both cases, we have to default to `cp -pR'.
532 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
533 as_ln_s='cp -pR'
534 elif ln conf$$.file conf$$ 2>/dev/null; then
535 as_ln_s=ln
536 else
537 as_ln_s='cp -pR'
539 else
540 as_ln_s='cp -pR'
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
545 if mkdir -p . 2>/dev/null; then
546 as_mkdir_p='mkdir -p "$as_dir"'
547 else
548 test -d ./-p && rmdir ./-p
549 as_mkdir_p=false
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
555 # Sed expression to map a string onto a valid CPP name.
556 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
558 # Sed expression to map a string onto a valid variable name.
559 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
562 test -n "$DJDIR" || exec 7<&0 </dev/null
563 exec 6>&1
565 # Name of the host.
566 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
567 # so uname gets run too.
568 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
571 # Initializations.
573 ac_default_prefix=/usr/local
574 ac_clean_files=
575 ac_config_libobj_dir=.
576 LIBOBJS=
577 cross_compiling=no
578 subdirs=
579 MFLAGS=
580 MAKEFLAGS=
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='17devel'
586 PACKAGE_STRING='PostgreSQL 17devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
588 PACKAGE_URL='https://www.postgresql.org/'
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 # include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 # include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_SYSROOT
631 PG_VERSION_NUM
632 LDFLAGS_EX_BE
633 PROVE
634 DBTOEPUB
636 XSLTPROC
637 XMLLINT
638 TCL_SHARED_BUILD
639 TCL_LIB_SPEC
640 TCL_LIBS
641 TCL_INCLUDE_SPEC
642 TCL_CONFIG_SH
643 TCLSH
644 XGETTEXT
645 MSGMERGE
646 MSGFMT_FLAGS
647 MSGFMT
648 PG_CRC32C_OBJS
649 CFLAGS_CRC
650 LIBOBJS
651 OPENSSL
652 ZSTD
654 UUID_LIBS
655 LDAP_LIBS_BE
656 LDAP_LIBS_FE
657 with_ssl
658 PTHREAD_CFLAGS
659 PTHREAD_LIBS
660 PTHREAD_CC
661 ax_pthread_config
662 EGREP
663 GREP
666 python_additional_libs
667 python_libspec
668 python_libdir
669 python_includespec
670 python_version
671 python_majorversion
672 PYTHON
673 perl_embed_ldflags
674 perl_embed_ccflags
675 perl_includespec
676 perl_useshrplib
677 perl_privlibexp
678 perl_archlibexp
679 PERL
680 FLEXFLAGS
681 FLEX
682 BISONFLAGS
683 BISON
684 MKDIR_P
685 LN_S
687 install_bin
688 INSTALL_DATA
689 INSTALL_SCRIPT
690 INSTALL_PROGRAM
691 WINDRES
693 STRIP_SHARED_LIB
694 STRIP_STATIC_LIB
695 STRIP
696 LDFLAGS_SL
697 LDFLAGS_EX
698 ZSTD_LIBS
699 ZSTD_CFLAGS
700 with_zstd
701 LZ4_LIBS
702 LZ4_CFLAGS
703 with_lz4
704 with_zlib
705 with_system_tzdata
706 with_libxslt
707 XML2_LIBS
708 XML2_CFLAGS
709 XML2_CONFIG
710 with_libxml
711 with_uuid
712 with_readline
713 with_systemd
714 with_selinux
715 with_ldap
716 with_krb_srvnam
717 krb_srvtab
718 with_gssapi
719 with_python
720 with_perl
721 with_tcl
722 ICU_LIBS
723 ICU_CFLAGS
724 with_icu
725 INCLUDES
726 autodepend
727 PKG_CONFIG_LIBDIR
728 PKG_CONFIG_PATH
729 PKG_CONFIG
730 DLSUFFIX
734 CFLAGS_SL
735 BITCODE_CXXFLAGS
736 BITCODE_CFLAGS
737 CXXFLAGS_SL_MODULE
738 CFLAGS_SL_MODULE
739 CFLAGS_VECTORIZE
740 CFLAGS_UNROLL_LOOPS
741 PERMIT_DECLARATION_AFTER_STATEMENT
742 LLVM_BINPATH
743 LLVM_CXXFLAGS
744 LLVM_CFLAGS
745 LLVM_CPPFLAGS
746 LLVM_LIBS
747 CLANG
748 LLVM_CONFIG
750 with_llvm
751 SUN_STUDIO_CC
752 ac_ct_CXX
753 CXXFLAGS
755 OBJEXT
756 EXEEXT
757 ac_ct_CC
758 CPPFLAGS
759 LDFLAGS
760 CFLAGS
762 enable_injection_points
763 enable_tap_tests
764 enable_dtrace
765 DTRACEFLAGS
766 DTRACE
767 enable_coverage
768 GENHTML
769 LCOV
770 GCOV
771 enable_debug
772 enable_rpath
773 default_port
774 WANTED_LANGUAGES
775 enable_nls
776 PORTNAME
777 host_os
778 host_vendor
779 host_cpu
780 host
781 build_os
782 build_vendor
783 build_cpu
784 build
785 PG_MAJORVERSION
786 target_alias
787 host_alias
788 build_alias
789 LIBS
790 ECHO_T
791 ECHO_N
792 ECHO_C
793 DEFS
794 mandir
795 localedir
796 libdir
797 psdir
798 pdfdir
799 dvidir
800 htmldir
801 infodir
802 docdir
803 oldincludedir
804 includedir
805 localstatedir
806 sharedstatedir
807 sysconfdir
808 datadir
809 datarootdir
810 libexecdir
811 sbindir
812 bindir
813 program_transform_name
814 prefix
815 exec_prefix
816 PACKAGE_URL
817 PACKAGE_BUGREPORT
818 PACKAGE_STRING
819 PACKAGE_VERSION
820 PACKAGE_TARNAME
821 PACKAGE_NAME
822 PATH_SEPARATOR
823 SHELL'
824 ac_subst_files=''
825 ac_user_opts='
826 enable_option_checking
827 with_extra_version
828 with_template
829 with_includes
830 with_libraries
831 with_libs
832 enable_integer_datetimes
833 enable_nls
834 with_pgport
835 enable_rpath
836 enable_spinlocks
837 enable_atomics
838 enable_debug
839 enable_profiling
840 enable_coverage
841 enable_dtrace
842 enable_tap_tests
843 enable_injection_points
844 with_blocksize
845 with_segsize
846 with_segsize_blocks
847 with_wal_blocksize
848 with_CC
849 with_llvm
850 enable_depend
851 enable_cassert
852 with_icu
853 with_tcl
854 with_tclconfig
855 with_perl
856 with_python
857 with_gssapi
858 with_krb_srvnam
859 with_pam
860 with_bsd_auth
861 with_ldap
862 with_bonjour
863 with_selinux
864 with_systemd
865 with_readline
866 with_libedit_preferred
867 with_uuid
868 with_ossp_uuid
869 with_libxml
870 with_libxslt
871 with_system_tzdata
872 with_zlib
873 with_lz4
874 with_zstd
875 with_ssl
876 with_openssl
877 enable_largefile
879 ac_precious_vars='build_alias
880 host_alias
881 target_alias
883 CFLAGS
884 LDFLAGS
885 LIBS
886 CPPFLAGS
888 CXXFLAGS
890 LLVM_CONFIG
891 CLANG
893 PKG_CONFIG
894 PKG_CONFIG_PATH
895 PKG_CONFIG_LIBDIR
896 ICU_CFLAGS
897 ICU_LIBS
898 XML2_CONFIG
899 XML2_CFLAGS
900 XML2_LIBS
901 LZ4_CFLAGS
902 LZ4_LIBS
903 ZSTD_CFLAGS
904 ZSTD_LIBS
905 LDFLAGS_EX
906 LDFLAGS_SL
907 PERL
908 PYTHON
909 MSGFMT
910 TCLSH'
913 # Initialize some variables set by options.
914 ac_init_help=
915 ac_init_version=false
916 ac_unrecognized_opts=
917 ac_unrecognized_sep=
918 # The variables have the same names as the options, with
919 # dashes changed to underlines.
920 cache_file=/dev/null
921 exec_prefix=NONE
922 no_create=
923 no_recursion=
924 prefix=NONE
925 program_prefix=NONE
926 program_suffix=NONE
927 program_transform_name=s,x,x,
928 silent=
929 site=
930 srcdir=
931 verbose=
932 x_includes=NONE
933 x_libraries=NONE
935 # Installation directory options.
936 # These are left unexpanded so users can "make install exec_prefix=/foo"
937 # and all the variables that are supposed to be based on exec_prefix
938 # by default will actually change.
939 # Use braces instead of parens because sh, perl, etc. also accept them.
940 # (The list follows the same order as the GNU Coding Standards.)
941 bindir='${exec_prefix}/bin'
942 sbindir='${exec_prefix}/sbin'
943 libexecdir='${exec_prefix}/libexec'
944 datarootdir='${prefix}/share'
945 datadir='${datarootdir}'
946 sysconfdir='${prefix}/etc'
947 sharedstatedir='${prefix}/com'
948 localstatedir='${prefix}/var'
949 includedir='${prefix}/include'
950 oldincludedir='/usr/include'
951 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
952 infodir='${datarootdir}/info'
953 htmldir='${docdir}'
954 dvidir='${docdir}'
955 pdfdir='${docdir}'
956 psdir='${docdir}'
957 libdir='${exec_prefix}/lib'
958 localedir='${datarootdir}/locale'
959 mandir='${datarootdir}/man'
961 ac_prev=
962 ac_dashdash=
963 for ac_option
965 # If the previous option needs an argument, assign it.
966 if test -n "$ac_prev"; then
967 eval $ac_prev=\$ac_option
968 ac_prev=
969 continue
972 case $ac_option in
973 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
974 *=) ac_optarg= ;;
975 *) ac_optarg=yes ;;
976 esac
978 # Accept the important Cygnus configure options, so we can diagnose typos.
980 case $ac_dashdash$ac_option in
982 ac_dashdash=yes ;;
984 -bindir | --bindir | --bindi | --bind | --bin | --bi)
985 ac_prev=bindir ;;
986 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
987 bindir=$ac_optarg ;;
989 -build | --build | --buil | --bui | --bu)
990 ac_prev=build_alias ;;
991 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
992 build_alias=$ac_optarg ;;
994 -cache-file | --cache-file | --cache-fil | --cache-fi \
995 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
996 ac_prev=cache_file ;;
997 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
998 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
999 cache_file=$ac_optarg ;;
1001 --config-cache | -C)
1002 cache_file=config.cache ;;
1004 -datadir | --datadir | --datadi | --datad)
1005 ac_prev=datadir ;;
1006 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1007 datadir=$ac_optarg ;;
1009 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1010 | --dataroo | --dataro | --datar)
1011 ac_prev=datarootdir ;;
1012 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1013 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1014 datarootdir=$ac_optarg ;;
1016 -disable-* | --disable-*)
1017 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1018 # Reject names that are not valid shell variable names.
1019 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1020 as_fn_error $? "invalid feature name: $ac_useropt"
1021 ac_useropt_orig=$ac_useropt
1022 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1023 case $ac_user_opts in
1025 "enable_$ac_useropt"
1026 "*) ;;
1027 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1028 ac_unrecognized_sep=', ';;
1029 esac
1030 eval enable_$ac_useropt=no ;;
1032 -docdir | --docdir | --docdi | --doc | --do)
1033 ac_prev=docdir ;;
1034 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1035 docdir=$ac_optarg ;;
1037 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1038 ac_prev=dvidir ;;
1039 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1040 dvidir=$ac_optarg ;;
1042 -enable-* | --enable-*)
1043 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1044 # Reject names that are not valid shell variable names.
1045 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1046 as_fn_error $? "invalid feature name: $ac_useropt"
1047 ac_useropt_orig=$ac_useropt
1048 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1049 case $ac_user_opts in
1051 "enable_$ac_useropt"
1052 "*) ;;
1053 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1054 ac_unrecognized_sep=', ';;
1055 esac
1056 eval enable_$ac_useropt=\$ac_optarg ;;
1058 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1059 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1060 | --exec | --exe | --ex)
1061 ac_prev=exec_prefix ;;
1062 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1063 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1064 | --exec=* | --exe=* | --ex=*)
1065 exec_prefix=$ac_optarg ;;
1067 -gas | --gas | --ga | --g)
1068 # Obsolete; use --with-gas.
1069 with_gas=yes ;;
1071 -help | --help | --hel | --he | -h)
1072 ac_init_help=long ;;
1073 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1074 ac_init_help=recursive ;;
1075 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1076 ac_init_help=short ;;
1078 -host | --host | --hos | --ho)
1079 ac_prev=host_alias ;;
1080 -host=* | --host=* | --hos=* | --ho=*)
1081 host_alias=$ac_optarg ;;
1083 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1084 ac_prev=htmldir ;;
1085 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1086 | --ht=*)
1087 htmldir=$ac_optarg ;;
1089 -includedir | --includedir | --includedi | --included | --include \
1090 | --includ | --inclu | --incl | --inc)
1091 ac_prev=includedir ;;
1092 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1093 | --includ=* | --inclu=* | --incl=* | --inc=*)
1094 includedir=$ac_optarg ;;
1096 -infodir | --infodir | --infodi | --infod | --info | --inf)
1097 ac_prev=infodir ;;
1098 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1099 infodir=$ac_optarg ;;
1101 -libdir | --libdir | --libdi | --libd)
1102 ac_prev=libdir ;;
1103 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1104 libdir=$ac_optarg ;;
1106 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1107 | --libexe | --libex | --libe)
1108 ac_prev=libexecdir ;;
1109 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1110 | --libexe=* | --libex=* | --libe=*)
1111 libexecdir=$ac_optarg ;;
1113 -localedir | --localedir | --localedi | --localed | --locale)
1114 ac_prev=localedir ;;
1115 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1116 localedir=$ac_optarg ;;
1118 -localstatedir | --localstatedir | --localstatedi | --localstated \
1119 | --localstate | --localstat | --localsta | --localst | --locals)
1120 ac_prev=localstatedir ;;
1121 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1122 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1123 localstatedir=$ac_optarg ;;
1125 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1126 ac_prev=mandir ;;
1127 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1128 mandir=$ac_optarg ;;
1130 -nfp | --nfp | --nf)
1131 # Obsolete; use --without-fp.
1132 with_fp=no ;;
1134 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1135 | --no-cr | --no-c | -n)
1136 no_create=yes ;;
1138 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1139 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1140 no_recursion=yes ;;
1142 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1143 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1144 | --oldin | --oldi | --old | --ol | --o)
1145 ac_prev=oldincludedir ;;
1146 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1147 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1148 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1149 oldincludedir=$ac_optarg ;;
1151 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1152 ac_prev=prefix ;;
1153 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1154 prefix=$ac_optarg ;;
1156 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1157 | --program-pre | --program-pr | --program-p)
1158 ac_prev=program_prefix ;;
1159 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1160 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1161 program_prefix=$ac_optarg ;;
1163 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1164 | --program-suf | --program-su | --program-s)
1165 ac_prev=program_suffix ;;
1166 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1167 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1168 program_suffix=$ac_optarg ;;
1170 -program-transform-name | --program-transform-name \
1171 | --program-transform-nam | --program-transform-na \
1172 | --program-transform-n | --program-transform- \
1173 | --program-transform | --program-transfor \
1174 | --program-transfo | --program-transf \
1175 | --program-trans | --program-tran \
1176 | --progr-tra | --program-tr | --program-t)
1177 ac_prev=program_transform_name ;;
1178 -program-transform-name=* | --program-transform-name=* \
1179 | --program-transform-nam=* | --program-transform-na=* \
1180 | --program-transform-n=* | --program-transform-=* \
1181 | --program-transform=* | --program-transfor=* \
1182 | --program-transfo=* | --program-transf=* \
1183 | --program-trans=* | --program-tran=* \
1184 | --progr-tra=* | --program-tr=* | --program-t=*)
1185 program_transform_name=$ac_optarg ;;
1187 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1188 ac_prev=pdfdir ;;
1189 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1190 pdfdir=$ac_optarg ;;
1192 -psdir | --psdir | --psdi | --psd | --ps)
1193 ac_prev=psdir ;;
1194 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1195 psdir=$ac_optarg ;;
1197 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1198 | -silent | --silent | --silen | --sile | --sil)
1199 silent=yes ;;
1201 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1202 ac_prev=sbindir ;;
1203 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1204 | --sbi=* | --sb=*)
1205 sbindir=$ac_optarg ;;
1207 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1208 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1209 | --sharedst | --shareds | --shared | --share | --shar \
1210 | --sha | --sh)
1211 ac_prev=sharedstatedir ;;
1212 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1213 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1214 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1215 | --sha=* | --sh=*)
1216 sharedstatedir=$ac_optarg ;;
1218 -site | --site | --sit)
1219 ac_prev=site ;;
1220 -site=* | --site=* | --sit=*)
1221 site=$ac_optarg ;;
1223 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1224 ac_prev=srcdir ;;
1225 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1226 srcdir=$ac_optarg ;;
1228 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1229 | --syscon | --sysco | --sysc | --sys | --sy)
1230 ac_prev=sysconfdir ;;
1231 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1232 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1233 sysconfdir=$ac_optarg ;;
1235 -target | --target | --targe | --targ | --tar | --ta | --t)
1236 ac_prev=target_alias ;;
1237 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1238 target_alias=$ac_optarg ;;
1240 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1241 verbose=yes ;;
1243 -version | --version | --versio | --versi | --vers | -V)
1244 ac_init_version=: ;;
1246 -with-* | --with-*)
1247 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1248 # Reject names that are not valid shell variable names.
1249 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1250 as_fn_error $? "invalid package name: $ac_useropt"
1251 ac_useropt_orig=$ac_useropt
1252 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1253 case $ac_user_opts in
1255 "with_$ac_useropt"
1256 "*) ;;
1257 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1258 ac_unrecognized_sep=', ';;
1259 esac
1260 eval with_$ac_useropt=\$ac_optarg ;;
1262 -without-* | --without-*)
1263 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1264 # Reject names that are not valid shell variable names.
1265 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1266 as_fn_error $? "invalid package name: $ac_useropt"
1267 ac_useropt_orig=$ac_useropt
1268 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1269 case $ac_user_opts in
1271 "with_$ac_useropt"
1272 "*) ;;
1273 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1274 ac_unrecognized_sep=', ';;
1275 esac
1276 eval with_$ac_useropt=no ;;
1278 --x)
1279 # Obsolete; use --with-x.
1280 with_x=yes ;;
1282 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1283 | --x-incl | --x-inc | --x-in | --x-i)
1284 ac_prev=x_includes ;;
1285 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1286 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1287 x_includes=$ac_optarg ;;
1289 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1290 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1291 ac_prev=x_libraries ;;
1292 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1293 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1294 x_libraries=$ac_optarg ;;
1296 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1297 Try \`$0 --help' for more information"
1300 *=*)
1301 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1302 # Reject names that are not valid shell variable names.
1303 case $ac_envvar in #(
1304 '' | [0-9]* | *[!_$as_cr_alnum]* )
1305 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1306 esac
1307 eval $ac_envvar=\$ac_optarg
1308 export $ac_envvar ;;
1311 # FIXME: should be removed in autoconf 3.0.
1312 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1313 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1314 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1315 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1318 esac
1319 done
1321 if test -n "$ac_prev"; then
1322 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1323 as_fn_error $? "missing argument to $ac_option"
1326 if test -n "$ac_unrecognized_opts"; then
1327 case $enable_option_checking in
1328 no) ;;
1329 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1330 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1331 esac
1334 # Check all directory arguments for consistency.
1335 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1336 datadir sysconfdir sharedstatedir localstatedir includedir \
1337 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1338 libdir localedir mandir
1340 eval ac_val=\$$ac_var
1341 # Remove trailing slashes.
1342 case $ac_val in
1343 */ )
1344 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1345 eval $ac_var=\$ac_val;;
1346 esac
1347 # Be sure to have absolute directory names.
1348 case $ac_val in
1349 [\\/$]* | ?:[\\/]* ) continue;;
1350 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1351 esac
1352 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1353 done
1355 # There might be people who depend on the old broken behavior: `$host'
1356 # used to hold the argument of --host etc.
1357 # FIXME: To remove some day.
1358 build=$build_alias
1359 host=$host_alias
1360 target=$target_alias
1362 # FIXME: To remove some day.
1363 if test "x$host_alias" != x; then
1364 if test "x$build_alias" = x; then
1365 cross_compiling=maybe
1366 elif test "x$build_alias" != "x$host_alias"; then
1367 cross_compiling=yes
1371 ac_tool_prefix=
1372 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1374 test "$silent" = yes && exec 6>/dev/null
1377 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1378 ac_ls_di=`ls -di .` &&
1379 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1380 as_fn_error $? "working directory cannot be determined"
1381 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1382 as_fn_error $? "pwd does not report name of working directory"
1385 # Find the source files, if location was not specified.
1386 if test -z "$srcdir"; then
1387 ac_srcdir_defaulted=yes
1388 # Try the directory containing this script, then the parent directory.
1389 ac_confdir=`$as_dirname -- "$as_myself" ||
1390 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1391 X"$as_myself" : 'X\(//\)[^/]' \| \
1392 X"$as_myself" : 'X\(//\)$' \| \
1393 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1394 $as_echo X"$as_myself" |
1395 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1396 s//\1/
1399 /^X\(\/\/\)[^/].*/{
1400 s//\1/
1403 /^X\(\/\/\)$/{
1404 s//\1/
1407 /^X\(\/\).*/{
1408 s//\1/
1411 s/.*/./; q'`
1412 srcdir=$ac_confdir
1413 if test ! -r "$srcdir/$ac_unique_file"; then
1414 srcdir=..
1416 else
1417 ac_srcdir_defaulted=no
1419 if test ! -r "$srcdir/$ac_unique_file"; then
1420 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1421 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1423 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1424 ac_abs_confdir=`(
1425 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1426 pwd)`
1427 # When building in place, set srcdir=.
1428 if test "$ac_abs_confdir" = "$ac_pwd"; then
1429 srcdir=.
1431 # Remove unnecessary trailing slashes from srcdir.
1432 # Double slashes in file names in object file debugging info
1433 # mess up M-x gdb in Emacs.
1434 case $srcdir in
1435 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1436 esac
1437 for ac_var in $ac_precious_vars; do
1438 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1439 eval ac_env_${ac_var}_value=\$${ac_var}
1440 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1441 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1442 done
1445 # Report the --help message.
1447 if test "$ac_init_help" = "long"; then
1448 # Omit some internal or obsolete options to make the list less imposing.
1449 # This message is too long to be a string in the A/UX 3.1 sh.
1450 cat <<_ACEOF
1451 \`configure' configures PostgreSQL 17devel to adapt to many kinds of systems.
1453 Usage: $0 [OPTION]... [VAR=VALUE]...
1455 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1456 VAR=VALUE. See below for descriptions of some of the useful variables.
1458 Defaults for the options are specified in brackets.
1460 Configuration:
1461 -h, --help display this help and exit
1462 --help=short display options specific to this package
1463 --help=recursive display the short help of all the included packages
1464 -V, --version display version information and exit
1465 -q, --quiet, --silent do not print \`checking ...' messages
1466 --cache-file=FILE cache test results in FILE [disabled]
1467 -C, --config-cache alias for \`--cache-file=config.cache'
1468 -n, --no-create do not create output files
1469 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1471 Installation directories:
1472 --prefix=PREFIX install architecture-independent files in PREFIX
1473 [$ac_default_prefix]
1474 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1475 [PREFIX]
1477 By default, \`make install' will install all the files in
1478 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1479 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1480 for instance \`--prefix=\$HOME'.
1482 For better control, use the options below.
1484 Fine tuning of the installation directories:
1485 --bindir=DIR user executables [EPREFIX/bin]
1486 --sbindir=DIR system admin executables [EPREFIX/sbin]
1487 --libexecdir=DIR program executables [EPREFIX/libexec]
1488 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1489 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1490 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1491 --libdir=DIR object code libraries [EPREFIX/lib]
1492 --includedir=DIR C header files [PREFIX/include]
1493 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1494 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1495 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1496 --infodir=DIR info documentation [DATAROOTDIR/info]
1497 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1498 --mandir=DIR man documentation [DATAROOTDIR/man]
1499 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1500 --htmldir=DIR html documentation [DOCDIR]
1501 --dvidir=DIR dvi documentation [DOCDIR]
1502 --pdfdir=DIR pdf documentation [DOCDIR]
1503 --psdir=DIR ps documentation [DOCDIR]
1504 _ACEOF
1506 cat <<\_ACEOF
1508 System types:
1509 --build=BUILD configure for building on BUILD [guessed]
1510 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1511 _ACEOF
1514 if test -n "$ac_init_help"; then
1515 case $ac_init_help in
1516 short | recursive ) echo "Configuration of PostgreSQL 17devel:";;
1517 esac
1518 cat <<\_ACEOF
1520 Optional Features:
1521 --disable-option-checking ignore unrecognized --enable/--with options
1522 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1523 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1524 --disable-integer-datetimes
1525 obsolete option, no longer supported
1526 --enable-nls[=LANGUAGES]
1527 enable Native Language Support
1528 --disable-rpath do not embed shared library search path in
1529 executables
1530 --disable-spinlocks do not use spinlocks
1531 --disable-atomics do not use atomic operations
1532 --enable-debug build with debugging symbols (-g)
1533 --enable-profiling build with profiling enabled
1534 --enable-coverage build with coverage testing instrumentation
1535 --enable-dtrace build with DTrace support
1536 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1537 --enable-injection-points
1538 enable injection points (for testing)
1539 --enable-depend turn on automatic dependency tracking
1540 --enable-cassert enable assertion checks (for debugging)
1541 --disable-largefile omit support for large files
1543 Optional Packages:
1544 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1545 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1546 --with-extra-version=STRING
1547 append STRING to version
1548 --with-template=NAME override operating system template
1549 --with-includes=DIRS look for additional header files in DIRS
1550 --with-libraries=DIRS look for additional libraries in DIRS
1551 --with-libs=DIRS alternative spelling of --with-libraries
1552 --with-pgport=PORTNUM set default port number [5432]
1553 --with-blocksize=BLOCKSIZE
1554 set table block size in kB [8]
1555 --with-segsize=SEGSIZE set table segment size in GB [1]
1556 --with-segsize-blocks=SEGSIZE_BLOCKS
1557 set table segment size in blocks [0]
1558 --with-wal-blocksize=BLOCKSIZE
1559 set WAL block size in kB [8]
1560 --with-CC=CMD set compiler (deprecated)
1561 --with-llvm build with LLVM based JIT support
1562 --without-icu build without ICU support
1563 --with-tcl build Tcl modules (PL/Tcl)
1564 --with-tclconfig=DIR tclConfig.sh is in DIR
1565 --with-perl build Perl modules (PL/Perl)
1566 --with-python build Python modules (PL/Python)
1567 --with-gssapi build with GSSAPI support
1568 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1569 [postgres]
1570 --with-pam build with PAM support
1571 --with-bsd-auth build with BSD Authentication support
1572 --with-ldap build with LDAP support
1573 --with-bonjour build with Bonjour support
1574 --with-selinux build with SELinux support
1575 --with-systemd build with systemd support
1576 --without-readline do not use GNU Readline nor BSD Libedit for editing
1577 --with-libedit-preferred
1578 prefer BSD Libedit over GNU Readline
1579 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1580 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1581 --with-libxml build with XML support
1582 --with-libxslt use XSLT support when building contrib/xml2
1583 --with-system-tzdata=DIR
1584 use system time zone data in DIR
1585 --without-zlib do not use Zlib
1586 --with-lz4 build with LZ4 support
1587 --with-zstd build with ZSTD support
1588 --with-ssl=LIB use LIB for SSL/TLS support (openssl)
1589 --with-openssl obsolete spelling of --with-ssl=openssl
1591 Some influential environment variables:
1592 CC C compiler command
1593 CFLAGS C compiler flags
1594 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1595 nonstandard directory <lib dir>
1596 LIBS libraries to pass to the linker, e.g. -l<library>
1597 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1598 you have headers in a nonstandard directory <include dir>
1599 CXX C++ compiler command
1600 CXXFLAGS C++ compiler flags
1601 LLVM_CONFIG path to llvm-config command
1602 CLANG path to clang compiler to generate bitcode
1603 CPP C preprocessor
1604 PKG_CONFIG path to pkg-config utility
1605 PKG_CONFIG_PATH
1606 directories to add to pkg-config's search path
1607 PKG_CONFIG_LIBDIR
1608 path overriding pkg-config's built-in search path
1609 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1610 ICU_LIBS linker flags for ICU, overriding pkg-config
1611 XML2_CONFIG path to xml2-config utility
1612 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1613 XML2_LIBS linker flags for XML2, overriding pkg-config
1614 LZ4_CFLAGS C compiler flags for LZ4, overriding pkg-config
1615 LZ4_LIBS linker flags for LZ4, overriding pkg-config
1616 ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
1617 ZSTD_LIBS linker flags for ZSTD, overriding pkg-config
1618 LDFLAGS_EX extra linker flags for linking executables only
1619 LDFLAGS_SL extra linker flags for linking shared libraries only
1620 PERL Perl program
1621 PYTHON Python program
1622 MSGFMT msgfmt program for NLS
1623 TCLSH Tcl interpreter program (tclsh)
1625 Use these variables to override the choices made by `configure' or to help
1626 it to find libraries and programs with nonstandard names/locations.
1628 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1629 PostgreSQL home page: <https://www.postgresql.org/>.
1630 _ACEOF
1631 ac_status=$?
1634 if test "$ac_init_help" = "recursive"; then
1635 # If there are subdirs, report their specific --help.
1636 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1637 test -d "$ac_dir" ||
1638 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1639 continue
1640 ac_builddir=.
1642 case "$ac_dir" in
1643 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1645 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1646 # A ".." for each directory in $ac_dir_suffix.
1647 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1648 case $ac_top_builddir_sub in
1649 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1650 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1651 esac ;;
1652 esac
1653 ac_abs_top_builddir=$ac_pwd
1654 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1655 # for backward compatibility:
1656 ac_top_builddir=$ac_top_build_prefix
1658 case $srcdir in
1659 .) # We are building in place.
1660 ac_srcdir=.
1661 ac_top_srcdir=$ac_top_builddir_sub
1662 ac_abs_top_srcdir=$ac_pwd ;;
1663 [\\/]* | ?:[\\/]* ) # Absolute name.
1664 ac_srcdir=$srcdir$ac_dir_suffix;
1665 ac_top_srcdir=$srcdir
1666 ac_abs_top_srcdir=$srcdir ;;
1667 *) # Relative name.
1668 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1669 ac_top_srcdir=$ac_top_build_prefix$srcdir
1670 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1671 esac
1672 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1674 cd "$ac_dir" || { ac_status=$?; continue; }
1675 # Check for guested configure.
1676 if test -f "$ac_srcdir/configure.gnu"; then
1677 echo &&
1678 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1679 elif test -f "$ac_srcdir/configure"; then
1680 echo &&
1681 $SHELL "$ac_srcdir/configure" --help=recursive
1682 else
1683 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1684 fi || ac_status=$?
1685 cd "$ac_pwd" || { ac_status=$?; break; }
1686 done
1689 test -n "$ac_init_help" && exit $ac_status
1690 if $ac_init_version; then
1691 cat <<\_ACEOF
1692 PostgreSQL configure 17devel
1693 generated by GNU Autoconf 2.69
1695 Copyright (C) 2012 Free Software Foundation, Inc.
1696 This configure script is free software; the Free Software Foundation
1697 gives unlimited permission to copy, distribute and modify it.
1699 Copyright (c) 1996-2024, PostgreSQL Global Development Group
1700 _ACEOF
1701 exit
1704 ## ------------------------ ##
1705 ## Autoconf initialization. ##
1706 ## ------------------------ ##
1708 # ac_fn_c_try_compile LINENO
1709 # --------------------------
1710 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1711 ac_fn_c_try_compile ()
1713 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1714 rm -f conftest.$ac_objext
1715 if { { ac_try="$ac_compile"
1716 case "(($ac_try" in
1717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1718 *) ac_try_echo=$ac_try;;
1719 esac
1720 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1721 $as_echo "$ac_try_echo"; } >&5
1722 (eval "$ac_compile") 2>conftest.err
1723 ac_status=$?
1724 if test -s conftest.err; then
1725 grep -v '^ *+' conftest.err >conftest.er1
1726 cat conftest.er1 >&5
1727 mv -f conftest.er1 conftest.err
1729 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1730 test $ac_status = 0; } && {
1731 test -z "$ac_c_werror_flag" ||
1732 test ! -s conftest.err
1733 } && test -s conftest.$ac_objext; then :
1734 ac_retval=0
1735 else
1736 $as_echo "$as_me: failed program was:" >&5
1737 sed 's/^/| /' conftest.$ac_ext >&5
1739 ac_retval=1
1741 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1742 as_fn_set_status $ac_retval
1744 } # ac_fn_c_try_compile
1746 # ac_fn_cxx_try_compile LINENO
1747 # ----------------------------
1748 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1749 ac_fn_cxx_try_compile ()
1751 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1752 rm -f conftest.$ac_objext
1753 if { { ac_try="$ac_compile"
1754 case "(($ac_try" in
1755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1756 *) ac_try_echo=$ac_try;;
1757 esac
1758 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1759 $as_echo "$ac_try_echo"; } >&5
1760 (eval "$ac_compile") 2>conftest.err
1761 ac_status=$?
1762 if test -s conftest.err; then
1763 grep -v '^ *+' conftest.err >conftest.er1
1764 cat conftest.er1 >&5
1765 mv -f conftest.er1 conftest.err
1767 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1768 test $ac_status = 0; } && {
1769 test -z "$ac_cxx_werror_flag" ||
1770 test ! -s conftest.err
1771 } && test -s conftest.$ac_objext; then :
1772 ac_retval=0
1773 else
1774 $as_echo "$as_me: failed program was:" >&5
1775 sed 's/^/| /' conftest.$ac_ext >&5
1777 ac_retval=1
1779 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1780 as_fn_set_status $ac_retval
1782 } # ac_fn_cxx_try_compile
1784 # ac_fn_c_try_link LINENO
1785 # -----------------------
1786 # Try to link conftest.$ac_ext, and return whether this succeeded.
1787 ac_fn_c_try_link ()
1789 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1790 rm -f conftest.$ac_objext conftest$ac_exeext
1791 if { { ac_try="$ac_link"
1792 case "(($ac_try" in
1793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1794 *) ac_try_echo=$ac_try;;
1795 esac
1796 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1797 $as_echo "$ac_try_echo"; } >&5
1798 (eval "$ac_link") 2>conftest.err
1799 ac_status=$?
1800 if test -s conftest.err; then
1801 grep -v '^ *+' conftest.err >conftest.er1
1802 cat conftest.er1 >&5
1803 mv -f conftest.er1 conftest.err
1805 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1806 test $ac_status = 0; } && {
1807 test -z "$ac_c_werror_flag" ||
1808 test ! -s conftest.err
1809 } && test -s conftest$ac_exeext && {
1810 test "$cross_compiling" = yes ||
1811 test -x conftest$ac_exeext
1812 }; then :
1813 ac_retval=0
1814 else
1815 $as_echo "$as_me: failed program was:" >&5
1816 sed 's/^/| /' conftest.$ac_ext >&5
1818 ac_retval=1
1820 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1821 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1822 # interfere with the next link command; also delete a directory that is
1823 # left behind by Apple's compiler. We do this before executing the actions.
1824 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1825 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1826 as_fn_set_status $ac_retval
1828 } # ac_fn_c_try_link
1830 # ac_fn_c_try_cpp LINENO
1831 # ----------------------
1832 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1833 ac_fn_c_try_cpp ()
1835 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1836 if { { ac_try="$ac_cpp conftest.$ac_ext"
1837 case "(($ac_try" in
1838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1839 *) ac_try_echo=$ac_try;;
1840 esac
1841 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1842 $as_echo "$ac_try_echo"; } >&5
1843 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1844 ac_status=$?
1845 if test -s conftest.err; then
1846 grep -v '^ *+' conftest.err >conftest.er1
1847 cat conftest.er1 >&5
1848 mv -f conftest.er1 conftest.err
1850 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1851 test $ac_status = 0; } > conftest.i && {
1852 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1853 test ! -s conftest.err
1854 }; then :
1855 ac_retval=0
1856 else
1857 $as_echo "$as_me: failed program was:" >&5
1858 sed 's/^/| /' conftest.$ac_ext >&5
1860 ac_retval=1
1862 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1863 as_fn_set_status $ac_retval
1865 } # ac_fn_c_try_cpp
1867 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1868 # -------------------------------------------------------
1869 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1870 # the include files in INCLUDES and setting the cache variable VAR
1871 # accordingly.
1872 ac_fn_c_check_header_mongrel ()
1874 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1875 if eval \${$3+:} false; then :
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1877 $as_echo_n "checking for $2... " >&6; }
1878 if eval \${$3+:} false; then :
1879 $as_echo_n "(cached) " >&6
1881 eval ac_res=\$$3
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1883 $as_echo "$ac_res" >&6; }
1884 else
1885 # Is the header compilable?
1886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1887 $as_echo_n "checking $2 usability... " >&6; }
1888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1889 /* end confdefs.h. */
1891 #include <$2>
1892 _ACEOF
1893 if ac_fn_c_try_compile "$LINENO"; then :
1894 ac_header_compiler=yes
1895 else
1896 ac_header_compiler=no
1898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1900 $as_echo "$ac_header_compiler" >&6; }
1902 # Is the header present?
1903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1904 $as_echo_n "checking $2 presence... " >&6; }
1905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1906 /* end confdefs.h. */
1907 #include <$2>
1908 _ACEOF
1909 if ac_fn_c_try_cpp "$LINENO"; then :
1910 ac_header_preproc=yes
1911 else
1912 ac_header_preproc=no
1914 rm -f conftest.err conftest.i conftest.$ac_ext
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1916 $as_echo "$ac_header_preproc" >&6; }
1918 # So? What about this header?
1919 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1920 yes:no: )
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1922 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1924 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1926 no:yes:* )
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1928 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1930 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1932 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1934 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1936 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1937 ( $as_echo "## ---------------------------------------------- ##
1938 ## Report this to pgsql-bugs@lists.postgresql.org ##
1939 ## ---------------------------------------------- ##"
1940 ) | sed "s/^/$as_me: WARNING: /" >&2
1942 esac
1943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1944 $as_echo_n "checking for $2... " >&6; }
1945 if eval \${$3+:} false; then :
1946 $as_echo_n "(cached) " >&6
1947 else
1948 eval "$3=\$ac_header_compiler"
1950 eval ac_res=\$$3
1951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1952 $as_echo "$ac_res" >&6; }
1954 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1956 } # ac_fn_c_check_header_mongrel
1958 # ac_fn_c_try_run LINENO
1959 # ----------------------
1960 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1961 # that executables *can* be run.
1962 ac_fn_c_try_run ()
1964 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1965 if { { ac_try="$ac_link"
1966 case "(($ac_try" in
1967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1968 *) ac_try_echo=$ac_try;;
1969 esac
1970 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1971 $as_echo "$ac_try_echo"; } >&5
1972 (eval "$ac_link") 2>&5
1973 ac_status=$?
1974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1975 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1976 { { case "(($ac_try" in
1977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1978 *) ac_try_echo=$ac_try;;
1979 esac
1980 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1981 $as_echo "$ac_try_echo"; } >&5
1982 (eval "$ac_try") 2>&5
1983 ac_status=$?
1984 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1985 test $ac_status = 0; }; }; then :
1986 ac_retval=0
1987 else
1988 $as_echo "$as_me: program exited with status $ac_status" >&5
1989 $as_echo "$as_me: failed program was:" >&5
1990 sed 's/^/| /' conftest.$ac_ext >&5
1992 ac_retval=$ac_status
1994 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1995 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1996 as_fn_set_status $ac_retval
1998 } # ac_fn_c_try_run
2000 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2001 # -------------------------------------------------------
2002 # Tests whether HEADER exists and can be compiled using the include files in
2003 # INCLUDES, setting the cache variable VAR accordingly.
2004 ac_fn_c_check_header_compile ()
2006 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2008 $as_echo_n "checking for $2... " >&6; }
2009 if eval \${$3+:} false; then :
2010 $as_echo_n "(cached) " >&6
2011 else
2012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013 /* end confdefs.h. */
2015 #include <$2>
2016 _ACEOF
2017 if ac_fn_c_try_compile "$LINENO"; then :
2018 eval "$3=yes"
2019 else
2020 eval "$3=no"
2022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2024 eval ac_res=\$$3
2025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2026 $as_echo "$ac_res" >&6; }
2027 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2029 } # ac_fn_c_check_header_compile
2031 # ac_fn_c_check_func LINENO FUNC VAR
2032 # ----------------------------------
2033 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2034 ac_fn_c_check_func ()
2036 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2038 $as_echo_n "checking for $2... " >&6; }
2039 if eval \${$3+:} false; then :
2040 $as_echo_n "(cached) " >&6
2041 else
2042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043 /* end confdefs.h. */
2044 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2045 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2046 #define $2 innocuous_$2
2048 /* System header to define __stub macros and hopefully few prototypes,
2049 which can conflict with char $2 (); below.
2050 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2051 <limits.h> exists even on freestanding compilers. */
2053 #ifdef __STDC__
2054 # include <limits.h>
2055 #else
2056 # include <assert.h>
2057 #endif
2059 #undef $2
2061 /* Override any GCC internal prototype to avoid an error.
2062 Use char because int might match the return type of a GCC
2063 builtin and then its argument prototype would still apply. */
2064 #ifdef __cplusplus
2065 extern "C"
2066 #endif
2067 char $2 ();
2068 /* The GNU C library defines this for functions which it implements
2069 to always fail with ENOSYS. Some functions are actually named
2070 something starting with __ and the normal name is an alias. */
2071 #if defined __stub_$2 || defined __stub___$2
2072 choke me
2073 #endif
2076 main ()
2078 return $2 ();
2080 return 0;
2082 _ACEOF
2083 if ac_fn_c_try_link "$LINENO"; then :
2084 eval "$3=yes"
2085 else
2086 eval "$3=no"
2088 rm -f core conftest.err conftest.$ac_objext \
2089 conftest$ac_exeext conftest.$ac_ext
2091 eval ac_res=\$$3
2092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2093 $as_echo "$ac_res" >&6; }
2094 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2096 } # ac_fn_c_check_func
2098 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2099 # -------------------------------------------
2100 # Tests whether TYPE exists after having included INCLUDES, setting cache
2101 # variable VAR accordingly.
2102 ac_fn_c_check_type ()
2104 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2106 $as_echo_n "checking for $2... " >&6; }
2107 if eval \${$3+:} false; then :
2108 $as_echo_n "(cached) " >&6
2109 else
2110 eval "$3=no"
2111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2112 /* end confdefs.h. */
2115 main ()
2117 if (sizeof ($2))
2118 return 0;
2120 return 0;
2122 _ACEOF
2123 if ac_fn_c_try_compile "$LINENO"; then :
2124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125 /* end confdefs.h. */
2128 main ()
2130 if (sizeof (($2)))
2131 return 0;
2133 return 0;
2135 _ACEOF
2136 if ac_fn_c_try_compile "$LINENO"; then :
2138 else
2139 eval "$3=yes"
2141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145 eval ac_res=\$$3
2146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2147 $as_echo "$ac_res" >&6; }
2148 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2150 } # ac_fn_c_check_type
2152 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2153 # ----------------------------------------------------
2154 # Tries to find if the field MEMBER exists in type AGGR, after including
2155 # INCLUDES, setting cache variable VAR accordingly.
2156 ac_fn_c_check_member ()
2158 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2160 $as_echo_n "checking for $2.$3... " >&6; }
2161 if eval \${$4+:} false; then :
2162 $as_echo_n "(cached) " >&6
2163 else
2164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2165 /* end confdefs.h. */
2168 main ()
2170 static $2 ac_aggr;
2171 if (ac_aggr.$3)
2172 return 0;
2174 return 0;
2176 _ACEOF
2177 if ac_fn_c_try_compile "$LINENO"; then :
2178 eval "$4=yes"
2179 else
2180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181 /* end confdefs.h. */
2184 main ()
2186 static $2 ac_aggr;
2187 if (sizeof ac_aggr.$3)
2188 return 0;
2190 return 0;
2192 _ACEOF
2193 if ac_fn_c_try_compile "$LINENO"; then :
2194 eval "$4=yes"
2195 else
2196 eval "$4=no"
2198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2202 eval ac_res=\$$4
2203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2204 $as_echo "$ac_res" >&6; }
2205 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2207 } # ac_fn_c_check_member
2209 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2210 # --------------------------------------------
2211 # Tries to find the compile-time value of EXPR in a program that includes
2212 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2213 # computed
2214 ac_fn_c_compute_int ()
2216 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2217 if test "$cross_compiling" = yes; then
2218 # Depending upon the size, compute the lo and hi bounds.
2219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2220 /* end confdefs.h. */
2223 main ()
2225 static int test_array [1 - 2 * !(($2) >= 0)];
2226 test_array [0] = 0;
2227 return test_array [0];
2230 return 0;
2232 _ACEOF
2233 if ac_fn_c_try_compile "$LINENO"; then :
2234 ac_lo=0 ac_mid=0
2235 while :; do
2236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2237 /* end confdefs.h. */
2240 main ()
2242 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2243 test_array [0] = 0;
2244 return test_array [0];
2247 return 0;
2249 _ACEOF
2250 if ac_fn_c_try_compile "$LINENO"; then :
2251 ac_hi=$ac_mid; break
2252 else
2253 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2254 if test $ac_lo -le $ac_mid; then
2255 ac_lo= ac_hi=
2256 break
2258 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2261 done
2262 else
2263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2264 /* end confdefs.h. */
2267 main ()
2269 static int test_array [1 - 2 * !(($2) < 0)];
2270 test_array [0] = 0;
2271 return test_array [0];
2274 return 0;
2276 _ACEOF
2277 if ac_fn_c_try_compile "$LINENO"; then :
2278 ac_hi=-1 ac_mid=-1
2279 while :; do
2280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2281 /* end confdefs.h. */
2284 main ()
2286 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2287 test_array [0] = 0;
2288 return test_array [0];
2291 return 0;
2293 _ACEOF
2294 if ac_fn_c_try_compile "$LINENO"; then :
2295 ac_lo=$ac_mid; break
2296 else
2297 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2298 if test $ac_mid -le $ac_hi; then
2299 ac_lo= ac_hi=
2300 break
2302 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2305 done
2306 else
2307 ac_lo= ac_hi=
2309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2312 # Binary search between lo and hi bounds.
2313 while test "x$ac_lo" != "x$ac_hi"; do
2314 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316 /* end confdefs.h. */
2319 main ()
2321 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2322 test_array [0] = 0;
2323 return test_array [0];
2326 return 0;
2328 _ACEOF
2329 if ac_fn_c_try_compile "$LINENO"; then :
2330 ac_hi=$ac_mid
2331 else
2332 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2335 done
2336 case $ac_lo in #((
2337 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2338 '') ac_retval=1 ;;
2339 esac
2340 else
2341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2342 /* end confdefs.h. */
2344 static long int longval () { return $2; }
2345 static unsigned long int ulongval () { return $2; }
2346 #include <stdio.h>
2347 #include <stdlib.h>
2349 main ()
2352 FILE *f = fopen ("conftest.val", "w");
2353 if (! f)
2354 return 1;
2355 if (($2) < 0)
2357 long int i = longval ();
2358 if (i != ($2))
2359 return 1;
2360 fprintf (f, "%ld", i);
2362 else
2364 unsigned long int i = ulongval ();
2365 if (i != ($2))
2366 return 1;
2367 fprintf (f, "%lu", i);
2369 /* Do not output a trailing newline, as this causes \r\n confusion
2370 on some platforms. */
2371 return ferror (f) || fclose (f) != 0;
2374 return 0;
2376 _ACEOF
2377 if ac_fn_c_try_run "$LINENO"; then :
2378 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2379 else
2380 ac_retval=1
2382 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2383 conftest.$ac_objext conftest.beam conftest.$ac_ext
2384 rm -f conftest.val
2387 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2388 as_fn_set_status $ac_retval
2390 } # ac_fn_c_compute_int
2392 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2393 # ---------------------------------------------
2394 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2395 # accordingly.
2396 ac_fn_c_check_decl ()
2398 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2399 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2400 as_decl_name=`echo $2|sed 's/ *(.*//'`
2401 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2403 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2404 if eval \${$3+:} false; then :
2405 $as_echo_n "(cached) " >&6
2406 else
2407 ac_save_werror_flag=$ac_c_werror_flag
2408 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2410 /* end confdefs.h. */
2413 main ()
2415 #ifndef $as_decl_name
2416 #ifdef __cplusplus
2417 (void) $as_decl_use;
2418 #else
2419 (void) $as_decl_name;
2420 #endif
2421 #endif
2424 return 0;
2426 _ACEOF
2427 if ac_fn_c_try_compile "$LINENO"; then :
2428 eval "$3=yes"
2429 else
2430 eval "$3=no"
2432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2433 ac_c_werror_flag=$ac_save_werror_flag
2435 eval ac_res=\$$3
2436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2437 $as_echo "$ac_res" >&6; }
2438 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2440 } # ac_fn_c_check_decl
2441 cat >config.log <<_ACEOF
2442 This file contains any messages produced by compilers while
2443 running configure, to aid debugging if configure makes a mistake.
2445 It was created by PostgreSQL $as_me 17devel, which was
2446 generated by GNU Autoconf 2.69. Invocation command line was
2448 $ $0 $@
2450 _ACEOF
2451 exec 5>>config.log
2453 cat <<_ASUNAME
2454 ## --------- ##
2455 ## Platform. ##
2456 ## --------- ##
2458 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2459 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2460 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2461 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2462 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2464 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2465 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2467 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2468 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2469 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2470 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2471 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2472 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2473 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2475 _ASUNAME
2477 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2478 for as_dir in $PATH
2480 IFS=$as_save_IFS
2481 test -z "$as_dir" && as_dir=.
2482 $as_echo "PATH: $as_dir"
2483 done
2484 IFS=$as_save_IFS
2486 } >&5
2488 cat >&5 <<_ACEOF
2491 ## ----------- ##
2492 ## Core tests. ##
2493 ## ----------- ##
2495 _ACEOF
2498 # Keep a trace of the command line.
2499 # Strip out --no-create and --no-recursion so they do not pile up.
2500 # Strip out --silent because we don't want to record it for future runs.
2501 # Also quote any args containing shell meta-characters.
2502 # Make two passes to allow for proper duplicate-argument suppression.
2503 ac_configure_args=
2504 ac_configure_args0=
2505 ac_configure_args1=
2506 ac_must_keep_next=false
2507 for ac_pass in 1 2
2509 for ac_arg
2511 case $ac_arg in
2512 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2513 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2514 | -silent | --silent | --silen | --sile | --sil)
2515 continue ;;
2516 *\'*)
2517 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2518 esac
2519 case $ac_pass in
2520 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2522 as_fn_append ac_configure_args1 " '$ac_arg'"
2523 if test $ac_must_keep_next = true; then
2524 ac_must_keep_next=false # Got value, back to normal.
2525 else
2526 case $ac_arg in
2527 *=* | --config-cache | -C | -disable-* | --disable-* \
2528 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2529 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2530 | -with-* | --with-* | -without-* | --without-* | --x)
2531 case "$ac_configure_args0 " in
2532 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2533 esac
2535 -* ) ac_must_keep_next=true ;;
2536 esac
2538 as_fn_append ac_configure_args " '$ac_arg'"
2540 esac
2541 done
2542 done
2543 { ac_configure_args0=; unset ac_configure_args0;}
2544 { ac_configure_args1=; unset ac_configure_args1;}
2546 # When interrupted or exit'd, cleanup temporary files, and complete
2547 # config.log. We remove comments because anyway the quotes in there
2548 # would cause problems or look ugly.
2549 # WARNING: Use '\'' to represent an apostrophe within the trap.
2550 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2551 trap 'exit_status=$?
2552 # Save into config.log some information that might help in debugging.
2554 echo
2556 $as_echo "## ---------------- ##
2557 ## Cache variables. ##
2558 ## ---------------- ##"
2559 echo
2560 # The following way of writing the cache mishandles newlines in values,
2562 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2563 eval ac_val=\$$ac_var
2564 case $ac_val in #(
2565 *${as_nl}*)
2566 case $ac_var in #(
2567 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2568 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2569 esac
2570 case $ac_var in #(
2571 _ | IFS | as_nl) ;; #(
2572 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2573 *) { eval $ac_var=; unset $ac_var;} ;;
2574 esac ;;
2575 esac
2576 done
2577 (set) 2>&1 |
2578 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2579 *${as_nl}ac_space=\ *)
2580 sed -n \
2581 "s/'\''/'\''\\\\'\'''\''/g;
2582 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2583 ;; #(
2585 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2587 esac |
2588 sort
2590 echo
2592 $as_echo "## ----------------- ##
2593 ## Output variables. ##
2594 ## ----------------- ##"
2595 echo
2596 for ac_var in $ac_subst_vars
2598 eval ac_val=\$$ac_var
2599 case $ac_val in
2600 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2601 esac
2602 $as_echo "$ac_var='\''$ac_val'\''"
2603 done | sort
2604 echo
2606 if test -n "$ac_subst_files"; then
2607 $as_echo "## ------------------- ##
2608 ## File substitutions. ##
2609 ## ------------------- ##"
2610 echo
2611 for ac_var in $ac_subst_files
2613 eval ac_val=\$$ac_var
2614 case $ac_val in
2615 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2616 esac
2617 $as_echo "$ac_var='\''$ac_val'\''"
2618 done | sort
2619 echo
2622 if test -s confdefs.h; then
2623 $as_echo "## ----------- ##
2624 ## confdefs.h. ##
2625 ## ----------- ##"
2626 echo
2627 cat confdefs.h
2628 echo
2630 test "$ac_signal" != 0 &&
2631 $as_echo "$as_me: caught signal $ac_signal"
2632 $as_echo "$as_me: exit $exit_status"
2633 } >&5
2634 rm -f core *.core core.conftest.* &&
2635 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2636 exit $exit_status
2638 for ac_signal in 1 2 13 15; do
2639 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2640 done
2641 ac_signal=0
2643 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2644 rm -f -r conftest* confdefs.h
2646 $as_echo "/* confdefs.h */" > confdefs.h
2648 # Predefined preprocessor variables.
2650 cat >>confdefs.h <<_ACEOF
2651 #define PACKAGE_NAME "$PACKAGE_NAME"
2652 _ACEOF
2654 cat >>confdefs.h <<_ACEOF
2655 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2656 _ACEOF
2658 cat >>confdefs.h <<_ACEOF
2659 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2660 _ACEOF
2662 cat >>confdefs.h <<_ACEOF
2663 #define PACKAGE_STRING "$PACKAGE_STRING"
2664 _ACEOF
2666 cat >>confdefs.h <<_ACEOF
2667 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2668 _ACEOF
2670 cat >>confdefs.h <<_ACEOF
2671 #define PACKAGE_URL "$PACKAGE_URL"
2672 _ACEOF
2675 # Let the site file select an alternate cache file if it wants to.
2676 # Prefer an explicitly selected file to automatically selected ones.
2677 ac_site_file1=NONE
2678 ac_site_file2=NONE
2679 if test -n "$CONFIG_SITE"; then
2680 # We do not want a PATH search for config.site.
2681 case $CONFIG_SITE in #((
2682 -*) ac_site_file1=./$CONFIG_SITE;;
2683 */*) ac_site_file1=$CONFIG_SITE;;
2684 *) ac_site_file1=./$CONFIG_SITE;;
2685 esac
2686 elif test "x$prefix" != xNONE; then
2687 ac_site_file1=$prefix/share/config.site
2688 ac_site_file2=$prefix/etc/config.site
2689 else
2690 ac_site_file1=$ac_default_prefix/share/config.site
2691 ac_site_file2=$ac_default_prefix/etc/config.site
2693 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2695 test "x$ac_site_file" = xNONE && continue
2696 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2697 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2698 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2699 sed 's/^/| /' "$ac_site_file" >&5
2700 . "$ac_site_file" \
2701 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2702 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2703 as_fn_error $? "failed to load site script $ac_site_file
2704 See \`config.log' for more details" "$LINENO" 5; }
2706 done
2708 if test -r "$cache_file"; then
2709 # Some versions of bash will fail to source /dev/null (special files
2710 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2711 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2713 $as_echo "$as_me: loading cache $cache_file" >&6;}
2714 case $cache_file in
2715 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2716 *) . "./$cache_file";;
2717 esac
2719 else
2720 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2721 $as_echo "$as_me: creating cache $cache_file" >&6;}
2722 >$cache_file
2725 # Check that the precious variables saved in the cache have kept the same
2726 # value.
2727 ac_cache_corrupted=false
2728 for ac_var in $ac_precious_vars; do
2729 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2730 eval ac_new_set=\$ac_env_${ac_var}_set
2731 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2732 eval ac_new_val=\$ac_env_${ac_var}_value
2733 case $ac_old_set,$ac_new_set in
2734 set,)
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2736 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2737 ac_cache_corrupted=: ;;
2738 ,set)
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2740 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2741 ac_cache_corrupted=: ;;
2742 ,);;
2744 if test "x$ac_old_val" != "x$ac_new_val"; then
2745 # differences in whitespace do not lead to failure.
2746 ac_old_val_w=`echo x $ac_old_val`
2747 ac_new_val_w=`echo x $ac_new_val`
2748 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2750 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2751 ac_cache_corrupted=:
2752 else
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2754 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2755 eval $ac_var=\$ac_old_val
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2758 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2760 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2761 fi;;
2762 esac
2763 # Pass precious variables to config.status.
2764 if test "$ac_new_set" = set; then
2765 case $ac_new_val in
2766 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2767 *) ac_arg=$ac_var=$ac_new_val ;;
2768 esac
2769 case " $ac_configure_args " in
2770 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2771 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2772 esac
2774 done
2775 if $ac_cache_corrupted; then
2776 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2777 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2779 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2780 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2782 ## -------------------- ##
2783 ## Main body of script. ##
2784 ## -------------------- ##
2786 ac_ext=c
2787 ac_cpp='$CPP $CPPFLAGS'
2788 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2789 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2790 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2797 ac_aux_dir=
2798 for ac_dir in config "$srcdir"/config; do
2799 if test -f "$ac_dir/install-sh"; then
2800 ac_aux_dir=$ac_dir
2801 ac_install_sh="$ac_aux_dir/install-sh -c"
2802 break
2803 elif test -f "$ac_dir/install.sh"; then
2804 ac_aux_dir=$ac_dir
2805 ac_install_sh="$ac_aux_dir/install.sh -c"
2806 break
2807 elif test -f "$ac_dir/shtool"; then
2808 ac_aux_dir=$ac_dir
2809 ac_install_sh="$ac_aux_dir/shtool install -c"
2810 break
2812 done
2813 if test -z "$ac_aux_dir"; then
2814 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2817 # These three variables are undocumented and unsupported,
2818 # and are intended to be withdrawn in a future Autoconf release.
2819 # They can cause serious problems if a builder's source tree is in a directory
2820 # whose full name contains unusual characters.
2821 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2822 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2823 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2828 cat >>confdefs.h <<_ACEOF
2829 #define CONFIGURE_ARGS "$ac_configure_args"
2830 _ACEOF
2833 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2834 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2835 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2838 cat >>confdefs.h <<_ACEOF
2839 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2840 _ACEOF
2843 cat >>confdefs.h <<_ACEOF
2844 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2845 _ACEOF
2848 cat >>confdefs.h <<_ACEOF
2849 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2850 _ACEOF
2856 # Check whether --with-extra-version was given.
2857 if test "${with_extra_version+set}" = set; then :
2858 withval=$with_extra_version;
2859 case $withval in
2860 yes)
2861 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2864 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2867 PG_VERSION="$PACKAGE_VERSION$withval"
2869 esac
2871 else
2872 PG_VERSION="$PACKAGE_VERSION"
2877 cat >>confdefs.h <<_ACEOF
2878 #define PG_VERSION "$PG_VERSION"
2879 _ACEOF
2882 # Make sure we can run config.sub.
2883 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2884 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2887 $as_echo_n "checking build system type... " >&6; }
2888 if ${ac_cv_build+:} false; then :
2889 $as_echo_n "(cached) " >&6
2890 else
2891 ac_build_alias=$build_alias
2892 test "x$ac_build_alias" = x &&
2893 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2894 test "x$ac_build_alias" = x &&
2895 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2896 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2897 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2901 $as_echo "$ac_cv_build" >&6; }
2902 case $ac_cv_build in
2903 *-*-*) ;;
2904 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2905 esac
2906 build=$ac_cv_build
2907 ac_save_IFS=$IFS; IFS='-'
2908 set x $ac_cv_build
2909 shift
2910 build_cpu=$1
2911 build_vendor=$2
2912 shift; shift
2913 # Remember, the first character of IFS is used to create $*,
2914 # except with old shells:
2915 build_os=$*
2916 IFS=$ac_save_IFS
2917 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2921 $as_echo_n "checking host system type... " >&6; }
2922 if ${ac_cv_host+:} false; then :
2923 $as_echo_n "(cached) " >&6
2924 else
2925 if test "x$host_alias" = x; then
2926 ac_cv_host=$ac_cv_build
2927 else
2928 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2929 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2934 $as_echo "$ac_cv_host" >&6; }
2935 case $ac_cv_host in
2936 *-*-*) ;;
2937 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2938 esac
2939 host=$ac_cv_host
2940 ac_save_IFS=$IFS; IFS='-'
2941 set x $ac_cv_host
2942 shift
2943 host_cpu=$1
2944 host_vendor=$2
2945 shift; shift
2946 # Remember, the first character of IFS is used to create $*,
2947 # except with old shells:
2948 host_os=$*
2949 IFS=$ac_save_IFS
2950 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2954 template=
2955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2956 $as_echo_n "checking which template to use... " >&6; }
2961 # Check whether --with-template was given.
2962 if test "${with_template+set}" = set; then :
2963 withval=$with_template;
2964 case $withval in
2965 yes)
2966 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2969 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2973 case $withval in
2974 list) echo; ls "$srcdir/src/template"; exit;;
2975 *) if test -f "$srcdir/src/template/$with_template" ; then
2976 template=$withval
2977 else
2978 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2979 fi;;
2980 esac
2983 esac
2985 else
2987 # --with-template not given
2989 case $host_os in
2990 aix*) template=aix ;;
2991 cygwin*|msys*) template=cygwin ;;
2992 darwin*) template=darwin ;;
2993 dragonfly*) template=netbsd ;;
2994 freebsd*) template=freebsd ;;
2995 linux*|gnu*|k*bsd*-gnu)
2996 template=linux ;;
2997 mingw*) template=win32 ;;
2998 netbsd*) template=netbsd ;;
2999 openbsd*) template=openbsd ;;
3000 solaris*) template=solaris ;;
3001 esac
3003 if test x"$template" = x"" ; then
3004 as_fn_error $? "
3005 *******************************************************************
3006 PostgreSQL has apparently not been ported to your platform yet.
3007 To try a manual configuration, look into the src/template directory
3008 for a similar platform and use the '--with-template=' option.
3010 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
3011 rectifying this. Include the above 'checking host system type...'
3012 line.
3013 *******************************************************************
3014 " "$LINENO" 5
3022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3023 $as_echo "$template" >&6; }
3025 PORTNAME=$template
3028 # Initialize default assumption that we do not need separate assembly code
3029 # for TAS (test-and-set). This can be overridden by the template file
3030 # when it's executed.
3031 need_tas=no
3032 tas_file=dummy.s
3034 # Default, works for most platforms, override in template file if needed
3035 DLSUFFIX=".so"
3040 ## Command line options
3044 # Add non-standard directories to the include path
3049 # Check whether --with-includes was given.
3050 if test "${with_includes+set}" = set; then :
3051 withval=$with_includes;
3052 case $withval in
3053 yes)
3054 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3057 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3062 esac
3070 # Add non-standard directories to the library search path
3075 # Check whether --with-libraries was given.
3076 if test "${with_libraries+set}" = set; then :
3077 withval=$with_libraries;
3078 case $withval in
3079 yes)
3080 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3083 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3086 LIBRARY_DIRS=$withval
3088 esac
3097 # Check whether --with-libs was given.
3098 if test "${with_libs+set}" = set; then :
3099 withval=$with_libs;
3100 case $withval in
3101 yes)
3102 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3105 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3108 LIBRARY_DIRS=$withval
3110 esac
3118 # 64-bit integer date/time storage is now the only option, but to avoid
3119 # unnecessary breakage of build scripts, continue to accept an explicit
3120 # "--enable-integer-datetimes" switch.
3124 # Check whether --enable-integer-datetimes was given.
3125 if test "${enable_integer_datetimes+set}" = set; then :
3126 enableval=$enable_integer_datetimes;
3127 case $enableval in
3128 yes)
3132 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3135 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3137 esac
3139 else
3140 enable_integer_datetimes=yes
3148 # NLS
3150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3151 $as_echo_n "checking whether NLS is wanted... " >&6; }
3154 # Check whether --enable-nls was given.
3155 if test "${enable_nls+set}" = set; then :
3156 enableval=$enable_nls;
3157 case $enableval in
3158 yes)
3165 enable_nls=yes
3166 WANTED_LANGUAGES=$enableval
3168 esac
3170 else
3171 enable_nls=no
3176 if test "$enable_nls" = yes; then
3178 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3183 $as_echo "$enable_nls" >&6; }
3188 # Default port number (--with-pgport), default 5432
3190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3191 $as_echo_n "checking for default port number... " >&6; }
3195 # Check whether --with-pgport was given.
3196 if test "${with_pgport+set}" = set; then :
3197 withval=$with_pgport;
3198 case $withval in
3199 yes)
3200 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3203 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3206 default_port=$withval
3208 esac
3210 else
3211 default_port=5432
3215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3216 $as_echo "$default_port" >&6; }
3217 # Need both of these because some places want an integer and some a string
3219 cat >>confdefs.h <<_ACEOF
3220 #define DEF_PGPORT ${default_port}
3221 _ACEOF
3224 cat >>confdefs.h <<_ACEOF
3225 #define DEF_PGPORT_STR "${default_port}"
3226 _ACEOF
3230 # It's worth validating port; you can get very confusing errors otherwise
3231 if test x"$default_port" = x""; then
3232 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3233 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3234 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3235 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3236 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3237 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3238 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3242 # '-rpath'-like feature can be disabled
3246 # Check whether --enable-rpath was given.
3247 if test "${enable_rpath+set}" = set; then :
3248 enableval=$enable_rpath;
3249 case $enableval in
3250 yes)
3257 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3259 esac
3261 else
3262 enable_rpath=yes
3270 # Spinlocks
3274 # Check whether --enable-spinlocks was given.
3275 if test "${enable_spinlocks+set}" = set; then :
3276 enableval=$enable_spinlocks;
3277 case $enableval in
3278 yes)
3285 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3287 esac
3289 else
3290 enable_spinlocks=yes
3297 # Atomic operations
3301 # Check whether --enable-atomics was given.
3302 if test "${enable_atomics+set}" = set; then :
3303 enableval=$enable_atomics;
3304 case $enableval in
3305 yes)
3312 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3314 esac
3316 else
3317 enable_atomics=yes
3324 # --enable-debug adds -g to compiler flags
3328 # Check whether --enable-debug was given.
3329 if test "${enable_debug+set}" = set; then :
3330 enableval=$enable_debug;
3331 case $enableval in
3332 yes)
3339 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3341 esac
3343 else
3344 enable_debug=no
3352 # --enable-profiling enables gcc profiling
3356 # Check whether --enable-profiling was given.
3357 if test "${enable_profiling+set}" = set; then :
3358 enableval=$enable_profiling;
3359 case $enableval in
3360 yes)
3367 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3369 esac
3371 else
3372 enable_profiling=no
3379 # --enable-coverage enables generation of code coverage metrics with gcov
3383 # Check whether --enable-coverage was given.
3384 if test "${enable_coverage+set}" = set; then :
3385 enableval=$enable_coverage;
3386 case $enableval in
3387 yes)
3388 if test -z "$GCOV"; then
3389 for ac_prog in gcov
3391 # Extract the first word of "$ac_prog", so it can be a program name with args.
3392 set dummy $ac_prog; ac_word=$2
3393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3394 $as_echo_n "checking for $ac_word... " >&6; }
3395 if ${ac_cv_path_GCOV+:} false; then :
3396 $as_echo_n "(cached) " >&6
3397 else
3398 case $GCOV in
3399 [\\/]* | ?:[\\/]*)
3400 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3403 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3404 for as_dir in $PATH
3406 IFS=$as_save_IFS
3407 test -z "$as_dir" && as_dir=.
3408 for ac_exec_ext in '' $ac_executable_extensions; do
3409 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3410 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3411 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3412 break 2
3414 done
3415 done
3416 IFS=$as_save_IFS
3419 esac
3421 GCOV=$ac_cv_path_GCOV
3422 if test -n "$GCOV"; then
3423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3424 $as_echo "$GCOV" >&6; }
3425 else
3426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3427 $as_echo "no" >&6; }
3431 test -n "$GCOV" && break
3432 done
3434 else
3435 # Report the value of GCOV in configure's output in all cases.
3436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3437 $as_echo_n "checking for GCOV... " >&6; }
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3439 $as_echo "$GCOV" >&6; }
3442 if test -z "$GCOV"; then
3443 as_fn_error $? "gcov not found" "$LINENO" 5
3445 if test -z "$LCOV"; then
3446 for ac_prog in lcov
3448 # Extract the first word of "$ac_prog", so it can be a program name with args.
3449 set dummy $ac_prog; ac_word=$2
3450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3451 $as_echo_n "checking for $ac_word... " >&6; }
3452 if ${ac_cv_path_LCOV+:} false; then :
3453 $as_echo_n "(cached) " >&6
3454 else
3455 case $LCOV in
3456 [\\/]* | ?:[\\/]*)
3457 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3461 for as_dir in $PATH
3463 IFS=$as_save_IFS
3464 test -z "$as_dir" && as_dir=.
3465 for ac_exec_ext in '' $ac_executable_extensions; do
3466 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3467 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3468 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3469 break 2
3471 done
3472 done
3473 IFS=$as_save_IFS
3476 esac
3478 LCOV=$ac_cv_path_LCOV
3479 if test -n "$LCOV"; then
3480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3481 $as_echo "$LCOV" >&6; }
3482 else
3483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3484 $as_echo "no" >&6; }
3488 test -n "$LCOV" && break
3489 done
3491 else
3492 # Report the value of LCOV in configure's output in all cases.
3493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3494 $as_echo_n "checking for LCOV... " >&6; }
3495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3496 $as_echo "$LCOV" >&6; }
3499 if test -z "$LCOV"; then
3500 as_fn_error $? "lcov not found" "$LINENO" 5
3502 if test -z "$GENHTML"; then
3503 for ac_prog in genhtml
3505 # Extract the first word of "$ac_prog", so it can be a program name with args.
3506 set dummy $ac_prog; ac_word=$2
3507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3508 $as_echo_n "checking for $ac_word... " >&6; }
3509 if ${ac_cv_path_GENHTML+:} false; then :
3510 $as_echo_n "(cached) " >&6
3511 else
3512 case $GENHTML in
3513 [\\/]* | ?:[\\/]*)
3514 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3518 for as_dir in $PATH
3520 IFS=$as_save_IFS
3521 test -z "$as_dir" && as_dir=.
3522 for ac_exec_ext in '' $ac_executable_extensions; do
3523 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3524 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3525 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3526 break 2
3528 done
3529 done
3530 IFS=$as_save_IFS
3533 esac
3535 GENHTML=$ac_cv_path_GENHTML
3536 if test -n "$GENHTML"; then
3537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3538 $as_echo "$GENHTML" >&6; }
3539 else
3540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3541 $as_echo "no" >&6; }
3545 test -n "$GENHTML" && break
3546 done
3548 else
3549 # Report the value of GENHTML in configure's output in all cases.
3550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3551 $as_echo_n "checking for GENHTML... " >&6; }
3552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3553 $as_echo "$GENHTML" >&6; }
3556 if test -z "$GENHTML"; then
3557 as_fn_error $? "genhtml not found" "$LINENO" 5
3564 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3566 esac
3568 else
3569 enable_coverage=no
3577 # DTrace
3581 # Check whether --enable-dtrace was given.
3582 if test "${enable_dtrace+set}" = set; then :
3583 enableval=$enable_dtrace;
3584 case $enableval in
3585 yes)
3586 if test -z "$DTRACE"; then
3587 for ac_prog in dtrace
3589 # Extract the first word of "$ac_prog", so it can be a program name with args.
3590 set dummy $ac_prog; ac_word=$2
3591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3592 $as_echo_n "checking for $ac_word... " >&6; }
3593 if ${ac_cv_path_DTRACE+:} false; then :
3594 $as_echo_n "(cached) " >&6
3595 else
3596 case $DTRACE in
3597 [\\/]* | ?:[\\/]*)
3598 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3601 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3602 for as_dir in $PATH
3604 IFS=$as_save_IFS
3605 test -z "$as_dir" && as_dir=.
3606 for ac_exec_ext in '' $ac_executable_extensions; do
3607 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3608 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3609 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3610 break 2
3612 done
3613 done
3614 IFS=$as_save_IFS
3617 esac
3619 DTRACE=$ac_cv_path_DTRACE
3620 if test -n "$DTRACE"; then
3621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3622 $as_echo "$DTRACE" >&6; }
3623 else
3624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3625 $as_echo "no" >&6; }
3629 test -n "$DTRACE" && break
3630 done
3632 else
3633 # Report the value of DTRACE in configure's output in all cases.
3634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3635 $as_echo_n "checking for DTRACE... " >&6; }
3636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3637 $as_echo "$DTRACE" >&6; }
3640 if test -z "$DTRACE"; then
3641 as_fn_error $? "dtrace not found" "$LINENO" 5
3649 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3651 esac
3653 else
3654 enable_dtrace=no
3662 # TAP tests
3666 # Check whether --enable-tap-tests was given.
3667 if test "${enable_tap_tests+set}" = set; then :
3668 enableval=$enable_tap_tests;
3669 case $enableval in
3670 yes)
3677 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3679 esac
3681 else
3682 enable_tap_tests=no
3690 # 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 # For historical reasons you can also use --with-CC to specify the C compiler
3896 # to use, although the standard way to do this is to set the CC environment
3897 # variable.
3901 # Check whether --with-CC was given.
3902 if test "${with_CC+set}" = set; then :
3903 withval=$with_CC;
3904 case $withval in
3905 yes)
3906 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3909 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3912 CC=$with_CC
3914 esac
3920 case $template in
3921 aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3922 *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3923 esac
3925 ac_ext=c
3926 ac_cpp='$CPP $CPPFLAGS'
3927 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3928 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3929 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3930 if test -n "$ac_tool_prefix"; then
3931 for ac_prog in $pgac_cc_list
3933 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3934 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3936 $as_echo_n "checking for $ac_word... " >&6; }
3937 if ${ac_cv_prog_CC+:} false; then :
3938 $as_echo_n "(cached) " >&6
3939 else
3940 if test -n "$CC"; then
3941 ac_cv_prog_CC="$CC" # Let the user override the test.
3942 else
3943 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3944 for as_dir in $PATH
3946 IFS=$as_save_IFS
3947 test -z "$as_dir" && as_dir=.
3948 for ac_exec_ext in '' $ac_executable_extensions; do
3949 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3950 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3951 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3952 break 2
3954 done
3955 done
3956 IFS=$as_save_IFS
3960 CC=$ac_cv_prog_CC
3961 if test -n "$CC"; then
3962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3963 $as_echo "$CC" >&6; }
3964 else
3965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3966 $as_echo "no" >&6; }
3970 test -n "$CC" && break
3971 done
3973 if test -z "$CC"; then
3974 ac_ct_CC=$CC
3975 for ac_prog in $pgac_cc_list
3977 # Extract the first word of "$ac_prog", so it can be a program name with args.
3978 set dummy $ac_prog; ac_word=$2
3979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3980 $as_echo_n "checking for $ac_word... " >&6; }
3981 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3982 $as_echo_n "(cached) " >&6
3983 else
3984 if test -n "$ac_ct_CC"; then
3985 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3986 else
3987 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3988 for as_dir in $PATH
3990 IFS=$as_save_IFS
3991 test -z "$as_dir" && as_dir=.
3992 for ac_exec_ext in '' $ac_executable_extensions; do
3993 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3994 ac_cv_prog_ac_ct_CC="$ac_prog"
3995 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3996 break 2
3998 done
3999 done
4000 IFS=$as_save_IFS
4004 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4005 if test -n "$ac_ct_CC"; then
4006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4007 $as_echo "$ac_ct_CC" >&6; }
4008 else
4009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4010 $as_echo "no" >&6; }
4014 test -n "$ac_ct_CC" && break
4015 done
4017 if test "x$ac_ct_CC" = x; then
4018 CC=""
4019 else
4020 case $cross_compiling:$ac_tool_warned in
4021 yes:)
4022 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4023 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4024 ac_tool_warned=yes ;;
4025 esac
4026 CC=$ac_ct_CC
4031 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4032 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4033 as_fn_error $? "no acceptable C compiler found in \$PATH
4034 See \`config.log' for more details" "$LINENO" 5; }
4036 # Provide some information about the compiler.
4037 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4038 set X $ac_compile
4039 ac_compiler=$2
4040 for ac_option in --version -v -V -qversion; do
4041 { { ac_try="$ac_compiler $ac_option >&5"
4042 case "(($ac_try" in
4043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4044 *) ac_try_echo=$ac_try;;
4045 esac
4046 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4047 $as_echo "$ac_try_echo"; } >&5
4048 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4049 ac_status=$?
4050 if test -s conftest.err; then
4051 sed '10a\
4052 ... rest of stderr output deleted ...
4053 10q' conftest.err >conftest.er1
4054 cat conftest.er1 >&5
4056 rm -f conftest.er1 conftest.err
4057 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4058 test $ac_status = 0; }
4059 done
4061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4062 /* end confdefs.h. */
4065 main ()
4069 return 0;
4071 _ACEOF
4072 ac_clean_files_save=$ac_clean_files
4073 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4074 # Try to create an executable without -o first, disregard a.out.
4075 # It will help us diagnose broken compilers, and finding out an intuition
4076 # of exeext.
4077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4078 $as_echo_n "checking whether the C compiler works... " >&6; }
4079 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4081 # The possible output files:
4082 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4084 ac_rmfiles=
4085 for ac_file in $ac_files
4087 case $ac_file in
4088 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4089 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4090 esac
4091 done
4092 rm -f $ac_rmfiles
4094 if { { ac_try="$ac_link_default"
4095 case "(($ac_try" in
4096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4097 *) ac_try_echo=$ac_try;;
4098 esac
4099 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4100 $as_echo "$ac_try_echo"; } >&5
4101 (eval "$ac_link_default") 2>&5
4102 ac_status=$?
4103 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4104 test $ac_status = 0; }; then :
4105 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4106 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4107 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4108 # so that the user can short-circuit this test for compilers unknown to
4109 # Autoconf.
4110 for ac_file in $ac_files ''
4112 test -f "$ac_file" || continue
4113 case $ac_file in
4114 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4116 [ab].out )
4117 # We found the default executable, but exeext='' is most
4118 # certainly right.
4119 break;;
4120 *.* )
4121 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4122 then :; else
4123 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4125 # We set ac_cv_exeext here because the later test for it is not
4126 # safe: cross compilers may not add the suffix if given an `-o'
4127 # argument, so we may need to know it at that point already.
4128 # Even if this section looks crufty: it has the advantage of
4129 # actually working.
4130 break;;
4132 break;;
4133 esac
4134 done
4135 test "$ac_cv_exeext" = no && ac_cv_exeext=
4137 else
4138 ac_file=''
4140 if test -z "$ac_file"; then :
4141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4142 $as_echo "no" >&6; }
4143 $as_echo "$as_me: failed program was:" >&5
4144 sed 's/^/| /' conftest.$ac_ext >&5
4146 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4147 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4148 as_fn_error 77 "C compiler cannot create executables
4149 See \`config.log' for more details" "$LINENO" 5; }
4150 else
4151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4152 $as_echo "yes" >&6; }
4154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4155 $as_echo_n "checking for C compiler default output file name... " >&6; }
4156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4157 $as_echo "$ac_file" >&6; }
4158 ac_exeext=$ac_cv_exeext
4160 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4161 ac_clean_files=$ac_clean_files_save
4162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4163 $as_echo_n "checking for suffix of executables... " >&6; }
4164 if { { ac_try="$ac_link"
4165 case "(($ac_try" in
4166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4167 *) ac_try_echo=$ac_try;;
4168 esac
4169 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4170 $as_echo "$ac_try_echo"; } >&5
4171 (eval "$ac_link") 2>&5
4172 ac_status=$?
4173 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4174 test $ac_status = 0; }; then :
4175 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4176 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4177 # work properly (i.e., refer to `conftest.exe'), while it won't with
4178 # `rm'.
4179 for ac_file in conftest.exe conftest conftest.*; do
4180 test -f "$ac_file" || continue
4181 case $ac_file in
4182 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4183 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4184 break;;
4185 * ) break;;
4186 esac
4187 done
4188 else
4189 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4190 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4191 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4192 See \`config.log' for more details" "$LINENO" 5; }
4194 rm -f conftest conftest$ac_cv_exeext
4195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4196 $as_echo "$ac_cv_exeext" >&6; }
4198 rm -f conftest.$ac_ext
4199 EXEEXT=$ac_cv_exeext
4200 ac_exeext=$EXEEXT
4201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4202 /* end confdefs.h. */
4203 #include <stdio.h>
4205 main ()
4207 FILE *f = fopen ("conftest.out", "w");
4208 return ferror (f) || fclose (f) != 0;
4211 return 0;
4213 _ACEOF
4214 ac_clean_files="$ac_clean_files conftest.out"
4215 # Check that the compiler produces executables we can run. If not, either
4216 # the compiler is broken, or we cross compile.
4217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4218 $as_echo_n "checking whether we are cross compiling... " >&6; }
4219 if test "$cross_compiling" != yes; then
4220 { { ac_try="$ac_link"
4221 case "(($ac_try" in
4222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4223 *) ac_try_echo=$ac_try;;
4224 esac
4225 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4226 $as_echo "$ac_try_echo"; } >&5
4227 (eval "$ac_link") 2>&5
4228 ac_status=$?
4229 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4230 test $ac_status = 0; }
4231 if { ac_try='./conftest$ac_cv_exeext'
4232 { { case "(($ac_try" in
4233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4234 *) ac_try_echo=$ac_try;;
4235 esac
4236 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4237 $as_echo "$ac_try_echo"; } >&5
4238 (eval "$ac_try") 2>&5
4239 ac_status=$?
4240 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4241 test $ac_status = 0; }; }; then
4242 cross_compiling=no
4243 else
4244 if test "$cross_compiling" = maybe; then
4245 cross_compiling=yes
4246 else
4247 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4248 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4249 as_fn_error $? "cannot run C compiled programs.
4250 If you meant to cross compile, use \`--host'.
4251 See \`config.log' for more details" "$LINENO" 5; }
4255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4256 $as_echo "$cross_compiling" >&6; }
4258 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4259 ac_clean_files=$ac_clean_files_save
4260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4261 $as_echo_n "checking for suffix of object files... " >&6; }
4262 if ${ac_cv_objext+:} false; then :
4263 $as_echo_n "(cached) " >&6
4264 else
4265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4266 /* end confdefs.h. */
4269 main ()
4273 return 0;
4275 _ACEOF
4276 rm -f conftest.o conftest.obj
4277 if { { ac_try="$ac_compile"
4278 case "(($ac_try" in
4279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4280 *) ac_try_echo=$ac_try;;
4281 esac
4282 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4283 $as_echo "$ac_try_echo"; } >&5
4284 (eval "$ac_compile") 2>&5
4285 ac_status=$?
4286 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4287 test $ac_status = 0; }; then :
4288 for ac_file in conftest.o conftest.obj conftest.*; do
4289 test -f "$ac_file" || continue;
4290 case $ac_file in
4291 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4292 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4293 break;;
4294 esac
4295 done
4296 else
4297 $as_echo "$as_me: failed program was:" >&5
4298 sed 's/^/| /' conftest.$ac_ext >&5
4300 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4301 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4302 as_fn_error $? "cannot compute suffix of object files: cannot compile
4303 See \`config.log' for more details" "$LINENO" 5; }
4305 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4308 $as_echo "$ac_cv_objext" >&6; }
4309 OBJEXT=$ac_cv_objext
4310 ac_objext=$OBJEXT
4311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4312 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4313 if ${ac_cv_c_compiler_gnu+:} false; then :
4314 $as_echo_n "(cached) " >&6
4315 else
4316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4317 /* end confdefs.h. */
4320 main ()
4322 #ifndef __GNUC__
4323 choke me
4324 #endif
4327 return 0;
4329 _ACEOF
4330 if ac_fn_c_try_compile "$LINENO"; then :
4331 ac_compiler_gnu=yes
4332 else
4333 ac_compiler_gnu=no
4335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4336 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4340 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4341 if test $ac_compiler_gnu = yes; then
4342 GCC=yes
4343 else
4344 GCC=
4346 ac_test_CFLAGS=${CFLAGS+set}
4347 ac_save_CFLAGS=$CFLAGS
4348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4349 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4350 if ${ac_cv_prog_cc_g+:} false; then :
4351 $as_echo_n "(cached) " >&6
4352 else
4353 ac_save_c_werror_flag=$ac_c_werror_flag
4354 ac_c_werror_flag=yes
4355 ac_cv_prog_cc_g=no
4356 CFLAGS="-g"
4357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4358 /* end confdefs.h. */
4361 main ()
4365 return 0;
4367 _ACEOF
4368 if ac_fn_c_try_compile "$LINENO"; then :
4369 ac_cv_prog_cc_g=yes
4370 else
4371 CFLAGS=""
4372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4373 /* end confdefs.h. */
4376 main ()
4380 return 0;
4382 _ACEOF
4383 if ac_fn_c_try_compile "$LINENO"; then :
4385 else
4386 ac_c_werror_flag=$ac_save_c_werror_flag
4387 CFLAGS="-g"
4388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4389 /* end confdefs.h. */
4392 main ()
4396 return 0;
4398 _ACEOF
4399 if ac_fn_c_try_compile "$LINENO"; then :
4400 ac_cv_prog_cc_g=yes
4402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4407 ac_c_werror_flag=$ac_save_c_werror_flag
4409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4410 $as_echo "$ac_cv_prog_cc_g" >&6; }
4411 if test "$ac_test_CFLAGS" = set; then
4412 CFLAGS=$ac_save_CFLAGS
4413 elif test $ac_cv_prog_cc_g = yes; then
4414 if test "$GCC" = yes; then
4415 CFLAGS="-g -O2"
4416 else
4417 CFLAGS="-g"
4419 else
4420 if test "$GCC" = yes; then
4421 CFLAGS="-O2"
4422 else
4423 CFLAGS=
4426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4427 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4428 if ${ac_cv_prog_cc_c89+:} false; then :
4429 $as_echo_n "(cached) " >&6
4430 else
4431 ac_cv_prog_cc_c89=no
4432 ac_save_CC=$CC
4433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4434 /* end confdefs.h. */
4435 #include <stdarg.h>
4436 #include <stdio.h>
4437 struct stat;
4438 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4439 struct buf { int x; };
4440 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4441 static char *e (p, i)
4442 char **p;
4443 int i;
4445 return p[i];
4447 static char *f (char * (*g) (char **, int), char **p, ...)
4449 char *s;
4450 va_list v;
4451 va_start (v,p);
4452 s = g (p, va_arg (v,int));
4453 va_end (v);
4454 return s;
4457 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4458 function prototypes and stuff, but not '\xHH' hex character constants.
4459 These don't provoke an error unfortunately, instead are silently treated
4460 as 'x'. The following induces an error, until -std is added to get
4461 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4462 array size at least. It's necessary to write '\x00'==0 to get something
4463 that's true only with -std. */
4464 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4466 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4467 inside strings and character constants. */
4468 #define FOO(x) 'x'
4469 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4471 int test (int i, double x);
4472 struct s1 {int (*f) (int a);};
4473 struct s2 {int (*f) (double a);};
4474 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4475 int argc;
4476 char **argv;
4478 main ()
4480 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4482 return 0;
4484 _ACEOF
4485 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4486 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4488 CC="$ac_save_CC $ac_arg"
4489 if ac_fn_c_try_compile "$LINENO"; then :
4490 ac_cv_prog_cc_c89=$ac_arg
4492 rm -f core conftest.err conftest.$ac_objext
4493 test "x$ac_cv_prog_cc_c89" != "xno" && break
4494 done
4495 rm -f conftest.$ac_ext
4496 CC=$ac_save_CC
4499 # AC_CACHE_VAL
4500 case "x$ac_cv_prog_cc_c89" in
4502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4503 $as_echo "none needed" >&6; } ;;
4504 xno)
4505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4506 $as_echo "unsupported" >&6; } ;;
4508 CC="$CC $ac_cv_prog_cc_c89"
4509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4510 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4511 esac
4512 if test "x$ac_cv_prog_cc_c89" != xno; then :
4516 ac_ext=c
4517 ac_cpp='$CPP $CPPFLAGS'
4518 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4519 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4520 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4523 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4524 if ${ac_cv_prog_cc_c99+:} false; then :
4525 $as_echo_n "(cached) " >&6
4526 else
4527 ac_cv_prog_cc_c99=no
4528 ac_save_CC=$CC
4529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4530 /* end confdefs.h. */
4531 #include <stdarg.h>
4532 #include <stdbool.h>
4533 #include <stdlib.h>
4534 #include <wchar.h>
4535 #include <stdio.h>
4537 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4538 #define debug(...) fprintf (stderr, __VA_ARGS__)
4539 #define showlist(...) puts (#__VA_ARGS__)
4540 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4541 static void
4542 test_varargs_macros (void)
4544 int x = 1234;
4545 int y = 5678;
4546 debug ("Flag");
4547 debug ("X = %d\n", x);
4548 showlist (The first, second, and third items.);
4549 report (x>y, "x is %d but y is %d", x, y);
4552 // Check long long types.
4553 #define BIG64 18446744073709551615ull
4554 #define BIG32 4294967295ul
4555 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4556 #if !BIG_OK
4557 your preprocessor is broken;
4558 #endif
4559 #if BIG_OK
4560 #else
4561 your preprocessor is broken;
4562 #endif
4563 static long long int bignum = -9223372036854775807LL;
4564 static unsigned long long int ubignum = BIG64;
4566 struct incomplete_array
4568 int datasize;
4569 double data[];
4572 struct named_init {
4573 int number;
4574 const wchar_t *name;
4575 double average;
4578 typedef const char *ccp;
4580 static inline int
4581 test_restrict (ccp restrict text)
4583 // See if C++-style comments work.
4584 // Iterate through items via the restricted pointer.
4585 // Also check for declarations in for loops.
4586 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4587 continue;
4588 return 0;
4591 // Check varargs and va_copy.
4592 static void
4593 test_varargs (const char *format, ...)
4595 va_list args;
4596 va_start (args, format);
4597 va_list args_copy;
4598 va_copy (args_copy, args);
4600 const char *str;
4601 int number;
4602 float fnumber;
4604 while (*format)
4606 switch (*format++)
4608 case 's': // string
4609 str = va_arg (args_copy, const char *);
4610 break;
4611 case 'd': // int
4612 number = va_arg (args_copy, int);
4613 break;
4614 case 'f': // float
4615 fnumber = va_arg (args_copy, double);
4616 break;
4617 default:
4618 break;
4621 va_end (args_copy);
4622 va_end (args);
4626 main ()
4629 // Check bool.
4630 _Bool success = false;
4632 // Check restrict.
4633 if (test_restrict ("String literal") == 0)
4634 success = true;
4635 char *restrict newvar = "Another string";
4637 // Check varargs.
4638 test_varargs ("s, d' f .", "string", 65, 34.234);
4639 test_varargs_macros ();
4641 // Check flexible array members.
4642 struct incomplete_array *ia =
4643 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4644 ia->datasize = 10;
4645 for (int i = 0; i < ia->datasize; ++i)
4646 ia->data[i] = i * 1.234;
4648 // Check named initializers.
4649 struct named_init ni = {
4650 .number = 34,
4651 .name = L"Test wide string",
4652 .average = 543.34343,
4655 ni.number = 58;
4657 int dynamic_array[ni.number];
4658 dynamic_array[ni.number - 1] = 543;
4660 // work around unused variable warnings
4661 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4662 || dynamic_array[ni.number - 1] != 543);
4665 return 0;
4667 _ACEOF
4668 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4670 CC="$ac_save_CC $ac_arg"
4671 if ac_fn_c_try_compile "$LINENO"; then :
4672 ac_cv_prog_cc_c99=$ac_arg
4674 rm -f core conftest.err conftest.$ac_objext
4675 test "x$ac_cv_prog_cc_c99" != "xno" && break
4676 done
4677 rm -f conftest.$ac_ext
4678 CC=$ac_save_CC
4681 # AC_CACHE_VAL
4682 case "x$ac_cv_prog_cc_c99" in
4684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4685 $as_echo "none needed" >&6; } ;;
4686 xno)
4687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4688 $as_echo "unsupported" >&6; } ;;
4690 CC="$CC $ac_cv_prog_cc_c99"
4691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4692 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4693 esac
4694 if test "x$ac_cv_prog_cc_c99" != xno; then :
4700 # Error out if the compiler does not support C99, as the codebase
4701 # relies on that.
4702 if test "$ac_cv_prog_cc_c99" = no; then
4703 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4706 ac_ext=cpp
4707 ac_cpp='$CXXCPP $CPPFLAGS'
4708 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4709 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4710 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4711 if test -z "$CXX"; then
4712 if test -n "$CCC"; then
4713 CXX=$CCC
4714 else
4715 if test -n "$ac_tool_prefix"; then
4716 for ac_prog in $pgac_cxx_list
4718 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4719 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4721 $as_echo_n "checking for $ac_word... " >&6; }
4722 if ${ac_cv_prog_CXX+:} false; then :
4723 $as_echo_n "(cached) " >&6
4724 else
4725 if test -n "$CXX"; then
4726 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4727 else
4728 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4729 for as_dir in $PATH
4731 IFS=$as_save_IFS
4732 test -z "$as_dir" && as_dir=.
4733 for ac_exec_ext in '' $ac_executable_extensions; do
4734 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4735 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4736 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4737 break 2
4739 done
4740 done
4741 IFS=$as_save_IFS
4745 CXX=$ac_cv_prog_CXX
4746 if test -n "$CXX"; then
4747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4748 $as_echo "$CXX" >&6; }
4749 else
4750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4751 $as_echo "no" >&6; }
4755 test -n "$CXX" && break
4756 done
4758 if test -z "$CXX"; then
4759 ac_ct_CXX=$CXX
4760 for ac_prog in $pgac_cxx_list
4762 # Extract the first word of "$ac_prog", so it can be a program name with args.
4763 set dummy $ac_prog; ac_word=$2
4764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4765 $as_echo_n "checking for $ac_word... " >&6; }
4766 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4767 $as_echo_n "(cached) " >&6
4768 else
4769 if test -n "$ac_ct_CXX"; then
4770 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4771 else
4772 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4773 for as_dir in $PATH
4775 IFS=$as_save_IFS
4776 test -z "$as_dir" && as_dir=.
4777 for ac_exec_ext in '' $ac_executable_extensions; do
4778 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4779 ac_cv_prog_ac_ct_CXX="$ac_prog"
4780 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4781 break 2
4783 done
4784 done
4785 IFS=$as_save_IFS
4789 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4790 if test -n "$ac_ct_CXX"; then
4791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4792 $as_echo "$ac_ct_CXX" >&6; }
4793 else
4794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4795 $as_echo "no" >&6; }
4799 test -n "$ac_ct_CXX" && break
4800 done
4802 if test "x$ac_ct_CXX" = x; then
4803 CXX="g++"
4804 else
4805 case $cross_compiling:$ac_tool_warned in
4806 yes:)
4807 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4808 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4809 ac_tool_warned=yes ;;
4810 esac
4811 CXX=$ac_ct_CXX
4817 # Provide some information about the compiler.
4818 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4819 set X $ac_compile
4820 ac_compiler=$2
4821 for ac_option in --version -v -V -qversion; do
4822 { { ac_try="$ac_compiler $ac_option >&5"
4823 case "(($ac_try" in
4824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4825 *) ac_try_echo=$ac_try;;
4826 esac
4827 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4828 $as_echo "$ac_try_echo"; } >&5
4829 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4830 ac_status=$?
4831 if test -s conftest.err; then
4832 sed '10a\
4833 ... rest of stderr output deleted ...
4834 10q' conftest.err >conftest.er1
4835 cat conftest.er1 >&5
4837 rm -f conftest.er1 conftest.err
4838 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4839 test $ac_status = 0; }
4840 done
4842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4843 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4844 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4845 $as_echo_n "(cached) " >&6
4846 else
4847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4848 /* end confdefs.h. */
4851 main ()
4853 #ifndef __GNUC__
4854 choke me
4855 #endif
4858 return 0;
4860 _ACEOF
4861 if ac_fn_cxx_try_compile "$LINENO"; then :
4862 ac_compiler_gnu=yes
4863 else
4864 ac_compiler_gnu=no
4866 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4867 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4871 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4872 if test $ac_compiler_gnu = yes; then
4873 GXX=yes
4874 else
4875 GXX=
4877 ac_test_CXXFLAGS=${CXXFLAGS+set}
4878 ac_save_CXXFLAGS=$CXXFLAGS
4879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4880 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4881 if ${ac_cv_prog_cxx_g+:} false; then :
4882 $as_echo_n "(cached) " >&6
4883 else
4884 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4885 ac_cxx_werror_flag=yes
4886 ac_cv_prog_cxx_g=no
4887 CXXFLAGS="-g"
4888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4889 /* end confdefs.h. */
4892 main ()
4896 return 0;
4898 _ACEOF
4899 if ac_fn_cxx_try_compile "$LINENO"; then :
4900 ac_cv_prog_cxx_g=yes
4901 else
4902 CXXFLAGS=""
4903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4904 /* end confdefs.h. */
4907 main ()
4911 return 0;
4913 _ACEOF
4914 if ac_fn_cxx_try_compile "$LINENO"; then :
4916 else
4917 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4918 CXXFLAGS="-g"
4919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4920 /* end confdefs.h. */
4923 main ()
4927 return 0;
4929 _ACEOF
4930 if ac_fn_cxx_try_compile "$LINENO"; then :
4931 ac_cv_prog_cxx_g=yes
4933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4937 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4938 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4941 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4942 if test "$ac_test_CXXFLAGS" = set; then
4943 CXXFLAGS=$ac_save_CXXFLAGS
4944 elif test $ac_cv_prog_cxx_g = yes; then
4945 if test "$GXX" = yes; then
4946 CXXFLAGS="-g -O2"
4947 else
4948 CXXFLAGS="-g"
4950 else
4951 if test "$GXX" = yes; then
4952 CXXFLAGS="-O2"
4953 else
4954 CXXFLAGS=
4957 ac_ext=c
4958 ac_cpp='$CPP $CPPFLAGS'
4959 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4960 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4961 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4964 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4965 # but has idiosyncrasies of its own. We assume icc will define
4966 # __INTEL_COMPILER regardless of CFLAGS.
4968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4969 /* end confdefs.h. */
4972 main ()
4974 #ifndef __INTEL_COMPILER
4975 choke me
4976 #endif
4978 return 0;
4980 _ACEOF
4981 if ac_fn_c_try_compile "$LINENO"; then :
4982 ICC=yes
4983 else
4984 ICC=no
4986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4988 # Check if it's Sun Studio compiler. We assume that
4989 # __SUNPRO_C will be defined for Sun Studio compilers
4990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4991 /* end confdefs.h. */
4994 main ()
4996 #ifndef __SUNPRO_C
4997 choke me
4998 #endif
5000 return 0;
5002 _ACEOF
5003 if ac_fn_c_try_compile "$LINENO"; then :
5004 SUN_STUDIO_CC=yes
5005 else
5006 SUN_STUDIO_CC=no
5008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5014 # LLVM
5016 # Checked early because subsequent tests depend on it.
5020 # Check whether --with-llvm was given.
5021 if test "${with_llvm+set}" = set; then :
5022 withval=$with_llvm;
5023 case $withval in
5024 yes)
5026 $as_echo "#define USE_LLVM 1" >>confdefs.h
5033 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
5035 esac
5037 else
5038 with_llvm=no
5044 for ac_prog in gawk mawk nawk awk
5046 # Extract the first word of "$ac_prog", so it can be a program name with args.
5047 set dummy $ac_prog; ac_word=$2
5048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5049 $as_echo_n "checking for $ac_word... " >&6; }
5050 if ${ac_cv_prog_AWK+:} false; then :
5051 $as_echo_n "(cached) " >&6
5052 else
5053 if test -n "$AWK"; then
5054 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5055 else
5056 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5057 for as_dir in $PATH
5059 IFS=$as_save_IFS
5060 test -z "$as_dir" && as_dir=.
5061 for ac_exec_ext in '' $ac_executable_extensions; do
5062 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5063 ac_cv_prog_AWK="$ac_prog"
5064 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5065 break 2
5067 done
5068 done
5069 IFS=$as_save_IFS
5073 AWK=$ac_cv_prog_AWK
5074 if test -n "$AWK"; then
5075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5076 $as_echo "$AWK" >&6; }
5077 else
5078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5079 $as_echo "no" >&6; }
5083 test -n "$AWK" && break
5084 done
5086 if test "$with_llvm" = yes; then :
5092 if test -z "$LLVM_CONFIG"; then
5093 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
5095 # Extract the first word of "$ac_prog", so it can be a program name with args.
5096 set dummy $ac_prog; ac_word=$2
5097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5098 $as_echo_n "checking for $ac_word... " >&6; }
5099 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5100 $as_echo_n "(cached) " >&6
5101 else
5102 case $LLVM_CONFIG in
5103 [\\/]* | ?:[\\/]*)
5104 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5107 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5108 for as_dir in $PATH
5110 IFS=$as_save_IFS
5111 test -z "$as_dir" && as_dir=.
5112 for ac_exec_ext in '' $ac_executable_extensions; do
5113 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5114 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5115 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5116 break 2
5118 done
5119 done
5120 IFS=$as_save_IFS
5123 esac
5125 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5126 if test -n "$LLVM_CONFIG"; then
5127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5128 $as_echo "$LLVM_CONFIG" >&6; }
5129 else
5130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5131 $as_echo "no" >&6; }
5135 test -n "$LLVM_CONFIG" && break
5136 done
5138 else
5139 # Report the value of LLVM_CONFIG in configure's output in all cases.
5140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5141 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5143 $as_echo "$LLVM_CONFIG" >&6; }
5147 # no point continuing if llvm wasn't found
5148 if test -z "$LLVM_CONFIG"; then
5149 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5151 # check if detected $LLVM_CONFIG is executable
5152 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5153 if test "x$pgac_llvm_version" = "xno"; then
5154 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5156 # and whether the version is supported
5157 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 10) exit 1; else exit 0;}';then
5158 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 10 is required" "$LINENO" 5
5160 { $as_echo "$as_me:${as_lineno-$LINENO}: using llvm $pgac_llvm_version" >&5
5161 $as_echo "$as_me: using llvm $pgac_llvm_version" >&6;}
5163 # need clang to create some bitcode files
5165 if test -z "$CLANG"; then
5166 for ac_prog in clang clang-17 clang-16 clang-15 clang-14 clang-13 clang-12 clang-11 clang-10
5168 # Extract the first word of "$ac_prog", so it can be a program name with args.
5169 set dummy $ac_prog; ac_word=$2
5170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5171 $as_echo_n "checking for $ac_word... " >&6; }
5172 if ${ac_cv_path_CLANG+:} false; then :
5173 $as_echo_n "(cached) " >&6
5174 else
5175 case $CLANG in
5176 [\\/]* | ?:[\\/]*)
5177 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5181 for as_dir in $PATH
5183 IFS=$as_save_IFS
5184 test -z "$as_dir" && as_dir=.
5185 for ac_exec_ext in '' $ac_executable_extensions; do
5186 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5187 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5188 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5189 break 2
5191 done
5192 done
5193 IFS=$as_save_IFS
5196 esac
5198 CLANG=$ac_cv_path_CLANG
5199 if test -n "$CLANG"; then
5200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5201 $as_echo "$CLANG" >&6; }
5202 else
5203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5204 $as_echo "no" >&6; }
5208 test -n "$CLANG" && break
5209 done
5211 else
5212 # Report the value of CLANG in configure's output in all cases.
5213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5214 $as_echo_n "checking for CLANG... " >&6; }
5215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5216 $as_echo "$CLANG" >&6; }
5219 if test -z "$CLANG"; then
5220 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5222 # make sure clang is executable
5223 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5224 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5226 # Could check clang version, but it doesn't seem that
5227 # important. Systems with a new enough LLVM version are usually
5228 # going to have a decent clang version too. It's also not entirely
5229 # clear what the minimum version is.
5231 # Collect compiler flags necessary to build the LLVM dependent
5232 # shared library.
5233 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5234 case $pgac_option in
5235 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5236 esac
5237 done
5239 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5240 case $pgac_option in
5241 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5242 esac
5243 done
5245 # ABI influencing options, standard influencing options
5246 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5247 case $pgac_option in
5248 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5249 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5250 esac
5251 done
5253 # Look for components we're interested in, collect necessary
5254 # libs. As some components are optional, we can't just list all of
5255 # them as it'd raise an error.
5256 pgac_components='';
5257 for pgac_component in `$LLVM_CONFIG --components`; do
5258 case $pgac_component in
5259 engine) pgac_components="$pgac_components $pgac_component";;
5260 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5261 orcjit) pgac_components="$pgac_components $pgac_component";;
5262 passes) pgac_components="$pgac_components $pgac_component";;
5263 native) pgac_components="$pgac_components $pgac_component";;
5264 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5265 esac
5266 done;
5268 # And then get the libraries that need to be linked in for the
5269 # selected components. They're large libraries, we only want to
5270 # link them into the LLVM using shared library.
5271 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5272 case $pgac_option in
5273 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5274 esac
5275 done
5277 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5287 fi # fi
5290 unset CFLAGS
5291 unset CXXFLAGS
5294 # Read the template
5296 . "$srcdir/src/template/$template" || exit
5298 # C[XX]FLAGS are selected so:
5299 # If the user specifies something in the environment, that is used.
5300 # else: If the template file set something, that is used.
5301 # else: If coverage was enabled, don't set anything.
5302 # else: If the compiler is GCC, then we use -O2.
5303 # else: If the compiler is something else, then we use -O, unless debugging.
5305 if test "$ac_env_CFLAGS_set" = set; then
5306 CFLAGS=$ac_env_CFLAGS_value
5307 elif test "${CFLAGS+set}" = set; then
5308 : # (keep what template set)
5309 elif test "$enable_coverage" = yes; then
5310 : # no optimization by default
5311 elif test "$GCC" = yes; then
5312 CFLAGS="-O2"
5313 else
5314 # if the user selected debug mode, don't use -O
5315 if test "$enable_debug" != yes; then
5316 CFLAGS="-O"
5320 if test "$ac_env_CXXFLAGS_set" = set; then
5321 CXXFLAGS=$ac_env_CXXFLAGS_value
5322 elif test "${CXXFLAGS+set}" = set; then
5323 : # (keep what template set)
5324 elif test "$enable_coverage" = yes; then
5325 : # no optimization by default
5326 elif test "$GCC" = yes; then
5327 CXXFLAGS="-O2"
5328 else
5329 # if the user selected debug mode, don't use -O
5330 if test "$enable_debug" != yes; then
5331 CXXFLAGS="-O"
5335 # When generating bitcode (for inlining) we always want to use -O2
5336 # even when --enable-debug is specified. The bitcode is not going to
5337 # be used for line-by-line debugging, and JIT inlining doesn't work
5338 # without at least -O1 (otherwise clang will emit 'noinline'
5339 # attributes everywhere), which is bad for testing. Still allow the
5340 # environment to override if done explicitly.
5341 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5342 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5343 else
5344 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5346 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5347 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5348 else
5349 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5352 # C[XX]FLAGS we determined above will be added back at the end
5353 user_CFLAGS=$CFLAGS
5354 CFLAGS=""
5355 user_CXXFLAGS=$CXXFLAGS
5356 CXXFLAGS=""
5357 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5358 BITCODE_CFLAGS=""
5359 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5360 BITCODE_CXXFLAGS=""
5362 # set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5363 if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5364 CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5366 if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5367 CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5370 # Some versions of GCC support some additional useful warning flags.
5371 # Check whether they are supported, and add them to CFLAGS if so.
5372 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5373 # but has its own. Also check other compiler-specific flags here.
5375 if test "$GCC" = yes -a "$ICC" = no; then
5376 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5377 CXXFLAGS="-Wall -Wpointer-arith"
5378 # These work in some but not all gcc versions
5379 save_CFLAGS=$CFLAGS
5381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5382 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5383 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5384 $as_echo_n "(cached) " >&6
5385 else
5386 pgac_save_CFLAGS=$CFLAGS
5387 pgac_save_CC=$CC
5388 CC=${CC}
5389 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5390 ac_save_c_werror_flag=$ac_c_werror_flag
5391 ac_c_werror_flag=yes
5392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5393 /* end confdefs.h. */
5396 main ()
5400 return 0;
5402 _ACEOF
5403 if ac_fn_c_try_compile "$LINENO"; then :
5404 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5405 else
5406 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5409 ac_c_werror_flag=$ac_save_c_werror_flag
5410 CFLAGS="$pgac_save_CFLAGS"
5411 CC="$pgac_save_CC"
5413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5414 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5415 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5416 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5420 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5421 # disable it, so AC_SUBST the negative form.
5422 PERMIT_DECLARATION_AFTER_STATEMENT=
5423 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5424 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5427 # Really don't want VLAs to be used in our dialect of C
5429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5430 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5431 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5432 $as_echo_n "(cached) " >&6
5433 else
5434 pgac_save_CFLAGS=$CFLAGS
5435 pgac_save_CC=$CC
5436 CC=${CC}
5437 CFLAGS="${CFLAGS} -Werror=vla"
5438 ac_save_c_werror_flag=$ac_c_werror_flag
5439 ac_c_werror_flag=yes
5440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5441 /* end confdefs.h. */
5444 main ()
5448 return 0;
5450 _ACEOF
5451 if ac_fn_c_try_compile "$LINENO"; then :
5452 pgac_cv_prog_CC_cflags__Werror_vla=yes
5453 else
5454 pgac_cv_prog_CC_cflags__Werror_vla=no
5456 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5457 ac_c_werror_flag=$ac_save_c_werror_flag
5458 CFLAGS="$pgac_save_CFLAGS"
5459 CC="$pgac_save_CC"
5461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5462 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5463 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5464 CFLAGS="${CFLAGS} -Werror=vla"
5468 # On macOS, complain about usage of symbols newer than the deployment target
5470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS" >&5
5471 $as_echo_n "checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS... " >&6; }
5472 if ${pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new+:} false; then :
5473 $as_echo_n "(cached) " >&6
5474 else
5475 pgac_save_CFLAGS=$CFLAGS
5476 pgac_save_CC=$CC
5477 CC=${CC}
5478 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5479 ac_save_c_werror_flag=$ac_c_werror_flag
5480 ac_c_werror_flag=yes
5481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5482 /* end confdefs.h. */
5485 main ()
5489 return 0;
5491 _ACEOF
5492 if ac_fn_c_try_compile "$LINENO"; then :
5493 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=yes
5494 else
5495 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=no
5497 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5498 ac_c_werror_flag=$ac_save_c_werror_flag
5499 CFLAGS="$pgac_save_CFLAGS"
5500 CC="$pgac_save_CC"
5502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&5
5503 $as_echo "$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&6; }
5504 if test x"$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" = x"yes"; then
5505 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS" >&5
5510 $as_echo_n "checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS... " >&6; }
5511 if ${pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new+:} false; then :
5512 $as_echo_n "(cached) " >&6
5513 else
5514 pgac_save_CXXFLAGS=$CXXFLAGS
5515 pgac_save_CXX=$CXX
5516 CXX=${CXX}
5517 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5518 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5519 ac_cxx_werror_flag=yes
5520 ac_ext=cpp
5521 ac_cpp='$CXXCPP $CPPFLAGS'
5522 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5523 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5524 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5527 /* end confdefs.h. */
5530 main ()
5534 return 0;
5536 _ACEOF
5537 if ac_fn_cxx_try_compile "$LINENO"; then :
5538 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=yes
5539 else
5540 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=no
5542 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5543 ac_ext=c
5544 ac_cpp='$CPP $CPPFLAGS'
5545 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5546 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5547 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5549 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5550 CXXFLAGS="$pgac_save_CXXFLAGS"
5551 CXX="$pgac_save_CXX"
5553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&5
5554 $as_echo "$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&6; }
5555 if test x"$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" = x"yes"; then
5556 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5560 # -Wvla is not applicable for C++
5562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5563 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5564 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5565 $as_echo_n "(cached) " >&6
5566 else
5567 pgac_save_CFLAGS=$CFLAGS
5568 pgac_save_CC=$CC
5569 CC=${CC}
5570 CFLAGS="${CFLAGS} -Wendif-labels"
5571 ac_save_c_werror_flag=$ac_c_werror_flag
5572 ac_c_werror_flag=yes
5573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5574 /* end confdefs.h. */
5577 main ()
5581 return 0;
5583 _ACEOF
5584 if ac_fn_c_try_compile "$LINENO"; then :
5585 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5586 else
5587 pgac_cv_prog_CC_cflags__Wendif_labels=no
5589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5590 ac_c_werror_flag=$ac_save_c_werror_flag
5591 CFLAGS="$pgac_save_CFLAGS"
5592 CC="$pgac_save_CC"
5594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5595 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5596 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5597 CFLAGS="${CFLAGS} -Wendif-labels"
5601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5602 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5603 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5604 $as_echo_n "(cached) " >&6
5605 else
5606 pgac_save_CXXFLAGS=$CXXFLAGS
5607 pgac_save_CXX=$CXX
5608 CXX=${CXX}
5609 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5610 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5611 ac_cxx_werror_flag=yes
5612 ac_ext=cpp
5613 ac_cpp='$CXXCPP $CPPFLAGS'
5614 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5615 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5616 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5619 /* end confdefs.h. */
5622 main ()
5626 return 0;
5628 _ACEOF
5629 if ac_fn_cxx_try_compile "$LINENO"; then :
5630 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5631 else
5632 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5634 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5635 ac_ext=c
5636 ac_cpp='$CPP $CPPFLAGS'
5637 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5638 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5639 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5641 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5642 CXXFLAGS="$pgac_save_CXXFLAGS"
5643 CXX="$pgac_save_CXX"
5645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5646 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5647 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5648 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5654 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5655 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5656 $as_echo_n "(cached) " >&6
5657 else
5658 pgac_save_CFLAGS=$CFLAGS
5659 pgac_save_CC=$CC
5660 CC=${CC}
5661 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5662 ac_save_c_werror_flag=$ac_c_werror_flag
5663 ac_c_werror_flag=yes
5664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5665 /* end confdefs.h. */
5668 main ()
5672 return 0;
5674 _ACEOF
5675 if ac_fn_c_try_compile "$LINENO"; then :
5676 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5677 else
5678 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5681 ac_c_werror_flag=$ac_save_c_werror_flag
5682 CFLAGS="$pgac_save_CFLAGS"
5683 CC="$pgac_save_CC"
5685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5686 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5687 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5688 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5693 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5694 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5695 $as_echo_n "(cached) " >&6
5696 else
5697 pgac_save_CXXFLAGS=$CXXFLAGS
5698 pgac_save_CXX=$CXX
5699 CXX=${CXX}
5700 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5701 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5702 ac_cxx_werror_flag=yes
5703 ac_ext=cpp
5704 ac_cpp='$CXXCPP $CPPFLAGS'
5705 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5706 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5707 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5710 /* end confdefs.h. */
5713 main ()
5717 return 0;
5719 _ACEOF
5720 if ac_fn_cxx_try_compile "$LINENO"; then :
5721 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5722 else
5723 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5726 ac_ext=c
5727 ac_cpp='$CPP $CPPFLAGS'
5728 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5729 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5730 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5732 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5733 CXXFLAGS="$pgac_save_CXXFLAGS"
5734 CXX="$pgac_save_CXX"
5736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5737 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5738 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5739 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5745 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5746 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5747 $as_echo_n "(cached) " >&6
5748 else
5749 pgac_save_CFLAGS=$CFLAGS
5750 pgac_save_CC=$CC
5751 CC=${CC}
5752 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5753 ac_save_c_werror_flag=$ac_c_werror_flag
5754 ac_c_werror_flag=yes
5755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5756 /* end confdefs.h. */
5759 main ()
5763 return 0;
5765 _ACEOF
5766 if ac_fn_c_try_compile "$LINENO"; then :
5767 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5768 else
5769 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5771 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5772 ac_c_werror_flag=$ac_save_c_werror_flag
5773 CFLAGS="$pgac_save_CFLAGS"
5774 CC="$pgac_save_CC"
5776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5777 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5778 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5779 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5784 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5785 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5786 $as_echo_n "(cached) " >&6
5787 else
5788 pgac_save_CXXFLAGS=$CXXFLAGS
5789 pgac_save_CXX=$CXX
5790 CXX=${CXX}
5791 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5792 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5793 ac_cxx_werror_flag=yes
5794 ac_ext=cpp
5795 ac_cpp='$CXXCPP $CPPFLAGS'
5796 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5797 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5798 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5801 /* end confdefs.h. */
5804 main ()
5808 return 0;
5810 _ACEOF
5811 if ac_fn_cxx_try_compile "$LINENO"; then :
5812 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5813 else
5814 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5817 ac_ext=c
5818 ac_cpp='$CPP $CPPFLAGS'
5819 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5820 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5821 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5823 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5824 CXXFLAGS="$pgac_save_CXXFLAGS"
5825 CXX="$pgac_save_CXX"
5827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5828 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5829 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5830 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5836 $as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5837 if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5838 $as_echo_n "(cached) " >&6
5839 else
5840 pgac_save_CFLAGS=$CFLAGS
5841 pgac_save_CC=$CC
5842 CC=${CC}
5843 CFLAGS="${CFLAGS} -Wcast-function-type"
5844 ac_save_c_werror_flag=$ac_c_werror_flag
5845 ac_c_werror_flag=yes
5846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5847 /* end confdefs.h. */
5850 main ()
5854 return 0;
5856 _ACEOF
5857 if ac_fn_c_try_compile "$LINENO"; then :
5858 pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5859 else
5860 pgac_cv_prog_CC_cflags__Wcast_function_type=no
5862 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5863 ac_c_werror_flag=$ac_save_c_werror_flag
5864 CFLAGS="$pgac_save_CFLAGS"
5865 CC="$pgac_save_CC"
5867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5868 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5869 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5870 CFLAGS="${CFLAGS} -Wcast-function-type"
5874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5875 $as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5876 if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5877 $as_echo_n "(cached) " >&6
5878 else
5879 pgac_save_CXXFLAGS=$CXXFLAGS
5880 pgac_save_CXX=$CXX
5881 CXX=${CXX}
5882 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5883 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5884 ac_cxx_werror_flag=yes
5885 ac_ext=cpp
5886 ac_cpp='$CXXCPP $CPPFLAGS'
5887 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5888 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5889 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5892 /* end confdefs.h. */
5895 main ()
5899 return 0;
5901 _ACEOF
5902 if ac_fn_cxx_try_compile "$LINENO"; then :
5903 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5904 else
5905 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5908 ac_ext=c
5909 ac_cpp='$CPP $CPPFLAGS'
5910 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5911 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5912 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5914 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5915 CXXFLAGS="$pgac_save_CXXFLAGS"
5916 CXX="$pgac_save_CXX"
5918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5919 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5920 if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5921 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS" >&5
5927 $as_echo_n "checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS... " >&6; }
5928 if ${pgac_cv_prog_CC_cflags__Wshadow_compatible_local+:} false; then :
5929 $as_echo_n "(cached) " >&6
5930 else
5931 pgac_save_CFLAGS=$CFLAGS
5932 pgac_save_CC=$CC
5933 CC=${CC}
5934 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5935 ac_save_c_werror_flag=$ac_c_werror_flag
5936 ac_c_werror_flag=yes
5937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5938 /* end confdefs.h. */
5941 main ()
5945 return 0;
5947 _ACEOF
5948 if ac_fn_c_try_compile "$LINENO"; then :
5949 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=yes
5950 else
5951 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=no
5953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5954 ac_c_werror_flag=$ac_save_c_werror_flag
5955 CFLAGS="$pgac_save_CFLAGS"
5956 CC="$pgac_save_CC"
5958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&5
5959 $as_echo "$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&6; }
5960 if test x"$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" = x"yes"; then
5961 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS" >&5
5966 $as_echo_n "checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS... " >&6; }
5967 if ${pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local+:} false; then :
5968 $as_echo_n "(cached) " >&6
5969 else
5970 pgac_save_CXXFLAGS=$CXXFLAGS
5971 pgac_save_CXX=$CXX
5972 CXX=${CXX}
5973 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5974 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5975 ac_cxx_werror_flag=yes
5976 ac_ext=cpp
5977 ac_cpp='$CXXCPP $CPPFLAGS'
5978 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5979 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5980 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5983 /* end confdefs.h. */
5986 main ()
5990 return 0;
5992 _ACEOF
5993 if ac_fn_cxx_try_compile "$LINENO"; then :
5994 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=yes
5995 else
5996 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=no
5998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5999 ac_ext=c
6000 ac_cpp='$CPP $CPPFLAGS'
6001 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6002 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6003 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6005 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6006 CXXFLAGS="$pgac_save_CXXFLAGS"
6007 CXX="$pgac_save_CXX"
6009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&5
6010 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&6; }
6011 if test x"$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" = x"yes"; then
6012 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
6016 # This was included in -Wall/-Wformat in older GCC versions
6018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
6019 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
6020 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
6021 $as_echo_n "(cached) " >&6
6022 else
6023 pgac_save_CFLAGS=$CFLAGS
6024 pgac_save_CC=$CC
6025 CC=${CC}
6026 CFLAGS="${CFLAGS} -Wformat-security"
6027 ac_save_c_werror_flag=$ac_c_werror_flag
6028 ac_c_werror_flag=yes
6029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6030 /* end confdefs.h. */
6033 main ()
6037 return 0;
6039 _ACEOF
6040 if ac_fn_c_try_compile "$LINENO"; then :
6041 pgac_cv_prog_CC_cflags__Wformat_security=yes
6042 else
6043 pgac_cv_prog_CC_cflags__Wformat_security=no
6045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6046 ac_c_werror_flag=$ac_save_c_werror_flag
6047 CFLAGS="$pgac_save_CFLAGS"
6048 CC="$pgac_save_CC"
6050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
6051 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
6052 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
6053 CFLAGS="${CFLAGS} -Wformat-security"
6057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
6058 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
6059 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
6060 $as_echo_n "(cached) " >&6
6061 else
6062 pgac_save_CXXFLAGS=$CXXFLAGS
6063 pgac_save_CXX=$CXX
6064 CXX=${CXX}
6065 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6066 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6067 ac_cxx_werror_flag=yes
6068 ac_ext=cpp
6069 ac_cpp='$CXXCPP $CPPFLAGS'
6070 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6071 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6072 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6075 /* end confdefs.h. */
6078 main ()
6082 return 0;
6084 _ACEOF
6085 if ac_fn_cxx_try_compile "$LINENO"; then :
6086 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
6087 else
6088 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
6090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6091 ac_ext=c
6092 ac_cpp='$CPP $CPPFLAGS'
6093 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6094 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6095 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6097 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6098 CXXFLAGS="$pgac_save_CXXFLAGS"
6099 CXX="$pgac_save_CXX"
6101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
6102 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
6103 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
6104 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6108 # Disable strict-aliasing rules; needed for gcc 3.3+
6110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6111 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6112 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6113 $as_echo_n "(cached) " >&6
6114 else
6115 pgac_save_CFLAGS=$CFLAGS
6116 pgac_save_CC=$CC
6117 CC=${CC}
6118 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6119 ac_save_c_werror_flag=$ac_c_werror_flag
6120 ac_c_werror_flag=yes
6121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6122 /* end confdefs.h. */
6125 main ()
6129 return 0;
6131 _ACEOF
6132 if ac_fn_c_try_compile "$LINENO"; then :
6133 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6134 else
6135 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6138 ac_c_werror_flag=$ac_save_c_werror_flag
6139 CFLAGS="$pgac_save_CFLAGS"
6140 CC="$pgac_save_CC"
6142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6143 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6144 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6145 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6150 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6151 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6152 $as_echo_n "(cached) " >&6
6153 else
6154 pgac_save_CXXFLAGS=$CXXFLAGS
6155 pgac_save_CXX=$CXX
6156 CXX=${CXX}
6157 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6158 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6159 ac_cxx_werror_flag=yes
6160 ac_ext=cpp
6161 ac_cpp='$CXXCPP $CPPFLAGS'
6162 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6163 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6164 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6167 /* end confdefs.h. */
6170 main ()
6174 return 0;
6176 _ACEOF
6177 if ac_fn_cxx_try_compile "$LINENO"; then :
6178 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6179 else
6180 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6183 ac_ext=c
6184 ac_cpp='$CPP $CPPFLAGS'
6185 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6186 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6187 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6189 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6190 CXXFLAGS="$pgac_save_CXXFLAGS"
6191 CXX="$pgac_save_CXX"
6193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6194 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6195 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6196 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6200 # Disable optimizations that assume no overflow; needed for gcc 4.3+
6202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
6203 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
6204 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
6205 $as_echo_n "(cached) " >&6
6206 else
6207 pgac_save_CFLAGS=$CFLAGS
6208 pgac_save_CC=$CC
6209 CC=${CC}
6210 CFLAGS="${CFLAGS} -fwrapv"
6211 ac_save_c_werror_flag=$ac_c_werror_flag
6212 ac_c_werror_flag=yes
6213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6214 /* end confdefs.h. */
6217 main ()
6221 return 0;
6223 _ACEOF
6224 if ac_fn_c_try_compile "$LINENO"; then :
6225 pgac_cv_prog_CC_cflags__fwrapv=yes
6226 else
6227 pgac_cv_prog_CC_cflags__fwrapv=no
6229 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6230 ac_c_werror_flag=$ac_save_c_werror_flag
6231 CFLAGS="$pgac_save_CFLAGS"
6232 CC="$pgac_save_CC"
6234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
6235 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
6236 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
6237 CFLAGS="${CFLAGS} -fwrapv"
6241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
6242 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
6243 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
6244 $as_echo_n "(cached) " >&6
6245 else
6246 pgac_save_CXXFLAGS=$CXXFLAGS
6247 pgac_save_CXX=$CXX
6248 CXX=${CXX}
6249 CXXFLAGS="${CXXFLAGS} -fwrapv"
6250 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6251 ac_cxx_werror_flag=yes
6252 ac_ext=cpp
6253 ac_cpp='$CXXCPP $CPPFLAGS'
6254 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6255 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6256 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6259 /* end confdefs.h. */
6262 main ()
6266 return 0;
6268 _ACEOF
6269 if ac_fn_cxx_try_compile "$LINENO"; then :
6270 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6271 else
6272 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6275 ac_ext=c
6276 ac_cpp='$CPP $CPPFLAGS'
6277 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6278 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6279 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6281 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6282 CXXFLAGS="$pgac_save_CXXFLAGS"
6283 CXX="$pgac_save_CXX"
6285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6286 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6287 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6288 CXXFLAGS="${CXXFLAGS} -fwrapv"
6292 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6295 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6296 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6297 $as_echo_n "(cached) " >&6
6298 else
6299 pgac_save_CFLAGS=$CFLAGS
6300 pgac_save_CC=$CC
6301 CC=${CC}
6302 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6303 ac_save_c_werror_flag=$ac_c_werror_flag
6304 ac_c_werror_flag=yes
6305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6306 /* end confdefs.h. */
6309 main ()
6313 return 0;
6315 _ACEOF
6316 if ac_fn_c_try_compile "$LINENO"; then :
6317 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6318 else
6319 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6321 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6322 ac_c_werror_flag=$ac_save_c_werror_flag
6323 CFLAGS="$pgac_save_CFLAGS"
6324 CC="$pgac_save_CC"
6326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6327 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6328 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6329 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6334 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6335 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6336 $as_echo_n "(cached) " >&6
6337 else
6338 pgac_save_CXXFLAGS=$CXXFLAGS
6339 pgac_save_CXX=$CXX
6340 CXX=${CXX}
6341 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6342 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6343 ac_cxx_werror_flag=yes
6344 ac_ext=cpp
6345 ac_cpp='$CXXCPP $CPPFLAGS'
6346 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6347 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6348 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6351 /* end confdefs.h. */
6354 main ()
6358 return 0;
6360 _ACEOF
6361 if ac_fn_cxx_try_compile "$LINENO"; then :
6362 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6363 else
6364 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6366 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6367 ac_ext=c
6368 ac_cpp='$CPP $CPPFLAGS'
6369 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6370 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6371 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6373 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6374 CXXFLAGS="$pgac_save_CXXFLAGS"
6375 CXX="$pgac_save_CXX"
6377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6378 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6379 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6380 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6384 # Optimization flags for specific files that benefit from loop unrolling
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6386 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6387 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6388 $as_echo_n "(cached) " >&6
6389 else
6390 pgac_save_CFLAGS=$CFLAGS
6391 pgac_save_CC=$CC
6392 CC=${CC}
6393 CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6394 ac_save_c_werror_flag=$ac_c_werror_flag
6395 ac_c_werror_flag=yes
6396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6397 /* end confdefs.h. */
6400 main ()
6404 return 0;
6406 _ACEOF
6407 if ac_fn_c_try_compile "$LINENO"; then :
6408 pgac_cv_prog_CC_cflags__funroll_loops=yes
6409 else
6410 pgac_cv_prog_CC_cflags__funroll_loops=no
6412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6413 ac_c_werror_flag=$ac_save_c_werror_flag
6414 CFLAGS="$pgac_save_CFLAGS"
6415 CC="$pgac_save_CC"
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6418 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6419 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6420 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6424 # Optimization flags for specific files that benefit from vectorization
6425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6426 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6427 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6428 $as_echo_n "(cached) " >&6
6429 else
6430 pgac_save_CFLAGS=$CFLAGS
6431 pgac_save_CC=$CC
6432 CC=${CC}
6433 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6434 ac_save_c_werror_flag=$ac_c_werror_flag
6435 ac_c_werror_flag=yes
6436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6437 /* end confdefs.h. */
6440 main ()
6444 return 0;
6446 _ACEOF
6447 if ac_fn_c_try_compile "$LINENO"; then :
6448 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6449 else
6450 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6452 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6453 ac_c_werror_flag=$ac_save_c_werror_flag
6454 CFLAGS="$pgac_save_CFLAGS"
6455 CC="$pgac_save_CC"
6457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6458 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6459 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6460 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6465 # The following tests want to suppress various unhelpful warnings by adding
6466 # -Wno-foo switches. But gcc won't complain about unrecognized -Wno-foo
6467 # switches, so we have to test for the positive form and if that works,
6468 # add the negative form. Note that tests of this form typically need to
6469 # be duplicated in the BITCODE_CFLAGS setup stanza below.
6471 # Suppress clang's unhelpful unused-command-line-argument warnings.
6472 NOT_THE_CFLAGS=""
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6474 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6475 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6476 $as_echo_n "(cached) " >&6
6477 else
6478 pgac_save_CFLAGS=$CFLAGS
6479 pgac_save_CC=$CC
6480 CC=${CC}
6481 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6482 ac_save_c_werror_flag=$ac_c_werror_flag
6483 ac_c_werror_flag=yes
6484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6485 /* end confdefs.h. */
6488 main ()
6492 return 0;
6494 _ACEOF
6495 if ac_fn_c_try_compile "$LINENO"; then :
6496 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6497 else
6498 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6500 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6501 ac_c_werror_flag=$ac_save_c_werror_flag
6502 CFLAGS="$pgac_save_CFLAGS"
6503 CC="$pgac_save_CC"
6505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6506 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6507 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6508 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6512 if test -n "$NOT_THE_CFLAGS"; then
6513 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6515 # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
6516 # of warnings when building plperl because of usages in the Perl headers.
6517 NOT_THE_CFLAGS=""
6518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
6519 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
6520 if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then :
6521 $as_echo_n "(cached) " >&6
6522 else
6523 pgac_save_CFLAGS=$CFLAGS
6524 pgac_save_CC=$CC
6525 CC=${CC}
6526 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6527 ac_save_c_werror_flag=$ac_c_werror_flag
6528 ac_c_werror_flag=yes
6529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6530 /* end confdefs.h. */
6533 main ()
6537 return 0;
6539 _ACEOF
6540 if ac_fn_c_try_compile "$LINENO"; then :
6541 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes
6542 else
6543 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no
6545 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6546 ac_c_werror_flag=$ac_save_c_werror_flag
6547 CFLAGS="$pgac_save_CFLAGS"
6548 CC="$pgac_save_CC"
6550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5
6551 $as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; }
6552 if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then
6553 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6557 if test -n "$NOT_THE_CFLAGS"; then
6558 CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
6560 # Similarly disable useless truncation warnings from gcc 8+
6561 NOT_THE_CFLAGS=""
6562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6563 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6564 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6565 $as_echo_n "(cached) " >&6
6566 else
6567 pgac_save_CFLAGS=$CFLAGS
6568 pgac_save_CC=$CC
6569 CC=${CC}
6570 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6571 ac_save_c_werror_flag=$ac_c_werror_flag
6572 ac_c_werror_flag=yes
6573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6574 /* end confdefs.h. */
6577 main ()
6581 return 0;
6583 _ACEOF
6584 if ac_fn_c_try_compile "$LINENO"; then :
6585 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6586 else
6587 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6590 ac_c_werror_flag=$ac_save_c_werror_flag
6591 CFLAGS="$pgac_save_CFLAGS"
6592 CC="$pgac_save_CC"
6594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6595 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6596 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6597 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6601 if test -n "$NOT_THE_CFLAGS"; then
6602 CFLAGS="$CFLAGS -Wno-format-truncation"
6604 NOT_THE_CFLAGS=""
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6606 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6607 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6608 $as_echo_n "(cached) " >&6
6609 else
6610 pgac_save_CFLAGS=$CFLAGS
6611 pgac_save_CC=$CC
6612 CC=${CC}
6613 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6614 ac_save_c_werror_flag=$ac_c_werror_flag
6615 ac_c_werror_flag=yes
6616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6617 /* end confdefs.h. */
6620 main ()
6624 return 0;
6626 _ACEOF
6627 if ac_fn_c_try_compile "$LINENO"; then :
6628 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6629 else
6630 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6632 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6633 ac_c_werror_flag=$ac_save_c_werror_flag
6634 CFLAGS="$pgac_save_CFLAGS"
6635 CC="$pgac_save_CC"
6637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6638 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6639 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6640 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6644 if test -n "$NOT_THE_CFLAGS"; then
6645 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6647 # Suppress clang 16's strict warnings about function casts
6648 NOT_THE_CFLAGS=""
6649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS" >&5
6650 $as_echo_n "checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS... " >&6; }
6651 if ${pgac_cv_prog_CC_cflags__Wcast_function_type_strict+:} false; then :
6652 $as_echo_n "(cached) " >&6
6653 else
6654 pgac_save_CFLAGS=$CFLAGS
6655 pgac_save_CC=$CC
6656 CC=${CC}
6657 CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6658 ac_save_c_werror_flag=$ac_c_werror_flag
6659 ac_c_werror_flag=yes
6660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6661 /* end confdefs.h. */
6664 main ()
6668 return 0;
6670 _ACEOF
6671 if ac_fn_c_try_compile "$LINENO"; then :
6672 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=yes
6673 else
6674 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=no
6676 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6677 ac_c_werror_flag=$ac_save_c_werror_flag
6678 CFLAGS="$pgac_save_CFLAGS"
6679 CC="$pgac_save_CC"
6681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&5
6682 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&6; }
6683 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" = x"yes"; then
6684 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6688 if test -n "$NOT_THE_CFLAGS"; then
6689 CFLAGS="$CFLAGS -Wno-cast-function-type-strict"
6691 elif test "$ICC" = yes; then
6692 # Intel's compiler has a bug/misoptimization in checking for
6693 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6696 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6697 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6698 $as_echo_n "(cached) " >&6
6699 else
6700 pgac_save_CFLAGS=$CFLAGS
6701 pgac_save_CC=$CC
6702 CC=${CC}
6703 CFLAGS="${CFLAGS} -mp1"
6704 ac_save_c_werror_flag=$ac_c_werror_flag
6705 ac_c_werror_flag=yes
6706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6707 /* end confdefs.h. */
6710 main ()
6714 return 0;
6716 _ACEOF
6717 if ac_fn_c_try_compile "$LINENO"; then :
6718 pgac_cv_prog_CC_cflags__mp1=yes
6719 else
6720 pgac_cv_prog_CC_cflags__mp1=no
6722 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6723 ac_c_werror_flag=$ac_save_c_werror_flag
6724 CFLAGS="$pgac_save_CFLAGS"
6725 CC="$pgac_save_CC"
6727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6728 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6729 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6730 CFLAGS="${CFLAGS} -mp1"
6734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6735 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6736 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6737 $as_echo_n "(cached) " >&6
6738 else
6739 pgac_save_CXXFLAGS=$CXXFLAGS
6740 pgac_save_CXX=$CXX
6741 CXX=${CXX}
6742 CXXFLAGS="${CXXFLAGS} -mp1"
6743 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6744 ac_cxx_werror_flag=yes
6745 ac_ext=cpp
6746 ac_cpp='$CXXCPP $CPPFLAGS'
6747 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6748 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6749 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6752 /* end confdefs.h. */
6755 main ()
6759 return 0;
6761 _ACEOF
6762 if ac_fn_cxx_try_compile "$LINENO"; then :
6763 pgac_cv_prog_CXX_cxxflags__mp1=yes
6764 else
6765 pgac_cv_prog_CXX_cxxflags__mp1=no
6767 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6768 ac_ext=c
6769 ac_cpp='$CPP $CPPFLAGS'
6770 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6771 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6772 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6774 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6775 CXXFLAGS="$pgac_save_CXXFLAGS"
6776 CXX="$pgac_save_CXX"
6778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6779 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6780 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6781 CXXFLAGS="${CXXFLAGS} -mp1"
6785 # Make sure strict aliasing is off (though this is said to be the default)
6787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6788 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6789 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6790 $as_echo_n "(cached) " >&6
6791 else
6792 pgac_save_CFLAGS=$CFLAGS
6793 pgac_save_CC=$CC
6794 CC=${CC}
6795 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6796 ac_save_c_werror_flag=$ac_c_werror_flag
6797 ac_c_werror_flag=yes
6798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6799 /* end confdefs.h. */
6802 main ()
6806 return 0;
6808 _ACEOF
6809 if ac_fn_c_try_compile "$LINENO"; then :
6810 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6811 else
6812 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6814 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6815 ac_c_werror_flag=$ac_save_c_werror_flag
6816 CFLAGS="$pgac_save_CFLAGS"
6817 CC="$pgac_save_CC"
6819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6820 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6821 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6822 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6827 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6828 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6829 $as_echo_n "(cached) " >&6
6830 else
6831 pgac_save_CXXFLAGS=$CXXFLAGS
6832 pgac_save_CXX=$CXX
6833 CXX=${CXX}
6834 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6835 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6836 ac_cxx_werror_flag=yes
6837 ac_ext=cpp
6838 ac_cpp='$CXXCPP $CPPFLAGS'
6839 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6840 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6841 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6844 /* end confdefs.h. */
6847 main ()
6851 return 0;
6853 _ACEOF
6854 if ac_fn_cxx_try_compile "$LINENO"; then :
6855 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6856 else
6857 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6860 ac_ext=c
6861 ac_cpp='$CPP $CPPFLAGS'
6862 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6863 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6864 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6866 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6867 CXXFLAGS="$pgac_save_CXXFLAGS"
6868 CXX="$pgac_save_CXX"
6870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6871 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6872 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6873 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6877 elif test "$PORTNAME" = "aix"; then
6878 # AIX's xlc has to have strict aliasing turned off too
6880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6881 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6882 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6883 $as_echo_n "(cached) " >&6
6884 else
6885 pgac_save_CFLAGS=$CFLAGS
6886 pgac_save_CC=$CC
6887 CC=${CC}
6888 CFLAGS="${CFLAGS} -qnoansialias"
6889 ac_save_c_werror_flag=$ac_c_werror_flag
6890 ac_c_werror_flag=yes
6891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6892 /* end confdefs.h. */
6895 main ()
6899 return 0;
6901 _ACEOF
6902 if ac_fn_c_try_compile "$LINENO"; then :
6903 pgac_cv_prog_CC_cflags__qnoansialias=yes
6904 else
6905 pgac_cv_prog_CC_cflags__qnoansialias=no
6907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6908 ac_c_werror_flag=$ac_save_c_werror_flag
6909 CFLAGS="$pgac_save_CFLAGS"
6910 CC="$pgac_save_CC"
6912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6913 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6914 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6915 CFLAGS="${CFLAGS} -qnoansialias"
6919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6920 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6921 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6922 $as_echo_n "(cached) " >&6
6923 else
6924 pgac_save_CXXFLAGS=$CXXFLAGS
6925 pgac_save_CXX=$CXX
6926 CXX=${CXX}
6927 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6928 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6929 ac_cxx_werror_flag=yes
6930 ac_ext=cpp
6931 ac_cpp='$CXXCPP $CPPFLAGS'
6932 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6933 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6934 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6937 /* end confdefs.h. */
6940 main ()
6944 return 0;
6946 _ACEOF
6947 if ac_fn_cxx_try_compile "$LINENO"; then :
6948 pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6949 else
6950 pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6952 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6953 ac_ext=c
6954 ac_cpp='$CPP $CPPFLAGS'
6955 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6956 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6957 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6959 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6960 CXXFLAGS="$pgac_save_CXXFLAGS"
6961 CXX="$pgac_save_CXX"
6963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6964 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6965 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6966 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6972 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6973 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6974 $as_echo_n "(cached) " >&6
6975 else
6976 pgac_save_CFLAGS=$CFLAGS
6977 pgac_save_CC=$CC
6978 CC=${CC}
6979 CFLAGS="${CFLAGS} -qlonglong"
6980 ac_save_c_werror_flag=$ac_c_werror_flag
6981 ac_c_werror_flag=yes
6982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6983 /* end confdefs.h. */
6986 main ()
6990 return 0;
6992 _ACEOF
6993 if ac_fn_c_try_compile "$LINENO"; then :
6994 pgac_cv_prog_CC_cflags__qlonglong=yes
6995 else
6996 pgac_cv_prog_CC_cflags__qlonglong=no
6998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6999 ac_c_werror_flag=$ac_save_c_werror_flag
7000 CFLAGS="$pgac_save_CFLAGS"
7001 CC="$pgac_save_CC"
7003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
7004 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
7005 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
7006 CFLAGS="${CFLAGS} -qlonglong"
7010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
7011 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
7012 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
7013 $as_echo_n "(cached) " >&6
7014 else
7015 pgac_save_CXXFLAGS=$CXXFLAGS
7016 pgac_save_CXX=$CXX
7017 CXX=${CXX}
7018 CXXFLAGS="${CXXFLAGS} -qlonglong"
7019 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7020 ac_cxx_werror_flag=yes
7021 ac_ext=cpp
7022 ac_cpp='$CXXCPP $CPPFLAGS'
7023 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7024 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7025 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7028 /* end confdefs.h. */
7031 main ()
7035 return 0;
7037 _ACEOF
7038 if ac_fn_cxx_try_compile "$LINENO"; then :
7039 pgac_cv_prog_CXX_cxxflags__qlonglong=yes
7040 else
7041 pgac_cv_prog_CXX_cxxflags__qlonglong=no
7043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7044 ac_ext=c
7045 ac_cpp='$CPP $CPPFLAGS'
7046 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7047 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7048 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7050 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7051 CXXFLAGS="$pgac_save_CXXFLAGS"
7052 CXX="$pgac_save_CXX"
7054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
7055 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
7056 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
7057 CXXFLAGS="${CXXFLAGS} -qlonglong"
7063 # If the compiler knows how to hide symbols, add the switch needed for that to
7064 # CFLAGS_SL_MODULE and define HAVE_VISIBILITY_ATTRIBUTE.
7066 # This is done separately from the above because -fvisibility is supported by
7067 # quite a few different compilers, making the required repetition bothersome.
7069 # We might need to add a separate test to check if
7070 # __attribute__((visibility("hidden"))) is supported, if we encounter a
7071 # compiler that supports one of the supported variants of -fvisibility=hidden
7072 # but uses a different syntax to mark a symbol as exported.
7073 if test "$GCC" = yes -o "$SUN_STUDIO_CC" = yes ; then
7074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE" >&5
7075 $as_echo_n "checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
7076 if ${pgac_cv_prog_CC_cflags__fvisibility_hidden+:} false; then :
7077 $as_echo_n "(cached) " >&6
7078 else
7079 pgac_save_CFLAGS=$CFLAGS
7080 pgac_save_CC=$CC
7081 CC=${CC}
7082 CFLAGS="${CFLAGS_SL_MODULE} -fvisibility=hidden"
7083 ac_save_c_werror_flag=$ac_c_werror_flag
7084 ac_c_werror_flag=yes
7085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7086 /* end confdefs.h. */
7089 main ()
7093 return 0;
7095 _ACEOF
7096 if ac_fn_c_try_compile "$LINENO"; then :
7097 pgac_cv_prog_CC_cflags__fvisibility_hidden=yes
7098 else
7099 pgac_cv_prog_CC_cflags__fvisibility_hidden=no
7101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7102 ac_c_werror_flag=$ac_save_c_werror_flag
7103 CFLAGS="$pgac_save_CFLAGS"
7104 CC="$pgac_save_CC"
7106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fvisibility_hidden" >&5
7107 $as_echo "$pgac_cv_prog_CC_cflags__fvisibility_hidden" >&6; }
7108 if test x"$pgac_cv_prog_CC_cflags__fvisibility_hidden" = x"yes"; then
7109 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -fvisibility=hidden"
7113 # For C++ we additionally want -fvisibility-inlines-hidden
7114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
7115 $as_echo_n "checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
7116 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_hidden+:} false; then :
7117 $as_echo_n "(cached) " >&6
7118 else
7119 pgac_save_CXXFLAGS=$CXXFLAGS
7120 pgac_save_CXX=$CXX
7121 CXX=${CXX}
7122 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
7123 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7124 ac_cxx_werror_flag=yes
7125 ac_ext=cpp
7126 ac_cpp='$CXXCPP $CPPFLAGS'
7127 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7128 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7129 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7132 /* end confdefs.h. */
7135 main ()
7139 return 0;
7141 _ACEOF
7142 if ac_fn_cxx_try_compile "$LINENO"; then :
7143 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=yes
7144 else
7145 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=no
7147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7148 ac_ext=c
7149 ac_cpp='$CPP $CPPFLAGS'
7150 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7151 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7152 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7154 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7155 CXXFLAGS="$pgac_save_CXXFLAGS"
7156 CXX="$pgac_save_CXX"
7158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&5
7159 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&6; }
7160 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" = x"yes"; then
7161 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
7164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE" >&5
7165 $as_echo_n "checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE... " >&6; }
7166 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden+:} false; then :
7167 $as_echo_n "(cached) " >&6
7168 else
7169 pgac_save_CXXFLAGS=$CXXFLAGS
7170 pgac_save_CXX=$CXX
7171 CXX=${CXX}
7172 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
7173 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7174 ac_cxx_werror_flag=yes
7175 ac_ext=cpp
7176 ac_cpp='$CXXCPP $CPPFLAGS'
7177 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7178 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7179 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7182 /* end confdefs.h. */
7185 main ()
7189 return 0;
7191 _ACEOF
7192 if ac_fn_cxx_try_compile "$LINENO"; then :
7193 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=yes
7194 else
7195 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=no
7197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7198 ac_ext=c
7199 ac_cpp='$CPP $CPPFLAGS'
7200 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7201 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7202 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7204 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7205 CXXFLAGS="$pgac_save_CXXFLAGS"
7206 CXX="$pgac_save_CXX"
7208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&5
7209 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&6; }
7210 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" = x"yes"; then
7211 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
7214 have_visibility_attribute=$pgac_cv_prog_CC_cflags__fvisibility_hidden
7215 elif test "$PORTNAME" = "aix"; then
7216 # Note that xlc accepts -fvisibility=hidden as a file.
7217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qvisibility=hidden, for CFLAGS_SL_MODULE" >&5
7218 $as_echo_n "checking whether ${CC} supports -qvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
7219 if ${pgac_cv_prog_CC_cflags__qvisibility_hidden+:} false; then :
7220 $as_echo_n "(cached) " >&6
7221 else
7222 pgac_save_CFLAGS=$CFLAGS
7223 pgac_save_CC=$CC
7224 CC=${CC}
7225 CFLAGS="${CFLAGS_SL_MODULE} -qvisibility=hidden"
7226 ac_save_c_werror_flag=$ac_c_werror_flag
7227 ac_c_werror_flag=yes
7228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7229 /* end confdefs.h. */
7232 main ()
7236 return 0;
7238 _ACEOF
7239 if ac_fn_c_try_compile "$LINENO"; then :
7240 pgac_cv_prog_CC_cflags__qvisibility_hidden=yes
7241 else
7242 pgac_cv_prog_CC_cflags__qvisibility_hidden=no
7244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7245 ac_c_werror_flag=$ac_save_c_werror_flag
7246 CFLAGS="$pgac_save_CFLAGS"
7247 CC="$pgac_save_CC"
7249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qvisibility_hidden" >&5
7250 $as_echo "$pgac_cv_prog_CC_cflags__qvisibility_hidden" >&6; }
7251 if test x"$pgac_cv_prog_CC_cflags__qvisibility_hidden" = x"yes"; then
7252 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -qvisibility=hidden"
7256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
7257 $as_echo_n "checking whether ${CXX} supports -qvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
7258 if ${pgac_cv_prog_CXX_cxxflags__qvisibility_hidden+:} false; then :
7259 $as_echo_n "(cached) " >&6
7260 else
7261 pgac_save_CXXFLAGS=$CXXFLAGS
7262 pgac_save_CXX=$CXX
7263 CXX=${CXX}
7264 CXXFLAGS="${CXXFLAGS_SL_MODULE} -qvisibility=hidden"
7265 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7266 ac_cxx_werror_flag=yes
7267 ac_ext=cpp
7268 ac_cpp='$CXXCPP $CPPFLAGS'
7269 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7270 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7271 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7274 /* end confdefs.h. */
7277 main ()
7281 return 0;
7283 _ACEOF
7284 if ac_fn_cxx_try_compile "$LINENO"; then :
7285 pgac_cv_prog_CXX_cxxflags__qvisibility_hidden=yes
7286 else
7287 pgac_cv_prog_CXX_cxxflags__qvisibility_hidden=no
7289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7290 ac_ext=c
7291 ac_cpp='$CPP $CPPFLAGS'
7292 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7293 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7294 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7296 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7297 CXXFLAGS="$pgac_save_CXXFLAGS"
7298 CXX="$pgac_save_CXX"
7300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" >&5
7301 $as_echo "$pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" >&6; }
7302 if test x"$pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" = x"yes"; then
7303 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -qvisibility=hidden"
7306 have_visibility_attribute=$pgac_cv_prog_CC_cflags__qvisibility_hidden
7307 # Old xlc versions (<13.1) don't have support for -qvisibility. Use expfull to force
7308 # all extension module symbols to be exported.
7309 if test "$pgac_cv_prog_CC_cflags__qvisibility_hidden" != "yes"; then
7310 CFLAGS_SL_MODULE="$CFLAGS_SL_MODULE -Wl,-b,expfull"
7314 if test "$have_visibility_attribute" = "yes"; then
7316 $as_echo "#define HAVE_VISIBILITY_ATTRIBUTE 1" >>confdefs.h
7325 # Determine flags used to emit bitcode for JIT inlining.
7326 # 1. We must duplicate any behaviour-changing compiler flags used above,
7327 # to keep compatibility with the compiler used for normal Postgres code.
7328 # 2. We don't bother to duplicate extra-warnings switches --- seeing a
7329 # warning in the main build is enough.
7330 # 3. But we must duplicate -Wno-warning flags, else we'll see those anyway.
7331 if test "$with_llvm" = yes ; then
7332 CLANGXX="$CLANG -xc++"
7334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
7335 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
7336 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
7337 $as_echo_n "(cached) " >&6
7338 else
7339 pgac_save_CFLAGS=$CFLAGS
7340 pgac_save_CC=$CC
7341 CC=${CLANG}
7342 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7343 ac_save_c_werror_flag=$ac_c_werror_flag
7344 ac_c_werror_flag=yes
7345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7346 /* end confdefs.h. */
7349 main ()
7353 return 0;
7355 _ACEOF
7356 if ac_fn_c_try_compile "$LINENO"; then :
7357 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
7358 else
7359 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
7361 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7362 ac_c_werror_flag=$ac_save_c_werror_flag
7363 CFLAGS="$pgac_save_CFLAGS"
7364 CC="$pgac_save_CC"
7366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
7367 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
7368 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
7369 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
7373 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
7374 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
7375 $as_echo_n "(cached) " >&6
7376 else
7377 pgac_save_CXXFLAGS=$CXXFLAGS
7378 pgac_save_CXX=$CXX
7379 CXX=${CLANGXX}
7380 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7381 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7382 ac_cxx_werror_flag=yes
7383 ac_ext=cpp
7384 ac_cpp='$CXXCPP $CPPFLAGS'
7385 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7386 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7387 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7390 /* end confdefs.h. */
7393 main ()
7397 return 0;
7399 _ACEOF
7400 if ac_fn_cxx_try_compile "$LINENO"; then :
7401 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
7402 else
7403 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
7405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7406 ac_ext=c
7407 ac_cpp='$CPP $CPPFLAGS'
7408 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7409 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7410 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7412 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7413 CXXFLAGS="$pgac_save_CXXFLAGS"
7414 CXX="$pgac_save_CXX"
7416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
7417 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
7418 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
7419 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
7423 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
7424 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
7425 $as_echo_n "(cached) " >&6
7426 else
7427 pgac_save_CFLAGS=$CFLAGS
7428 pgac_save_CC=$CC
7429 CC=${CLANG}
7430 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7431 ac_save_c_werror_flag=$ac_c_werror_flag
7432 ac_c_werror_flag=yes
7433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7434 /* end confdefs.h. */
7437 main ()
7441 return 0;
7443 _ACEOF
7444 if ac_fn_c_try_compile "$LINENO"; then :
7445 pgac_cv_prog_CLANG_cflags__fwrapv=yes
7446 else
7447 pgac_cv_prog_CLANG_cflags__fwrapv=no
7449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7450 ac_c_werror_flag=$ac_save_c_werror_flag
7451 CFLAGS="$pgac_save_CFLAGS"
7452 CC="$pgac_save_CC"
7454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
7455 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
7456 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
7457 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
7461 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
7462 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
7463 $as_echo_n "(cached) " >&6
7464 else
7465 pgac_save_CXXFLAGS=$CXXFLAGS
7466 pgac_save_CXX=$CXX
7467 CXX=${CLANGXX}
7468 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7469 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7470 ac_cxx_werror_flag=yes
7471 ac_ext=cpp
7472 ac_cpp='$CXXCPP $CPPFLAGS'
7473 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7474 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7475 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7478 /* end confdefs.h. */
7481 main ()
7485 return 0;
7487 _ACEOF
7488 if ac_fn_cxx_try_compile "$LINENO"; then :
7489 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
7490 else
7491 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
7493 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7494 ac_ext=c
7495 ac_cpp='$CPP $CPPFLAGS'
7496 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7497 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7498 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7500 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7501 CXXFLAGS="$pgac_save_CXXFLAGS"
7502 CXX="$pgac_save_CXX"
7504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
7505 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
7506 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
7507 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
7511 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
7512 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
7513 $as_echo_n "(cached) " >&6
7514 else
7515 pgac_save_CFLAGS=$CFLAGS
7516 pgac_save_CC=$CC
7517 CC=${CLANG}
7518 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7519 ac_save_c_werror_flag=$ac_c_werror_flag
7520 ac_c_werror_flag=yes
7521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7522 /* end confdefs.h. */
7525 main ()
7529 return 0;
7531 _ACEOF
7532 if ac_fn_c_try_compile "$LINENO"; then :
7533 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7534 else
7535 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7537 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7538 ac_c_werror_flag=$ac_save_c_werror_flag
7539 CFLAGS="$pgac_save_CFLAGS"
7540 CC="$pgac_save_CC"
7542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7543 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7544 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7545 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7549 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7550 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7551 $as_echo_n "(cached) " >&6
7552 else
7553 pgac_save_CXXFLAGS=$CXXFLAGS
7554 pgac_save_CXX=$CXX
7555 CXX=${CLANGXX}
7556 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7557 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7558 ac_cxx_werror_flag=yes
7559 ac_ext=cpp
7560 ac_cpp='$CXXCPP $CPPFLAGS'
7561 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7562 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7563 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7566 /* end confdefs.h. */
7569 main ()
7573 return 0;
7575 _ACEOF
7576 if ac_fn_cxx_try_compile "$LINENO"; then :
7577 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7578 else
7579 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7581 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7582 ac_ext=c
7583 ac_cpp='$CPP $CPPFLAGS'
7584 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7585 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7586 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7588 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7589 CXXFLAGS="$pgac_save_CXXFLAGS"
7590 CXX="$pgac_save_CXX"
7592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7593 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7594 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7595 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS" >&5
7600 $as_echo_n "checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS... " >&6; }
7601 if ${pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers+:} false; then :
7602 $as_echo_n "(cached) " >&6
7603 else
7604 pgac_save_CFLAGS=$CFLAGS
7605 pgac_save_CC=$CC
7606 CC=${CLANG}
7607 CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7608 ac_save_c_werror_flag=$ac_c_werror_flag
7609 ac_c_werror_flag=yes
7610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7611 /* end confdefs.h. */
7614 main ()
7618 return 0;
7620 _ACEOF
7621 if ac_fn_c_try_compile "$LINENO"; then :
7622 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=yes
7623 else
7624 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=no
7626 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7627 ac_c_werror_flag=$ac_save_c_werror_flag
7628 CFLAGS="$pgac_save_CFLAGS"
7629 CC="$pgac_save_CC"
7631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&5
7632 $as_echo "$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&6; }
7633 if test x"$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" = x"yes"; then
7634 BITCODE_CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS" >&5
7638 $as_echo_n "checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS... " >&6; }
7639 if ${pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers+:} false; then :
7640 $as_echo_n "(cached) " >&6
7641 else
7642 pgac_save_CXXFLAGS=$CXXFLAGS
7643 pgac_save_CXX=$CXX
7644 CXX=${CLANGXX}
7645 CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7646 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7647 ac_cxx_werror_flag=yes
7648 ac_ext=cpp
7649 ac_cpp='$CXXCPP $CPPFLAGS'
7650 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7651 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7652 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7655 /* end confdefs.h. */
7658 main ()
7662 return 0;
7664 _ACEOF
7665 if ac_fn_cxx_try_compile "$LINENO"; then :
7666 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=yes
7667 else
7668 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=no
7670 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7671 ac_ext=c
7672 ac_cpp='$CPP $CPPFLAGS'
7673 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7674 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7675 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7677 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7678 CXXFLAGS="$pgac_save_CXXFLAGS"
7679 CXX="$pgac_save_CXX"
7681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&5
7682 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&6; }
7683 if test x"$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" = x"yes"; then
7684 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7688 NOT_THE_CFLAGS=""
7689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
7690 $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
7691 if ${pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument+:} false; then :
7692 $as_echo_n "(cached) " >&6
7693 else
7694 pgac_save_CFLAGS=$CFLAGS
7695 pgac_save_CC=$CC
7696 CC=${CLANG}
7697 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7698 ac_save_c_werror_flag=$ac_c_werror_flag
7699 ac_c_werror_flag=yes
7700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7701 /* end confdefs.h. */
7704 main ()
7708 return 0;
7710 _ACEOF
7711 if ac_fn_c_try_compile "$LINENO"; then :
7712 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=yes
7713 else
7714 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=no
7716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7717 ac_c_werror_flag=$ac_save_c_werror_flag
7718 CFLAGS="$pgac_save_CFLAGS"
7719 CC="$pgac_save_CC"
7721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&5
7722 $as_echo "$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&6; }
7723 if test x"$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" = x"yes"; then
7724 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7727 if test -n "$NOT_THE_CFLAGS"; then
7728 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-unused-command-line-argument"
7730 NOT_THE_CFLAGS=""
7731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
7732 $as_echo_n "checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
7733 if ${pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro+:} false; then :
7734 $as_echo_n "(cached) " >&6
7735 else
7736 pgac_save_CFLAGS=$CFLAGS
7737 pgac_save_CC=$CC
7738 CC=${CLANG}
7739 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7740 ac_save_c_werror_flag=$ac_c_werror_flag
7741 ac_c_werror_flag=yes
7742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7743 /* end confdefs.h. */
7746 main ()
7750 return 0;
7752 _ACEOF
7753 if ac_fn_c_try_compile "$LINENO"; then :
7754 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=yes
7755 else
7756 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=no
7758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7759 ac_c_werror_flag=$ac_save_c_werror_flag
7760 CFLAGS="$pgac_save_CFLAGS"
7761 CC="$pgac_save_CC"
7763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&5
7764 $as_echo "$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&6; }
7765 if test x"$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" = x"yes"; then
7766 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7769 if test -n "$NOT_THE_CFLAGS"; then
7770 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
7772 NOT_THE_CFLAGS=""
7773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
7774 $as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
7775 if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :
7776 $as_echo_n "(cached) " >&6
7777 else
7778 pgac_save_CFLAGS=$CFLAGS
7779 pgac_save_CC=$CC
7780 CC=${CLANG}
7781 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7782 ac_save_c_werror_flag=$ac_c_werror_flag
7783 ac_c_werror_flag=yes
7784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7785 /* end confdefs.h. */
7788 main ()
7792 return 0;
7794 _ACEOF
7795 if ac_fn_c_try_compile "$LINENO"; then :
7796 pgac_cv_prog_CLANG_cflags__Wformat_truncation=yes
7797 else
7798 pgac_cv_prog_CLANG_cflags__Wformat_truncation=no
7800 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7801 ac_c_werror_flag=$ac_save_c_werror_flag
7802 CFLAGS="$pgac_save_CFLAGS"
7803 CC="$pgac_save_CC"
7805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&5
7806 $as_echo "$pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&6; }
7807 if test x"$pgac_cv_prog_CLANG_cflags__Wformat_truncation" = x"yes"; then
7808 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7811 if test -n "$NOT_THE_CFLAGS"; then
7812 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"
7814 NOT_THE_CFLAGS=""
7815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
7816 $as_echo_n "checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
7817 if ${pgac_cv_prog_CLANG_cflags__Wstringop_truncation+:} false; then :
7818 $as_echo_n "(cached) " >&6
7819 else
7820 pgac_save_CFLAGS=$CFLAGS
7821 pgac_save_CC=$CC
7822 CC=${CLANG}
7823 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7824 ac_save_c_werror_flag=$ac_c_werror_flag
7825 ac_c_werror_flag=yes
7826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7827 /* end confdefs.h. */
7830 main ()
7834 return 0;
7836 _ACEOF
7837 if ac_fn_c_try_compile "$LINENO"; then :
7838 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=yes
7839 else
7840 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=no
7842 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7843 ac_c_werror_flag=$ac_save_c_werror_flag
7844 CFLAGS="$pgac_save_CFLAGS"
7845 CC="$pgac_save_CC"
7847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&5
7848 $as_echo "$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&6; }
7849 if test x"$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" = x"yes"; then
7850 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7853 if test -n "$NOT_THE_CFLAGS"; then
7854 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-stringop-truncation"
7858 # supply -g if --enable-debug
7859 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7860 CFLAGS="$CFLAGS -g"
7863 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7864 CXXFLAGS="$CXXFLAGS -g"
7867 # enable code coverage if --enable-coverage
7868 if test "$enable_coverage" = yes; then
7869 if test "$GCC" = yes; then
7870 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7871 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7872 else
7873 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7877 # enable profiling if --enable-profiling
7878 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7879 if test "$GCC" = yes; then
7881 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7883 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7884 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7885 else
7886 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7890 # On Solaris, we need this #define to get POSIX-conforming versions
7891 # of many interfaces (sigwait, getpwuid_r, ...).
7892 if test "$PORTNAME" = "solaris"; then
7893 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
7896 # We already have this in Makefile.win32, but configure needs it too
7897 if test "$PORTNAME" = "win32"; then
7898 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7901 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7902 # user-specified flags (if any) at the end. This lets users override
7903 # the automatic additions.
7904 CFLAGS="$CFLAGS $user_CFLAGS"
7905 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7906 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7907 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7912 # The template file must set up CFLAGS_SL; we don't support user override
7915 # Check if the compiler still works with the final flag settings
7916 # (note, we're not checking that for CXX, which is optional)
7917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7918 $as_echo_n "checking whether the C compiler still works... " >&6; }
7919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7920 /* end confdefs.h. */
7923 main ()
7925 return 0;
7927 return 0;
7929 _ACEOF
7930 if ac_fn_c_try_link "$LINENO"; then :
7931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7932 $as_echo "yes" >&6; }
7933 else
7934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7935 $as_echo "no" >&6; }
7936 as_fn_error $? "cannot proceed" "$LINENO" 5
7938 rm -f core conftest.err conftest.$ac_objext \
7939 conftest$ac_exeext conftest.$ac_ext
7941 # Defend against gcc -ffast-math
7942 if test "$GCC" = yes; then
7943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7944 /* end confdefs.h. */
7947 main ()
7949 #ifdef __FAST_MATH__
7950 choke me
7951 #endif
7953 return 0;
7955 _ACEOF
7956 if ac_fn_c_try_compile "$LINENO"; then :
7958 else
7959 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7961 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7964 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7965 # versions of clang do not understand -fexcess-precision=standard, the use of
7966 # x87 floating point operations leads to problems like isinf possibly returning
7967 # false for a value that is infinite when converted from the 80bit register to
7968 # the 8byte memory representation.
7970 # Only perform the test if the compiler doesn't understand
7971 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7972 # automatically.
7973 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7975 /* end confdefs.h. */
7978 main ()
7981 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7982 choke me
7983 #endif
7986 return 0;
7988 _ACEOF
7989 if ac_fn_c_try_compile "$LINENO"; then :
7991 else
7992 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7994 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7997 ac_ext=c
7998 ac_cpp='$CPP $CPPFLAGS'
7999 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8000 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8001 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
8003 $as_echo_n "checking how to run the C preprocessor... " >&6; }
8004 # On Suns, sometimes $CPP names a directory.
8005 if test -n "$CPP" && test -d "$CPP"; then
8006 CPP=
8008 if test -z "$CPP"; then
8009 if ${ac_cv_prog_CPP+:} false; then :
8010 $as_echo_n "(cached) " >&6
8011 else
8012 # Double quotes because CPP needs to be expanded
8013 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
8015 ac_preproc_ok=false
8016 for ac_c_preproc_warn_flag in '' yes
8018 # Use a header file that comes with gcc, so configuring glibc
8019 # with a fresh cross-compiler works.
8020 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8021 # <limits.h> exists even on freestanding compilers.
8022 # On the NeXT, cc -E runs the code through the compiler's parser,
8023 # not just through cpp. "Syntax error" is here to catch this case.
8024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8025 /* end confdefs.h. */
8026 #ifdef __STDC__
8027 # include <limits.h>
8028 #else
8029 # include <assert.h>
8030 #endif
8031 Syntax error
8032 _ACEOF
8033 if ac_fn_c_try_cpp "$LINENO"; then :
8035 else
8036 # Broken: fails on valid input.
8037 continue
8039 rm -f conftest.err conftest.i conftest.$ac_ext
8041 # OK, works on sane cases. Now check whether nonexistent headers
8042 # can be detected and how.
8043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8044 /* end confdefs.h. */
8045 #include <ac_nonexistent.h>
8046 _ACEOF
8047 if ac_fn_c_try_cpp "$LINENO"; then :
8048 # Broken: success on invalid input.
8049 continue
8050 else
8051 # Passes both tests.
8052 ac_preproc_ok=:
8053 break
8055 rm -f conftest.err conftest.i conftest.$ac_ext
8057 done
8058 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8059 rm -f conftest.i conftest.err conftest.$ac_ext
8060 if $ac_preproc_ok; then :
8061 break
8064 done
8065 ac_cv_prog_CPP=$CPP
8068 CPP=$ac_cv_prog_CPP
8069 else
8070 ac_cv_prog_CPP=$CPP
8072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
8073 $as_echo "$CPP" >&6; }
8074 ac_preproc_ok=false
8075 for ac_c_preproc_warn_flag in '' yes
8077 # Use a header file that comes with gcc, so configuring glibc
8078 # with a fresh cross-compiler works.
8079 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8080 # <limits.h> exists even on freestanding compilers.
8081 # On the NeXT, cc -E runs the code through the compiler's parser,
8082 # not just through cpp. "Syntax error" is here to catch this case.
8083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8084 /* end confdefs.h. */
8085 #ifdef __STDC__
8086 # include <limits.h>
8087 #else
8088 # include <assert.h>
8089 #endif
8090 Syntax error
8091 _ACEOF
8092 if ac_fn_c_try_cpp "$LINENO"; then :
8094 else
8095 # Broken: fails on valid input.
8096 continue
8098 rm -f conftest.err conftest.i conftest.$ac_ext
8100 # OK, works on sane cases. Now check whether nonexistent headers
8101 # can be detected and how.
8102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8103 /* end confdefs.h. */
8104 #include <ac_nonexistent.h>
8105 _ACEOF
8106 if ac_fn_c_try_cpp "$LINENO"; then :
8107 # Broken: success on invalid input.
8108 continue
8109 else
8110 # Passes both tests.
8111 ac_preproc_ok=:
8112 break
8114 rm -f conftest.err conftest.i conftest.$ac_ext
8116 done
8117 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8118 rm -f conftest.i conftest.err conftest.$ac_ext
8119 if $ac_preproc_ok; then :
8121 else
8122 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8123 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8124 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
8125 See \`config.log' for more details" "$LINENO" 5; }
8128 ac_ext=c
8129 ac_cpp='$CPP $CPPFLAGS'
8130 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8131 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8132 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8138 # Set up TAS assembly code if needed; the template file has now had its
8139 # chance to request this.
8141 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
8144 if test "$need_tas" = yes ; then
8145 TAS=tas.o
8146 else
8147 TAS=""
8152 cat >>confdefs.h <<_ACEOF
8153 #define DLSUFFIX "$DLSUFFIX"
8154 _ACEOF
8158 # Set up pkg_config in case we need it below
8167 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8168 if test -n "$ac_tool_prefix"; then
8169 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8170 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
8171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8172 $as_echo_n "checking for $ac_word... " >&6; }
8173 if ${ac_cv_path_PKG_CONFIG+:} false; then :
8174 $as_echo_n "(cached) " >&6
8175 else
8176 case $PKG_CONFIG in
8177 [\\/]* | ?:[\\/]*)
8178 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8182 for as_dir in $PATH
8184 IFS=$as_save_IFS
8185 test -z "$as_dir" && as_dir=.
8186 for ac_exec_ext in '' $ac_executable_extensions; do
8187 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8188 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8189 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8190 break 2
8192 done
8193 done
8194 IFS=$as_save_IFS
8197 esac
8199 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8200 if test -n "$PKG_CONFIG"; then
8201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8202 $as_echo "$PKG_CONFIG" >&6; }
8203 else
8204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8205 $as_echo "no" >&6; }
8210 if test -z "$ac_cv_path_PKG_CONFIG"; then
8211 ac_pt_PKG_CONFIG=$PKG_CONFIG
8212 # Extract the first word of "pkg-config", so it can be a program name with args.
8213 set dummy pkg-config; ac_word=$2
8214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8215 $as_echo_n "checking for $ac_word... " >&6; }
8216 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
8217 $as_echo_n "(cached) " >&6
8218 else
8219 case $ac_pt_PKG_CONFIG in
8220 [\\/]* | ?:[\\/]*)
8221 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8225 for as_dir in $PATH
8227 IFS=$as_save_IFS
8228 test -z "$as_dir" && as_dir=.
8229 for ac_exec_ext in '' $ac_executable_extensions; do
8230 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8231 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8232 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8233 break 2
8235 done
8236 done
8237 IFS=$as_save_IFS
8240 esac
8242 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8243 if test -n "$ac_pt_PKG_CONFIG"; then
8244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8245 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
8246 else
8247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8248 $as_echo "no" >&6; }
8251 if test "x$ac_pt_PKG_CONFIG" = x; then
8252 PKG_CONFIG=""
8253 else
8254 case $cross_compiling:$ac_tool_warned in
8255 yes:)
8256 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8257 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8258 ac_tool_warned=yes ;;
8259 esac
8260 PKG_CONFIG=$ac_pt_PKG_CONFIG
8262 else
8263 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8267 if test -n "$PKG_CONFIG"; then
8268 _pkg_min_version=0.9.0
8269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
8270 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
8271 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8273 $as_echo "yes" >&6; }
8274 else
8275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8276 $as_echo "no" >&6; }
8277 PKG_CONFIG=""
8282 # Automatic dependency tracking
8286 # Check whether --enable-depend was given.
8287 if test "${enable_depend+set}" = set; then :
8288 enableval=$enable_depend;
8289 case $enableval in
8290 yes)
8291 autodepend=yes
8297 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
8299 esac
8301 else
8302 enable_depend=no
8311 # Enable assert checks
8315 # Check whether --enable-cassert was given.
8316 if test "${enable_cassert+set}" = set; then :
8317 enableval=$enable_cassert;
8318 case $enableval in
8319 yes)
8321 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
8328 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
8330 esac
8332 else
8333 enable_cassert=no
8341 # Include directories
8343 ac_save_IFS=$IFS
8344 IFS="${IFS}${PATH_SEPARATOR}"
8345 # SRCH_INC comes from the template file
8346 for dir in $with_includes $SRCH_INC; do
8347 if test -d "$dir"; then
8348 INCLUDES="$INCLUDES -I$dir"
8349 else
8350 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
8351 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
8353 done
8354 IFS=$ac_save_IFS
8359 # Library directories
8361 ac_save_IFS=$IFS
8362 IFS="${IFS}${PATH_SEPARATOR}"
8363 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
8364 for dir in $LIBRARY_DIRS $SRCH_LIB; do
8365 if test -d "$dir"; then
8366 LIBDIRS="$LIBDIRS -L$dir"
8367 else
8368 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
8369 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
8371 done
8372 IFS=$ac_save_IFS
8375 # ICU
8377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
8378 $as_echo_n "checking whether to build with ICU support... " >&6; }
8382 # Check whether --with-icu was given.
8383 if test "${with_icu+set}" = set; then :
8384 withval=$with_icu;
8385 case $withval in
8386 yes)
8388 $as_echo "#define USE_ICU 1" >>confdefs.h
8395 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
8397 esac
8399 else
8400 with_icu=yes
8402 $as_echo "#define USE_ICU 1" >>confdefs.h
8407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
8408 $as_echo "$with_icu" >&6; }
8411 if test "$with_icu" = yes; then
8413 pkg_failed=no
8414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
8415 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
8417 if test -n "$ICU_CFLAGS"; then
8418 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
8419 elif test -n "$PKG_CONFIG"; then
8420 if test -n "$PKG_CONFIG" && \
8421 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8422 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8423 ac_status=$?
8424 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8425 test $ac_status = 0; }; then
8426 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
8427 test "x$?" != "x0" && pkg_failed=yes
8428 else
8429 pkg_failed=yes
8431 else
8432 pkg_failed=untried
8434 if test -n "$ICU_LIBS"; then
8435 pkg_cv_ICU_LIBS="$ICU_LIBS"
8436 elif test -n "$PKG_CONFIG"; then
8437 if test -n "$PKG_CONFIG" && \
8438 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8439 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8440 ac_status=$?
8441 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8442 test $ac_status = 0; }; then
8443 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
8444 test "x$?" != "x0" && pkg_failed=yes
8445 else
8446 pkg_failed=yes
8448 else
8449 pkg_failed=untried
8454 if test $pkg_failed = yes; then
8455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8456 $as_echo "no" >&6; }
8458 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8459 _pkg_short_errors_supported=yes
8460 else
8461 _pkg_short_errors_supported=no
8463 if test $_pkg_short_errors_supported = yes; then
8464 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8465 else
8466 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8468 # Put the nasty error message in config.log where it belongs
8469 echo "$ICU_PKG_ERRORS" >&5
8471 as_fn_error $? "ICU library not found
8472 If you have ICU already installed, see config.log for details on the
8473 failure. It is possible the compiler isn't looking in the proper directory.
8474 Use --without-icu to disable ICU support." "$LINENO" 5
8475 elif test $pkg_failed = untried; then
8476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8477 $as_echo "no" >&6; }
8478 as_fn_error $? "ICU library not found
8479 If you have ICU already installed, see config.log for details on the
8480 failure. It is possible the compiler isn't looking in the proper directory.
8481 Use --without-icu to disable ICU support." "$LINENO" 5
8482 else
8483 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
8484 ICU_LIBS=$pkg_cv_ICU_LIBS
8485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8486 $as_echo "yes" >&6; }
8492 # Optionally build Tcl modules (PL/Tcl)
8494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
8495 $as_echo_n "checking whether to build with Tcl... " >&6; }
8499 # Check whether --with-tcl was given.
8500 if test "${with_tcl+set}" = set; then :
8501 withval=$with_tcl;
8502 case $withval in
8503 yes)
8510 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
8512 esac
8514 else
8515 with_tcl=no
8520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
8521 $as_echo "$with_tcl" >&6; }
8524 # We see if the path to the Tcl/Tk configuration scripts is specified.
8525 # This will override the use of tclsh to find the paths to search.
8530 # Check whether --with-tclconfig was given.
8531 if test "${with_tclconfig+set}" = set; then :
8532 withval=$with_tclconfig;
8533 case $withval in
8534 yes)
8535 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8538 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8543 esac
8550 # Optionally build Perl modules (PL/Perl)
8552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
8553 $as_echo_n "checking whether to build Perl modules... " >&6; }
8557 # Check whether --with-perl was given.
8558 if test "${with_perl+set}" = set; then :
8559 withval=$with_perl;
8560 case $withval in
8561 yes)
8568 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
8570 esac
8572 else
8573 with_perl=no
8578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
8579 $as_echo "$with_perl" >&6; }
8583 # Optionally build Python modules (PL/Python)
8585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
8586 $as_echo_n "checking whether to build Python modules... " >&6; }
8590 # Check whether --with-python was given.
8591 if test "${with_python+set}" = set; then :
8592 withval=$with_python;
8593 case $withval in
8594 yes)
8601 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
8603 esac
8605 else
8606 with_python=no
8611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8612 $as_echo "$with_python" >&6; }
8616 # GSSAPI
8618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
8619 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
8623 # Check whether --with-gssapi was given.
8624 if test "${with_gssapi+set}" = set; then :
8625 withval=$with_gssapi;
8626 case $withval in
8627 yes)
8630 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
8632 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
8639 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
8641 esac
8643 else
8644 with_gssapi=no
8649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8650 $as_echo "$with_gssapi" >&6; }
8658 # Kerberos configuration parameters
8663 # Check whether --with-krb-srvnam was given.
8664 if test "${with_krb_srvnam+set}" = set; then :
8665 withval=$with_krb_srvnam;
8666 case $withval in
8667 yes)
8668 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8671 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8676 esac
8678 else
8679 with_krb_srvnam="postgres"
8685 cat >>confdefs.h <<_ACEOF
8686 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8687 _ACEOF
8692 # PAM
8694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8695 $as_echo_n "checking whether to build with PAM support... " >&6; }
8699 # Check whether --with-pam was given.
8700 if test "${with_pam+set}" = set; then :
8701 withval=$with_pam;
8702 case $withval in
8703 yes)
8705 $as_echo "#define USE_PAM 1" >>confdefs.h
8712 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8714 esac
8716 else
8717 with_pam=no
8722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8723 $as_echo "$with_pam" >&6; }
8727 # BSD AUTH
8729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8730 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8734 # Check whether --with-bsd-auth was given.
8735 if test "${with_bsd_auth+set}" = set; then :
8736 withval=$with_bsd_auth;
8737 case $withval in
8738 yes)
8740 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8747 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8749 esac
8751 else
8752 with_bsd_auth=no
8757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8758 $as_echo "$with_bsd_auth" >&6; }
8762 # LDAP
8764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8765 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8769 # Check whether --with-ldap was given.
8770 if test "${with_ldap+set}" = set; then :
8771 withval=$with_ldap;
8772 case $withval in
8773 yes)
8775 $as_echo "#define USE_LDAP 1" >>confdefs.h
8782 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8784 esac
8786 else
8787 with_ldap=no
8792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8793 $as_echo "$with_ldap" >&6; }
8798 # Bonjour
8800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8801 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8805 # Check whether --with-bonjour was given.
8806 if test "${with_bonjour+set}" = set; then :
8807 withval=$with_bonjour;
8808 case $withval in
8809 yes)
8811 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8818 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8820 esac
8822 else
8823 with_bonjour=no
8828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8829 $as_echo "$with_bonjour" >&6; }
8833 # SELinux
8835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8836 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8840 # Check whether --with-selinux was given.
8841 if test "${with_selinux+set}" = set; then :
8842 withval=$with_selinux;
8843 case $withval in
8844 yes)
8851 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8853 esac
8855 else
8856 with_selinux=no
8862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8863 $as_echo "$with_selinux" >&6; }
8866 # Systemd
8868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8869 $as_echo_n "checking whether to build with systemd support... " >&6; }
8873 # Check whether --with-systemd was given.
8874 if test "${with_systemd+set}" = set; then :
8875 withval=$with_systemd;
8876 case $withval in
8877 yes)
8879 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8886 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8888 esac
8890 else
8891 with_systemd=no
8897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8898 $as_echo "$with_systemd" >&6; }
8901 # Readline
8906 # Check whether --with-readline was given.
8907 if test "${with_readline+set}" = set; then :
8908 withval=$with_readline;
8909 case $withval in
8910 yes)
8917 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8919 esac
8921 else
8922 with_readline=yes
8927 # readline on MinGW has problems with backslashes in psql and other bugs.
8928 # This is particularly a problem with non-US code pages.
8929 # Therefore disable its use until we understand the cause. 2004-07-20
8930 if test "$PORTNAME" = "win32"; then
8931 if test "$with_readline" = yes; then
8932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8933 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8934 with_readline=no
8941 # Prefer libedit
8946 # Check whether --with-libedit-preferred was given.
8947 if test "${with_libedit_preferred+set}" = set; then :
8948 withval=$with_libedit_preferred;
8949 case $withval in
8950 yes)
8957 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8959 esac
8961 else
8962 with_libedit_preferred=no
8970 # UUID library
8972 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8973 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8974 # UUID library. More than one of these might be present on a given platform,
8975 # so we make the user say which one she wants.
8980 # Check whether --with-uuid was given.
8981 if test "${with_uuid+set}" = set; then :
8982 withval=$with_uuid;
8983 case $withval in
8984 yes)
8985 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8988 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8993 esac
8998 if test x"$with_uuid" = x"" ; then
8999 with_uuid=no
9004 # Check whether --with-ossp-uuid was given.
9005 if test "${with_ossp_uuid+set}" = set; then :
9006 withval=$with_ossp_uuid;
9007 case $withval in
9008 yes)
9015 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
9017 esac
9019 else
9020 with_ossp_uuid=no
9025 if test "$with_ossp_uuid" = yes ; then
9026 with_uuid=ossp
9029 if test "$with_uuid" != no ; then
9030 if test "$with_uuid" = bsd ; then
9032 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
9034 elif test "$with_uuid" = e2fs ; then
9036 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
9038 elif test "$with_uuid" = ossp ; then
9040 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
9042 else
9043 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
9050 # XML
9052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
9053 $as_echo_n "checking whether to build with XML support... " >&6; }
9057 # Check whether --with-libxml was given.
9058 if test "${with_libxml+set}" = set; then :
9059 withval=$with_libxml;
9060 case $withval in
9061 yes)
9063 $as_echo "#define USE_LIBXML 1" >>confdefs.h
9070 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
9072 esac
9074 else
9075 with_libxml=no
9080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
9081 $as_echo "$with_libxml" >&6; }
9084 if test "$with_libxml" = yes ; then
9085 # Check pkg-config, then xml2-config. But for backwards compatibility,
9086 # setting XML2_CONFIG overrides pkg-config.
9087 have_libxml2_pkg_config=no
9088 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
9090 pkg_failed=no
9091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
9092 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
9094 if test -n "$XML2_CFLAGS"; then
9095 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
9096 elif test -n "$PKG_CONFIG"; then
9097 if test -n "$PKG_CONFIG" && \
9098 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
9099 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
9100 ac_status=$?
9101 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9102 test $ac_status = 0; }; then
9103 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
9104 test "x$?" != "x0" && pkg_failed=yes
9105 else
9106 pkg_failed=yes
9108 else
9109 pkg_failed=untried
9111 if test -n "$XML2_LIBS"; then
9112 pkg_cv_XML2_LIBS="$XML2_LIBS"
9113 elif test -n "$PKG_CONFIG"; then
9114 if test -n "$PKG_CONFIG" && \
9115 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
9116 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
9117 ac_status=$?
9118 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9119 test $ac_status = 0; }; then
9120 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
9121 test "x$?" != "x0" && pkg_failed=yes
9122 else
9123 pkg_failed=yes
9125 else
9126 pkg_failed=untried
9131 if test $pkg_failed = yes; then
9132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9133 $as_echo "no" >&6; }
9135 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9136 _pkg_short_errors_supported=yes
9137 else
9138 _pkg_short_errors_supported=no
9140 if test $_pkg_short_errors_supported = yes; then
9141 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
9142 else
9143 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
9145 # Put the nasty error message in config.log where it belongs
9146 echo "$XML2_PKG_ERRORS" >&5
9148 # do nothing
9149 elif test $pkg_failed = untried; then
9150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9151 $as_echo "no" >&6; }
9152 # do nothing
9153 else
9154 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
9155 XML2_LIBS=$pkg_cv_XML2_LIBS
9156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9157 $as_echo "yes" >&6; }
9158 have_libxml2_pkg_config=yes
9161 if test "$have_libxml2_pkg_config" = no ; then
9162 if test -z "$XML2_CONFIG"; then
9163 for ac_prog in xml2-config
9165 # Extract the first word of "$ac_prog", so it can be a program name with args.
9166 set dummy $ac_prog; ac_word=$2
9167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9168 $as_echo_n "checking for $ac_word... " >&6; }
9169 if ${ac_cv_path_XML2_CONFIG+:} false; then :
9170 $as_echo_n "(cached) " >&6
9171 else
9172 case $XML2_CONFIG in
9173 [\\/]* | ?:[\\/]*)
9174 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
9177 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9178 for as_dir in $PATH
9180 IFS=$as_save_IFS
9181 test -z "$as_dir" && as_dir=.
9182 for ac_exec_ext in '' $ac_executable_extensions; do
9183 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9184 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9185 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9186 break 2
9188 done
9189 done
9190 IFS=$as_save_IFS
9193 esac
9195 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
9196 if test -n "$XML2_CONFIG"; then
9197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
9198 $as_echo "$XML2_CONFIG" >&6; }
9199 else
9200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9201 $as_echo "no" >&6; }
9205 test -n "$XML2_CONFIG" && break
9206 done
9208 else
9209 # Report the value of XML2_CONFIG in configure's output in all cases.
9210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
9211 $as_echo_n "checking for XML2_CONFIG... " >&6; }
9212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
9213 $as_echo "$XML2_CONFIG" >&6; }
9216 if test -n "$XML2_CONFIG"; then
9217 XML2_CFLAGS=`$XML2_CONFIG --cflags`
9218 XML2_LIBS=`$XML2_CONFIG --libs`
9221 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
9222 for pgac_option in $XML2_CFLAGS; do
9223 case $pgac_option in
9224 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9225 esac
9226 done
9227 for pgac_option in $XML2_LIBS; do
9228 case $pgac_option in
9229 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9230 esac
9231 done
9236 # XSLT
9241 # Check whether --with-libxslt was given.
9242 if test "${with_libxslt+set}" = set; then :
9243 withval=$with_libxslt;
9244 case $withval in
9245 yes)
9247 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
9254 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
9256 esac
9258 else
9259 with_libxslt=no
9269 # tzdata
9274 # Check whether --with-system-tzdata was given.
9275 if test "${with_system_tzdata+set}" = set; then :
9276 withval=$with_system_tzdata;
9277 case $withval in
9278 yes)
9279 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
9282 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
9287 esac
9295 # Zlib
9300 # Check whether --with-zlib was given.
9301 if test "${with_zlib+set}" = set; then :
9302 withval=$with_zlib;
9303 case $withval in
9304 yes)
9311 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
9313 esac
9315 else
9316 with_zlib=yes
9324 # LZ4
9326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
9327 $as_echo_n "checking whether to build with LZ4 support... " >&6; }
9331 # Check whether --with-lz4 was given.
9332 if test "${with_lz4+set}" = set; then :
9333 withval=$with_lz4;
9334 case $withval in
9335 yes)
9337 $as_echo "#define USE_LZ4 1" >>confdefs.h
9344 as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
9346 esac
9348 else
9349 with_lz4=no
9354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
9355 $as_echo "$with_lz4" >&6; }
9358 if test "$with_lz4" = yes; then
9360 pkg_failed=no
9361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
9362 $as_echo_n "checking for liblz4... " >&6; }
9364 if test -n "$LZ4_CFLAGS"; then
9365 pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
9366 elif test -n "$PKG_CONFIG"; then
9367 if test -n "$PKG_CONFIG" && \
9368 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9369 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9370 ac_status=$?
9371 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9372 test $ac_status = 0; }; then
9373 pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
9374 test "x$?" != "x0" && pkg_failed=yes
9375 else
9376 pkg_failed=yes
9378 else
9379 pkg_failed=untried
9381 if test -n "$LZ4_LIBS"; then
9382 pkg_cv_LZ4_LIBS="$LZ4_LIBS"
9383 elif test -n "$PKG_CONFIG"; then
9384 if test -n "$PKG_CONFIG" && \
9385 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9386 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9387 ac_status=$?
9388 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9389 test $ac_status = 0; }; then
9390 pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
9391 test "x$?" != "x0" && pkg_failed=yes
9392 else
9393 pkg_failed=yes
9395 else
9396 pkg_failed=untried
9401 if test $pkg_failed = yes; then
9402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9403 $as_echo "no" >&6; }
9405 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9406 _pkg_short_errors_supported=yes
9407 else
9408 _pkg_short_errors_supported=no
9410 if test $_pkg_short_errors_supported = yes; then
9411 LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
9412 else
9413 LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
9415 # Put the nasty error message in config.log where it belongs
9416 echo "$LZ4_PKG_ERRORS" >&5
9418 as_fn_error $? "Package requirements (liblz4) were not met:
9420 $LZ4_PKG_ERRORS
9422 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9423 installed software in a non-standard prefix.
9425 Alternatively, you may set the environment variables LZ4_CFLAGS
9426 and LZ4_LIBS to avoid the need to call pkg-config.
9427 See the pkg-config man page for more details." "$LINENO" 5
9428 elif test $pkg_failed = untried; then
9429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9430 $as_echo "no" >&6; }
9431 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9432 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9433 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9434 is in your PATH or set the PKG_CONFIG environment variable to the full
9435 path to pkg-config.
9437 Alternatively, you may set the environment variables LZ4_CFLAGS
9438 and LZ4_LIBS to avoid the need to call pkg-config.
9439 See the pkg-config man page for more details.
9441 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9442 See \`config.log' for more details" "$LINENO" 5; }
9443 else
9444 LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
9445 LZ4_LIBS=$pkg_cv_LZ4_LIBS
9446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9447 $as_echo "yes" >&6; }
9450 # We only care about -I, -D, and -L switches;
9451 # note that -llz4 will be added by AC_CHECK_LIB below.
9452 for pgac_option in $LZ4_CFLAGS; do
9453 case $pgac_option in
9454 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9455 esac
9456 done
9457 for pgac_option in $LZ4_LIBS; do
9458 case $pgac_option in
9459 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9460 esac
9461 done
9465 # ZSTD
9467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ZSTD support" >&5
9468 $as_echo_n "checking whether to build with ZSTD support... " >&6; }
9472 # Check whether --with-zstd was given.
9473 if test "${with_zstd+set}" = set; then :
9474 withval=$with_zstd;
9475 case $withval in
9476 yes)
9478 $as_echo "#define USE_ZSTD 1" >>confdefs.h
9485 as_fn_error $? "no argument expected for --with-zstd option" "$LINENO" 5
9487 esac
9489 else
9490 with_zstd=no
9495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_zstd" >&5
9496 $as_echo "$with_zstd" >&6; }
9499 if test "$with_zstd" = yes; then
9501 pkg_failed=no
9502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd >= 1.4.0" >&5
9503 $as_echo_n "checking for libzstd >= 1.4.0... " >&6; }
9505 if test -n "$ZSTD_CFLAGS"; then
9506 pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
9507 elif test -n "$PKG_CONFIG"; then
9508 if test -n "$PKG_CONFIG" && \
9509 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9510 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9511 ac_status=$?
9512 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9513 test $ac_status = 0; }; then
9514 pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd >= 1.4.0" 2>/dev/null`
9515 test "x$?" != "x0" && pkg_failed=yes
9516 else
9517 pkg_failed=yes
9519 else
9520 pkg_failed=untried
9522 if test -n "$ZSTD_LIBS"; then
9523 pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
9524 elif test -n "$PKG_CONFIG"; then
9525 if test -n "$PKG_CONFIG" && \
9526 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9527 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9528 ac_status=$?
9529 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9530 test $ac_status = 0; }; then
9531 pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd >= 1.4.0" 2>/dev/null`
9532 test "x$?" != "x0" && pkg_failed=yes
9533 else
9534 pkg_failed=yes
9536 else
9537 pkg_failed=untried
9542 if test $pkg_failed = yes; then
9543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9544 $as_echo "no" >&6; }
9546 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9547 _pkg_short_errors_supported=yes
9548 else
9549 _pkg_short_errors_supported=no
9551 if test $_pkg_short_errors_supported = yes; then
9552 ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9553 else
9554 ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9556 # Put the nasty error message in config.log where it belongs
9557 echo "$ZSTD_PKG_ERRORS" >&5
9559 as_fn_error $? "Package requirements (libzstd >= 1.4.0) were not met:
9561 $ZSTD_PKG_ERRORS
9563 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9564 installed software in a non-standard prefix.
9566 Alternatively, you may set the environment variables ZSTD_CFLAGS
9567 and ZSTD_LIBS to avoid the need to call pkg-config.
9568 See the pkg-config man page for more details." "$LINENO" 5
9569 elif test $pkg_failed = untried; then
9570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9571 $as_echo "no" >&6; }
9572 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9573 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9574 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9575 is in your PATH or set the PKG_CONFIG environment variable to the full
9576 path to pkg-config.
9578 Alternatively, you may set the environment variables ZSTD_CFLAGS
9579 and ZSTD_LIBS to avoid the need to call pkg-config.
9580 See the pkg-config man page for more details.
9582 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9583 See \`config.log' for more details" "$LINENO" 5; }
9584 else
9585 ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
9586 ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
9587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9588 $as_echo "yes" >&6; }
9591 # We only care about -I, -D, and -L switches;
9592 # note that -lzstd will be added by AC_CHECK_LIB below.
9593 for pgac_option in $ZSTD_CFLAGS; do
9594 case $pgac_option in
9595 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9596 esac
9597 done
9598 for pgac_option in $ZSTD_LIBS; do
9599 case $pgac_option in
9600 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9601 esac
9602 done
9605 # Assignments
9608 CPPFLAGS="$CPPFLAGS $INCLUDES"
9609 LDFLAGS="$LDFLAGS $LIBDIRS"
9615 if test -n "$ac_tool_prefix"; then
9616 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9617 set dummy ${ac_tool_prefix}strip; ac_word=$2
9618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9619 $as_echo_n "checking for $ac_word... " >&6; }
9620 if ${ac_cv_prog_STRIP+:} false; then :
9621 $as_echo_n "(cached) " >&6
9622 else
9623 if test -n "$STRIP"; then
9624 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9625 else
9626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9627 for as_dir in $PATH
9629 IFS=$as_save_IFS
9630 test -z "$as_dir" && as_dir=.
9631 for ac_exec_ext in '' $ac_executable_extensions; do
9632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9633 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9635 break 2
9637 done
9638 done
9639 IFS=$as_save_IFS
9643 STRIP=$ac_cv_prog_STRIP
9644 if test -n "$STRIP"; then
9645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9646 $as_echo "$STRIP" >&6; }
9647 else
9648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9649 $as_echo "no" >&6; }
9654 if test -z "$ac_cv_prog_STRIP"; then
9655 ac_ct_STRIP=$STRIP
9656 # Extract the first word of "strip", so it can be a program name with args.
9657 set dummy strip; ac_word=$2
9658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9659 $as_echo_n "checking for $ac_word... " >&6; }
9660 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9661 $as_echo_n "(cached) " >&6
9662 else
9663 if test -n "$ac_ct_STRIP"; then
9664 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9665 else
9666 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9667 for as_dir in $PATH
9669 IFS=$as_save_IFS
9670 test -z "$as_dir" && as_dir=.
9671 for ac_exec_ext in '' $ac_executable_extensions; do
9672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9673 ac_cv_prog_ac_ct_STRIP="strip"
9674 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9675 break 2
9677 done
9678 done
9679 IFS=$as_save_IFS
9683 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9684 if test -n "$ac_ct_STRIP"; then
9685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9686 $as_echo "$ac_ct_STRIP" >&6; }
9687 else
9688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9689 $as_echo "no" >&6; }
9692 if test "x$ac_ct_STRIP" = x; then
9693 STRIP=":"
9694 else
9695 case $cross_compiling:$ac_tool_warned in
9696 yes:)
9697 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9698 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9699 ac_tool_warned=yes ;;
9700 esac
9701 STRIP=$ac_ct_STRIP
9703 else
9704 STRIP="$ac_cv_prog_STRIP"
9708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9709 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9710 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9711 STRIP_STATIC_LIB="$STRIP --strip-unneeded"
9712 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9714 $as_echo "yes" >&6; }
9715 else
9716 case $host_os in
9717 darwin*)
9718 STRIP="$STRIP -x"
9719 STRIP_STATIC_LIB=$STRIP
9720 STRIP_SHARED_LIB=$STRIP
9721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9722 $as_echo "yes" >&6; }
9725 STRIP_STATIC_LIB=:
9726 STRIP_SHARED_LIB=:
9727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9728 $as_echo "no" >&6; }
9730 esac
9735 if test -n "$ac_tool_prefix"; then
9736 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9737 set dummy ${ac_tool_prefix}ar; ac_word=$2
9738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9739 $as_echo_n "checking for $ac_word... " >&6; }
9740 if ${ac_cv_prog_AR+:} false; then :
9741 $as_echo_n "(cached) " >&6
9742 else
9743 if test -n "$AR"; then
9744 ac_cv_prog_AR="$AR" # Let the user override the test.
9745 else
9746 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9747 for as_dir in $PATH
9749 IFS=$as_save_IFS
9750 test -z "$as_dir" && as_dir=.
9751 for ac_exec_ext in '' $ac_executable_extensions; do
9752 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9753 ac_cv_prog_AR="${ac_tool_prefix}ar"
9754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9755 break 2
9757 done
9758 done
9759 IFS=$as_save_IFS
9763 AR=$ac_cv_prog_AR
9764 if test -n "$AR"; then
9765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9766 $as_echo "$AR" >&6; }
9767 else
9768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9769 $as_echo "no" >&6; }
9774 if test -z "$ac_cv_prog_AR"; then
9775 ac_ct_AR=$AR
9776 # Extract the first word of "ar", so it can be a program name with args.
9777 set dummy ar; ac_word=$2
9778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9779 $as_echo_n "checking for $ac_word... " >&6; }
9780 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9781 $as_echo_n "(cached) " >&6
9782 else
9783 if test -n "$ac_ct_AR"; then
9784 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9785 else
9786 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9787 for as_dir in $PATH
9789 IFS=$as_save_IFS
9790 test -z "$as_dir" && as_dir=.
9791 for ac_exec_ext in '' $ac_executable_extensions; do
9792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9793 ac_cv_prog_ac_ct_AR="ar"
9794 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9795 break 2
9797 done
9798 done
9799 IFS=$as_save_IFS
9803 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9804 if test -n "$ac_ct_AR"; then
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9806 $as_echo "$ac_ct_AR" >&6; }
9807 else
9808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9809 $as_echo "no" >&6; }
9812 if test "x$ac_ct_AR" = x; then
9813 AR="ar"
9814 else
9815 case $cross_compiling:$ac_tool_warned in
9816 yes:)
9817 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9818 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9819 ac_tool_warned=yes ;;
9820 esac
9821 AR=$ac_ct_AR
9823 else
9824 AR="$ac_cv_prog_AR"
9827 if test "$PORTNAME" = "win32"; then
9828 if test -n "$ac_tool_prefix"; then
9829 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9830 set dummy ${ac_tool_prefix}windres; ac_word=$2
9831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9832 $as_echo_n "checking for $ac_word... " >&6; }
9833 if ${ac_cv_prog_WINDRES+:} false; then :
9834 $as_echo_n "(cached) " >&6
9835 else
9836 if test -n "$WINDRES"; then
9837 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9838 else
9839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9840 for as_dir in $PATH
9842 IFS=$as_save_IFS
9843 test -z "$as_dir" && as_dir=.
9844 for ac_exec_ext in '' $ac_executable_extensions; do
9845 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9846 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9847 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9848 break 2
9850 done
9851 done
9852 IFS=$as_save_IFS
9856 WINDRES=$ac_cv_prog_WINDRES
9857 if test -n "$WINDRES"; then
9858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9859 $as_echo "$WINDRES" >&6; }
9860 else
9861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9862 $as_echo "no" >&6; }
9867 if test -z "$ac_cv_prog_WINDRES"; then
9868 ac_ct_WINDRES=$WINDRES
9869 # Extract the first word of "windres", so it can be a program name with args.
9870 set dummy windres; ac_word=$2
9871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9872 $as_echo_n "checking for $ac_word... " >&6; }
9873 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9874 $as_echo_n "(cached) " >&6
9875 else
9876 if test -n "$ac_ct_WINDRES"; then
9877 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9878 else
9879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9880 for as_dir in $PATH
9882 IFS=$as_save_IFS
9883 test -z "$as_dir" && as_dir=.
9884 for ac_exec_ext in '' $ac_executable_extensions; do
9885 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9886 ac_cv_prog_ac_ct_WINDRES="windres"
9887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9888 break 2
9890 done
9891 done
9892 IFS=$as_save_IFS
9896 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9897 if test -n "$ac_ct_WINDRES"; then
9898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9899 $as_echo "$ac_ct_WINDRES" >&6; }
9900 else
9901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9902 $as_echo "no" >&6; }
9905 if test "x$ac_ct_WINDRES" = x; then
9906 WINDRES="windres"
9907 else
9908 case $cross_compiling:$ac_tool_warned in
9909 yes:)
9910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9911 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9912 ac_tool_warned=yes ;;
9913 esac
9914 WINDRES=$ac_ct_WINDRES
9916 else
9917 WINDRES="$ac_cv_prog_WINDRES"
9922 # Find a good install program. We prefer a C program (faster),
9923 # so one script is as good as another. But avoid the broken or
9924 # incompatible versions:
9925 # SysV /etc/install, /usr/sbin/install
9926 # SunOS /usr/etc/install
9927 # IRIX /sbin/install
9928 # AIX /bin/install
9929 # AmigaOS /C/install, which installs bootblocks on floppy discs
9930 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9931 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9932 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9933 # OS/2's system install, which has a completely different semantic
9934 # ./install, which can be erroneously created by make from ./install.sh.
9935 # Reject install programs that cannot install multiple files.
9936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9937 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9938 if test -z "$INSTALL"; then
9939 if ${ac_cv_path_install+:} false; then :
9940 $as_echo_n "(cached) " >&6
9941 else
9942 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9943 for as_dir in $PATH
9945 IFS=$as_save_IFS
9946 test -z "$as_dir" && as_dir=.
9947 # Account for people who put trailing slashes in PATH elements.
9948 case $as_dir/ in #((
9949 ./ | .// | /[cC]/* | \
9950 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9951 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9952 /usr/ucb/* ) ;;
9954 # OSF1 and SCO ODT 3.0 have their own names for install.
9955 # Don't use installbsd from OSF since it installs stuff as root
9956 # by default.
9957 for ac_prog in ginstall scoinst install; do
9958 for ac_exec_ext in '' $ac_executable_extensions; do
9959 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9960 if test $ac_prog = install &&
9961 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9962 # AIX install. It has an incompatible calling convention.
9964 elif test $ac_prog = install &&
9965 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9966 # program-specific install script used by HP pwplus--don't use.
9968 else
9969 rm -rf conftest.one conftest.two conftest.dir
9970 echo one > conftest.one
9971 echo two > conftest.two
9972 mkdir conftest.dir
9973 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9974 test -s conftest.one && test -s conftest.two &&
9975 test -s conftest.dir/conftest.one &&
9976 test -s conftest.dir/conftest.two
9977 then
9978 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9979 break 3
9983 done
9984 done
9986 esac
9988 done
9989 IFS=$as_save_IFS
9991 rm -rf conftest.one conftest.two conftest.dir
9994 if test "${ac_cv_path_install+set}" = set; then
9995 INSTALL=$ac_cv_path_install
9996 else
9997 # As a last resort, use the slow shell script. Don't cache a
9998 # value for INSTALL within a source directory, because that will
9999 # break other packages using the cache if that directory is
10000 # removed, or if the value is a relative name.
10001 INSTALL=$ac_install_sh
10004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
10005 $as_echo "$INSTALL" >&6; }
10007 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
10008 # It thinks the first close brace ends the variable substitution.
10009 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
10011 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
10013 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
10015 # When Autoconf chooses install-sh as install program it tries to generate
10016 # a relative path to it in each makefile where it substitutes it. This clashes
10017 # with our Makefile.global concept. This workaround helps.
10018 case $INSTALL in
10019 *install-sh*) install_bin='';;
10020 *) install_bin=$INSTALL;;
10021 esac
10024 if test -z "$TAR"; then
10025 for ac_prog in tar
10027 # Extract the first word of "$ac_prog", so it can be a program name with args.
10028 set dummy $ac_prog; ac_word=$2
10029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10030 $as_echo_n "checking for $ac_word... " >&6; }
10031 if ${ac_cv_path_TAR+:} false; then :
10032 $as_echo_n "(cached) " >&6
10033 else
10034 case $TAR in
10035 [\\/]* | ?:[\\/]*)
10036 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10040 for as_dir in $PATH
10042 IFS=$as_save_IFS
10043 test -z "$as_dir" && as_dir=.
10044 for ac_exec_ext in '' $ac_executable_extensions; do
10045 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10046 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10047 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10048 break 2
10050 done
10051 done
10052 IFS=$as_save_IFS
10055 esac
10057 TAR=$ac_cv_path_TAR
10058 if test -n "$TAR"; then
10059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10060 $as_echo "$TAR" >&6; }
10061 else
10062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10063 $as_echo "no" >&6; }
10067 test -n "$TAR" && break
10068 done
10070 else
10071 # Report the value of TAR in configure's output in all cases.
10072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10073 $as_echo_n "checking for TAR... " >&6; }
10074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10075 $as_echo "$TAR" >&6; }
10078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
10079 $as_echo_n "checking whether ln -s works... " >&6; }
10080 LN_S=$as_ln_s
10081 if test "$LN_S" = "ln -s"; then
10082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10083 $as_echo "yes" >&6; }
10084 else
10085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
10086 $as_echo "no, using $LN_S" >&6; }
10089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
10090 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
10091 if test -z "$MKDIR_P"; then
10092 if ${ac_cv_path_mkdir+:} false; then :
10093 $as_echo_n "(cached) " >&6
10094 else
10095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10096 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
10098 IFS=$as_save_IFS
10099 test -z "$as_dir" && as_dir=.
10100 for ac_prog in mkdir gmkdir; do
10101 for ac_exec_ext in '' $ac_executable_extensions; do
10102 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
10103 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
10104 'mkdir (GNU coreutils) '* | \
10105 'mkdir (coreutils) '* | \
10106 'mkdir (fileutils) '4.1*)
10107 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
10108 break 3;;
10109 esac
10110 done
10111 done
10112 done
10113 IFS=$as_save_IFS
10117 test -d ./--version && rmdir ./--version
10118 if test "${ac_cv_path_mkdir+set}" = set; then
10119 MKDIR_P="$ac_cv_path_mkdir -p"
10120 else
10121 # As a last resort, use the slow shell script. Don't cache a
10122 # value for MKDIR_P within a source directory, because that will
10123 # break other packages using the cache if that directory is
10124 # removed, or if the value is a relative name.
10125 MKDIR_P="$ac_install_sh -d"
10128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
10129 $as_echo "$MKDIR_P" >&6; }
10131 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
10132 # a relative path to it in each makefile where it substitutes it. This clashes
10133 # with our Makefile.global concept. This workaround helps.
10134 case $MKDIR_P in
10135 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
10136 esac
10138 if test -z "$BISON"; then
10139 for ac_prog in bison
10141 # Extract the first word of "$ac_prog", so it can be a program name with args.
10142 set dummy $ac_prog; ac_word=$2
10143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10144 $as_echo_n "checking for $ac_word... " >&6; }
10145 if ${ac_cv_path_BISON+:} false; then :
10146 $as_echo_n "(cached) " >&6
10147 else
10148 case $BISON in
10149 [\\/]* | ?:[\\/]*)
10150 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
10153 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10154 for as_dir in $PATH
10156 IFS=$as_save_IFS
10157 test -z "$as_dir" && as_dir=.
10158 for ac_exec_ext in '' $ac_executable_extensions; do
10159 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10160 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
10161 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10162 break 2
10164 done
10165 done
10166 IFS=$as_save_IFS
10169 esac
10171 BISON=$ac_cv_path_BISON
10172 if test -n "$BISON"; then
10173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10174 $as_echo "$BISON" >&6; }
10175 else
10176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10177 $as_echo "no" >&6; }
10181 test -n "$BISON" && break
10182 done
10184 else
10185 # Report the value of BISON in configure's output in all cases.
10186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
10187 $as_echo_n "checking for BISON... " >&6; }
10188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10189 $as_echo "$BISON" >&6; }
10193 if test "$BISON"; then
10194 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
10195 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
10196 $as_echo "$as_me: using $pgac_bison_version" >&6;}
10197 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 2.3) exit 0; else exit 1;}'
10198 then
10199 as_fn_error $? "
10200 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10201 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." "$LINENO" 5
10203 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
10204 # of the now preferred %name-prefix "base_yy", but the latter
10205 # doesn't work with Bison 2.3 or less. So for now we silence the
10206 # deprecation warnings.
10207 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
10208 then
10209 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
10213 if test -z "$BISON"; then
10214 as_fn_error $? "bison not found" "$LINENO" 5
10218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
10219 $as_echo_n "checking for flex... " >&6; }
10220 if ${pgac_cv_path_flex+:} false; then :
10221 $as_echo_n "(cached) " >&6
10222 else
10223 # Let the user override the test
10224 if test -n "$FLEX"; then
10225 pgac_cv_path_flex=$FLEX
10226 else
10227 pgac_save_IFS=$IFS
10228 IFS=$PATH_SEPARATOR
10229 for pgac_dir in $PATH; do
10230 IFS=$pgac_save_IFS
10231 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
10232 pgac_dir=`pwd`
10234 for pgac_prog in flex lex; do
10235 pgac_candidate="$pgac_dir/$pgac_prog"
10236 if test -f "$pgac_candidate" \
10237 && $pgac_candidate --version </dev/null >/dev/null 2>&1
10238 then
10239 echo '%%' > conftest.l
10240 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
10241 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
10242 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;}'
10243 then
10244 pgac_cv_path_flex=$pgac_candidate
10245 break 2
10246 else
10247 as_fn_error $? "
10248 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10249 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." "$LINENO" 5
10253 done
10254 done
10255 rm -f conftest.l lex.yy.c
10256 : ${pgac_cv_path_flex=no}
10260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
10261 $as_echo "$pgac_cv_path_flex" >&6; }
10262 if test x"$pgac_cv_path_flex" = x"no"; then
10263 as_fn_error $? "flex not found" "$LINENO" 5
10264 else
10265 FLEX=$pgac_cv_path_flex
10266 pgac_flex_version=`$FLEX --version 2>/dev/null`
10267 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
10268 $as_echo "$as_me: using $pgac_flex_version" >&6;}
10275 if test -z "$PERL"; then
10276 for ac_prog in perl
10278 # Extract the first word of "$ac_prog", so it can be a program name with args.
10279 set dummy $ac_prog; ac_word=$2
10280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10281 $as_echo_n "checking for $ac_word... " >&6; }
10282 if ${ac_cv_path_PERL+:} false; then :
10283 $as_echo_n "(cached) " >&6
10284 else
10285 case $PERL in
10286 [\\/]* | ?:[\\/]*)
10287 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
10290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10291 for as_dir in $PATH
10293 IFS=$as_save_IFS
10294 test -z "$as_dir" && as_dir=.
10295 for ac_exec_ext in '' $ac_executable_extensions; do
10296 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10297 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
10298 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10299 break 2
10301 done
10302 done
10303 IFS=$as_save_IFS
10306 esac
10308 PERL=$ac_cv_path_PERL
10309 if test -n "$PERL"; then
10310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10311 $as_echo "$PERL" >&6; }
10312 else
10313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10314 $as_echo "no" >&6; }
10318 test -n "$PERL" && break
10319 done
10321 else
10322 # Report the value of PERL in configure's output in all cases.
10323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
10324 $as_echo_n "checking for PERL... " >&6; }
10325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10326 $as_echo "$PERL" >&6; }
10330 if test "$PERL"; then
10331 pgac_perl_version=`$PERL -v 2>/dev/null | sed -n 's/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p'`
10332 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
10333 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
10334 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
10335 $AWK '{ if ($1 == 5 && ($2 >= 14)) exit 1; else exit 0;}'
10336 then
10337 as_fn_error $? "
10338 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10339 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." "$LINENO" 5
10343 if test -z "$PERL"; then
10344 as_fn_error $? "Perl not found" "$LINENO" 5
10347 if test "$with_perl" = yes; then
10348 if test -z "$PERL"; then
10349 as_fn_error $? "Perl not found" "$LINENO" 5
10352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
10353 $as_echo_n "checking for Perl archlibexp... " >&6; }
10354 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
10355 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
10356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
10357 $as_echo "$perl_archlibexp" >&6; }
10358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
10359 $as_echo_n "checking for Perl privlibexp... " >&6; }
10360 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
10361 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
10362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
10363 $as_echo "$perl_privlibexp" >&6; }
10364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
10365 $as_echo_n "checking for Perl useshrplib... " >&6; }
10366 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
10367 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
10368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
10369 $as_echo "$perl_useshrplib" >&6; }
10370 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
10371 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
10372 You might have to rebuild your Perl installation. Refer to the
10373 documentation for details. Use --without-perl to disable building
10374 PL/Perl." "$LINENO" 5
10376 # On most platforms, archlibexp is also where the Perl include files live ...
10377 perl_includespec="-I$perl_archlibexp/CORE"
10378 # ... but on newer macOS versions, we must use -iwithsysroot to look
10379 # under $PG_SYSROOT
10380 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
10381 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
10382 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
10387 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
10388 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10390 $as_echo "$perl_ccflags" >&6; }
10391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10392 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10393 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10395 $as_echo "$perl_embed_ccflags" >&6; }
10398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10399 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10400 if test "$PORTNAME" = "win32" ; then
10401 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10402 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10403 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10404 else
10405 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10406 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10407 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10410 else
10411 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10412 pgac_tmp2=`$PERL -MConfig -e 'print "$Config{ccdlflags} $Config{ldflags}"'`
10413 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%"`
10415 if test -z "$perl_embed_ldflags" ; then
10416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10417 $as_echo "no" >&6; }
10418 as_fn_error $? "could not determine flags for linking embedded Perl.
10419 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10420 installed." "$LINENO" 5
10421 else
10422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10423 $as_echo "$perl_embed_ldflags" >&6; }
10428 if test "$with_python" = yes; then
10429 if test -z "$PYTHON"; then
10430 for ac_prog in python3 python
10432 # Extract the first word of "$ac_prog", so it can be a program name with args.
10433 set dummy $ac_prog; ac_word=$2
10434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10435 $as_echo_n "checking for $ac_word... " >&6; }
10436 if ${ac_cv_path_PYTHON+:} false; then :
10437 $as_echo_n "(cached) " >&6
10438 else
10439 case $PYTHON in
10440 [\\/]* | ?:[\\/]*)
10441 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10444 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10445 for as_dir in $PATH
10447 IFS=$as_save_IFS
10448 test -z "$as_dir" && as_dir=.
10449 for ac_exec_ext in '' $ac_executable_extensions; do
10450 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10451 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10452 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10453 break 2
10455 done
10456 done
10457 IFS=$as_save_IFS
10460 esac
10462 PYTHON=$ac_cv_path_PYTHON
10463 if test -n "$PYTHON"; then
10464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10465 $as_echo "$PYTHON" >&6; }
10466 else
10467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10468 $as_echo "no" >&6; }
10472 test -n "$PYTHON" && break
10473 done
10475 else
10476 # Report the value of PYTHON in configure's output in all cases.
10477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10478 $as_echo_n "checking for PYTHON... " >&6; }
10479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10480 $as_echo "$PYTHON" >&6; }
10483 if test x"$PYTHON" = x""; then
10484 as_fn_error $? "Python not found" "$LINENO" 5
10488 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10489 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10490 $as_echo "$as_me: using python $python_fullversion" >&6;}
10491 # python_fullversion is typically n.n.n plus some trailing junk
10492 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10493 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10494 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10495 # Reject unsupported Python versions as soon as practical.
10496 if test "$python_majorversion" -lt 3; then
10497 as_fn_error $? "Python version $python_version is too old (version 3 or later is required)" "$LINENO" 5
10500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
10501 $as_echo_n "checking for Python sysconfig module... " >&6; }
10502 if "${PYTHON}" -c 'import sysconfig' 2>&5
10503 then
10504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10505 $as_echo "yes" >&6; }
10506 else
10507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10508 $as_echo "no" >&6; }
10509 as_fn_error $? "sysconfig module not found" "$LINENO" 5
10512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10513 $as_echo_n "checking Python configuration directory... " >&6; }
10514 python_configdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBPL'))))"`
10515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10516 $as_echo "$python_configdir" >&6; }
10518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directory" >&5
10519 $as_echo_n "checking Python include directory... " >&6; }
10520 python_includespec=`${PYTHON} -c "import sysconfig; print('-I' + sysconfig.get_config_var('INCLUDEPY'))"`
10521 if test "$PORTNAME" = win32 ; then
10522 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10525 $as_echo "$python_includespec" >&6; }
10529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10530 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10532 python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10533 python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
10535 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10536 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10537 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10538 then
10539 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10540 found_shlib=1
10541 else
10542 # Otherwise, guess the base name of the shlib.
10543 # LDVERSION was added in Python 3.2, before that use VERSION,
10544 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10545 python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
10546 if test x"${python_ldversion}" != x""; then
10547 ldlibrary="python${python_ldversion}"
10548 else
10549 python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
10550 if test x"${python_version_var}" != x""; then
10551 ldlibrary="python${python_version_var}"
10552 else
10553 ldlibrary="python${python_version}"
10556 # Search for a likely-looking file.
10557 found_shlib=0
10558 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10560 if test -e "$d/lib${ldlibrary}${DLSUFFIX}"; then
10561 python_libdir="$d"
10562 found_shlib=1
10563 break 2
10565 done
10566 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10567 # (".so.n.n") as well. However, check this only after failing to find
10568 # ".so" anywhere, because yet other platforms (Debian) put the .so
10569 # symlink in a different directory from the underlying versioned shlib.
10570 if test "$found_shlib" != 1; then
10571 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10573 for f in "$d/lib${ldlibrary}.so."* ; do
10574 if test -e "$f"; then
10575 python_libdir="$d"
10576 found_shlib=1
10577 break 2
10579 done
10580 done
10582 # As usual, Windows has its own ideas. Possible default library
10583 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10584 # and the "lib" prefix might not be there.
10585 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10586 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10588 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10589 if test -e "$f"; then
10590 python_libdir="$d"
10591 found_shlib=1
10592 break 2
10594 done
10595 done
10598 if test "$found_shlib" != 1; then
10599 as_fn_error $? "could not find shared library for Python
10600 You might have to rebuild your Python installation. Refer to the
10601 documentation for details. Use --without-python to disable building
10602 PL/Python." "$LINENO" 5
10604 python_libspec="-L${python_libdir} -l${ldlibrary}"
10606 python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10609 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10615 if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then
10616 if test -z "$ZIC"; then
10617 for ac_prog in zic
10619 # Extract the first word of "$ac_prog", so it can be a program name with args.
10620 set dummy $ac_prog; ac_word=$2
10621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10622 $as_echo_n "checking for $ac_word... " >&6; }
10623 if ${ac_cv_path_ZIC+:} false; then :
10624 $as_echo_n "(cached) " >&6
10625 else
10626 case $ZIC in
10627 [\\/]* | ?:[\\/]*)
10628 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10631 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10632 for as_dir in $PATH
10634 IFS=$as_save_IFS
10635 test -z "$as_dir" && as_dir=.
10636 for ac_exec_ext in '' $ac_executable_extensions; do
10637 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10638 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10639 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10640 break 2
10642 done
10643 done
10644 IFS=$as_save_IFS
10647 esac
10649 ZIC=$ac_cv_path_ZIC
10650 if test -n "$ZIC"; then
10651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10652 $as_echo "$ZIC" >&6; }
10653 else
10654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10655 $as_echo "no" >&6; }
10659 test -n "$ZIC" && break
10660 done
10662 else
10663 # Report the value of ZIC in configure's output in all cases.
10664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10665 $as_echo_n "checking for ZIC... " >&6; }
10666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10667 $as_echo "$ZIC" >&6; }
10670 if test -z "$ZIC"; then
10671 as_fn_error $? "
10672 When cross-compiling, either use the option --with-system-tzdata to use
10673 existing time-zone data, or set the environment variable ZIC to a zic
10674 program to use during the build." "$LINENO" 5
10679 # Pthreads
10681 # For each platform, we need to know about any special compile and link
10682 # libraries, and whether the normal C function names are thread-safe.
10683 # WIN32 doesn't need the pthread tests; it always uses threads
10685 # These tests are run before the library-tests, because linking with the
10686 # other libraries can pull in the pthread functions as a side-effect. We
10687 # want to use the -pthread or similar flags directly, and not rely on
10688 # the side-effects of linking with some other library.
10690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10691 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10692 if ${ac_cv_path_SED+:} false; then :
10693 $as_echo_n "(cached) " >&6
10694 else
10695 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10696 for ac_i in 1 2 3 4 5 6 7; do
10697 ac_script="$ac_script$as_nl$ac_script"
10698 done
10699 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10700 { ac_script=; unset ac_script;}
10701 if test -z "$SED"; then
10702 ac_path_SED_found=false
10703 # Loop through the user's path and test for each of PROGNAME-LIST
10704 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10705 for as_dir in $PATH
10707 IFS=$as_save_IFS
10708 test -z "$as_dir" && as_dir=.
10709 for ac_prog in sed gsed; do
10710 for ac_exec_ext in '' $ac_executable_extensions; do
10711 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10712 as_fn_executable_p "$ac_path_SED" || continue
10713 # Check for GNU ac_path_SED and select it if it is found.
10714 # Check for GNU $ac_path_SED
10715 case `"$ac_path_SED" --version 2>&1` in
10716 *GNU*)
10717 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10719 ac_count=0
10720 $as_echo_n 0123456789 >"conftest.in"
10721 while :
10723 cat "conftest.in" "conftest.in" >"conftest.tmp"
10724 mv "conftest.tmp" "conftest.in"
10725 cp "conftest.in" "conftest.nl"
10726 $as_echo '' >> "conftest.nl"
10727 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10728 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10729 as_fn_arith $ac_count + 1 && ac_count=$as_val
10730 if test $ac_count -gt ${ac_path_SED_max-0}; then
10731 # Best one so far, save it but keep looking for a better one
10732 ac_cv_path_SED="$ac_path_SED"
10733 ac_path_SED_max=$ac_count
10735 # 10*(2^10) chars as input seems more than enough
10736 test $ac_count -gt 10 && break
10737 done
10738 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10739 esac
10741 $ac_path_SED_found && break 3
10742 done
10743 done
10744 done
10745 IFS=$as_save_IFS
10746 if test -z "$ac_cv_path_SED"; then
10747 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10749 else
10750 ac_cv_path_SED=$SED
10754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10755 $as_echo "$ac_cv_path_SED" >&6; }
10756 SED="$ac_cv_path_SED"
10757 rm -f conftest.sed
10760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10761 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10762 if ${ac_cv_path_GREP+:} false; then :
10763 $as_echo_n "(cached) " >&6
10764 else
10765 if test -z "$GREP"; then
10766 ac_path_GREP_found=false
10767 # Loop through the user's path and test for each of PROGNAME-LIST
10768 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10769 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10771 IFS=$as_save_IFS
10772 test -z "$as_dir" && as_dir=.
10773 for ac_prog in grep ggrep; do
10774 for ac_exec_ext in '' $ac_executable_extensions; do
10775 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10776 as_fn_executable_p "$ac_path_GREP" || continue
10777 # Check for GNU ac_path_GREP and select it if it is found.
10778 # Check for GNU $ac_path_GREP
10779 case `"$ac_path_GREP" --version 2>&1` in
10780 *GNU*)
10781 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10783 ac_count=0
10784 $as_echo_n 0123456789 >"conftest.in"
10785 while :
10787 cat "conftest.in" "conftest.in" >"conftest.tmp"
10788 mv "conftest.tmp" "conftest.in"
10789 cp "conftest.in" "conftest.nl"
10790 $as_echo 'GREP' >> "conftest.nl"
10791 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10792 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10793 as_fn_arith $ac_count + 1 && ac_count=$as_val
10794 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10795 # Best one so far, save it but keep looking for a better one
10796 ac_cv_path_GREP="$ac_path_GREP"
10797 ac_path_GREP_max=$ac_count
10799 # 10*(2^10) chars as input seems more than enough
10800 test $ac_count -gt 10 && break
10801 done
10802 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10803 esac
10805 $ac_path_GREP_found && break 3
10806 done
10807 done
10808 done
10809 IFS=$as_save_IFS
10810 if test -z "$ac_cv_path_GREP"; then
10811 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10813 else
10814 ac_cv_path_GREP=$GREP
10818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10819 $as_echo "$ac_cv_path_GREP" >&6; }
10820 GREP="$ac_cv_path_GREP"
10823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10824 $as_echo_n "checking for egrep... " >&6; }
10825 if ${ac_cv_path_EGREP+:} false; then :
10826 $as_echo_n "(cached) " >&6
10827 else
10828 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10829 then ac_cv_path_EGREP="$GREP -E"
10830 else
10831 if test -z "$EGREP"; then
10832 ac_path_EGREP_found=false
10833 # Loop through the user's path and test for each of PROGNAME-LIST
10834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10835 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10837 IFS=$as_save_IFS
10838 test -z "$as_dir" && as_dir=.
10839 for ac_prog in egrep; do
10840 for ac_exec_ext in '' $ac_executable_extensions; do
10841 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10842 as_fn_executable_p "$ac_path_EGREP" || continue
10843 # Check for GNU ac_path_EGREP and select it if it is found.
10844 # Check for GNU $ac_path_EGREP
10845 case `"$ac_path_EGREP" --version 2>&1` in
10846 *GNU*)
10847 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10849 ac_count=0
10850 $as_echo_n 0123456789 >"conftest.in"
10851 while :
10853 cat "conftest.in" "conftest.in" >"conftest.tmp"
10854 mv "conftest.tmp" "conftest.in"
10855 cp "conftest.in" "conftest.nl"
10856 $as_echo 'EGREP' >> "conftest.nl"
10857 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10858 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10859 as_fn_arith $ac_count + 1 && ac_count=$as_val
10860 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10861 # Best one so far, save it but keep looking for a better one
10862 ac_cv_path_EGREP="$ac_path_EGREP"
10863 ac_path_EGREP_max=$ac_count
10865 # 10*(2^10) chars as input seems more than enough
10866 test $ac_count -gt 10 && break
10867 done
10868 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10869 esac
10871 $ac_path_EGREP_found && break 3
10872 done
10873 done
10874 done
10875 IFS=$as_save_IFS
10876 if test -z "$ac_cv_path_EGREP"; then
10877 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10879 else
10880 ac_cv_path_EGREP=$EGREP
10885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10886 $as_echo "$ac_cv_path_EGREP" >&6; }
10887 EGREP="$ac_cv_path_EGREP"
10890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10891 $as_echo_n "checking for ANSI C header files... " >&6; }
10892 if ${ac_cv_header_stdc+:} false; then :
10893 $as_echo_n "(cached) " >&6
10894 else
10895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10896 /* end confdefs.h. */
10897 #include <stdlib.h>
10898 #include <stdarg.h>
10899 #include <string.h>
10900 #include <float.h>
10903 main ()
10907 return 0;
10909 _ACEOF
10910 if ac_fn_c_try_compile "$LINENO"; then :
10911 ac_cv_header_stdc=yes
10912 else
10913 ac_cv_header_stdc=no
10915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10917 if test $ac_cv_header_stdc = yes; then
10918 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10920 /* end confdefs.h. */
10921 #include <string.h>
10923 _ACEOF
10924 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10925 $EGREP "memchr" >/dev/null 2>&1; then :
10927 else
10928 ac_cv_header_stdc=no
10930 rm -f conftest*
10934 if test $ac_cv_header_stdc = yes; then
10935 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10937 /* end confdefs.h. */
10938 #include <stdlib.h>
10940 _ACEOF
10941 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10942 $EGREP "free" >/dev/null 2>&1; then :
10944 else
10945 ac_cv_header_stdc=no
10947 rm -f conftest*
10951 if test $ac_cv_header_stdc = yes; then
10952 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10953 if test "$cross_compiling" = yes; then :
10955 else
10956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10957 /* end confdefs.h. */
10958 #include <ctype.h>
10959 #include <stdlib.h>
10960 #if ((' ' & 0x0FF) == 0x020)
10961 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10962 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10963 #else
10964 # define ISLOWER(c) \
10965 (('a' <= (c) && (c) <= 'i') \
10966 || ('j' <= (c) && (c) <= 'r') \
10967 || ('s' <= (c) && (c) <= 'z'))
10968 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10969 #endif
10971 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10973 main ()
10975 int i;
10976 for (i = 0; i < 256; i++)
10977 if (XOR (islower (i), ISLOWER (i))
10978 || toupper (i) != TOUPPER (i))
10979 return 2;
10980 return 0;
10982 _ACEOF
10983 if ac_fn_c_try_run "$LINENO"; then :
10985 else
10986 ac_cv_header_stdc=no
10988 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10989 conftest.$ac_objext conftest.beam conftest.$ac_ext
10994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10995 $as_echo "$ac_cv_header_stdc" >&6; }
10996 if test $ac_cv_header_stdc = yes; then
10998 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
11002 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11003 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11004 inttypes.h stdint.h unistd.h
11005 do :
11006 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11007 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
11009 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11010 cat >>confdefs.h <<_ACEOF
11011 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11012 _ACEOF
11016 done
11019 if test "$PORTNAME" != "win32"; then :
11020 # then
11025 ac_ext=c
11026 ac_cpp='$CPP $CPPFLAGS'
11027 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11028 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11029 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11031 ax_pthread_ok=no
11033 # We used to check for pthread.h first, but this fails if pthread.h
11034 # requires special compiler flags (e.g. on Tru64 or Sequent).
11035 # It gets checked for in the link test anyway.
11037 # First of all, check if the user has set any of the PTHREAD_LIBS,
11038 # etcetera environment variables, and if threads linking works using
11039 # them:
11040 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
11041 ax_pthread_save_CC="$CC"
11042 ax_pthread_save_CFLAGS="$CFLAGS"
11043 ax_pthread_save_LIBS="$LIBS"
11044 if test "x$PTHREAD_CC" != "x"; then :
11045 CC="$PTHREAD_CC"
11047 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11048 LIBS="$PTHREAD_LIBS $LIBS"
11049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
11050 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
11051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11052 /* end confdefs.h. */
11054 /* Override any GCC internal prototype to avoid an error.
11055 Use char because int might match the return type of a GCC
11056 builtin and then its argument prototype would still apply. */
11057 #ifdef __cplusplus
11058 extern "C"
11059 #endif
11060 char pthread_join ();
11062 main ()
11064 return pthread_join ();
11066 return 0;
11068 _ACEOF
11069 if ac_fn_c_try_link "$LINENO"; then :
11070 ax_pthread_ok=yes
11072 rm -f core conftest.err conftest.$ac_objext \
11073 conftest$ac_exeext conftest.$ac_ext
11074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11075 $as_echo "$ax_pthread_ok" >&6; }
11076 if test "x$ax_pthread_ok" = "xno"; then
11077 PTHREAD_LIBS=""
11078 PTHREAD_CFLAGS=""
11080 CC="$ax_pthread_save_CC"
11081 CFLAGS="$ax_pthread_save_CFLAGS"
11082 LIBS="$ax_pthread_save_LIBS"
11085 # We must check for the threads library under a number of different
11086 # names; the ordering is very important because some systems
11087 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
11088 # libraries is broken (non-POSIX).
11090 # Create a list of thread flags to try. Items starting with a "-" are
11091 # C compiler flags, and other items are library names, except for "none"
11092 # which indicates that we try without any flags at all, and "pthread-config"
11093 # which is a program returning the flags for the Pth emulation library.
11095 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
11097 # The ordering *is* (sometimes) important. Some notes on the
11098 # individual items follow:
11100 # pthreads: AIX (must check this before -lpthread)
11101 # none: in case threads are in libc; should be tried before -Kthread and
11102 # other compiler flags to prevent continual compiler warnings
11103 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
11104 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
11105 # (Note: HP C rejects this with "bad form for `-t' option")
11106 # -pthreads: Solaris/gcc (Note: HP C also rejects)
11107 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
11108 # doesn't hurt to check since this sometimes defines pthreads and
11109 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
11110 # is present but should not be used directly; and before -mthreads,
11111 # because the compiler interprets this as "-mt" + "-hreads")
11112 # -mthreads: Mingw32/gcc, Lynx/gcc
11113 # pthread: Linux, etcetera
11114 # --thread-safe: KAI C++
11115 # pthread-config: use pthread-config program (for GNU Pth library)
11117 case $host_os in
11119 freebsd*)
11121 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
11122 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
11124 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
11127 hpux*)
11129 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
11130 # multi-threading and also sets -lpthread."
11132 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
11135 openedition*)
11137 # IBM z/OS requires a feature-test macro to be defined in order to
11138 # enable POSIX threads at all, so give the user a hint if this is
11139 # not set. (We don't define these ourselves, as they can affect
11140 # other portions of the system API in unpredictable ways.)
11142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11143 /* end confdefs.h. */
11145 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
11146 AX_PTHREAD_ZOS_MISSING
11147 # endif
11149 _ACEOF
11150 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11151 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
11152 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
11153 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
11155 rm -f conftest*
11159 solaris*)
11161 # On Solaris (at least, for some versions), libc contains stubbed
11162 # (non-functional) versions of the pthreads routines, so link-based
11163 # tests will erroneously succeed. (N.B.: The stubs are missing
11164 # pthread_cleanup_push, or rather a function called by this macro,
11165 # so we could check for that, but who knows whether they'll stub
11166 # that too in a future libc.) So we'll check first for the
11167 # standard Solaris way of linking pthreads (-mt -lpthread).
11169 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
11171 esac
11173 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
11175 if test "x$GCC" = "xyes"; then :
11176 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
11179 # The presence of a feature test macro requesting re-entrant function
11180 # definitions is, on some systems, a strong hint that pthreads support is
11181 # correctly enabled
11183 case $host_os in
11184 darwin* | hpux* | linux* | osf* | solaris*)
11185 ax_pthread_check_macro="_REENTRANT"
11188 aix*)
11189 ax_pthread_check_macro="_THREAD_SAFE"
11193 ax_pthread_check_macro="--"
11195 esac
11196 if test "x$ax_pthread_check_macro" = "x--"; then :
11197 ax_pthread_check_cond=0
11198 else
11199 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
11202 # Are we compiling with Clang?
11204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
11205 $as_echo_n "checking whether $CC is Clang... " >&6; }
11206 if ${ax_cv_PTHREAD_CLANG+:} false; then :
11207 $as_echo_n "(cached) " >&6
11208 else
11209 ax_cv_PTHREAD_CLANG=no
11210 # Note that Autoconf sets GCC=yes for Clang as well as GCC
11211 if test "x$GCC" = "xyes"; then
11212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11213 /* end confdefs.h. */
11214 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
11215 # if defined(__clang__) && defined(__llvm__)
11216 AX_PTHREAD_CC_IS_CLANG
11217 # endif
11219 _ACEOF
11220 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11221 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
11222 ax_cv_PTHREAD_CLANG=yes
11224 rm -f conftest*
11229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
11230 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
11231 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
11233 ax_pthread_clang_warning=no
11235 # Clang needs special handling, because older versions handle the -pthread
11236 # option in a rather... idiosyncratic way
11238 if test "x$ax_pthread_clang" = "xyes"; then
11240 # Clang takes -pthread; it has never supported any other flag
11242 # (Note 1: This will need to be revisited if a system that Clang
11243 # supports has POSIX threads in a separate library. This tends not
11244 # to be the way of modern systems, but it's conceivable.)
11246 # (Note 2: On some systems, notably Darwin, -pthread is not needed
11247 # to get POSIX threads support; the API is always present and
11248 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
11249 # -pthread does define _REENTRANT, and while the Darwin headers
11250 # ignore this macro, third-party headers might not.)
11252 PTHREAD_CFLAGS="-pthread"
11253 PTHREAD_LIBS=
11255 ax_pthread_ok=yes
11257 # However, older versions of Clang make a point of warning the user
11258 # that, in an invocation where only linking and no compilation is
11259 # taking place, the -pthread option has no effect ("argument unused
11260 # during compilation"). They expect -pthread to be passed in only
11261 # when source code is being compiled.
11263 # Problem is, this is at odds with the way Automake and most other
11264 # C build frameworks function, which is that the same flags used in
11265 # compilation (CFLAGS) are also used in linking. Many systems
11266 # supported by AX_PTHREAD require exactly this for POSIX threads
11267 # support, and in fact it is often not straightforward to specify a
11268 # flag that is used only in the compilation phase and not in
11269 # linking. Such a scenario is extremely rare in practice.
11271 # Even though use of the -pthread flag in linking would only print
11272 # a warning, this can be a nuisance for well-run software projects
11273 # that build with -Werror. So if the active version of Clang has
11274 # this misfeature, we search for an option to squash it.
11276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
11277 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
11278 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
11279 $as_echo_n "(cached) " >&6
11280 else
11281 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
11282 # Create an alternate version of $ac_link that compiles and
11283 # links in two steps (.c -> .o, .o -> exe) instead of one
11284 # (.c -> exe), because the warning occurs only in the second
11285 # step
11286 ax_pthread_save_ac_link="$ac_link"
11287 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
11288 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
11289 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
11290 ax_pthread_save_CFLAGS="$CFLAGS"
11291 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
11292 if test "x$ax_pthread_try" = "xunknown"; then :
11293 break
11295 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
11296 ac_link="$ax_pthread_save_ac_link"
11297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11298 /* end confdefs.h. */
11299 int main(void){return 0;}
11300 _ACEOF
11301 if ac_fn_c_try_link "$LINENO"; then :
11302 ac_link="$ax_pthread_2step_ac_link"
11303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11304 /* end confdefs.h. */
11305 int main(void){return 0;}
11306 _ACEOF
11307 if ac_fn_c_try_link "$LINENO"; then :
11308 break
11310 rm -f core conftest.err conftest.$ac_objext \
11311 conftest$ac_exeext conftest.$ac_ext
11314 rm -f core conftest.err conftest.$ac_objext \
11315 conftest$ac_exeext conftest.$ac_ext
11316 done
11317 ac_link="$ax_pthread_save_ac_link"
11318 CFLAGS="$ax_pthread_save_CFLAGS"
11319 if test "x$ax_pthread_try" = "x"; then :
11320 ax_pthread_try=no
11322 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
11325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
11326 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
11328 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
11329 no | unknown) ;;
11330 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
11331 esac
11333 fi # $ax_pthread_clang = yes
11335 if test "x$ax_pthread_ok" = "xno"; then
11336 for ax_pthread_try_flag in $ax_pthread_flags; do
11338 case $ax_pthread_try_flag in
11339 none)
11340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
11341 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
11344 -mt,pthread)
11345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
11346 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
11347 PTHREAD_CFLAGS="-mt"
11348 PTHREAD_LIBS="-lpthread"
11352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
11353 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
11354 PTHREAD_CFLAGS="$ax_pthread_try_flag"
11357 pthread-config)
11358 # Extract the first word of "pthread-config", so it can be a program name with args.
11359 set dummy pthread-config; ac_word=$2
11360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11361 $as_echo_n "checking for $ac_word... " >&6; }
11362 if ${ac_cv_prog_ax_pthread_config+:} false; then :
11363 $as_echo_n "(cached) " >&6
11364 else
11365 if test -n "$ax_pthread_config"; then
11366 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
11367 else
11368 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11369 for as_dir in $PATH
11371 IFS=$as_save_IFS
11372 test -z "$as_dir" && as_dir=.
11373 for ac_exec_ext in '' $ac_executable_extensions; do
11374 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11375 ac_cv_prog_ax_pthread_config="yes"
11376 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11377 break 2
11379 done
11380 done
11381 IFS=$as_save_IFS
11383 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
11386 ax_pthread_config=$ac_cv_prog_ax_pthread_config
11387 if test -n "$ax_pthread_config"; then
11388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11389 $as_echo "$ax_pthread_config" >&6; }
11390 else
11391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11392 $as_echo "no" >&6; }
11396 if test "x$ax_pthread_config" = "xno"; then :
11397 continue
11399 PTHREAD_CFLAGS="`pthread-config --cflags`"
11400 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11405 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11406 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11408 esac
11410 ax_pthread_save_CFLAGS="$CFLAGS"
11411 ax_pthread_save_LIBS="$LIBS"
11412 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11413 LIBS="$PTHREAD_LIBS $LIBS"
11415 # Check for various functions. We must include pthread.h,
11416 # since some functions may be macros. (On the Sequent, we
11417 # need a special flag -Kthread to make this header compile.)
11418 # We check for pthread_join because it is in -lpthread on IRIX
11419 # while pthread_create is in libc. We check for pthread_attr_init
11420 # due to DEC craziness with -lpthreads. We check for
11421 # pthread_cleanup_push because it is one of the few pthread
11422 # functions on Solaris that doesn't have a non-functional libc stub.
11423 # We try pthread_create on general principles.
11425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11426 /* end confdefs.h. */
11427 #include <pthread.h>
11428 # if $ax_pthread_check_cond
11429 # error "$ax_pthread_check_macro must be defined"
11430 # endif
11431 static void routine(void *a) { a = 0; }
11432 static void *start_routine(void *a) { return a; }
11434 main ()
11436 pthread_t th; pthread_attr_t attr;
11437 pthread_create(&th, 0, start_routine, 0);
11438 pthread_join(th, 0);
11439 pthread_attr_init(&attr);
11440 pthread_cleanup_push(routine, 0);
11441 pthread_cleanup_pop(0) /* ; */
11443 return 0;
11445 _ACEOF
11446 if ac_fn_c_try_link "$LINENO"; then :
11447 ax_pthread_ok=yes
11449 rm -f core conftest.err conftest.$ac_objext \
11450 conftest$ac_exeext conftest.$ac_ext
11452 CFLAGS="$ax_pthread_save_CFLAGS"
11453 LIBS="$ax_pthread_save_LIBS"
11455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11456 $as_echo "$ax_pthread_ok" >&6; }
11457 if test "x$ax_pthread_ok" = "xyes"; then :
11458 break
11461 PTHREAD_LIBS=""
11462 PTHREAD_CFLAGS=""
11463 done
11466 # Various other checks:
11467 if test "x$ax_pthread_ok" = "xyes"; then
11468 ax_pthread_save_CFLAGS="$CFLAGS"
11469 ax_pthread_save_LIBS="$LIBS"
11470 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11471 LIBS="$PTHREAD_LIBS $LIBS"
11473 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11475 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11476 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11477 $as_echo_n "(cached) " >&6
11478 else
11479 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11480 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11482 /* end confdefs.h. */
11483 #include <pthread.h>
11485 main ()
11487 int attr = $ax_pthread_attr; return attr /* ; */
11489 return 0;
11491 _ACEOF
11492 if ac_fn_c_try_link "$LINENO"; then :
11493 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11495 rm -f core conftest.err conftest.$ac_objext \
11496 conftest$ac_exeext conftest.$ac_ext
11497 done
11500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11501 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11502 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11503 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11504 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11506 cat >>confdefs.h <<_ACEOF
11507 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11508 _ACEOF
11510 ax_pthread_joinable_attr_defined=yes
11514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11515 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11516 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11517 $as_echo_n "(cached) " >&6
11518 else
11519 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11520 case $host_os in
11521 solaris*)
11522 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11524 esac
11527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11528 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11529 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11530 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11531 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11532 ax_pthread_special_flags_added=yes
11535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11536 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11537 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11538 $as_echo_n "(cached) " >&6
11539 else
11540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11541 /* end confdefs.h. */
11542 #include <pthread.h>
11544 main ()
11546 int i = PTHREAD_PRIO_INHERIT;
11548 return 0;
11550 _ACEOF
11551 if ac_fn_c_try_link "$LINENO"; then :
11552 ax_cv_PTHREAD_PRIO_INHERIT=yes
11553 else
11554 ax_cv_PTHREAD_PRIO_INHERIT=no
11556 rm -f core conftest.err conftest.$ac_objext \
11557 conftest$ac_exeext conftest.$ac_ext
11560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11561 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11562 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11563 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11565 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11567 ax_pthread_prio_inherit_defined=yes
11571 CFLAGS="$ax_pthread_save_CFLAGS"
11572 LIBS="$ax_pthread_save_LIBS"
11574 # More AIX lossage: compile with *_r variant
11575 if test "x$GCC" != "xyes"; then
11576 case $host_os in
11577 aix*)
11578 case "x/$CC" in #(
11579 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11580 #handle absolute path differently from PATH based program lookup
11581 case "x$CC" in #(
11582 x/*) :
11583 if as_fn_executable_p ${CC}_r; then :
11584 PTHREAD_CC="${CC}_r"
11585 fi ;; #(
11586 *) :
11587 for ac_prog in ${CC}_r
11589 # Extract the first word of "$ac_prog", so it can be a program name with args.
11590 set dummy $ac_prog; ac_word=$2
11591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11592 $as_echo_n "checking for $ac_word... " >&6; }
11593 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11594 $as_echo_n "(cached) " >&6
11595 else
11596 if test -n "$PTHREAD_CC"; then
11597 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11598 else
11599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11600 for as_dir in $PATH
11602 IFS=$as_save_IFS
11603 test -z "$as_dir" && as_dir=.
11604 for ac_exec_ext in '' $ac_executable_extensions; do
11605 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11606 ac_cv_prog_PTHREAD_CC="$ac_prog"
11607 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11608 break 2
11610 done
11611 done
11612 IFS=$as_save_IFS
11616 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11617 if test -n "$PTHREAD_CC"; then
11618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11619 $as_echo "$PTHREAD_CC" >&6; }
11620 else
11621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11622 $as_echo "no" >&6; }
11626 test -n "$PTHREAD_CC" && break
11627 done
11628 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11630 esac ;; #(
11631 *) :
11633 esac
11635 esac
11639 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11645 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11646 if test "x$ax_pthread_ok" = "xyes"; then
11648 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11651 else
11652 ax_pthread_ok=no
11655 ac_ext=c
11656 ac_cpp='$CPP $CPPFLAGS'
11657 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11658 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11659 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11661 # set thread flags
11663 # Some platforms use these, so just define them. They can't hurt if they
11664 # are not supported.
11665 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE"
11667 # Check for *_r functions
11668 _CFLAGS="$CFLAGS"
11669 _LIBS="$LIBS"
11670 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11671 LIBS="$LIBS $PTHREAD_LIBS"
11673 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11674 if test "x$ac_cv_header_pthread_h" = xyes; then :
11676 else
11677 as_fn_error $? "
11678 pthread.h not found" "$LINENO" 5
11683 for ac_func in strerror_r
11684 do :
11685 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
11686 if test "x$ac_cv_func_strerror_r" = xyes; then :
11687 cat >>confdefs.h <<_ACEOF
11688 #define HAVE_STRERROR_R 1
11689 _ACEOF
11692 done
11695 # Do test here with the proper thread flags
11696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11697 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11698 if ${pgac_cv_func_strerror_r_int+:} false; then :
11699 $as_echo_n "(cached) " >&6
11700 else
11701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11702 /* end confdefs.h. */
11703 #include <string.h>
11705 main ()
11707 char buf[100];
11708 switch (strerror_r(1, buf, sizeof(buf)))
11709 { case 0: break; default: break; }
11712 return 0;
11714 _ACEOF
11715 if ac_fn_c_try_compile "$LINENO"; then :
11716 pgac_cv_func_strerror_r_int=yes
11717 else
11718 pgac_cv_func_strerror_r_int=no
11720 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11723 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11724 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11726 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11731 CFLAGS="$_CFLAGS"
11732 LIBS="$_LIBS"
11735 else
11736 # else
11737 # do not use values from template file
11738 PTHREAD_CFLAGS=
11739 PTHREAD_LIBS=
11741 fi # fi
11748 ## Libraries
11750 ## Most libraries are included only if they demonstrably provide a function
11751 ## we need, but libm is an exception: always include it, because there are
11752 ## too many compilers that play cute optimization games that will break
11753 ## probes for standard functions such as pow().
11756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11757 $as_echo_n "checking for main in -lm... " >&6; }
11758 if ${ac_cv_lib_m_main+:} false; then :
11759 $as_echo_n "(cached) " >&6
11760 else
11761 ac_check_lib_save_LIBS=$LIBS
11762 LIBS="-lm $LIBS"
11763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11764 /* end confdefs.h. */
11768 main ()
11770 return main ();
11772 return 0;
11774 _ACEOF
11775 if ac_fn_c_try_link "$LINENO"; then :
11776 ac_cv_lib_m_main=yes
11777 else
11778 ac_cv_lib_m_main=no
11780 rm -f core conftest.err conftest.$ac_objext \
11781 conftest$ac_exeext conftest.$ac_ext
11782 LIBS=$ac_check_lib_save_LIBS
11784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11785 $as_echo "$ac_cv_lib_m_main" >&6; }
11786 if test "x$ac_cv_lib_m_main" = xyes; then :
11787 cat >>confdefs.h <<_ACEOF
11788 #define HAVE_LIBM 1
11789 _ACEOF
11791 LIBS="-lm $LIBS"
11795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11796 $as_echo_n "checking for library containing setproctitle... " >&6; }
11797 if ${ac_cv_search_setproctitle+:} false; then :
11798 $as_echo_n "(cached) " >&6
11799 else
11800 ac_func_search_save_LIBS=$LIBS
11801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11802 /* end confdefs.h. */
11804 /* Override any GCC internal prototype to avoid an error.
11805 Use char because int might match the return type of a GCC
11806 builtin and then its argument prototype would still apply. */
11807 #ifdef __cplusplus
11808 extern "C"
11809 #endif
11810 char setproctitle ();
11812 main ()
11814 return setproctitle ();
11816 return 0;
11818 _ACEOF
11819 for ac_lib in '' util; do
11820 if test -z "$ac_lib"; then
11821 ac_res="none required"
11822 else
11823 ac_res=-l$ac_lib
11824 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11826 if ac_fn_c_try_link "$LINENO"; then :
11827 ac_cv_search_setproctitle=$ac_res
11829 rm -f core conftest.err conftest.$ac_objext \
11830 conftest$ac_exeext
11831 if ${ac_cv_search_setproctitle+:} false; then :
11832 break
11834 done
11835 if ${ac_cv_search_setproctitle+:} false; then :
11837 else
11838 ac_cv_search_setproctitle=no
11840 rm conftest.$ac_ext
11841 LIBS=$ac_func_search_save_LIBS
11843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11844 $as_echo "$ac_cv_search_setproctitle" >&6; }
11845 ac_res=$ac_cv_search_setproctitle
11846 if test "$ac_res" != no; then :
11847 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11851 # gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
11852 # when enabling asan the dlopen check doesn't notice that -ldl is actually
11853 # required. Just checking for dlsym() ought to suffice.
11854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
11855 $as_echo_n "checking for library containing dlsym... " >&6; }
11856 if ${ac_cv_search_dlsym+:} false; then :
11857 $as_echo_n "(cached) " >&6
11858 else
11859 ac_func_search_save_LIBS=$LIBS
11860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11861 /* end confdefs.h. */
11863 /* Override any GCC internal prototype to avoid an error.
11864 Use char because int might match the return type of a GCC
11865 builtin and then its argument prototype would still apply. */
11866 #ifdef __cplusplus
11867 extern "C"
11868 #endif
11869 char dlsym ();
11871 main ()
11873 return dlsym ();
11875 return 0;
11877 _ACEOF
11878 for ac_lib in '' dl; do
11879 if test -z "$ac_lib"; then
11880 ac_res="none required"
11881 else
11882 ac_res=-l$ac_lib
11883 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11885 if ac_fn_c_try_link "$LINENO"; then :
11886 ac_cv_search_dlsym=$ac_res
11888 rm -f core conftest.err conftest.$ac_objext \
11889 conftest$ac_exeext
11890 if ${ac_cv_search_dlsym+:} false; then :
11891 break
11893 done
11894 if ${ac_cv_search_dlsym+:} false; then :
11896 else
11897 ac_cv_search_dlsym=no
11899 rm conftest.$ac_ext
11900 LIBS=$ac_func_search_save_LIBS
11902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
11903 $as_echo "$ac_cv_search_dlsym" >&6; }
11904 ac_res=$ac_cv_search_dlsym
11905 if test "$ac_res" != no; then :
11906 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11911 $as_echo_n "checking for library containing socket... " >&6; }
11912 if ${ac_cv_search_socket+:} false; then :
11913 $as_echo_n "(cached) " >&6
11914 else
11915 ac_func_search_save_LIBS=$LIBS
11916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11917 /* end confdefs.h. */
11919 /* Override any GCC internal prototype to avoid an error.
11920 Use char because int might match the return type of a GCC
11921 builtin and then its argument prototype would still apply. */
11922 #ifdef __cplusplus
11923 extern "C"
11924 #endif
11925 char socket ();
11927 main ()
11929 return socket ();
11931 return 0;
11933 _ACEOF
11934 for ac_lib in '' socket ws2_32; do
11935 if test -z "$ac_lib"; then
11936 ac_res="none required"
11937 else
11938 ac_res=-l$ac_lib
11939 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11941 if ac_fn_c_try_link "$LINENO"; then :
11942 ac_cv_search_socket=$ac_res
11944 rm -f core conftest.err conftest.$ac_objext \
11945 conftest$ac_exeext
11946 if ${ac_cv_search_socket+:} false; then :
11947 break
11949 done
11950 if ${ac_cv_search_socket+:} false; then :
11952 else
11953 ac_cv_search_socket=no
11955 rm conftest.$ac_ext
11956 LIBS=$ac_func_search_save_LIBS
11958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11959 $as_echo "$ac_cv_search_socket" >&6; }
11960 ac_res=$ac_cv_search_socket
11961 if test "$ac_res" != no; then :
11962 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11967 $as_echo_n "checking for library containing getopt_long... " >&6; }
11968 if ${ac_cv_search_getopt_long+:} false; then :
11969 $as_echo_n "(cached) " >&6
11970 else
11971 ac_func_search_save_LIBS=$LIBS
11972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11973 /* end confdefs.h. */
11975 /* Override any GCC internal prototype to avoid an error.
11976 Use char because int might match the return type of a GCC
11977 builtin and then its argument prototype would still apply. */
11978 #ifdef __cplusplus
11979 extern "C"
11980 #endif
11981 char getopt_long ();
11983 main ()
11985 return getopt_long ();
11987 return 0;
11989 _ACEOF
11990 for ac_lib in '' getopt gnugetopt; do
11991 if test -z "$ac_lib"; then
11992 ac_res="none required"
11993 else
11994 ac_res=-l$ac_lib
11995 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11997 if ac_fn_c_try_link "$LINENO"; then :
11998 ac_cv_search_getopt_long=$ac_res
12000 rm -f core conftest.err conftest.$ac_objext \
12001 conftest$ac_exeext
12002 if ${ac_cv_search_getopt_long+:} false; then :
12003 break
12005 done
12006 if ${ac_cv_search_getopt_long+:} false; then :
12008 else
12009 ac_cv_search_getopt_long=no
12011 rm conftest.$ac_ext
12012 LIBS=$ac_func_search_save_LIBS
12014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
12015 $as_echo "$ac_cv_search_getopt_long" >&6; }
12016 ac_res=$ac_cv_search_getopt_long
12017 if test "$ac_res" != no; then :
12018 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
12023 $as_echo_n "checking for library containing shm_open... " >&6; }
12024 if ${ac_cv_search_shm_open+:} false; then :
12025 $as_echo_n "(cached) " >&6
12026 else
12027 ac_func_search_save_LIBS=$LIBS
12028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12029 /* end confdefs.h. */
12031 /* Override any GCC internal prototype to avoid an error.
12032 Use char because int might match the return type of a GCC
12033 builtin and then its argument prototype would still apply. */
12034 #ifdef __cplusplus
12035 extern "C"
12036 #endif
12037 char shm_open ();
12039 main ()
12041 return shm_open ();
12043 return 0;
12045 _ACEOF
12046 for ac_lib in '' rt; do
12047 if test -z "$ac_lib"; then
12048 ac_res="none required"
12049 else
12050 ac_res=-l$ac_lib
12051 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12053 if ac_fn_c_try_link "$LINENO"; then :
12054 ac_cv_search_shm_open=$ac_res
12056 rm -f core conftest.err conftest.$ac_objext \
12057 conftest$ac_exeext
12058 if ${ac_cv_search_shm_open+:} false; then :
12059 break
12061 done
12062 if ${ac_cv_search_shm_open+:} false; then :
12064 else
12065 ac_cv_search_shm_open=no
12067 rm conftest.$ac_ext
12068 LIBS=$ac_func_search_save_LIBS
12070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
12071 $as_echo "$ac_cv_search_shm_open" >&6; }
12072 ac_res=$ac_cv_search_shm_open
12073 if test "$ac_res" != no; then :
12074 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
12079 $as_echo_n "checking for library containing shm_unlink... " >&6; }
12080 if ${ac_cv_search_shm_unlink+:} false; then :
12081 $as_echo_n "(cached) " >&6
12082 else
12083 ac_func_search_save_LIBS=$LIBS
12084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12085 /* end confdefs.h. */
12087 /* Override any GCC internal prototype to avoid an error.
12088 Use char because int might match the return type of a GCC
12089 builtin and then its argument prototype would still apply. */
12090 #ifdef __cplusplus
12091 extern "C"
12092 #endif
12093 char shm_unlink ();
12095 main ()
12097 return shm_unlink ();
12099 return 0;
12101 _ACEOF
12102 for ac_lib in '' rt; do
12103 if test -z "$ac_lib"; then
12104 ac_res="none required"
12105 else
12106 ac_res=-l$ac_lib
12107 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12109 if ac_fn_c_try_link "$LINENO"; then :
12110 ac_cv_search_shm_unlink=$ac_res
12112 rm -f core conftest.err conftest.$ac_objext \
12113 conftest$ac_exeext
12114 if ${ac_cv_search_shm_unlink+:} false; then :
12115 break
12117 done
12118 if ${ac_cv_search_shm_unlink+:} false; then :
12120 else
12121 ac_cv_search_shm_unlink=no
12123 rm conftest.$ac_ext
12124 LIBS=$ac_func_search_save_LIBS
12126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
12127 $as_echo "$ac_cv_search_shm_unlink" >&6; }
12128 ac_res=$ac_cv_search_shm_unlink
12129 if test "$ac_res" != no; then :
12130 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
12135 $as_echo_n "checking for library containing clock_gettime... " >&6; }
12136 if ${ac_cv_search_clock_gettime+:} false; then :
12137 $as_echo_n "(cached) " >&6
12138 else
12139 ac_func_search_save_LIBS=$LIBS
12140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12141 /* end confdefs.h. */
12143 /* Override any GCC internal prototype to avoid an error.
12144 Use char because int might match the return type of a GCC
12145 builtin and then its argument prototype would still apply. */
12146 #ifdef __cplusplus
12147 extern "C"
12148 #endif
12149 char clock_gettime ();
12151 main ()
12153 return clock_gettime ();
12155 return 0;
12157 _ACEOF
12158 for ac_lib in '' rt; do
12159 if test -z "$ac_lib"; then
12160 ac_res="none required"
12161 else
12162 ac_res=-l$ac_lib
12163 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12165 if ac_fn_c_try_link "$LINENO"; then :
12166 ac_cv_search_clock_gettime=$ac_res
12168 rm -f core conftest.err conftest.$ac_objext \
12169 conftest$ac_exeext
12170 if ${ac_cv_search_clock_gettime+:} false; then :
12171 break
12173 done
12174 if ${ac_cv_search_clock_gettime+:} false; then :
12176 else
12177 ac_cv_search_clock_gettime=no
12179 rm conftest.$ac_ext
12180 LIBS=$ac_func_search_save_LIBS
12182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
12183 $as_echo "$ac_cv_search_clock_gettime" >&6; }
12184 ac_res=$ac_cv_search_clock_gettime
12185 if test "$ac_res" != no; then :
12186 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12190 # Cygwin:
12191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
12192 $as_echo_n "checking for library containing shmget... " >&6; }
12193 if ${ac_cv_search_shmget+:} false; then :
12194 $as_echo_n "(cached) " >&6
12195 else
12196 ac_func_search_save_LIBS=$LIBS
12197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12198 /* end confdefs.h. */
12200 /* Override any GCC internal prototype to avoid an error.
12201 Use char because int might match the return type of a GCC
12202 builtin and then its argument prototype would still apply. */
12203 #ifdef __cplusplus
12204 extern "C"
12205 #endif
12206 char shmget ();
12208 main ()
12210 return shmget ();
12212 return 0;
12214 _ACEOF
12215 for ac_lib in '' cygipc; do
12216 if test -z "$ac_lib"; then
12217 ac_res="none required"
12218 else
12219 ac_res=-l$ac_lib
12220 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12222 if ac_fn_c_try_link "$LINENO"; then :
12223 ac_cv_search_shmget=$ac_res
12225 rm -f core conftest.err conftest.$ac_objext \
12226 conftest$ac_exeext
12227 if ${ac_cv_search_shmget+:} false; then :
12228 break
12230 done
12231 if ${ac_cv_search_shmget+:} false; then :
12233 else
12234 ac_cv_search_shmget=no
12236 rm conftest.$ac_ext
12237 LIBS=$ac_func_search_save_LIBS
12239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
12240 $as_echo "$ac_cv_search_shmget" >&6; }
12241 ac_res=$ac_cv_search_shmget
12242 if test "$ac_res" != no; then :
12243 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12247 # *BSD:
12248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
12249 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
12250 if ${ac_cv_search_backtrace_symbols+:} false; then :
12251 $as_echo_n "(cached) " >&6
12252 else
12253 ac_func_search_save_LIBS=$LIBS
12254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12255 /* end confdefs.h. */
12257 /* Override any GCC internal prototype to avoid an error.
12258 Use char because int might match the return type of a GCC
12259 builtin and then its argument prototype would still apply. */
12260 #ifdef __cplusplus
12261 extern "C"
12262 #endif
12263 char backtrace_symbols ();
12265 main ()
12267 return backtrace_symbols ();
12269 return 0;
12271 _ACEOF
12272 for ac_lib in '' execinfo; do
12273 if test -z "$ac_lib"; then
12274 ac_res="none required"
12275 else
12276 ac_res=-l$ac_lib
12277 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12279 if ac_fn_c_try_link "$LINENO"; then :
12280 ac_cv_search_backtrace_symbols=$ac_res
12282 rm -f core conftest.err conftest.$ac_objext \
12283 conftest$ac_exeext
12284 if ${ac_cv_search_backtrace_symbols+:} false; then :
12285 break
12287 done
12288 if ${ac_cv_search_backtrace_symbols+:} false; then :
12290 else
12291 ac_cv_search_backtrace_symbols=no
12293 rm conftest.$ac_ext
12294 LIBS=$ac_func_search_save_LIBS
12296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
12297 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
12298 ac_res=$ac_cv_search_backtrace_symbols
12299 if test "$ac_res" != no; then :
12300 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
12306 $as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
12307 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12308 $as_echo_n "(cached) " >&6
12309 else
12310 ac_func_search_save_LIBS=$LIBS
12311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12312 /* end confdefs.h. */
12314 /* Override any GCC internal prototype to avoid an error.
12315 Use char because int might match the return type of a GCC
12316 builtin and then its argument prototype would still apply. */
12317 #ifdef __cplusplus
12318 extern "C"
12319 #endif
12320 char pthread_barrier_wait ();
12322 main ()
12324 return pthread_barrier_wait ();
12326 return 0;
12328 _ACEOF
12329 for ac_lib in '' pthread; do
12330 if test -z "$ac_lib"; then
12331 ac_res="none required"
12332 else
12333 ac_res=-l$ac_lib
12334 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12336 if ac_fn_c_try_link "$LINENO"; then :
12337 ac_cv_search_pthread_barrier_wait=$ac_res
12339 rm -f core conftest.err conftest.$ac_objext \
12340 conftest$ac_exeext
12341 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12342 break
12344 done
12345 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12347 else
12348 ac_cv_search_pthread_barrier_wait=no
12350 rm conftest.$ac_ext
12351 LIBS=$ac_func_search_save_LIBS
12353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_barrier_wait" >&5
12354 $as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
12355 ac_res=$ac_cv_search_pthread_barrier_wait
12356 if test "$ac_res" != no; then :
12357 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12362 if test "$with_readline" = yes; then
12365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
12366 $as_echo_n "checking for library containing readline... " >&6; }
12367 if ${pgac_cv_check_readline+:} false; then :
12368 $as_echo_n "(cached) " >&6
12369 else
12370 pgac_cv_check_readline=no
12371 pgac_save_LIBS=$LIBS
12372 if test x"$with_libedit_preferred" != x"yes"
12373 then READLINE_ORDER="-lreadline -ledit"
12374 else READLINE_ORDER="-ledit -lreadline"
12376 for pgac_rllib in $READLINE_ORDER ; do
12377 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
12378 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
12379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12380 /* end confdefs.h. */
12382 /* Override any GCC internal prototype to avoid an error.
12383 Use char because int might match the return type of a GCC
12384 builtin and then its argument prototype would still apply. */
12385 #ifdef __cplusplus
12386 extern "C"
12387 #endif
12388 char readline ();
12390 main ()
12392 return readline ();
12394 return 0;
12396 _ACEOF
12397 if ac_fn_c_try_link "$LINENO"; then :
12399 # Older NetBSD and OpenBSD have a broken linker that does not
12400 # recognize dependent libraries; assume curses is needed if we didn't
12401 # find any dependency.
12402 case $host_os in
12403 netbsd* | openbsd*)
12404 if test x"$pgac_lib" = x"" ; then
12405 pgac_lib=" -lcurses"
12406 fi ;;
12407 esac
12409 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12410 break
12413 rm -f core conftest.err conftest.$ac_objext \
12414 conftest$ac_exeext conftest.$ac_ext
12415 done
12416 if test "$pgac_cv_check_readline" != no ; then
12417 break
12419 done
12420 LIBS=$pgac_save_LIBS
12423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12424 $as_echo "$pgac_cv_check_readline" >&6; }
12425 if test "$pgac_cv_check_readline" != no ; then
12426 LIBS="$pgac_cv_check_readline $LIBS"
12428 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12433 if test x"$pgac_cv_check_readline" = x"no"; then
12434 as_fn_error $? "readline library not found
12435 If you have readline already installed, see config.log for details on the
12436 failure. It is possible the compiler isn't looking in the proper directory.
12437 Use --without-readline to disable readline support." "$LINENO" 5
12441 if test "$with_zlib" = yes; then
12442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12443 $as_echo_n "checking for inflate in -lz... " >&6; }
12444 if ${ac_cv_lib_z_inflate+:} false; then :
12445 $as_echo_n "(cached) " >&6
12446 else
12447 ac_check_lib_save_LIBS=$LIBS
12448 LIBS="-lz $LIBS"
12449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12450 /* end confdefs.h. */
12452 /* Override any GCC internal prototype to avoid an error.
12453 Use char because int might match the return type of a GCC
12454 builtin and then its argument prototype would still apply. */
12455 #ifdef __cplusplus
12456 extern "C"
12457 #endif
12458 char inflate ();
12460 main ()
12462 return inflate ();
12464 return 0;
12466 _ACEOF
12467 if ac_fn_c_try_link "$LINENO"; then :
12468 ac_cv_lib_z_inflate=yes
12469 else
12470 ac_cv_lib_z_inflate=no
12472 rm -f core conftest.err conftest.$ac_objext \
12473 conftest$ac_exeext conftest.$ac_ext
12474 LIBS=$ac_check_lib_save_LIBS
12476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12477 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12478 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12479 cat >>confdefs.h <<_ACEOF
12480 #define HAVE_LIBZ 1
12481 _ACEOF
12483 LIBS="-lz $LIBS"
12485 else
12486 as_fn_error $? "zlib library not found
12487 If you have zlib already installed, see config.log for details on the
12488 failure. It is possible the compiler isn't looking in the proper directory.
12489 Use --without-zlib to disable zlib support." "$LINENO" 5
12494 if test "$enable_spinlocks" = yes; then
12496 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
12498 else
12499 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12500 *** Not using spinlocks will cause poor performance." >&5
12501 $as_echo "$as_me: WARNING:
12502 *** Not using spinlocks will cause poor performance." >&2;}
12505 if test "$enable_atomics" = yes; then
12507 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
12509 else
12510 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12511 *** Not using atomic operations will cause poor performance." >&5
12512 $as_echo "$as_me: WARNING:
12513 *** Not using atomic operations will cause poor performance." >&2;}
12516 if test "$with_gssapi" = yes ; then
12517 if test "$PORTNAME" != "win32"; then
12518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_store_cred_into" >&5
12519 $as_echo_n "checking for library containing gss_store_cred_into... " >&6; }
12520 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12521 $as_echo_n "(cached) " >&6
12522 else
12523 ac_func_search_save_LIBS=$LIBS
12524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12525 /* end confdefs.h. */
12527 /* Override any GCC internal prototype to avoid an error.
12528 Use char because int might match the return type of a GCC
12529 builtin and then its argument prototype would still apply. */
12530 #ifdef __cplusplus
12531 extern "C"
12532 #endif
12533 char gss_store_cred_into ();
12535 main ()
12537 return gss_store_cred_into ();
12539 return 0;
12541 _ACEOF
12542 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12543 if test -z "$ac_lib"; then
12544 ac_res="none required"
12545 else
12546 ac_res=-l$ac_lib
12547 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12549 if ac_fn_c_try_link "$LINENO"; then :
12550 ac_cv_search_gss_store_cred_into=$ac_res
12552 rm -f core conftest.err conftest.$ac_objext \
12553 conftest$ac_exeext
12554 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12555 break
12557 done
12558 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12560 else
12561 ac_cv_search_gss_store_cred_into=no
12563 rm conftest.$ac_ext
12564 LIBS=$ac_func_search_save_LIBS
12566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_store_cred_into" >&5
12567 $as_echo "$ac_cv_search_gss_store_cred_into" >&6; }
12568 ac_res=$ac_cv_search_gss_store_cred_into
12569 if test "$ac_res" != no; then :
12570 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12572 else
12573 as_fn_error $? "could not find function 'gss_store_cred_into' required for GSSAPI" "$LINENO" 5
12576 else
12577 LIBS="$LIBS -lgssapi32"
12582 # SSL Library
12584 # There is currently only one supported SSL/TLS library: OpenSSL.
12589 # Check whether --with-ssl was given.
12590 if test "${with_ssl+set}" = set; then :
12591 withval=$with_ssl;
12592 case $withval in
12593 yes)
12594 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12597 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12602 esac
12607 if test x"$with_ssl" = x"" ; then
12608 with_ssl=no
12613 # Check whether --with-openssl was given.
12614 if test "${with_openssl+set}" = set; then :
12615 withval=$with_openssl;
12616 case $withval in
12617 yes)
12624 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12626 esac
12628 else
12629 with_openssl=no
12634 if test "$with_openssl" = yes ; then
12635 with_ssl=openssl
12638 if test "$with_ssl" = openssl ; then
12639 # Minimum required OpenSSL version is 1.0.2
12641 $as_echo "#define OPENSSL_API_COMPAT 0x10002000L" >>confdefs.h
12643 if test "$PORTNAME" != "win32"; then
12644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12645 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12646 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12647 $as_echo_n "(cached) " >&6
12648 else
12649 ac_check_lib_save_LIBS=$LIBS
12650 LIBS="-lcrypto $LIBS"
12651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12652 /* end confdefs.h. */
12654 /* Override any GCC internal prototype to avoid an error.
12655 Use char because int might match the return type of a GCC
12656 builtin and then its argument prototype would still apply. */
12657 #ifdef __cplusplus
12658 extern "C"
12659 #endif
12660 char CRYPTO_new_ex_data ();
12662 main ()
12664 return CRYPTO_new_ex_data ();
12666 return 0;
12668 _ACEOF
12669 if ac_fn_c_try_link "$LINENO"; then :
12670 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12671 else
12672 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12674 rm -f core conftest.err conftest.$ac_objext \
12675 conftest$ac_exeext conftest.$ac_ext
12676 LIBS=$ac_check_lib_save_LIBS
12678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12679 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12680 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12681 cat >>confdefs.h <<_ACEOF
12682 #define HAVE_LIBCRYPTO 1
12683 _ACEOF
12685 LIBS="-lcrypto $LIBS"
12687 else
12688 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12692 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12693 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12694 $as_echo_n "(cached) " >&6
12695 else
12696 ac_check_lib_save_LIBS=$LIBS
12697 LIBS="-lssl $LIBS"
12698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12699 /* end confdefs.h. */
12701 /* Override any GCC internal prototype to avoid an error.
12702 Use char because int might match the return type of a GCC
12703 builtin and then its argument prototype would still apply. */
12704 #ifdef __cplusplus
12705 extern "C"
12706 #endif
12707 char SSL_new ();
12709 main ()
12711 return SSL_new ();
12713 return 0;
12715 _ACEOF
12716 if ac_fn_c_try_link "$LINENO"; then :
12717 ac_cv_lib_ssl_SSL_new=yes
12718 else
12719 ac_cv_lib_ssl_SSL_new=no
12721 rm -f core conftest.err conftest.$ac_objext \
12722 conftest$ac_exeext conftest.$ac_ext
12723 LIBS=$ac_check_lib_save_LIBS
12725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12726 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12727 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12728 cat >>confdefs.h <<_ACEOF
12729 #define HAVE_LIBSSL 1
12730 _ACEOF
12732 LIBS="-lssl $LIBS"
12734 else
12735 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12738 else
12739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12740 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12741 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12742 $as_echo_n "(cached) " >&6
12743 else
12744 ac_func_search_save_LIBS=$LIBS
12745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12746 /* end confdefs.h. */
12748 /* Override any GCC internal prototype to avoid an error.
12749 Use char because int might match the return type of a GCC
12750 builtin and then its argument prototype would still apply. */
12751 #ifdef __cplusplus
12752 extern "C"
12753 #endif
12754 char CRYPTO_new_ex_data ();
12756 main ()
12758 return CRYPTO_new_ex_data ();
12760 return 0;
12762 _ACEOF
12763 for ac_lib in '' eay32 crypto; do
12764 if test -z "$ac_lib"; then
12765 ac_res="none required"
12766 else
12767 ac_res=-l$ac_lib
12768 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12770 if ac_fn_c_try_link "$LINENO"; then :
12771 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12773 rm -f core conftest.err conftest.$ac_objext \
12774 conftest$ac_exeext
12775 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12776 break
12778 done
12779 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12781 else
12782 ac_cv_search_CRYPTO_new_ex_data=no
12784 rm conftest.$ac_ext
12785 LIBS=$ac_func_search_save_LIBS
12787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12788 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12789 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12790 if test "$ac_res" != no; then :
12791 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12793 else
12794 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12798 $as_echo_n "checking for library containing SSL_new... " >&6; }
12799 if ${ac_cv_search_SSL_new+:} false; then :
12800 $as_echo_n "(cached) " >&6
12801 else
12802 ac_func_search_save_LIBS=$LIBS
12803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12804 /* end confdefs.h. */
12806 /* Override any GCC internal prototype to avoid an error.
12807 Use char because int might match the return type of a GCC
12808 builtin and then its argument prototype would still apply. */
12809 #ifdef __cplusplus
12810 extern "C"
12811 #endif
12812 char SSL_new ();
12814 main ()
12816 return SSL_new ();
12818 return 0;
12820 _ACEOF
12821 for ac_lib in '' ssleay32 ssl; do
12822 if test -z "$ac_lib"; then
12823 ac_res="none required"
12824 else
12825 ac_res=-l$ac_lib
12826 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12828 if ac_fn_c_try_link "$LINENO"; then :
12829 ac_cv_search_SSL_new=$ac_res
12831 rm -f core conftest.err conftest.$ac_objext \
12832 conftest$ac_exeext
12833 if ${ac_cv_search_SSL_new+:} false; then :
12834 break
12836 done
12837 if ${ac_cv_search_SSL_new+:} false; then :
12839 else
12840 ac_cv_search_SSL_new=no
12842 rm conftest.$ac_ext
12843 LIBS=$ac_func_search_save_LIBS
12845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12846 $as_echo "$ac_cv_search_SSL_new" >&6; }
12847 ac_res=$ac_cv_search_SSL_new
12848 if test "$ac_res" != no; then :
12849 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12851 else
12852 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12856 # Function introduced in OpenSSL 1.0.2, not in LibreSSL.
12857 for ac_func in SSL_CTX_set_cert_cb
12858 do :
12859 ac_fn_c_check_func "$LINENO" "SSL_CTX_set_cert_cb" "ac_cv_func_SSL_CTX_set_cert_cb"
12860 if test "x$ac_cv_func_SSL_CTX_set_cert_cb" = xyes; then :
12861 cat >>confdefs.h <<_ACEOF
12862 #define HAVE_SSL_CTX_SET_CERT_CB 1
12863 _ACEOF
12866 done
12868 # Functions introduced in OpenSSL 1.1.0. We used to check for
12869 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12870 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12871 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12872 # functions.
12873 for ac_func in OPENSSL_init_ssl BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free
12874 do :
12875 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12876 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12877 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12878 cat >>confdefs.h <<_ACEOF
12879 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12880 _ACEOF
12883 done
12885 # OpenSSL versions before 1.1.0 required setting callback functions, for
12886 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12887 # function was removed.
12888 for ac_func in CRYPTO_lock
12889 do :
12890 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12891 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12892 cat >>confdefs.h <<_ACEOF
12893 #define HAVE_CRYPTO_LOCK 1
12894 _ACEOF
12897 done
12899 # Function introduced in OpenSSL 1.1.1.
12900 for ac_func in X509_get_signature_info
12901 do :
12902 ac_fn_c_check_func "$LINENO" "X509_get_signature_info" "ac_cv_func_X509_get_signature_info"
12903 if test "x$ac_cv_func_X509_get_signature_info" = xyes; then :
12904 cat >>confdefs.h <<_ACEOF
12905 #define HAVE_X509_GET_SIGNATURE_INFO 1
12906 _ACEOF
12909 done
12912 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
12914 elif test "$with_ssl" != no ; then
12915 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
12919 if test "$with_pam" = yes ; then
12920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12921 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12922 if ${ac_cv_lib_pam_pam_start+:} false; then :
12923 $as_echo_n "(cached) " >&6
12924 else
12925 ac_check_lib_save_LIBS=$LIBS
12926 LIBS="-lpam $LIBS"
12927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12928 /* end confdefs.h. */
12930 /* Override any GCC internal prototype to avoid an error.
12931 Use char because int might match the return type of a GCC
12932 builtin and then its argument prototype would still apply. */
12933 #ifdef __cplusplus
12934 extern "C"
12935 #endif
12936 char pam_start ();
12938 main ()
12940 return pam_start ();
12942 return 0;
12944 _ACEOF
12945 if ac_fn_c_try_link "$LINENO"; then :
12946 ac_cv_lib_pam_pam_start=yes
12947 else
12948 ac_cv_lib_pam_pam_start=no
12950 rm -f core conftest.err conftest.$ac_objext \
12951 conftest$ac_exeext conftest.$ac_ext
12952 LIBS=$ac_check_lib_save_LIBS
12954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12955 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12956 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12957 cat >>confdefs.h <<_ACEOF
12958 #define HAVE_LIBPAM 1
12959 _ACEOF
12961 LIBS="-lpam $LIBS"
12963 else
12964 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12969 if test "$with_libxml" = yes ; then
12970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12971 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12972 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12973 $as_echo_n "(cached) " >&6
12974 else
12975 ac_check_lib_save_LIBS=$LIBS
12976 LIBS="-lxml2 $LIBS"
12977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12978 /* end confdefs.h. */
12980 /* Override any GCC internal prototype to avoid an error.
12981 Use char because int might match the return type of a GCC
12982 builtin and then its argument prototype would still apply. */
12983 #ifdef __cplusplus
12984 extern "C"
12985 #endif
12986 char xmlSaveToBuffer ();
12988 main ()
12990 return xmlSaveToBuffer ();
12992 return 0;
12994 _ACEOF
12995 if ac_fn_c_try_link "$LINENO"; then :
12996 ac_cv_lib_xml2_xmlSaveToBuffer=yes
12997 else
12998 ac_cv_lib_xml2_xmlSaveToBuffer=no
13000 rm -f core conftest.err conftest.$ac_objext \
13001 conftest$ac_exeext conftest.$ac_ext
13002 LIBS=$ac_check_lib_save_LIBS
13004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
13005 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
13006 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
13007 cat >>confdefs.h <<_ACEOF
13008 #define HAVE_LIBXML2 1
13009 _ACEOF
13011 LIBS="-lxml2 $LIBS"
13013 else
13014 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
13019 if test "$with_libxslt" = yes ; then
13020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
13021 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
13022 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
13023 $as_echo_n "(cached) " >&6
13024 else
13025 ac_check_lib_save_LIBS=$LIBS
13026 LIBS="-lxslt $LIBS"
13027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13028 /* end confdefs.h. */
13030 /* Override any GCC internal prototype to avoid an error.
13031 Use char because int might match the return type of a GCC
13032 builtin and then its argument prototype would still apply. */
13033 #ifdef __cplusplus
13034 extern "C"
13035 #endif
13036 char xsltCleanupGlobals ();
13038 main ()
13040 return xsltCleanupGlobals ();
13042 return 0;
13044 _ACEOF
13045 if ac_fn_c_try_link "$LINENO"; then :
13046 ac_cv_lib_xslt_xsltCleanupGlobals=yes
13047 else
13048 ac_cv_lib_xslt_xsltCleanupGlobals=no
13050 rm -f core conftest.err conftest.$ac_objext \
13051 conftest$ac_exeext conftest.$ac_ext
13052 LIBS=$ac_check_lib_save_LIBS
13054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
13055 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
13056 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
13057 cat >>confdefs.h <<_ACEOF
13058 #define HAVE_LIBXSLT 1
13059 _ACEOF
13061 LIBS="-lxslt $LIBS"
13063 else
13064 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
13069 if test "$with_lz4" = yes ; then
13070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
13071 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
13072 if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
13073 $as_echo_n "(cached) " >&6
13074 else
13075 ac_check_lib_save_LIBS=$LIBS
13076 LIBS="-llz4 $LIBS"
13077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13078 /* end confdefs.h. */
13080 /* Override any GCC internal prototype to avoid an error.
13081 Use char because int might match the return type of a GCC
13082 builtin and then its argument prototype would still apply. */
13083 #ifdef __cplusplus
13084 extern "C"
13085 #endif
13086 char LZ4_compress_default ();
13088 main ()
13090 return LZ4_compress_default ();
13092 return 0;
13094 _ACEOF
13095 if ac_fn_c_try_link "$LINENO"; then :
13096 ac_cv_lib_lz4_LZ4_compress_default=yes
13097 else
13098 ac_cv_lib_lz4_LZ4_compress_default=no
13100 rm -f core conftest.err conftest.$ac_objext \
13101 conftest$ac_exeext conftest.$ac_ext
13102 LIBS=$ac_check_lib_save_LIBS
13104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5
13105 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
13106 if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
13107 cat >>confdefs.h <<_ACEOF
13108 #define HAVE_LIBLZ4 1
13109 _ACEOF
13111 LIBS="-llz4 $LIBS"
13113 else
13114 as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
13119 if test "$with_zstd" = yes ; then
13120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5
13121 $as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; }
13122 if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then :
13123 $as_echo_n "(cached) " >&6
13124 else
13125 ac_check_lib_save_LIBS=$LIBS
13126 LIBS="-lzstd $LIBS"
13127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13128 /* end confdefs.h. */
13130 /* Override any GCC internal prototype to avoid an error.
13131 Use char because int might match the return type of a GCC
13132 builtin and then its argument prototype would still apply. */
13133 #ifdef __cplusplus
13134 extern "C"
13135 #endif
13136 char ZSTD_compress ();
13138 main ()
13140 return ZSTD_compress ();
13142 return 0;
13144 _ACEOF
13145 if ac_fn_c_try_link "$LINENO"; then :
13146 ac_cv_lib_zstd_ZSTD_compress=yes
13147 else
13148 ac_cv_lib_zstd_ZSTD_compress=no
13150 rm -f core conftest.err conftest.$ac_objext \
13151 conftest$ac_exeext conftest.$ac_ext
13152 LIBS=$ac_check_lib_save_LIBS
13154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5
13155 $as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; }
13156 if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then :
13157 cat >>confdefs.h <<_ACEOF
13158 #define HAVE_LIBZSTD 1
13159 _ACEOF
13161 LIBS="-lzstd $LIBS"
13163 else
13164 as_fn_error $? "library 'zstd' is required for ZSTD support" "$LINENO" 5
13169 # Note: We can test for libldap_r only after we know PTHREAD_LIBS;
13170 # also, on AIX, we may need to have openssl in LIBS for this step.
13171 if test "$with_ldap" = yes ; then
13172 _LIBS="$LIBS"
13173 if test "$PORTNAME" != "win32"; then
13174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
13175 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
13176 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
13177 $as_echo_n "(cached) " >&6
13178 else
13179 ac_check_lib_save_LIBS=$LIBS
13180 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
13181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13182 /* end confdefs.h. */
13184 /* Override any GCC internal prototype to avoid an error.
13185 Use char because int might match the return type of a GCC
13186 builtin and then its argument prototype would still apply. */
13187 #ifdef __cplusplus
13188 extern "C"
13189 #endif
13190 char ldap_bind ();
13192 main ()
13194 return ldap_bind ();
13196 return 0;
13198 _ACEOF
13199 if ac_fn_c_try_link "$LINENO"; then :
13200 ac_cv_lib_ldap_ldap_bind=yes
13201 else
13202 ac_cv_lib_ldap_ldap_bind=no
13204 rm -f core conftest.err conftest.$ac_objext \
13205 conftest$ac_exeext conftest.$ac_ext
13206 LIBS=$ac_check_lib_save_LIBS
13208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
13209 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
13210 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
13211 cat >>confdefs.h <<_ACEOF
13212 #define HAVE_LIBLDAP 1
13213 _ACEOF
13215 LIBS="-lldap $LIBS"
13217 else
13218 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
13221 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
13222 # This test is carried out against libldap.
13223 for ac_func in ldap_initialize
13224 do :
13225 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
13226 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
13227 cat >>confdefs.h <<_ACEOF
13228 #define HAVE_LDAP_INITIALIZE 1
13229 _ACEOF
13232 done
13234 # The separate ldap_r library only exists in OpenLDAP < 2.5, and if we
13235 # have 2.5 or later, we shouldn't even probe for ldap_r (we might find a
13236 # library from a separate OpenLDAP installation). The most reliable
13237 # way to check that is to check for a function introduced in 2.5.
13238 ac_fn_c_check_func "$LINENO" "ldap_verify_credentials" "ac_cv_func_ldap_verify_credentials"
13239 if test "x$ac_cv_func_ldap_verify_credentials" = xyes; then :
13240 thread_safe_libldap=yes
13241 else
13242 thread_safe_libldap=no
13245 if test "$thread_safe_libldap" = no; then
13246 # Use ldap_r for FE if available, else assume ldap is thread-safe.
13247 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
13248 LIBS="$_LIBS"
13249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
13250 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
13251 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
13252 $as_echo_n "(cached) " >&6
13253 else
13254 ac_check_lib_save_LIBS=$LIBS
13255 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
13256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13257 /* end confdefs.h. */
13259 /* Override any GCC internal prototype to avoid an error.
13260 Use char because int might match the return type of a GCC
13261 builtin and then its argument prototype would still apply. */
13262 #ifdef __cplusplus
13263 extern "C"
13264 #endif
13265 char ldap_bind ();
13267 main ()
13269 return ldap_bind ();
13271 return 0;
13273 _ACEOF
13274 if ac_fn_c_try_link "$LINENO"; then :
13275 ac_cv_lib_ldap_r_ldap_bind=yes
13276 else
13277 ac_cv_lib_ldap_r_ldap_bind=no
13279 rm -f core conftest.err conftest.$ac_objext \
13280 conftest$ac_exeext conftest.$ac_ext
13281 LIBS=$ac_check_lib_save_LIBS
13283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
13284 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
13285 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
13286 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
13287 else
13288 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13291 else
13292 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13294 else
13295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
13296 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
13297 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
13298 $as_echo_n "(cached) " >&6
13299 else
13300 ac_check_lib_save_LIBS=$LIBS
13301 LIBS="-lwldap32 $LIBS"
13302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13303 /* end confdefs.h. */
13305 /* Override any GCC internal prototype to avoid an error.
13306 Use char because int might match the return type of a GCC
13307 builtin and then its argument prototype would still apply. */
13308 #ifdef __cplusplus
13309 extern "C"
13310 #endif
13311 char ldap_bind ();
13313 main ()
13315 return ldap_bind ();
13317 return 0;
13319 _ACEOF
13320 if ac_fn_c_try_link "$LINENO"; then :
13321 ac_cv_lib_wldap32_ldap_bind=yes
13322 else
13323 ac_cv_lib_wldap32_ldap_bind=no
13325 rm -f core conftest.err conftest.$ac_objext \
13326 conftest$ac_exeext conftest.$ac_ext
13327 LIBS=$ac_check_lib_save_LIBS
13329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
13330 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
13331 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
13332 cat >>confdefs.h <<_ACEOF
13333 #define HAVE_LIBWLDAP32 1
13334 _ACEOF
13336 LIBS="-lwldap32 $LIBS"
13338 else
13339 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13342 LDAP_LIBS_FE="-lwldap32"
13343 LDAP_LIBS_BE="-lwldap32"
13345 LIBS="$_LIBS"
13350 # for contrib/sepgsql
13351 if test "$with_selinux" = yes; then
13352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
13353 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
13354 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
13355 $as_echo_n "(cached) " >&6
13356 else
13357 ac_check_lib_save_LIBS=$LIBS
13358 LIBS="-lselinux $LIBS"
13359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13360 /* end confdefs.h. */
13362 /* Override any GCC internal prototype to avoid an error.
13363 Use char because int might match the return type of a GCC
13364 builtin and then its argument prototype would still apply. */
13365 #ifdef __cplusplus
13366 extern "C"
13367 #endif
13368 char security_compute_create_name ();
13370 main ()
13372 return security_compute_create_name ();
13374 return 0;
13376 _ACEOF
13377 if ac_fn_c_try_link "$LINENO"; then :
13378 ac_cv_lib_selinux_security_compute_create_name=yes
13379 else
13380 ac_cv_lib_selinux_security_compute_create_name=no
13382 rm -f core conftest.err conftest.$ac_objext \
13383 conftest$ac_exeext conftest.$ac_ext
13384 LIBS=$ac_check_lib_save_LIBS
13386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
13387 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
13388 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
13389 cat >>confdefs.h <<_ACEOF
13390 #define HAVE_LIBSELINUX 1
13391 _ACEOF
13393 LIBS="-lselinux $LIBS"
13395 else
13396 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
13401 # for contrib/uuid-ossp
13402 if test "$with_uuid" = bsd ; then
13403 # On BSD, the UUID functions are in libc
13404 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
13405 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
13406 UUID_LIBS=""
13407 else
13408 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
13411 elif test "$with_uuid" = e2fs ; then
13412 # On macOS, the UUID functions are in libc
13413 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
13414 if test "x$ac_cv_func_uuid_generate" = xyes; then :
13415 UUID_LIBS=""
13416 else
13417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
13418 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
13419 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
13420 $as_echo_n "(cached) " >&6
13421 else
13422 ac_check_lib_save_LIBS=$LIBS
13423 LIBS="-luuid $LIBS"
13424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13425 /* end confdefs.h. */
13427 /* Override any GCC internal prototype to avoid an error.
13428 Use char because int might match the return type of a GCC
13429 builtin and then its argument prototype would still apply. */
13430 #ifdef __cplusplus
13431 extern "C"
13432 #endif
13433 char uuid_generate ();
13435 main ()
13437 return uuid_generate ();
13439 return 0;
13441 _ACEOF
13442 if ac_fn_c_try_link "$LINENO"; then :
13443 ac_cv_lib_uuid_uuid_generate=yes
13444 else
13445 ac_cv_lib_uuid_uuid_generate=no
13447 rm -f core conftest.err conftest.$ac_objext \
13448 conftest$ac_exeext conftest.$ac_ext
13449 LIBS=$ac_check_lib_save_LIBS
13451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13452 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13453 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13454 UUID_LIBS="-luuid"
13455 else
13456 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13461 elif test "$with_uuid" = ossp ; then
13462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13463 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13464 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13465 $as_echo_n "(cached) " >&6
13466 else
13467 ac_check_lib_save_LIBS=$LIBS
13468 LIBS="-lossp-uuid $LIBS"
13469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13470 /* end confdefs.h. */
13472 /* Override any GCC internal prototype to avoid an error.
13473 Use char because int might match the return type of a GCC
13474 builtin and then its argument prototype would still apply. */
13475 #ifdef __cplusplus
13476 extern "C"
13477 #endif
13478 char uuid_export ();
13480 main ()
13482 return uuid_export ();
13484 return 0;
13486 _ACEOF
13487 if ac_fn_c_try_link "$LINENO"; then :
13488 ac_cv_lib_ossp_uuid_uuid_export=yes
13489 else
13490 ac_cv_lib_ossp_uuid_uuid_export=no
13492 rm -f core conftest.err conftest.$ac_objext \
13493 conftest$ac_exeext conftest.$ac_ext
13494 LIBS=$ac_check_lib_save_LIBS
13496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13497 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13498 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13499 UUID_LIBS="-lossp-uuid"
13500 else
13501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13502 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13503 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13504 $as_echo_n "(cached) " >&6
13505 else
13506 ac_check_lib_save_LIBS=$LIBS
13507 LIBS="-luuid $LIBS"
13508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13509 /* end confdefs.h. */
13511 /* Override any GCC internal prototype to avoid an error.
13512 Use char because int might match the return type of a GCC
13513 builtin and then its argument prototype would still apply. */
13514 #ifdef __cplusplus
13515 extern "C"
13516 #endif
13517 char uuid_export ();
13519 main ()
13521 return uuid_export ();
13523 return 0;
13525 _ACEOF
13526 if ac_fn_c_try_link "$LINENO"; then :
13527 ac_cv_lib_uuid_uuid_export=yes
13528 else
13529 ac_cv_lib_uuid_uuid_export=no
13531 rm -f core conftest.err conftest.$ac_objext \
13532 conftest$ac_exeext conftest.$ac_ext
13533 LIBS=$ac_check_lib_save_LIBS
13535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13536 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13537 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13538 UUID_LIBS="-luuid"
13539 else
13540 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13550 ## Header files
13553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13554 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13555 if ${ac_cv_header_stdbool_h+:} false; then :
13556 $as_echo_n "(cached) " >&6
13557 else
13558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13559 /* end confdefs.h. */
13561 #include <stdbool.h>
13562 #ifndef bool
13563 "error: bool is not defined"
13564 #endif
13565 #ifndef false
13566 "error: false is not defined"
13567 #endif
13568 #if false
13569 "error: false is not 0"
13570 #endif
13571 #ifndef true
13572 "error: true is not defined"
13573 #endif
13574 #if true != 1
13575 "error: true is not 1"
13576 #endif
13577 #ifndef __bool_true_false_are_defined
13578 "error: __bool_true_false_are_defined is not defined"
13579 #endif
13581 struct s { _Bool s: 1; _Bool t; } s;
13583 char a[true == 1 ? 1 : -1];
13584 char b[false == 0 ? 1 : -1];
13585 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13586 char d[(bool) 0.5 == true ? 1 : -1];
13587 /* See body of main program for 'e'. */
13588 char f[(_Bool) 0.0 == false ? 1 : -1];
13589 char g[true];
13590 char h[sizeof (_Bool)];
13591 char i[sizeof s.t];
13592 enum { j = false, k = true, l = false * true, m = true * 256 };
13593 /* The following fails for
13594 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13595 _Bool n[m];
13596 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13597 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13598 /* Catch a bug in an HP-UX C compiler. See
13599 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13600 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13602 _Bool q = true;
13603 _Bool *pq = &q;
13606 main ()
13609 bool e = &s;
13610 *pq |= q;
13611 *pq |= ! q;
13612 /* Refer to every declared value, to avoid compiler optimizations. */
13613 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13614 + !m + !n + !o + !p + !q + !pq);
13617 return 0;
13619 _ACEOF
13620 if ac_fn_c_try_compile "$LINENO"; then :
13621 ac_cv_header_stdbool_h=yes
13622 else
13623 ac_cv_header_stdbool_h=no
13625 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13628 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13629 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13630 if test "x$ac_cv_type__Bool" = xyes; then :
13632 cat >>confdefs.h <<_ACEOF
13633 #define HAVE__BOOL 1
13634 _ACEOF
13640 if test $ac_cv_header_stdbool_h = yes; then
13642 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13647 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
13648 do :
13649 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13650 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13651 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13652 cat >>confdefs.h <<_ACEOF
13653 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13654 _ACEOF
13658 done
13661 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13662 for ac_header in readline/readline.h
13663 do :
13664 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13665 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13666 cat >>confdefs.h <<_ACEOF
13667 #define HAVE_READLINE_READLINE_H 1
13668 _ACEOF
13670 else
13671 for ac_header in readline.h
13672 do :
13673 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13674 if test "x$ac_cv_header_readline_h" = xyes; then :
13675 cat >>confdefs.h <<_ACEOF
13676 #define HAVE_READLINE_H 1
13677 _ACEOF
13679 else
13680 as_fn_error $? "readline header not found
13681 If you have readline already installed, see config.log for details on the
13682 failure. It is possible the compiler isn't looking in the proper directory.
13683 Use --without-readline to disable readline support." "$LINENO" 5
13686 done
13690 done
13692 for ac_header in readline/history.h
13693 do :
13694 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13695 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13696 cat >>confdefs.h <<_ACEOF
13697 #define HAVE_READLINE_HISTORY_H 1
13698 _ACEOF
13700 else
13701 for ac_header in history.h
13702 do :
13703 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13704 if test "x$ac_cv_header_history_h" = xyes; then :
13705 cat >>confdefs.h <<_ACEOF
13706 #define HAVE_HISTORY_H 1
13707 _ACEOF
13709 else
13710 as_fn_error $? "history header not found
13711 If you have readline already installed, see config.log for details on the
13712 failure. It is possible the compiler isn't looking in the proper directory.
13713 Use --without-readline to disable readline support." "$LINENO" 5
13716 done
13720 done
13724 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13725 # Some installations of libedit usurp /usr/include/readline/, which seems
13726 # bad practice, since in combined installations readline will have its headers
13727 # there. We might have to resort to AC_EGREP checks to make sure we found
13728 # the proper header...
13729 for ac_header in editline/readline.h
13730 do :
13731 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13732 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13733 cat >>confdefs.h <<_ACEOF
13734 #define HAVE_EDITLINE_READLINE_H 1
13735 _ACEOF
13737 else
13738 for ac_header in readline.h
13739 do :
13740 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13741 if test "x$ac_cv_header_readline_h" = xyes; then :
13742 cat >>confdefs.h <<_ACEOF
13743 #define HAVE_READLINE_H 1
13744 _ACEOF
13746 else
13747 for ac_header in readline/readline.h
13748 do :
13749 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13750 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13751 cat >>confdefs.h <<_ACEOF
13752 #define HAVE_READLINE_READLINE_H 1
13753 _ACEOF
13755 else
13756 as_fn_error $? "readline header not found
13757 If you have libedit already installed, see config.log for details on the
13758 failure. It is possible the compiler isn't looking in the proper directory.
13759 Use --without-readline to disable libedit support." "$LINENO" 5
13762 done
13766 done
13770 done
13772 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13773 # not be there at all. Hence, don't complain if not found. We must check
13774 # though, since in yet other versions it is an independent header.
13775 for ac_header in editline/history.h
13776 do :
13777 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13778 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13779 cat >>confdefs.h <<_ACEOF
13780 #define HAVE_EDITLINE_HISTORY_H 1
13781 _ACEOF
13783 else
13784 for ac_header in history.h
13785 do :
13786 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13787 if test "x$ac_cv_header_history_h" = xyes; then :
13788 cat >>confdefs.h <<_ACEOF
13789 #define HAVE_HISTORY_H 1
13790 _ACEOF
13792 else
13793 for ac_header in readline/history.h
13794 do :
13795 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13796 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13797 cat >>confdefs.h <<_ACEOF
13798 #define HAVE_READLINE_HISTORY_H 1
13799 _ACEOF
13803 done
13807 done
13811 done
13815 if test "$with_zlib" = yes; then
13816 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13817 if test "x$ac_cv_header_zlib_h" = xyes; then :
13819 else
13820 as_fn_error $? "zlib header not found
13821 If you have zlib already installed, see config.log for details on the
13822 failure. It is possible the compiler isn't looking in the proper directory.
13823 Use --without-zlib to disable zlib support." "$LINENO" 5
13829 if test -z "$LZ4"; then
13830 for ac_prog in lz4
13832 # Extract the first word of "$ac_prog", so it can be a program name with args.
13833 set dummy $ac_prog; ac_word=$2
13834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13835 $as_echo_n "checking for $ac_word... " >&6; }
13836 if ${ac_cv_path_LZ4+:} false; then :
13837 $as_echo_n "(cached) " >&6
13838 else
13839 case $LZ4 in
13840 [\\/]* | ?:[\\/]*)
13841 ac_cv_path_LZ4="$LZ4" # Let the user override the test with a path.
13844 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13845 for as_dir in $PATH
13847 IFS=$as_save_IFS
13848 test -z "$as_dir" && as_dir=.
13849 for ac_exec_ext in '' $ac_executable_extensions; do
13850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13851 ac_cv_path_LZ4="$as_dir/$ac_word$ac_exec_ext"
13852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13853 break 2
13855 done
13856 done
13857 IFS=$as_save_IFS
13860 esac
13862 LZ4=$ac_cv_path_LZ4
13863 if test -n "$LZ4"; then
13864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13865 $as_echo "$LZ4" >&6; }
13866 else
13867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13868 $as_echo "no" >&6; }
13872 test -n "$LZ4" && break
13873 done
13875 else
13876 # Report the value of LZ4 in configure's output in all cases.
13877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4" >&5
13878 $as_echo_n "checking for LZ4... " >&6; }
13879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13880 $as_echo "$LZ4" >&6; }
13883 if test "$with_lz4" = yes; then
13884 ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
13885 if test "x$ac_cv_header_lz4_h" = xyes; then :
13887 else
13888 as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
13894 if test -z "$ZSTD"; then
13895 for ac_prog in zstd
13897 # Extract the first word of "$ac_prog", so it can be a program name with args.
13898 set dummy $ac_prog; ac_word=$2
13899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13900 $as_echo_n "checking for $ac_word... " >&6; }
13901 if ${ac_cv_path_ZSTD+:} false; then :
13902 $as_echo_n "(cached) " >&6
13903 else
13904 case $ZSTD in
13905 [\\/]* | ?:[\\/]*)
13906 ac_cv_path_ZSTD="$ZSTD" # Let the user override the test with a path.
13909 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13910 for as_dir in $PATH
13912 IFS=$as_save_IFS
13913 test -z "$as_dir" && as_dir=.
13914 for ac_exec_ext in '' $ac_executable_extensions; do
13915 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13916 ac_cv_path_ZSTD="$as_dir/$ac_word$ac_exec_ext"
13917 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13918 break 2
13920 done
13921 done
13922 IFS=$as_save_IFS
13925 esac
13927 ZSTD=$ac_cv_path_ZSTD
13928 if test -n "$ZSTD"; then
13929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13930 $as_echo "$ZSTD" >&6; }
13931 else
13932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13933 $as_echo "no" >&6; }
13937 test -n "$ZSTD" && break
13938 done
13940 else
13941 # Report the value of ZSTD in configure's output in all cases.
13942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD" >&5
13943 $as_echo_n "checking for ZSTD... " >&6; }
13944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13945 $as_echo "$ZSTD" >&6; }
13948 if test "$with_zstd" = yes; then
13949 ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default"
13950 if test "x$ac_cv_header_zstd_h" = xyes; then :
13952 else
13953 as_fn_error $? "zstd.h header file is required for ZSTD" "$LINENO" 5
13959 if test "$with_gssapi" = yes ; then
13960 for ac_header in gssapi/gssapi.h
13961 do :
13962 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13963 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13964 cat >>confdefs.h <<_ACEOF
13965 #define HAVE_GSSAPI_GSSAPI_H 1
13966 _ACEOF
13968 else
13969 for ac_header in gssapi.h
13970 do :
13971 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13972 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13973 cat >>confdefs.h <<_ACEOF
13974 #define HAVE_GSSAPI_H 1
13975 _ACEOF
13977 else
13978 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13981 done
13985 done
13987 for ac_header in gssapi/gssapi_ext.h
13988 do :
13989 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi_ext.h" "ac_cv_header_gssapi_gssapi_ext_h" "$ac_includes_default"
13990 if test "x$ac_cv_header_gssapi_gssapi_ext_h" = xyes; then :
13991 cat >>confdefs.h <<_ACEOF
13992 #define HAVE_GSSAPI_GSSAPI_EXT_H 1
13993 _ACEOF
13995 else
13996 for ac_header in gssapi_ext.h
13997 do :
13998 ac_fn_c_check_header_mongrel "$LINENO" "gssapi_ext.h" "ac_cv_header_gssapi_ext_h" "$ac_includes_default"
13999 if test "x$ac_cv_header_gssapi_ext_h" = xyes; then :
14000 cat >>confdefs.h <<_ACEOF
14001 #define HAVE_GSSAPI_EXT_H 1
14002 _ACEOF
14004 else
14005 as_fn_error $? "gssapi_ext.h header file is required for GSSAPI" "$LINENO" 5
14008 done
14012 done
14016 if test -z "$OPENSSL"; then
14017 for ac_prog in openssl
14019 # Extract the first word of "$ac_prog", so it can be a program name with args.
14020 set dummy $ac_prog; ac_word=$2
14021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14022 $as_echo_n "checking for $ac_word... " >&6; }
14023 if ${ac_cv_path_OPENSSL+:} false; then :
14024 $as_echo_n "(cached) " >&6
14025 else
14026 case $OPENSSL in
14027 [\\/]* | ?:[\\/]*)
14028 ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a path.
14031 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14032 for as_dir in $PATH
14034 IFS=$as_save_IFS
14035 test -z "$as_dir" && as_dir=.
14036 for ac_exec_ext in '' $ac_executable_extensions; do
14037 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14038 ac_cv_path_OPENSSL="$as_dir/$ac_word$ac_exec_ext"
14039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14040 break 2
14042 done
14043 done
14044 IFS=$as_save_IFS
14047 esac
14049 OPENSSL=$ac_cv_path_OPENSSL
14050 if test -n "$OPENSSL"; then
14051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
14052 $as_echo "$OPENSSL" >&6; }
14053 else
14054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14055 $as_echo "no" >&6; }
14059 test -n "$OPENSSL" && break
14060 done
14062 else
14063 # Report the value of OPENSSL in configure's output in all cases.
14064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
14065 $as_echo_n "checking for OPENSSL... " >&6; }
14066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
14067 $as_echo "$OPENSSL" >&6; }
14070 pgac_openssl_version="$($OPENSSL version 2> /dev/null || echo openssl not found)"
14071 { $as_echo "$as_me:${as_lineno-$LINENO}: using openssl: $pgac_openssl_version" >&5
14072 $as_echo "$as_me: using openssl: $pgac_openssl_version" >&6;}
14073 if test "$with_ssl" = openssl ; then
14074 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
14075 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
14077 else
14078 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
14082 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
14083 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
14085 else
14086 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
14092 if test "$with_pam" = yes ; then
14093 for ac_header in security/pam_appl.h
14094 do :
14095 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
14096 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
14097 cat >>confdefs.h <<_ACEOF
14098 #define HAVE_SECURITY_PAM_APPL_H 1
14099 _ACEOF
14101 else
14102 for ac_header in pam/pam_appl.h
14103 do :
14104 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
14105 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
14106 cat >>confdefs.h <<_ACEOF
14107 #define HAVE_PAM_PAM_APPL_H 1
14108 _ACEOF
14110 else
14111 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
14114 done
14118 done
14122 if test "$with_bsd_auth" = yes ; then
14123 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
14124 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
14126 else
14127 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
14133 if test "$with_systemd" = yes ; then
14134 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
14135 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
14137 else
14138 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
14144 if test "$with_libxml" = yes ; then
14145 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
14146 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
14148 else
14149 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
14155 if test "$with_libxslt" = yes ; then
14156 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
14157 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
14159 else
14160 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
14166 if test "$with_ldap" = yes ; then
14167 if test "$PORTNAME" != "win32"; then
14168 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
14169 if test "x$ac_cv_header_ldap_h" = xyes; then :
14171 else
14172 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
14176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
14177 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
14178 if ${pgac_cv_ldap_safe+:} false; then :
14179 $as_echo_n "(cached) " >&6
14180 else
14181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14182 /* end confdefs.h. */
14183 #include <ldap.h>
14184 #if !defined(LDAP_VENDOR_VERSION) || \
14185 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
14186 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
14187 choke me
14188 #endif
14190 main ()
14194 return 0;
14196 _ACEOF
14197 if ac_fn_c_try_compile "$LINENO"; then :
14198 pgac_cv_ldap_safe=yes
14199 else
14200 pgac_cv_ldap_safe=no
14202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
14205 $as_echo "$pgac_cv_ldap_safe" >&6; }
14207 if test "$pgac_cv_ldap_safe" != yes; then
14208 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14209 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14210 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14211 *** also uses LDAP will crash on exit." >&5
14212 $as_echo "$as_me: WARNING:
14213 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14214 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14215 *** also uses LDAP will crash on exit." >&2;}
14217 else
14218 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
14219 #include <windows.h>
14222 if test "x$ac_cv_header_winldap_h" = xyes; then :
14224 else
14225 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
14232 if test "$with_bonjour" = yes ; then
14233 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
14234 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
14236 else
14237 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
14243 # for contrib/uuid-ossp
14244 if test "$with_uuid" = bsd ; then
14245 for ac_header in uuid.h
14246 do :
14247 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14248 if test "x$ac_cv_header_uuid_h" = xyes; then :
14249 cat >>confdefs.h <<_ACEOF
14250 #define HAVE_UUID_H 1
14251 _ACEOF
14252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14253 /* end confdefs.h. */
14254 #include <uuid.h>
14256 _ACEOF
14257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14258 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
14260 else
14261 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
14263 rm -f conftest*
14265 else
14266 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
14269 done
14271 elif test "$with_uuid" = e2fs ; then
14272 for ac_header in uuid/uuid.h
14273 do :
14274 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
14275 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
14276 cat >>confdefs.h <<_ACEOF
14277 #define HAVE_UUID_UUID_H 1
14278 _ACEOF
14279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14280 /* end confdefs.h. */
14281 #include <uuid/uuid.h>
14283 _ACEOF
14284 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14285 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14287 else
14288 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
14290 rm -f conftest*
14292 else
14293 for ac_header in uuid.h
14294 do :
14295 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14296 if test "x$ac_cv_header_uuid_h" = xyes; then :
14297 cat >>confdefs.h <<_ACEOF
14298 #define HAVE_UUID_H 1
14299 _ACEOF
14300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14301 /* end confdefs.h. */
14302 #include <uuid.h>
14304 _ACEOF
14305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14306 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14308 else
14309 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
14311 rm -f conftest*
14313 else
14314 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
14317 done
14321 done
14323 elif test "$with_uuid" = ossp ; then
14324 for ac_header in ossp/uuid.h
14325 do :
14326 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
14327 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
14328 cat >>confdefs.h <<_ACEOF
14329 #define HAVE_OSSP_UUID_H 1
14330 _ACEOF
14331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14332 /* end confdefs.h. */
14333 #include <ossp/uuid.h>
14335 _ACEOF
14336 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14337 $EGREP "uuid_export" >/dev/null 2>&1; then :
14339 else
14340 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
14342 rm -f conftest*
14344 else
14345 for ac_header in uuid.h
14346 do :
14347 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14348 if test "x$ac_cv_header_uuid_h" = xyes; then :
14349 cat >>confdefs.h <<_ACEOF
14350 #define HAVE_UUID_H 1
14351 _ACEOF
14352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14353 /* end confdefs.h. */
14354 #include <uuid.h>
14356 _ACEOF
14357 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14358 $EGREP "uuid_export" >/dev/null 2>&1; then :
14360 else
14361 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
14363 rm -f conftest*
14365 else
14366 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
14369 done
14373 done
14377 if test "$PORTNAME" = "win32" ; then
14378 for ac_header in crtdefs.h
14379 do :
14380 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
14381 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
14382 cat >>confdefs.h <<_ACEOF
14383 #define HAVE_CRTDEFS_H 1
14384 _ACEOF
14388 done
14393 ## Types, structures, compiler characteristics
14396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14397 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14398 if ${ac_cv_c_bigendian+:} false; then :
14399 $as_echo_n "(cached) " >&6
14400 else
14401 ac_cv_c_bigendian=unknown
14402 # See if we're dealing with a universal compiler.
14403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14404 /* end confdefs.h. */
14405 #ifndef __APPLE_CC__
14406 not a universal capable compiler
14407 #endif
14408 typedef int dummy;
14410 _ACEOF
14411 if ac_fn_c_try_compile "$LINENO"; then :
14413 # Check for potential -arch flags. It is not universal unless
14414 # there are at least two -arch flags with different values.
14415 ac_arch=
14416 ac_prev=
14417 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14418 if test -n "$ac_prev"; then
14419 case $ac_word in
14420 i?86 | x86_64 | ppc | ppc64)
14421 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14422 ac_arch=$ac_word
14423 else
14424 ac_cv_c_bigendian=universal
14425 break
14428 esac
14429 ac_prev=
14430 elif test "x$ac_word" = "x-arch"; then
14431 ac_prev=arch
14433 done
14435 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14436 if test $ac_cv_c_bigendian = unknown; then
14437 # See if sys/param.h defines the BYTE_ORDER macro.
14438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14439 /* end confdefs.h. */
14440 #include <sys/types.h>
14441 #include <sys/param.h>
14444 main ()
14446 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14447 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14448 && LITTLE_ENDIAN)
14449 bogus endian macros
14450 #endif
14453 return 0;
14455 _ACEOF
14456 if ac_fn_c_try_compile "$LINENO"; then :
14457 # It does; now see whether it defined to BIG_ENDIAN or not.
14458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14459 /* end confdefs.h. */
14460 #include <sys/types.h>
14461 #include <sys/param.h>
14464 main ()
14466 #if BYTE_ORDER != BIG_ENDIAN
14467 not big endian
14468 #endif
14471 return 0;
14473 _ACEOF
14474 if ac_fn_c_try_compile "$LINENO"; then :
14475 ac_cv_c_bigendian=yes
14476 else
14477 ac_cv_c_bigendian=no
14479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14483 if test $ac_cv_c_bigendian = unknown; then
14484 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14486 /* end confdefs.h. */
14487 #include <limits.h>
14490 main ()
14492 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14493 bogus endian macros
14494 #endif
14497 return 0;
14499 _ACEOF
14500 if ac_fn_c_try_compile "$LINENO"; then :
14501 # It does; now see whether it defined to _BIG_ENDIAN or not.
14502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14503 /* end confdefs.h. */
14504 #include <limits.h>
14507 main ()
14509 #ifndef _BIG_ENDIAN
14510 not big endian
14511 #endif
14514 return 0;
14516 _ACEOF
14517 if ac_fn_c_try_compile "$LINENO"; then :
14518 ac_cv_c_bigendian=yes
14519 else
14520 ac_cv_c_bigendian=no
14522 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14524 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14526 if test $ac_cv_c_bigendian = unknown; then
14527 # Compile a test program.
14528 if test "$cross_compiling" = yes; then :
14529 # Try to guess by grepping values from an object file.
14530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14531 /* end confdefs.h. */
14532 short int ascii_mm[] =
14533 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14534 short int ascii_ii[] =
14535 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14536 int use_ascii (int i) {
14537 return ascii_mm[i] + ascii_ii[i];
14539 short int ebcdic_ii[] =
14540 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14541 short int ebcdic_mm[] =
14542 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14543 int use_ebcdic (int i) {
14544 return ebcdic_mm[i] + ebcdic_ii[i];
14546 extern int foo;
14549 main ()
14551 return use_ascii (foo) == use_ebcdic (foo);
14553 return 0;
14555 _ACEOF
14556 if ac_fn_c_try_compile "$LINENO"; then :
14557 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14558 ac_cv_c_bigendian=yes
14560 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14561 if test "$ac_cv_c_bigendian" = unknown; then
14562 ac_cv_c_bigendian=no
14563 else
14564 # finding both strings is unlikely to happen, but who knows?
14565 ac_cv_c_bigendian=unknown
14569 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14570 else
14571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14572 /* end confdefs.h. */
14573 $ac_includes_default
14575 main ()
14578 /* Are we little or big endian? From Harbison&Steele. */
14579 union
14581 long int l;
14582 char c[sizeof (long int)];
14583 } u;
14584 u.l = 1;
14585 return u.c[sizeof (long int) - 1] == 1;
14588 return 0;
14590 _ACEOF
14591 if ac_fn_c_try_run "$LINENO"; then :
14592 ac_cv_c_bigendian=no
14593 else
14594 ac_cv_c_bigendian=yes
14596 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14597 conftest.$ac_objext conftest.beam conftest.$ac_ext
14602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14603 $as_echo "$ac_cv_c_bigendian" >&6; }
14604 case $ac_cv_c_bigendian in #(
14605 yes)
14606 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14607 ;; #(
14609 ;; #(
14610 universal)
14612 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14614 ;; #(
14616 as_fn_error $? "unknown endianness
14617 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14618 esac
14620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14621 $as_echo_n "checking for inline... " >&6; }
14622 if ${ac_cv_c_inline+:} false; then :
14623 $as_echo_n "(cached) " >&6
14624 else
14625 ac_cv_c_inline=no
14626 for ac_kw in inline __inline__ __inline; do
14627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14628 /* end confdefs.h. */
14629 #ifndef __cplusplus
14630 typedef int foo_t;
14631 static $ac_kw foo_t static_foo () {return 0; }
14632 $ac_kw foo_t foo () {return 0; }
14633 #endif
14635 _ACEOF
14636 if ac_fn_c_try_compile "$LINENO"; then :
14637 ac_cv_c_inline=$ac_kw
14639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14640 test "$ac_cv_c_inline" != no && break
14641 done
14644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14645 $as_echo "$ac_cv_c_inline" >&6; }
14647 case $ac_cv_c_inline in
14648 inline | yes) ;;
14650 case $ac_cv_c_inline in
14651 no) ac_val=;;
14652 *) ac_val=$ac_cv_c_inline;;
14653 esac
14654 cat >>confdefs.h <<_ACEOF
14655 #ifndef __cplusplus
14656 #define inline $ac_val
14657 #endif
14658 _ACEOF
14660 esac
14662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14663 $as_echo_n "checking for printf format archetype... " >&6; }
14664 if ${pgac_cv_printf_archetype+:} false; then :
14665 $as_echo_n "(cached) " >&6
14666 else
14667 pgac_cv_printf_archetype=gnu_printf
14668 ac_save_c_werror_flag=$ac_c_werror_flag
14669 ac_c_werror_flag=yes
14670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14671 /* end confdefs.h. */
14672 extern void pgac_write(int ignore, const char *fmt,...)
14673 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14675 main ()
14677 pgac_write(0, "error %s: %m", "foo");
14679 return 0;
14681 _ACEOF
14682 if ac_fn_c_try_compile "$LINENO"; then :
14683 ac_archetype_ok=yes
14684 else
14685 ac_archetype_ok=no
14687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14688 ac_c_werror_flag=$ac_save_c_werror_flag
14690 if [ "$ac_archetype_ok" = no ]; then
14691 pgac_cv_printf_archetype=__syslog__
14692 ac_save_c_werror_flag=$ac_c_werror_flag
14693 ac_c_werror_flag=yes
14694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14695 /* end confdefs.h. */
14696 extern void pgac_write(int ignore, const char *fmt,...)
14697 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14699 main ()
14701 pgac_write(0, "error %s: %m", "foo");
14703 return 0;
14705 _ACEOF
14706 if ac_fn_c_try_compile "$LINENO"; then :
14707 ac_archetype_ok=yes
14708 else
14709 ac_archetype_ok=no
14711 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14712 ac_c_werror_flag=$ac_save_c_werror_flag
14714 if [ "$ac_archetype_ok" = no ]; then
14715 pgac_cv_printf_archetype=printf
14719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14720 $as_echo "$pgac_cv_printf_archetype" >&6; }
14722 cat >>confdefs.h <<_ACEOF
14723 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14724 _ACEOF
14727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14728 $as_echo_n "checking for _Static_assert... " >&6; }
14729 if ${pgac_cv__static_assert+:} false; then :
14730 $as_echo_n "(cached) " >&6
14731 else
14732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14733 /* end confdefs.h. */
14736 main ()
14738 ({ _Static_assert(1, "foo"); })
14740 return 0;
14742 _ACEOF
14743 if ac_fn_c_try_link "$LINENO"; then :
14744 pgac_cv__static_assert=yes
14745 else
14746 pgac_cv__static_assert=no
14748 rm -f core conftest.err conftest.$ac_objext \
14749 conftest$ac_exeext conftest.$ac_ext
14751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14752 $as_echo "$pgac_cv__static_assert" >&6; }
14753 if test x"$pgac_cv__static_assert" = xyes ; then
14755 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14759 $as_echo_n "checking for typeof... " >&6; }
14760 if ${pgac_cv_c_typeof+:} false; then :
14761 $as_echo_n "(cached) " >&6
14762 else
14763 pgac_cv_c_typeof=no
14764 for pgac_kw in typeof __typeof__ decltype; do
14765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14766 /* end confdefs.h. */
14769 main ()
14771 int x = 0;
14772 $pgac_kw(x) y;
14773 y = x;
14774 return y;
14776 return 0;
14778 _ACEOF
14779 if ac_fn_c_try_compile "$LINENO"; then :
14780 pgac_cv_c_typeof=$pgac_kw
14782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14783 test "$pgac_cv_c_typeof" != no && break
14784 done
14786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14787 $as_echo "$pgac_cv_c_typeof" >&6; }
14788 if test "$pgac_cv_c_typeof" != no; then
14790 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14792 if test "$pgac_cv_c_typeof" != typeof; then
14794 cat >>confdefs.h <<_ACEOF
14795 #define typeof $pgac_cv_c_typeof
14796 _ACEOF
14800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14801 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14802 if ${pgac_cv__types_compatible+:} false; then :
14803 $as_echo_n "(cached) " >&6
14804 else
14805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14806 /* end confdefs.h. */
14809 main ()
14811 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14813 return 0;
14815 _ACEOF
14816 if ac_fn_c_try_compile "$LINENO"; then :
14817 pgac_cv__types_compatible=yes
14818 else
14819 pgac_cv__types_compatible=no
14821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14824 $as_echo "$pgac_cv__types_compatible" >&6; }
14825 if test x"$pgac_cv__types_compatible" = xyes ; then
14827 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14831 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14832 if ${pgac_cv__builtin_constant_p+:} false; then :
14833 $as_echo_n "(cached) " >&6
14834 else
14835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14836 /* end confdefs.h. */
14837 static int x;
14838 static int y[__builtin_constant_p(x) ? x : 1];
14839 static int z[__builtin_constant_p("string literal") ? 1 : x];
14842 _ACEOF
14843 if ac_fn_c_try_compile "$LINENO"; then :
14844 pgac_cv__builtin_constant_p=yes
14845 else
14846 pgac_cv__builtin_constant_p=no
14848 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14851 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14852 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14854 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14858 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14859 if ${pgac_cv__builtin_unreachable+:} false; then :
14860 $as_echo_n "(cached) " >&6
14861 else
14862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14863 /* end confdefs.h. */
14866 main ()
14868 __builtin_unreachable();
14870 return 0;
14872 _ACEOF
14873 if ac_fn_c_try_link "$LINENO"; then :
14874 pgac_cv__builtin_unreachable=yes
14875 else
14876 pgac_cv__builtin_unreachable=no
14878 rm -f core conftest.err conftest.$ac_objext \
14879 conftest$ac_exeext conftest.$ac_ext
14881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14882 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14883 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14885 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14889 $as_echo_n "checking for computed goto support... " >&6; }
14890 if ${pgac_cv_computed_goto+:} false; then :
14891 $as_echo_n "(cached) " >&6
14892 else
14893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14894 /* end confdefs.h. */
14897 main ()
14899 void *labeladdrs[] = {&&my_label};
14900 goto *labeladdrs[0];
14901 my_label:
14902 return 1;
14905 return 0;
14907 _ACEOF
14908 if ac_fn_c_try_compile "$LINENO"; then :
14909 pgac_cv_computed_goto=yes
14910 else
14911 pgac_cv_computed_goto=no
14913 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14916 $as_echo "$pgac_cv_computed_goto" >&6; }
14917 if test x"$pgac_cv_computed_goto" = xyes ; then
14919 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14922 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14923 #include <time.h>
14926 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14928 cat >>confdefs.h <<_ACEOF
14929 #define HAVE_STRUCT_TM_TM_ZONE 1
14930 _ACEOF
14936 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14937 #include <sys/ipc.h>
14938 #include <sys/sem.h>
14941 if test "x$ac_cv_type_union_semun" = xyes; then :
14943 cat >>confdefs.h <<_ACEOF
14944 #define HAVE_UNION_SEMUN 1
14945 _ACEOF
14950 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/socket.h>
14952 if test "x$ac_cv_type_socklen_t" = xyes; then :
14954 cat >>confdefs.h <<_ACEOF
14955 #define HAVE_SOCKLEN_T 1
14956 _ACEOF
14961 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14962 #include <sys/socket.h>
14965 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14967 cat >>confdefs.h <<_ACEOF
14968 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14969 _ACEOF
14975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14976 $as_echo_n "checking for locale_t... " >&6; }
14977 if ${pgac_cv_type_locale_t+:} false; then :
14978 $as_echo_n "(cached) " >&6
14979 else
14980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14981 /* end confdefs.h. */
14982 #include <locale.h>
14983 locale_t x;
14985 main ()
14989 return 0;
14991 _ACEOF
14992 if ac_fn_c_try_compile "$LINENO"; then :
14993 pgac_cv_type_locale_t=yes
14994 else
14995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14996 /* end confdefs.h. */
14997 #include <xlocale.h>
14998 locale_t x;
15000 main ()
15004 return 0;
15006 _ACEOF
15007 if ac_fn_c_try_compile "$LINENO"; then :
15008 pgac_cv_type_locale_t='yes (in xlocale.h)'
15009 else
15010 pgac_cv_type_locale_t=no
15012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
15017 $as_echo "$pgac_cv_type_locale_t" >&6; }
15018 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
15020 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
15024 # MSVC doesn't cope well with defining restrict to __restrict, the
15025 # spelling it understands, because it conflicts with
15026 # __declspec(restrict). Therefore we define pg_restrict to the
15027 # appropriate definition, which presumably won't conflict.
15029 # Allow platforms with buggy compilers to force restrict to not be
15030 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
15031 # template.
15032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
15033 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
15034 if ${ac_cv_c_restrict+:} false; then :
15035 $as_echo_n "(cached) " >&6
15036 else
15037 ac_cv_c_restrict=no
15038 # The order here caters to the fact that C++ does not require restrict.
15039 for ac_kw in __restrict __restrict__ _Restrict restrict; do
15040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15041 /* end confdefs.h. */
15042 typedef int * int_ptr;
15043 int foo (int_ptr $ac_kw ip) {
15044 return ip[0];
15047 main ()
15049 int s[1];
15050 int * $ac_kw t = s;
15051 t[0] = 0;
15052 return foo(t)
15054 return 0;
15056 _ACEOF
15057 if ac_fn_c_try_compile "$LINENO"; then :
15058 ac_cv_c_restrict=$ac_kw
15060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15061 test "$ac_cv_c_restrict" != no && break
15062 done
15065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
15066 $as_echo "$ac_cv_c_restrict" >&6; }
15068 case $ac_cv_c_restrict in
15069 restrict) ;;
15070 no) $as_echo "#define restrict /**/" >>confdefs.h
15072 *) cat >>confdefs.h <<_ACEOF
15073 #define restrict $ac_cv_c_restrict
15074 _ACEOF
15076 esac
15078 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
15079 pg_restrict=""
15080 else
15081 pg_restrict="$ac_cv_c_restrict"
15084 cat >>confdefs.h <<_ACEOF
15085 #define pg_restrict $pg_restrict
15086 _ACEOF
15089 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
15090 #include <getopt.h>
15091 #endif
15093 if test "x$ac_cv_type_struct_option" = xyes; then :
15095 cat >>confdefs.h <<_ACEOF
15096 #define HAVE_STRUCT_OPTION 1
15097 _ACEOF
15103 case $host_cpu in
15104 x86_64)
15105 # On x86_64, check if we can compile a popcntq instruction
15106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
15107 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
15108 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
15109 $as_echo_n "(cached) " >&6
15110 else
15111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15112 /* end confdefs.h. */
15115 main ()
15117 long long x = 1; long long r;
15118 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
15120 return 0;
15122 _ACEOF
15123 if ac_fn_c_try_compile "$LINENO"; then :
15124 pgac_cv_have_x86_64_popcntq=yes
15125 else
15126 pgac_cv_have_x86_64_popcntq=no
15128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
15131 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
15132 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
15134 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
15138 ppc*|powerpc*)
15139 # On PPC, check if compiler accepts "i"(x) when __builtin_constant_p(x).
15140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
15141 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
15142 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
15143 $as_echo_n "(cached) " >&6
15144 else
15145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15146 /* end confdefs.h. */
15147 static inline int
15148 addi(int ra, int si)
15150 int res = 0;
15151 if (__builtin_constant_p(si))
15152 __asm__ __volatile__(
15153 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
15154 return res;
15156 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
15158 main ()
15162 return 0;
15164 _ACEOF
15165 if ac_fn_c_try_compile "$LINENO"; then :
15166 pgac_cv_have_i_constraint__builtin_constant_p=yes
15167 else
15168 pgac_cv_have_i_constraint__builtin_constant_p=no
15170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
15173 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
15174 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
15176 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
15180 esac
15182 # Check largefile support. You might think this is a system service not a
15183 # compiler characteristic, but you'd be wrong. We must check this before
15184 # probing existence of related functions such as fseeko, since the largefile
15185 # defines can affect what is generated for that.
15186 if test "$PORTNAME" != "win32"; then
15187 # Check whether --enable-largefile was given.
15188 if test "${enable_largefile+set}" = set; then :
15189 enableval=$enable_largefile;
15192 if test "$enable_largefile" != no; then
15194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15195 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15196 if ${ac_cv_sys_largefile_CC+:} false; then :
15197 $as_echo_n "(cached) " >&6
15198 else
15199 ac_cv_sys_largefile_CC=no
15200 if test "$GCC" != yes; then
15201 ac_save_CC=$CC
15202 while :; do
15203 # IRIX 6.2 and later do not support large files by default,
15204 # so use the C compiler's -n32 option if that helps.
15205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15206 /* end confdefs.h. */
15207 #include <sys/types.h>
15208 /* Check that off_t can represent 2**63 - 1 correctly.
15209 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15210 since some C++ compilers masquerading as C compilers
15211 incorrectly reject 9223372036854775807. */
15212 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15213 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15214 && LARGE_OFF_T % 2147483647 == 1)
15215 ? 1 : -1];
15217 main ()
15221 return 0;
15223 _ACEOF
15224 if ac_fn_c_try_compile "$LINENO"; then :
15225 break
15227 rm -f core conftest.err conftest.$ac_objext
15228 CC="$CC -n32"
15229 if ac_fn_c_try_compile "$LINENO"; then :
15230 ac_cv_sys_largefile_CC=' -n32'; break
15232 rm -f core conftest.err conftest.$ac_objext
15233 break
15234 done
15235 CC=$ac_save_CC
15236 rm -f conftest.$ac_ext
15239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15240 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15241 if test "$ac_cv_sys_largefile_CC" != no; then
15242 CC=$CC$ac_cv_sys_largefile_CC
15245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15246 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15247 if ${ac_cv_sys_file_offset_bits+:} false; then :
15248 $as_echo_n "(cached) " >&6
15249 else
15250 while :; do
15251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15252 /* end confdefs.h. */
15253 #include <sys/types.h>
15254 /* Check that off_t can represent 2**63 - 1 correctly.
15255 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15256 since some C++ compilers masquerading as C compilers
15257 incorrectly reject 9223372036854775807. */
15258 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15259 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15260 && LARGE_OFF_T % 2147483647 == 1)
15261 ? 1 : -1];
15263 main ()
15267 return 0;
15269 _ACEOF
15270 if ac_fn_c_try_compile "$LINENO"; then :
15271 ac_cv_sys_file_offset_bits=no; break
15273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15275 /* end confdefs.h. */
15276 #define _FILE_OFFSET_BITS 64
15277 #include <sys/types.h>
15278 /* Check that off_t can represent 2**63 - 1 correctly.
15279 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15280 since some C++ compilers masquerading as C compilers
15281 incorrectly reject 9223372036854775807. */
15282 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15283 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15284 && LARGE_OFF_T % 2147483647 == 1)
15285 ? 1 : -1];
15287 main ()
15291 return 0;
15293 _ACEOF
15294 if ac_fn_c_try_compile "$LINENO"; then :
15295 ac_cv_sys_file_offset_bits=64; break
15297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15298 ac_cv_sys_file_offset_bits=unknown
15299 break
15300 done
15302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15303 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15304 case $ac_cv_sys_file_offset_bits in #(
15305 no | unknown) ;;
15307 cat >>confdefs.h <<_ACEOF
15308 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15309 _ACEOF
15311 esac
15312 rm -rf conftest*
15313 if test $ac_cv_sys_file_offset_bits = unknown; then
15314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15315 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15316 if ${ac_cv_sys_large_files+:} false; then :
15317 $as_echo_n "(cached) " >&6
15318 else
15319 while :; do
15320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15321 /* end confdefs.h. */
15322 #include <sys/types.h>
15323 /* Check that off_t can represent 2**63 - 1 correctly.
15324 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15325 since some C++ compilers masquerading as C compilers
15326 incorrectly reject 9223372036854775807. */
15327 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15328 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15329 && LARGE_OFF_T % 2147483647 == 1)
15330 ? 1 : -1];
15332 main ()
15336 return 0;
15338 _ACEOF
15339 if ac_fn_c_try_compile "$LINENO"; then :
15340 ac_cv_sys_large_files=no; break
15342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15344 /* end confdefs.h. */
15345 #define _LARGE_FILES 1
15346 #include <sys/types.h>
15347 /* Check that off_t can represent 2**63 - 1 correctly.
15348 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15349 since some C++ compilers masquerading as C compilers
15350 incorrectly reject 9223372036854775807. */
15351 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15352 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15353 && LARGE_OFF_T % 2147483647 == 1)
15354 ? 1 : -1];
15356 main ()
15360 return 0;
15362 _ACEOF
15363 if ac_fn_c_try_compile "$LINENO"; then :
15364 ac_cv_sys_large_files=1; break
15366 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15367 ac_cv_sys_large_files=unknown
15368 break
15369 done
15371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15372 $as_echo "$ac_cv_sys_large_files" >&6; }
15373 case $ac_cv_sys_large_files in #(
15374 no | unknown) ;;
15376 cat >>confdefs.h <<_ACEOF
15377 #define _LARGE_FILES $ac_cv_sys_large_files
15378 _ACEOF
15380 esac
15381 rm -rf conftest*
15390 # The cast to long int works around a bug in the HP C Compiler
15391 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15392 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15393 # This bug is HP SR number 8606223364.
15394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15395 $as_echo_n "checking size of off_t... " >&6; }
15396 if ${ac_cv_sizeof_off_t+:} false; then :
15397 $as_echo_n "(cached) " >&6
15398 else
15399 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
15401 else
15402 if test "$ac_cv_type_off_t" = yes; then
15403 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15404 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15405 as_fn_error 77 "cannot compute sizeof (off_t)
15406 See \`config.log' for more details" "$LINENO" 5; }
15407 else
15408 ac_cv_sizeof_off_t=0
15413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15414 $as_echo "$ac_cv_sizeof_off_t" >&6; }
15418 cat >>confdefs.h <<_ACEOF
15419 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15420 _ACEOF
15424 # If we don't have largefile support, can't handle segment size >= 2GB.
15425 if test "$ac_cv_sizeof_off_t" -lt 8; then
15426 if expr $RELSEG_SIZE '*' $blocksize '>=' 2 '*' 1024 '*' 1024; then
15427 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15431 # The cast to long int works around a bug in the HP C Compiler
15432 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15433 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15434 # This bug is HP SR number 8606223364.
15435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
15436 $as_echo_n "checking size of bool... " >&6; }
15437 if ${ac_cv_sizeof_bool+:} false; then :
15438 $as_echo_n "(cached) " >&6
15439 else
15440 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
15441 #include <stdbool.h>
15442 #endif
15443 "; then :
15445 else
15446 if test "$ac_cv_type_bool" = yes; then
15447 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15448 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15449 as_fn_error 77 "cannot compute sizeof (bool)
15450 See \`config.log' for more details" "$LINENO" 5; }
15451 else
15452 ac_cv_sizeof_bool=0
15457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15458 $as_echo "$ac_cv_sizeof_bool" >&6; }
15462 cat >>confdefs.h <<_ACEOF
15463 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15464 _ACEOF
15468 if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
15470 $as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
15476 ## Functions, global variables
15479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15480 $as_echo_n "checking for int timezone... " >&6; }
15481 if ${pgac_cv_var_int_timezone+:} false; then :
15482 $as_echo_n "(cached) " >&6
15483 else
15484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15485 /* end confdefs.h. */
15486 #include <time.h>
15487 int res;
15489 main ()
15491 #ifndef __CYGWIN__
15492 res = timezone / 60;
15493 #else
15494 res = _timezone / 60;
15495 #endif
15497 return 0;
15499 _ACEOF
15500 if ac_fn_c_try_link "$LINENO"; then :
15501 pgac_cv_var_int_timezone=yes
15502 else
15503 pgac_cv_var_int_timezone=no
15505 rm -f core conftest.err conftest.$ac_objext \
15506 conftest$ac_exeext conftest.$ac_ext
15508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15509 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15510 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15512 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15516 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15517 if ${pgac_cv_func_wcstombs_l+:} false; then :
15518 $as_echo_n "(cached) " >&6
15519 else
15520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15521 /* end confdefs.h. */
15522 #include <stdlib.h>
15523 #include <locale.h>
15525 main ()
15527 #ifndef wcstombs_l
15528 (void) wcstombs_l;
15529 #endif
15531 return 0;
15533 _ACEOF
15534 if ac_fn_c_try_compile "$LINENO"; then :
15535 pgac_cv_func_wcstombs_l='yes'
15536 else
15537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15538 /* end confdefs.h. */
15539 #include <stdlib.h>
15540 #include <locale.h>
15541 #include <xlocale.h>
15543 main ()
15545 #ifndef wcstombs_l
15546 (void) wcstombs_l;
15547 #endif
15549 return 0;
15551 _ACEOF
15552 if ac_fn_c_try_compile "$LINENO"; then :
15553 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15554 else
15555 pgac_cv_func_wcstombs_l='no'
15557 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15562 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15563 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15565 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15569 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15570 # symbols that that library has no business exposing to the world. Pending
15571 # acquisition of a clue by those developers, ignore libedit (including its
15572 # possible alias of libreadline) while checking for everything else.
15573 LIBS_including_readline="$LIBS"
15574 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15576 for ac_func in backtrace_symbols copyfile getifaddrs getpeerucred inet_pton kqueue mbstowcs_l memset_s posix_fallocate ppoll pthread_is_threaded_np setproctitle setproctitle_fast strchrnul strsignal syncfs sync_file_range uselocale wcstombs_l
15577 do :
15578 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15579 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15580 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15581 cat >>confdefs.h <<_ACEOF
15582 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15583 _ACEOF
15586 done
15589 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15591 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15592 if ${pgac_cv__builtin_bswap16+:} false; then :
15593 $as_echo_n "(cached) " >&6
15594 else
15595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15596 /* end confdefs.h. */
15599 call__builtin_bswap16(int x)
15601 return __builtin_bswap16(x);
15604 main ()
15608 return 0;
15610 _ACEOF
15611 if ac_fn_c_try_link "$LINENO"; then :
15612 pgac_cv__builtin_bswap16=yes
15613 else
15614 pgac_cv__builtin_bswap16=no
15616 rm -f core conftest.err conftest.$ac_objext \
15617 conftest$ac_exeext conftest.$ac_ext
15619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15620 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15621 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15623 cat >>confdefs.h <<_ACEOF
15624 #define HAVE__BUILTIN_BSWAP16 1
15625 _ACEOF
15628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15629 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15630 if ${pgac_cv__builtin_bswap32+:} false; then :
15631 $as_echo_n "(cached) " >&6
15632 else
15633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15634 /* end confdefs.h. */
15637 call__builtin_bswap32(int x)
15639 return __builtin_bswap32(x);
15642 main ()
15646 return 0;
15648 _ACEOF
15649 if ac_fn_c_try_link "$LINENO"; then :
15650 pgac_cv__builtin_bswap32=yes
15651 else
15652 pgac_cv__builtin_bswap32=no
15654 rm -f core conftest.err conftest.$ac_objext \
15655 conftest$ac_exeext conftest.$ac_ext
15657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15658 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15659 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15661 cat >>confdefs.h <<_ACEOF
15662 #define HAVE__BUILTIN_BSWAP32 1
15663 _ACEOF
15666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15667 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15668 if ${pgac_cv__builtin_bswap64+:} false; then :
15669 $as_echo_n "(cached) " >&6
15670 else
15671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15672 /* end confdefs.h. */
15675 call__builtin_bswap64(long int x)
15677 return __builtin_bswap64(x);
15680 main ()
15684 return 0;
15686 _ACEOF
15687 if ac_fn_c_try_link "$LINENO"; then :
15688 pgac_cv__builtin_bswap64=yes
15689 else
15690 pgac_cv__builtin_bswap64=no
15692 rm -f core conftest.err conftest.$ac_objext \
15693 conftest$ac_exeext conftest.$ac_ext
15695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15696 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15697 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15699 cat >>confdefs.h <<_ACEOF
15700 #define HAVE__BUILTIN_BSWAP64 1
15701 _ACEOF
15704 # We assume that we needn't test all widths of these explicitly:
15705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15706 $as_echo_n "checking for __builtin_clz... " >&6; }
15707 if ${pgac_cv__builtin_clz+:} false; then :
15708 $as_echo_n "(cached) " >&6
15709 else
15710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15711 /* end confdefs.h. */
15714 call__builtin_clz(unsigned int x)
15716 return __builtin_clz(x);
15719 main ()
15723 return 0;
15725 _ACEOF
15726 if ac_fn_c_try_link "$LINENO"; then :
15727 pgac_cv__builtin_clz=yes
15728 else
15729 pgac_cv__builtin_clz=no
15731 rm -f core conftest.err conftest.$ac_objext \
15732 conftest$ac_exeext conftest.$ac_ext
15734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15735 $as_echo "$pgac_cv__builtin_clz" >&6; }
15736 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15738 cat >>confdefs.h <<_ACEOF
15739 #define HAVE__BUILTIN_CLZ 1
15740 _ACEOF
15743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15744 $as_echo_n "checking for __builtin_ctz... " >&6; }
15745 if ${pgac_cv__builtin_ctz+:} false; then :
15746 $as_echo_n "(cached) " >&6
15747 else
15748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15749 /* end confdefs.h. */
15752 call__builtin_ctz(unsigned int x)
15754 return __builtin_ctz(x);
15757 main ()
15761 return 0;
15763 _ACEOF
15764 if ac_fn_c_try_link "$LINENO"; then :
15765 pgac_cv__builtin_ctz=yes
15766 else
15767 pgac_cv__builtin_ctz=no
15769 rm -f core conftest.err conftest.$ac_objext \
15770 conftest$ac_exeext conftest.$ac_ext
15772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15773 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15774 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15776 cat >>confdefs.h <<_ACEOF
15777 #define HAVE__BUILTIN_CTZ 1
15778 _ACEOF
15781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15782 $as_echo_n "checking for __builtin_popcount... " >&6; }
15783 if ${pgac_cv__builtin_popcount+:} false; then :
15784 $as_echo_n "(cached) " >&6
15785 else
15786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15787 /* end confdefs.h. */
15790 call__builtin_popcount(unsigned int x)
15792 return __builtin_popcount(x);
15795 main ()
15799 return 0;
15801 _ACEOF
15802 if ac_fn_c_try_link "$LINENO"; then :
15803 pgac_cv__builtin_popcount=yes
15804 else
15805 pgac_cv__builtin_popcount=no
15807 rm -f core conftest.err conftest.$ac_objext \
15808 conftest$ac_exeext conftest.$ac_ext
15810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15811 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15812 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15814 cat >>confdefs.h <<_ACEOF
15815 #define HAVE__BUILTIN_POPCOUNT 1
15816 _ACEOF
15819 # __builtin_frame_address may draw a diagnostic for non-constant argument,
15820 # so it needs a different test function.
15821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
15822 $as_echo_n "checking for __builtin_frame_address... " >&6; }
15823 if ${pgac_cv__builtin_frame_address+:} false; then :
15824 $as_echo_n "(cached) " >&6
15825 else
15826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15827 /* end confdefs.h. */
15829 void *
15830 call__builtin_frame_address(void)
15832 return __builtin_frame_address(0);
15835 main ()
15839 return 0;
15841 _ACEOF
15842 if ac_fn_c_try_link "$LINENO"; then :
15843 pgac_cv__builtin_frame_address=yes
15844 else
15845 pgac_cv__builtin_frame_address=no
15847 rm -f core conftest.err conftest.$ac_objext \
15848 conftest$ac_exeext conftest.$ac_ext
15850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5
15851 $as_echo "$pgac_cv__builtin_frame_address" >&6; }
15852 if test x"${pgac_cv__builtin_frame_address}" = xyes ; then
15854 cat >>confdefs.h <<_ACEOF
15855 #define HAVE__BUILTIN_FRAME_ADDRESS 1
15856 _ACEOF
15860 # We require 64-bit fseeko() to be available, but run this check anyway
15861 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
15862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15863 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15864 if ${ac_cv_sys_largefile_source+:} false; then :
15865 $as_echo_n "(cached) " >&6
15866 else
15867 while :; do
15868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15869 /* end confdefs.h. */
15870 #include <sys/types.h> /* for off_t */
15871 #include <stdio.h>
15873 main ()
15875 int (*fp) (FILE *, off_t, int) = fseeko;
15876 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15878 return 0;
15880 _ACEOF
15881 if ac_fn_c_try_link "$LINENO"; then :
15882 ac_cv_sys_largefile_source=no; break
15884 rm -f core conftest.err conftest.$ac_objext \
15885 conftest$ac_exeext conftest.$ac_ext
15886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15887 /* end confdefs.h. */
15888 #define _LARGEFILE_SOURCE 1
15889 #include <sys/types.h> /* for off_t */
15890 #include <stdio.h>
15892 main ()
15894 int (*fp) (FILE *, off_t, int) = fseeko;
15895 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15897 return 0;
15899 _ACEOF
15900 if ac_fn_c_try_link "$LINENO"; then :
15901 ac_cv_sys_largefile_source=1; break
15903 rm -f core conftest.err conftest.$ac_objext \
15904 conftest$ac_exeext conftest.$ac_ext
15905 ac_cv_sys_largefile_source=unknown
15906 break
15907 done
15909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15910 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15911 case $ac_cv_sys_largefile_source in #(
15912 no | unknown) ;;
15914 cat >>confdefs.h <<_ACEOF
15915 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15916 _ACEOF
15918 esac
15919 rm -rf conftest*
15921 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15922 # in glibc 2.1.3, but that breaks too many other things.
15923 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15924 if test $ac_cv_sys_largefile_source != unknown; then
15926 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15931 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15932 # by calling it, 2009-04-02
15933 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15934 # The Clang compiler raises a warning for an undeclared identifier that matches
15935 # a compiler builtin function. All extant Clang versions are affected, as of
15936 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
15937 # C and Objective C languages, but Clang does report an error under C++ and
15938 # Objective C++.
15940 # Passing -fno-builtin to the compiler would suppress this problem. That
15941 # strategy would have the advantage of being insensitive to stray warnings, but
15942 # it would make tests less realistic.
15943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15944 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15945 if ${ac_cv_c_decl_report+:} false; then :
15946 $as_echo_n "(cached) " >&6
15947 else
15948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15949 /* end confdefs.h. */
15952 main ()
15954 (void) strchr;
15956 return 0;
15958 _ACEOF
15959 if ac_fn_c_try_compile "$LINENO"; then :
15960 if test -s conftest.err; then :
15961 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15962 # valid AC_CHECK_DECL input. No library function is consistently available
15963 # on freestanding implementations, so test against a dummy declaration.
15964 # Include always-available headers on the off chance that they somehow
15965 # elicit warnings.
15966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15967 /* end confdefs.h. */
15968 #include <float.h>
15969 #include <limits.h>
15970 #include <stdarg.h>
15971 #include <stddef.h>
15972 extern void ac_decl (int, char *);
15974 main ()
15976 #ifdef __cplusplus
15977 (void) ac_decl ((int) 0, (char *) 0);
15978 (void) ac_decl;
15979 #else
15980 (void) ac_decl;
15981 #endif
15984 return 0;
15986 _ACEOF
15987 if ac_fn_c_try_compile "$LINENO"; then :
15988 if test -s conftest.err; then :
15989 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15990 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15991 as_fn_error $? "cannot detect from compiler exit status or warnings
15992 See \`config.log' for more details" "$LINENO" 5; }
15993 else
15994 ac_cv_c_decl_report=warning
15996 else
15997 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15998 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15999 as_fn_error $? "cannot compile a simple declaration test
16000 See \`config.log' for more details" "$LINENO" 5; }
16002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16003 else
16004 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16005 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16006 as_fn_error $? "compiler does not report undeclared identifiers
16007 See \`config.log' for more details" "$LINENO" 5; }
16009 else
16010 ac_cv_c_decl_report=error
16012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
16015 $as_echo "$ac_cv_c_decl_report" >&6; }
16017 case $ac_cv_c_decl_report in
16018 warning) ac_c_decl_warn_flag=yes ;;
16019 *) ac_c_decl_warn_flag= ;;
16020 esac
16022 if test "$PORTNAME" != "solaris"; then :
16024 for ac_func in posix_fadvise
16025 do :
16026 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
16027 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
16028 cat >>confdefs.h <<_ACEOF
16029 #define HAVE_POSIX_FADVISE 1
16030 _ACEOF
16033 done
16035 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
16037 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
16038 ac_have_decl=1
16039 else
16040 ac_have_decl=0
16043 cat >>confdefs.h <<_ACEOF
16044 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
16045 _ACEOF
16048 fi # fi
16050 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
16052 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
16053 ac_have_decl=1
16054 else
16055 ac_have_decl=0
16058 cat >>confdefs.h <<_ACEOF
16059 #define HAVE_DECL_FDATASYNC $ac_have_decl
16060 _ACEOF
16062 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
16063 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
16064 ac_have_decl=1
16065 else
16066 ac_have_decl=0
16069 cat >>confdefs.h <<_ACEOF
16070 #define HAVE_DECL_STRLCAT $ac_have_decl
16071 _ACEOF
16072 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
16073 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
16074 ac_have_decl=1
16075 else
16076 ac_have_decl=0
16079 cat >>confdefs.h <<_ACEOF
16080 #define HAVE_DECL_STRLCPY $ac_have_decl
16081 _ACEOF
16082 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
16083 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
16084 ac_have_decl=1
16085 else
16086 ac_have_decl=0
16089 cat >>confdefs.h <<_ACEOF
16090 #define HAVE_DECL_STRNLEN $ac_have_decl
16091 _ACEOF
16094 # We can't use AC_CHECK_FUNCS to detect these functions, because it
16095 # won't handle deployment target restrictions on macOS
16096 ac_fn_c_check_decl "$LINENO" "preadv" "ac_cv_have_decl_preadv" "#include <sys/uio.h>
16098 if test "x$ac_cv_have_decl_preadv" = xyes; then :
16099 ac_have_decl=1
16100 else
16101 ac_have_decl=0
16104 cat >>confdefs.h <<_ACEOF
16105 #define HAVE_DECL_PREADV $ac_have_decl
16106 _ACEOF
16108 ac_fn_c_check_decl "$LINENO" "pwritev" "ac_cv_have_decl_pwritev" "#include <sys/uio.h>
16110 if test "x$ac_cv_have_decl_pwritev" = xyes; then :
16111 ac_have_decl=1
16112 else
16113 ac_have_decl=0
16116 cat >>confdefs.h <<_ACEOF
16117 #define HAVE_DECL_PWRITEV $ac_have_decl
16118 _ACEOF
16121 # This is probably only present on macOS, but may as well check always
16122 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
16124 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
16125 ac_have_decl=1
16126 else
16127 ac_have_decl=0
16130 cat >>confdefs.h <<_ACEOF
16131 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
16132 _ACEOF
16135 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
16136 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
16137 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
16139 else
16140 case " $LIBOBJS " in
16141 *" explicit_bzero.$ac_objext "* ) ;;
16142 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
16144 esac
16148 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
16149 if test "x$ac_cv_func_getopt" = xyes; then :
16150 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
16152 else
16153 case " $LIBOBJS " in
16154 *" getopt.$ac_objext "* ) ;;
16155 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16157 esac
16161 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
16162 if test "x$ac_cv_func_getpeereid" = xyes; then :
16163 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16165 else
16166 case " $LIBOBJS " in
16167 *" getpeereid.$ac_objext "* ) ;;
16168 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
16170 esac
16174 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
16175 if test "x$ac_cv_func_inet_aton" = xyes; then :
16176 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
16178 else
16179 case " $LIBOBJS " in
16180 *" inet_aton.$ac_objext "* ) ;;
16181 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
16183 esac
16187 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
16188 if test "x$ac_cv_func_mkdtemp" = xyes; then :
16189 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
16191 else
16192 case " $LIBOBJS " in
16193 *" mkdtemp.$ac_objext "* ) ;;
16194 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
16196 esac
16200 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
16201 if test "x$ac_cv_func_strlcat" = xyes; then :
16202 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
16204 else
16205 case " $LIBOBJS " in
16206 *" strlcat.$ac_objext "* ) ;;
16207 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
16209 esac
16213 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
16214 if test "x$ac_cv_func_strlcpy" = xyes; then :
16215 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
16217 else
16218 case " $LIBOBJS " in
16219 *" strlcpy.$ac_objext "* ) ;;
16220 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
16222 esac
16226 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
16227 if test "x$ac_cv_func_strnlen" = xyes; then :
16228 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
16230 else
16231 case " $LIBOBJS " in
16232 *" strnlen.$ac_objext "* ) ;;
16233 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
16235 esac
16241 ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
16242 if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
16243 $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
16245 else
16246 case " $LIBOBJS " in
16247 *" pthread_barrier_wait.$ac_objext "* ) ;;
16248 *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
16250 esac
16256 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
16257 # Cygwin and (apparently, based on test results) Mingw both
16258 # have a broken strtof(), so substitute its implementation.
16259 # That's not a perfect fix, since it doesn't avoid double-rounding,
16260 # but we have no better options.
16261 case " $LIBOBJS " in
16262 *" strtof.$ac_objext "* ) ;;
16263 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16265 esac
16267 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
16268 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
16271 # Similarly, use system's getopt_long() only if system provides struct option.
16272 if test x"$ac_cv_type_struct_option" = xyes ; then
16273 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
16274 if test "x$ac_cv_func_getopt_long" = xyes; then :
16275 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
16277 else
16278 case " $LIBOBJS " in
16279 *" getopt_long.$ac_objext "* ) ;;
16280 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16282 esac
16287 else
16288 case " $LIBOBJS " in
16289 *" getopt_long.$ac_objext "* ) ;;
16290 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16292 esac
16296 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
16297 # (i.e., allow '-' as a flag character), so use our version on those platforms.
16298 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
16299 case " $LIBOBJS " in
16300 *" getopt.$ac_objext "* ) ;;
16301 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16303 esac
16307 # mingw has adopted a GNU-centric interpretation of optind/optreset,
16308 # so always use our version on Windows.
16309 if test "$PORTNAME" = "win32"; then
16310 case " $LIBOBJS " in
16311 *" getopt.$ac_objext "* ) ;;
16312 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16314 esac
16316 case " $LIBOBJS " in
16317 *" getopt_long.$ac_objext "* ) ;;
16318 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16320 esac
16324 # Win32 (really MinGW) support
16325 if test "$PORTNAME" = "win32"; then
16326 for ac_func in _configthreadlocale
16327 do :
16328 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16329 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16330 cat >>confdefs.h <<_ACEOF
16331 #define HAVE__CONFIGTHREADLOCALE 1
16332 _ACEOF
16335 done
16337 case " $LIBOBJS " in
16338 *" dirmod.$ac_objext "* ) ;;
16339 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16341 esac
16343 case " $LIBOBJS " in
16344 *" kill.$ac_objext "* ) ;;
16345 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16347 esac
16349 case " $LIBOBJS " in
16350 *" open.$ac_objext "* ) ;;
16351 *) LIBOBJS="$LIBOBJS open.$ac_objext"
16353 esac
16355 case " $LIBOBJS " in
16356 *" system.$ac_objext "* ) ;;
16357 *) LIBOBJS="$LIBOBJS system.$ac_objext"
16359 esac
16361 case " $LIBOBJS " in
16362 *" win32common.$ac_objext "* ) ;;
16363 *) LIBOBJS="$LIBOBJS win32common.$ac_objext"
16365 esac
16367 case " $LIBOBJS " in
16368 *" win32dlopen.$ac_objext "* ) ;;
16369 *) LIBOBJS="$LIBOBJS win32dlopen.$ac_objext"
16371 esac
16373 case " $LIBOBJS " in
16374 *" win32env.$ac_objext "* ) ;;
16375 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16377 esac
16379 case " $LIBOBJS " in
16380 *" win32error.$ac_objext "* ) ;;
16381 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16383 esac
16385 case " $LIBOBJS " in
16386 *" win32fdatasync.$ac_objext "* ) ;;
16387 *) LIBOBJS="$LIBOBJS win32fdatasync.$ac_objext"
16389 esac
16391 case " $LIBOBJS " in
16392 *" win32getrusage.$ac_objext "* ) ;;
16393 *) LIBOBJS="$LIBOBJS win32getrusage.$ac_objext"
16395 esac
16397 case " $LIBOBJS " in
16398 *" win32link.$ac_objext "* ) ;;
16399 *) LIBOBJS="$LIBOBJS win32link.$ac_objext"
16401 esac
16403 case " $LIBOBJS " in
16404 *" win32ntdll.$ac_objext "* ) ;;
16405 *) LIBOBJS="$LIBOBJS win32ntdll.$ac_objext"
16407 esac
16409 case " $LIBOBJS " in
16410 *" win32pread.$ac_objext "* ) ;;
16411 *) LIBOBJS="$LIBOBJS win32pread.$ac_objext"
16413 esac
16415 case " $LIBOBJS " in
16416 *" win32pwrite.$ac_objext "* ) ;;
16417 *) LIBOBJS="$LIBOBJS win32pwrite.$ac_objext"
16419 esac
16421 case " $LIBOBJS " in
16422 *" win32security.$ac_objext "* ) ;;
16423 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16425 esac
16427 case " $LIBOBJS " in
16428 *" win32setlocale.$ac_objext "* ) ;;
16429 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16431 esac
16433 case " $LIBOBJS " in
16434 *" win32stat.$ac_objext "* ) ;;
16435 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
16437 esac
16440 # Cygwin needs only a bit of that
16441 if test "$PORTNAME" = "cygwin"; then
16442 case " $LIBOBJS " in
16443 *" dirmod.$ac_objext "* ) ;;
16444 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16446 esac
16450 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16451 if test "x$ac_cv_func_syslog" = xyes; then :
16452 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16453 if test "x$ac_cv_header_syslog_h" = xyes; then :
16455 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16464 $as_echo_n "checking for opterr... " >&6; }
16465 if ${pgac_cv_var_int_opterr+:} false; then :
16466 $as_echo_n "(cached) " >&6
16467 else
16468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16469 /* end confdefs.h. */
16470 #include <unistd.h>
16472 main ()
16474 extern int opterr; opterr = 1;
16476 return 0;
16478 _ACEOF
16479 if ac_fn_c_try_link "$LINENO"; then :
16480 pgac_cv_var_int_opterr=yes
16481 else
16482 pgac_cv_var_int_opterr=no
16484 rm -f core conftest.err conftest.$ac_objext \
16485 conftest$ac_exeext conftest.$ac_ext
16487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16488 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16489 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16491 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16496 $as_echo_n "checking for optreset... " >&6; }
16497 if ${pgac_cv_var_int_optreset+:} false; then :
16498 $as_echo_n "(cached) " >&6
16499 else
16500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16501 /* end confdefs.h. */
16502 #include <unistd.h>
16504 main ()
16506 extern int optreset; optreset = 1;
16508 return 0;
16510 _ACEOF
16511 if ac_fn_c_try_link "$LINENO"; then :
16512 pgac_cv_var_int_optreset=yes
16513 else
16514 pgac_cv_var_int_optreset=no
16516 rm -f core conftest.err conftest.$ac_objext \
16517 conftest$ac_exeext conftest.$ac_ext
16519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16520 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16521 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16523 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16527 if test "$with_icu" = yes; then
16528 ac_save_CPPFLAGS=$CPPFLAGS
16529 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16531 # Verify we have ICU's header files
16532 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16533 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16535 else
16536 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16541 CPPFLAGS=$ac_save_CPPFLAGS
16544 if test "$with_llvm" = yes; then
16546 # Check which functionality is present
16547 SAVE_CPPFLAGS="$CPPFLAGS"
16548 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16549 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16551 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16552 ac_have_decl=1
16553 else
16554 ac_have_decl=0
16557 cat >>confdefs.h <<_ACEOF
16558 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16559 _ACEOF
16560 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16562 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16563 ac_have_decl=1
16564 else
16565 ac_have_decl=0
16568 cat >>confdefs.h <<_ACEOF
16569 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16570 _ACEOF
16572 CPPFLAGS="$SAVE_CPPFLAGS"
16576 # Lastly, restore full LIBS list and check for readline/libedit symbols
16577 LIBS="$LIBS_including_readline"
16579 if test "$with_readline" = yes; then
16580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
16581 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
16582 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
16583 $as_echo_n "(cached) " >&6
16584 else
16585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16586 /* end confdefs.h. */
16587 #include <stdio.h>
16588 #if defined(HAVE_READLINE_READLINE_H)
16589 #include <readline/readline.h>
16590 #elif defined(HAVE_EDITLINE_READLINE_H)
16591 #include <editline/readline.h>
16592 #elif defined(HAVE_READLINE_H)
16593 #include <readline.h>
16594 #endif
16597 main ()
16599 rl_completion_suppress_quote = 1;
16601 return 0;
16603 _ACEOF
16604 if ac_fn_c_try_link "$LINENO"; then :
16605 pgac_cv_var_rl_completion_suppress_quote=yes
16606 else
16607 pgac_cv_var_rl_completion_suppress_quote=no
16609 rm -f core conftest.err conftest.$ac_objext \
16610 conftest$ac_exeext conftest.$ac_ext
16612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
16613 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
16614 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
16616 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
16619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
16620 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
16621 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
16622 $as_echo_n "(cached) " >&6
16623 else
16624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16625 /* end confdefs.h. */
16626 #include <stdio.h>
16627 #if defined(HAVE_READLINE_READLINE_H)
16628 #include <readline/readline.h>
16629 #elif defined(HAVE_EDITLINE_READLINE_H)
16630 #include <editline/readline.h>
16631 #elif defined(HAVE_READLINE_H)
16632 #include <readline.h>
16633 #endif
16636 main ()
16638 rl_filename_quote_characters = "x";
16640 return 0;
16642 _ACEOF
16643 if ac_fn_c_try_link "$LINENO"; then :
16644 pgac_cv_var_rl_filename_quote_characters=yes
16645 else
16646 pgac_cv_var_rl_filename_quote_characters=no
16648 rm -f core conftest.err conftest.$ac_objext \
16649 conftest$ac_exeext conftest.$ac_ext
16651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
16652 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
16653 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
16655 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
16658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
16659 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
16660 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
16661 $as_echo_n "(cached) " >&6
16662 else
16663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16664 /* end confdefs.h. */
16665 #include <stdio.h>
16666 #if defined(HAVE_READLINE_READLINE_H)
16667 #include <readline/readline.h>
16668 #elif defined(HAVE_EDITLINE_READLINE_H)
16669 #include <editline/readline.h>
16670 #elif defined(HAVE_READLINE_H)
16671 #include <readline.h>
16672 #endif
16675 main ()
16677 rl_filename_quoting_function = 0;
16679 return 0;
16681 _ACEOF
16682 if ac_fn_c_try_link "$LINENO"; then :
16683 pgac_cv_var_rl_filename_quoting_function=yes
16684 else
16685 pgac_cv_var_rl_filename_quoting_function=no
16687 rm -f core conftest.err conftest.$ac_objext \
16688 conftest$ac_exeext conftest.$ac_ext
16690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
16691 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
16692 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
16694 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
16698 for ac_func in append_history history_truncate_file rl_completion_matches rl_filename_completion_function rl_reset_screen_size rl_variable_bind
16699 do :
16700 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16701 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16702 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16703 cat >>confdefs.h <<_ACEOF
16704 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16705 _ACEOF
16708 done
16713 # This test makes sure that run tests work at all. Sometimes a shared
16714 # library is found by the linker, but the runtime linker can't find it.
16715 # This check should come after all modifications of compiler or linker
16716 # variables, and before any other run tests.
16717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16718 $as_echo_n "checking test program... " >&6; }
16719 if test "$cross_compiling" = yes; then :
16720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16721 $as_echo "cross-compiling" >&6; }
16722 else
16723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16724 /* end confdefs.h. */
16725 int main() { return 0; }
16726 _ACEOF
16727 if ac_fn_c_try_run "$LINENO"; then :
16728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16729 $as_echo "ok" >&6; }
16730 else
16731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16732 $as_echo "failed" >&6; }
16733 as_fn_error $? "
16734 Could not execute a simple test program. This may be a problem
16735 related to locating shared libraries. Check the file 'config.log'
16736 for the exact reason." "$LINENO" 5
16738 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16739 conftest.$ac_objext conftest.beam conftest.$ac_ext
16743 # --------------------
16744 # Run tests below here
16745 # --------------------
16748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16749 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16750 if ${pgac_cv_type_long_int_64+:} false; then :
16751 $as_echo_n "(cached) " >&6
16752 else
16753 if test "$cross_compiling" = yes; then :
16754 # If cross-compiling, check the size reported by the compiler and
16755 # trust that the arithmetic works.
16756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16757 /* end confdefs.h. */
16760 main ()
16762 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16763 test_array [0] = 0;
16764 return test_array [0];
16767 return 0;
16769 _ACEOF
16770 if ac_fn_c_try_compile "$LINENO"; then :
16771 pgac_cv_type_long_int_64=yes
16772 else
16773 pgac_cv_type_long_int_64=no
16775 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16776 else
16777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16778 /* end confdefs.h. */
16779 typedef long int ac_int64;
16782 * These are globals to discourage the compiler from folding all the
16783 * arithmetic tests down to compile-time constants.
16785 ac_int64 a = 20000001;
16786 ac_int64 b = 40000005;
16788 int does_int64_work()
16790 ac_int64 c,d;
16792 if (sizeof(ac_int64) != 8)
16793 return 0; /* definitely not the right size */
16795 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16796 c = a * b;
16797 d = (c + b) / b;
16798 if (d != a+1)
16799 return 0;
16800 return 1;
16804 main() {
16805 return (! does_int64_work());
16807 _ACEOF
16808 if ac_fn_c_try_run "$LINENO"; then :
16809 pgac_cv_type_long_int_64=yes
16810 else
16811 pgac_cv_type_long_int_64=no
16813 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16814 conftest.$ac_objext conftest.beam conftest.$ac_ext
16818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16819 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16821 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16822 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16824 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16829 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16830 pg_int64_type="long int"
16831 else
16832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16833 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16834 if ${pgac_cv_type_long_long_int_64+:} false; then :
16835 $as_echo_n "(cached) " >&6
16836 else
16837 if test "$cross_compiling" = yes; then :
16838 # If cross-compiling, check the size reported by the compiler and
16839 # trust that the arithmetic works.
16840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16841 /* end confdefs.h. */
16844 main ()
16846 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16847 test_array [0] = 0;
16848 return test_array [0];
16851 return 0;
16853 _ACEOF
16854 if ac_fn_c_try_compile "$LINENO"; then :
16855 pgac_cv_type_long_long_int_64=yes
16856 else
16857 pgac_cv_type_long_long_int_64=no
16859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16860 else
16861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16862 /* end confdefs.h. */
16863 typedef long long int ac_int64;
16866 * These are globals to discourage the compiler from folding all the
16867 * arithmetic tests down to compile-time constants.
16869 ac_int64 a = 20000001;
16870 ac_int64 b = 40000005;
16872 int does_int64_work()
16874 ac_int64 c,d;
16876 if (sizeof(ac_int64) != 8)
16877 return 0; /* definitely not the right size */
16879 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16880 c = a * b;
16881 d = (c + b) / b;
16882 if (d != a+1)
16883 return 0;
16884 return 1;
16888 main() {
16889 return (! does_int64_work());
16891 _ACEOF
16892 if ac_fn_c_try_run "$LINENO"; then :
16893 pgac_cv_type_long_long_int_64=yes
16894 else
16895 pgac_cv_type_long_long_int_64=no
16897 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16898 conftest.$ac_objext conftest.beam conftest.$ac_ext
16902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16903 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16905 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16906 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16908 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16912 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16913 pg_int64_type="long long int"
16914 else
16915 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16920 cat >>confdefs.h <<_ACEOF
16921 #define PG_INT64_TYPE $pg_int64_type
16922 _ACEOF
16925 # Select the printf length modifier that goes with that, too.
16926 if test x"$pg_int64_type" = x"long long int" ; then
16927 INT64_MODIFIER='"ll"'
16928 else
16929 INT64_MODIFIER='"l"'
16933 cat >>confdefs.h <<_ACEOF
16934 #define INT64_MODIFIER $INT64_MODIFIER
16935 _ACEOF
16938 # has to be down here, rather than with the other builtins, because
16939 # the test uses PG_INT64_TYPE.
16940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16941 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16942 if ${pgac_cv__builtin_op_overflow+:} false; then :
16943 $as_echo_n "(cached) " >&6
16944 else
16945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16946 /* end confdefs.h. */
16948 PG_INT64_TYPE a = 1;
16949 PG_INT64_TYPE b = 1;
16950 PG_INT64_TYPE result;
16951 int oflo;
16954 main ()
16956 oflo = __builtin_mul_overflow(a, b, &result);
16958 return 0;
16960 _ACEOF
16961 if ac_fn_c_try_link "$LINENO"; then :
16962 pgac_cv__builtin_op_overflow=yes
16963 else
16964 pgac_cv__builtin_op_overflow=no
16966 rm -f core conftest.err conftest.$ac_objext \
16967 conftest$ac_exeext conftest.$ac_ext
16969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16970 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16971 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16973 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16977 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16978 # The cast to long int works around a bug in the HP C Compiler
16979 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16980 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16981 # This bug is HP SR number 8606223364.
16982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16983 $as_echo_n "checking size of void *... " >&6; }
16984 if ${ac_cv_sizeof_void_p+:} false; then :
16985 $as_echo_n "(cached) " >&6
16986 else
16987 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
16989 else
16990 if test "$ac_cv_type_void_p" = yes; then
16991 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16992 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16993 as_fn_error 77 "cannot compute sizeof (void *)
16994 See \`config.log' for more details" "$LINENO" 5; }
16995 else
16996 ac_cv_sizeof_void_p=0
17001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
17002 $as_echo "$ac_cv_sizeof_void_p" >&6; }
17006 cat >>confdefs.h <<_ACEOF
17007 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
17008 _ACEOF
17011 # The cast to long int works around a bug in the HP C Compiler
17012 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17013 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17014 # This bug is HP SR number 8606223364.
17015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
17016 $as_echo_n "checking size of size_t... " >&6; }
17017 if ${ac_cv_sizeof_size_t+:} false; then :
17018 $as_echo_n "(cached) " >&6
17019 else
17020 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
17022 else
17023 if test "$ac_cv_type_size_t" = yes; then
17024 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17025 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17026 as_fn_error 77 "cannot compute sizeof (size_t)
17027 See \`config.log' for more details" "$LINENO" 5; }
17028 else
17029 ac_cv_sizeof_size_t=0
17034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
17035 $as_echo "$ac_cv_sizeof_size_t" >&6; }
17039 cat >>confdefs.h <<_ACEOF
17040 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
17041 _ACEOF
17044 # The cast to long int works around a bug in the HP C Compiler
17045 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17046 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17047 # This bug is HP SR number 8606223364.
17048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
17049 $as_echo_n "checking size of long... " >&6; }
17050 if ${ac_cv_sizeof_long+:} false; then :
17051 $as_echo_n "(cached) " >&6
17052 else
17053 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
17055 else
17056 if test "$ac_cv_type_long" = yes; then
17057 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17058 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17059 as_fn_error 77 "cannot compute sizeof (long)
17060 See \`config.log' for more details" "$LINENO" 5; }
17061 else
17062 ac_cv_sizeof_long=0
17067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
17068 $as_echo "$ac_cv_sizeof_long" >&6; }
17072 cat >>confdefs.h <<_ACEOF
17073 #define SIZEOF_LONG $ac_cv_sizeof_long
17074 _ACEOF
17078 # Determine memory alignment requirements for the basic C data types.
17080 # The cast to long int works around a bug in the HP C Compiler,
17081 # see AC_CHECK_SIZEOF for more information.
17082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
17083 $as_echo_n "checking alignment of short... " >&6; }
17084 if ${ac_cv_alignof_short+:} false; then :
17085 $as_echo_n "(cached) " >&6
17086 else
17087 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
17088 #ifndef offsetof
17089 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17090 #endif
17091 typedef struct { char x; short y; } ac__type_alignof_;"; then :
17093 else
17094 if test "$ac_cv_type_short" = yes; then
17095 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17096 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17097 as_fn_error 77 "cannot compute alignment of short
17098 See \`config.log' for more details" "$LINENO" 5; }
17099 else
17100 ac_cv_alignof_short=0
17105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
17106 $as_echo "$ac_cv_alignof_short" >&6; }
17110 cat >>confdefs.h <<_ACEOF
17111 #define ALIGNOF_SHORT $ac_cv_alignof_short
17112 _ACEOF
17115 # The cast to long int works around a bug in the HP C Compiler,
17116 # see AC_CHECK_SIZEOF for more information.
17117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
17118 $as_echo_n "checking alignment of int... " >&6; }
17119 if ${ac_cv_alignof_int+:} false; then :
17120 $as_echo_n "(cached) " >&6
17121 else
17122 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
17123 #ifndef offsetof
17124 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17125 #endif
17126 typedef struct { char x; int y; } ac__type_alignof_;"; then :
17128 else
17129 if test "$ac_cv_type_int" = yes; then
17130 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17131 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17132 as_fn_error 77 "cannot compute alignment of int
17133 See \`config.log' for more details" "$LINENO" 5; }
17134 else
17135 ac_cv_alignof_int=0
17140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
17141 $as_echo "$ac_cv_alignof_int" >&6; }
17145 cat >>confdefs.h <<_ACEOF
17146 #define ALIGNOF_INT $ac_cv_alignof_int
17147 _ACEOF
17150 # The cast to long int works around a bug in the HP C Compiler,
17151 # see AC_CHECK_SIZEOF for more information.
17152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17153 $as_echo_n "checking alignment of long... " >&6; }
17154 if ${ac_cv_alignof_long+:} false; then :
17155 $as_echo_n "(cached) " >&6
17156 else
17157 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
17158 #ifndef offsetof
17159 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17160 #endif
17161 typedef struct { char x; long y; } ac__type_alignof_;"; then :
17163 else
17164 if test "$ac_cv_type_long" = yes; then
17165 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17166 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17167 as_fn_error 77 "cannot compute alignment of long
17168 See \`config.log' for more details" "$LINENO" 5; }
17169 else
17170 ac_cv_alignof_long=0
17175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17176 $as_echo "$ac_cv_alignof_long" >&6; }
17180 cat >>confdefs.h <<_ACEOF
17181 #define ALIGNOF_LONG $ac_cv_alignof_long
17182 _ACEOF
17185 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17186 # The cast to long int works around a bug in the HP C Compiler,
17187 # see AC_CHECK_SIZEOF for more information.
17188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
17189 $as_echo_n "checking alignment of long long int... " >&6; }
17190 if ${ac_cv_alignof_long_long_int+:} false; then :
17191 $as_echo_n "(cached) " >&6
17192 else
17193 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
17194 #ifndef offsetof
17195 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17196 #endif
17197 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
17199 else
17200 if test "$ac_cv_type_long_long_int" = yes; then
17201 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17202 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17203 as_fn_error 77 "cannot compute alignment of long long int
17204 See \`config.log' for more details" "$LINENO" 5; }
17205 else
17206 ac_cv_alignof_long_long_int=0
17211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
17212 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
17216 cat >>confdefs.h <<_ACEOF
17217 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
17218 _ACEOF
17222 # The cast to long int works around a bug in the HP C Compiler,
17223 # see AC_CHECK_SIZEOF for more information.
17224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
17225 $as_echo_n "checking alignment of double... " >&6; }
17226 if ${ac_cv_alignof_double+:} false; then :
17227 $as_echo_n "(cached) " >&6
17228 else
17229 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
17230 #ifndef offsetof
17231 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17232 #endif
17233 typedef struct { char x; double y; } ac__type_alignof_;"; then :
17235 else
17236 if test "$ac_cv_type_double" = yes; then
17237 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17238 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17239 as_fn_error 77 "cannot compute alignment of double
17240 See \`config.log' for more details" "$LINENO" 5; }
17241 else
17242 ac_cv_alignof_double=0
17247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17248 $as_echo "$ac_cv_alignof_double" >&6; }
17252 cat >>confdefs.h <<_ACEOF
17253 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
17254 _ACEOF
17258 # Compute maximum alignment of any basic type.
17259 # We assume long's alignment is at least as strong as char, short, or int;
17260 # but we must check long long (if it is being used for int64) and double.
17261 # Note that we intentionally do not consider any types wider than 64 bits,
17262 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17263 # for disk and memory space.
17265 MAX_ALIGNOF=$ac_cv_alignof_long
17266 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17267 MAX_ALIGNOF=$ac_cv_alignof_double
17269 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17270 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17273 cat >>confdefs.h <<_ACEOF
17274 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17275 _ACEOF
17279 # Some platforms predefine the types int8, int16, etc. Only check
17280 # a (hopefully) representative subset.
17281 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17283 if test "x$ac_cv_type_int8" = xyes; then :
17285 cat >>confdefs.h <<_ACEOF
17286 #define HAVE_INT8 1
17287 _ACEOF
17291 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17293 if test "x$ac_cv_type_uint8" = xyes; then :
17295 cat >>confdefs.h <<_ACEOF
17296 #define HAVE_UINT8 1
17297 _ACEOF
17301 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17303 if test "x$ac_cv_type_int64" = xyes; then :
17305 cat >>confdefs.h <<_ACEOF
17306 #define HAVE_INT64 1
17307 _ACEOF
17311 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17313 if test "x$ac_cv_type_uint64" = xyes; then :
17315 cat >>confdefs.h <<_ACEOF
17316 #define HAVE_UINT64 1
17317 _ACEOF
17323 # Some compilers offer a 128-bit integer scalar type.
17324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17325 $as_echo_n "checking for __int128... " >&6; }
17326 if ${pgac_cv__128bit_int+:} false; then :
17327 $as_echo_n "(cached) " >&6
17328 else
17329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17330 /* end confdefs.h. */
17333 * We don't actually run this test, just link it to verify that any support
17334 * functions needed for __int128 are present.
17336 * These are globals to discourage the compiler from folding all the
17337 * arithmetic tests down to compile-time constants. We do not have
17338 * convenient support for 128bit literals at this point...
17340 __int128 a = 48828125;
17341 __int128 b = 97656250;
17344 main ()
17347 __int128 c,d;
17348 a = (a << 12) + 1; /* 200000000001 */
17349 b = (b << 12) + 5; /* 400000000005 */
17350 /* try the most relevant arithmetic ops */
17351 c = a * b;
17352 d = (c + b) / b;
17353 /* must use the results, else compiler may optimize arithmetic away */
17354 if (d != a+1)
17355 return 1;
17358 return 0;
17360 _ACEOF
17361 if ac_fn_c_try_link "$LINENO"; then :
17362 pgac_cv__128bit_int=yes
17363 else
17364 pgac_cv__128bit_int=no
17366 rm -f core conftest.err conftest.$ac_objext \
17367 conftest$ac_exeext conftest.$ac_ext
17369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17370 $as_echo "$pgac_cv__128bit_int" >&6; }
17371 if test x"$pgac_cv__128bit_int" = xyes ; then
17372 # Use of non-default alignment with __int128 tickles bugs in some compilers.
17373 # If not cross-compiling, we can test for bugs and disable use of __int128
17374 # with buggy compilers. If cross-compiling, hope for the best.
17375 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17377 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17378 if ${pgac_cv__128bit_int_bug+:} false; then :
17379 $as_echo_n "(cached) " >&6
17380 else
17381 if test "$cross_compiling" = yes; then :
17382 pgac_cv__128bit_int_bug="assuming ok"
17383 else
17384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17385 /* end confdefs.h. */
17387 /* This must match the corresponding code in c.h: */
17388 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17389 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17390 #elif defined(_MSC_VER)
17391 #define pg_attribute_aligned(a) __declspec(align(a))
17392 #endif
17393 typedef __int128 int128a
17394 #if defined(pg_attribute_aligned)
17395 pg_attribute_aligned(8)
17396 #endif
17398 int128a holder;
17399 void pass_by_val(void *buffer, int128a par) { holder = par; }
17402 main ()
17405 long int i64 = 97656225L << 12;
17406 int128a q;
17407 pass_by_val(main, (int128a) i64);
17408 q = (int128a) i64;
17409 if (q != holder)
17410 return 1;
17413 return 0;
17415 _ACEOF
17416 if ac_fn_c_try_run "$LINENO"; then :
17417 pgac_cv__128bit_int_bug=ok
17418 else
17419 pgac_cv__128bit_int_bug=broken
17421 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17422 conftest.$ac_objext conftest.beam conftest.$ac_ext
17426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17427 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17428 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17430 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17432 # The cast to long int works around a bug in the HP C Compiler,
17433 # see AC_CHECK_SIZEOF for more information.
17434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17435 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17436 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17437 $as_echo_n "(cached) " >&6
17438 else
17439 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
17440 #ifndef offsetof
17441 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17442 #endif
17443 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17445 else
17446 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17447 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17448 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17449 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17450 See \`config.log' for more details" "$LINENO" 5; }
17451 else
17452 ac_cv_alignof_PG_INT128_TYPE=0
17457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17458 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17462 cat >>confdefs.h <<_ACEOF
17463 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17464 _ACEOF
17470 # Check for various atomic operations now that we have checked how to declare
17471 # 64bit integers.
17472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17473 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17474 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17475 $as_echo_n "(cached) " >&6
17476 else
17477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17478 /* end confdefs.h. */
17481 main ()
17483 char lock = 0;
17484 __sync_lock_test_and_set(&lock, 1);
17485 __sync_lock_release(&lock);
17487 return 0;
17489 _ACEOF
17490 if ac_fn_c_try_link "$LINENO"; then :
17491 pgac_cv_gcc_sync_char_tas="yes"
17492 else
17493 pgac_cv_gcc_sync_char_tas="no"
17495 rm -f core conftest.err conftest.$ac_objext \
17496 conftest$ac_exeext conftest.$ac_ext
17498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17499 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17500 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17502 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17506 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17507 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17508 $as_echo_n "(cached) " >&6
17509 else
17510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17511 /* end confdefs.h. */
17514 main ()
17516 int lock = 0;
17517 __sync_lock_test_and_set(&lock, 1);
17518 __sync_lock_release(&lock);
17520 return 0;
17522 _ACEOF
17523 if ac_fn_c_try_link "$LINENO"; then :
17524 pgac_cv_gcc_sync_int32_tas="yes"
17525 else
17526 pgac_cv_gcc_sync_int32_tas="no"
17528 rm -f core conftest.err conftest.$ac_objext \
17529 conftest$ac_exeext conftest.$ac_ext
17531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17532 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17533 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17535 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17539 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17540 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17541 $as_echo_n "(cached) " >&6
17542 else
17543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17544 /* end confdefs.h. */
17547 main ()
17549 int val = 0;
17550 __sync_val_compare_and_swap(&val, 0, 37);
17552 return 0;
17554 _ACEOF
17555 if ac_fn_c_try_link "$LINENO"; then :
17556 pgac_cv_gcc_sync_int32_cas="yes"
17557 else
17558 pgac_cv_gcc_sync_int32_cas="no"
17560 rm -f core conftest.err conftest.$ac_objext \
17561 conftest$ac_exeext conftest.$ac_ext
17563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17564 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17565 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17567 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17571 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17572 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17573 $as_echo_n "(cached) " >&6
17574 else
17575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17576 /* end confdefs.h. */
17579 main ()
17581 PG_INT64_TYPE lock = 0;
17582 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17584 return 0;
17586 _ACEOF
17587 if ac_fn_c_try_link "$LINENO"; then :
17588 pgac_cv_gcc_sync_int64_cas="yes"
17589 else
17590 pgac_cv_gcc_sync_int64_cas="no"
17592 rm -f core conftest.err conftest.$ac_objext \
17593 conftest$ac_exeext conftest.$ac_ext
17595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17596 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17597 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17599 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17603 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17604 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17605 $as_echo_n "(cached) " >&6
17606 else
17607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17608 /* end confdefs.h. */
17611 main ()
17613 int val = 0;
17614 int expect = 0;
17615 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17617 return 0;
17619 _ACEOF
17620 if ac_fn_c_try_link "$LINENO"; then :
17621 pgac_cv_gcc_atomic_int32_cas="yes"
17622 else
17623 pgac_cv_gcc_atomic_int32_cas="no"
17625 rm -f core conftest.err conftest.$ac_objext \
17626 conftest$ac_exeext conftest.$ac_ext
17628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17629 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17630 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17632 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17636 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17637 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17638 $as_echo_n "(cached) " >&6
17639 else
17640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17641 /* end confdefs.h. */
17644 main ()
17646 PG_INT64_TYPE val = 0;
17647 PG_INT64_TYPE expect = 0;
17648 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17650 return 0;
17652 _ACEOF
17653 if ac_fn_c_try_link "$LINENO"; then :
17654 pgac_cv_gcc_atomic_int64_cas="yes"
17655 else
17656 pgac_cv_gcc_atomic_int64_cas="no"
17658 rm -f core conftest.err conftest.$ac_objext \
17659 conftest$ac_exeext conftest.$ac_ext
17661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17662 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17663 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17665 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17670 # Check for x86 cpuid instruction
17671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17672 $as_echo_n "checking for __get_cpuid... " >&6; }
17673 if ${pgac_cv__get_cpuid+:} false; then :
17674 $as_echo_n "(cached) " >&6
17675 else
17676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17677 /* end confdefs.h. */
17678 #include <cpuid.h>
17680 main ()
17682 unsigned int exx[4] = {0, 0, 0, 0};
17683 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17686 return 0;
17688 _ACEOF
17689 if ac_fn_c_try_link "$LINENO"; then :
17690 pgac_cv__get_cpuid="yes"
17691 else
17692 pgac_cv__get_cpuid="no"
17694 rm -f core conftest.err conftest.$ac_objext \
17695 conftest$ac_exeext conftest.$ac_ext
17697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17698 $as_echo "$pgac_cv__get_cpuid" >&6; }
17699 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17701 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17706 $as_echo_n "checking for __cpuid... " >&6; }
17707 if ${pgac_cv__cpuid+:} false; then :
17708 $as_echo_n "(cached) " >&6
17709 else
17710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17711 /* end confdefs.h. */
17712 #include <intrin.h>
17714 main ()
17716 unsigned int exx[4] = {0, 0, 0, 0};
17717 __get_cpuid(exx[0], 1);
17720 return 0;
17722 _ACEOF
17723 if ac_fn_c_try_link "$LINENO"; then :
17724 pgac_cv__cpuid="yes"
17725 else
17726 pgac_cv__cpuid="no"
17728 rm -f core conftest.err conftest.$ac_objext \
17729 conftest$ac_exeext conftest.$ac_ext
17731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17732 $as_echo "$pgac_cv__cpuid" >&6; }
17733 if test x"$pgac_cv__cpuid" = x"yes"; then
17735 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17739 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17741 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17742 # with the default compiler flags. If not, check if adding the -msse4.2
17743 # flag helps. CFLAGS_CRC is set to -msse4.2 if that's required.
17744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17745 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17746 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17747 $as_echo_n "(cached) " >&6
17748 else
17749 pgac_save_CFLAGS=$CFLAGS
17750 CFLAGS="$pgac_save_CFLAGS "
17751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17752 /* end confdefs.h. */
17753 #include <nmmintrin.h>
17755 main ()
17757 unsigned int crc = 0;
17758 crc = _mm_crc32_u8(crc, 0);
17759 crc = _mm_crc32_u32(crc, 0);
17760 /* return computed value, to prevent the above being optimized away */
17761 return crc == 0;
17763 return 0;
17765 _ACEOF
17766 if ac_fn_c_try_link "$LINENO"; then :
17767 pgac_cv_sse42_crc32_intrinsics_=yes
17768 else
17769 pgac_cv_sse42_crc32_intrinsics_=no
17771 rm -f core conftest.err conftest.$ac_objext \
17772 conftest$ac_exeext conftest.$ac_ext
17773 CFLAGS="$pgac_save_CFLAGS"
17775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17776 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17777 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17778 CFLAGS_CRC=""
17779 pgac_sse42_crc32_intrinsics=yes
17782 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17784 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17785 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17786 $as_echo_n "(cached) " >&6
17787 else
17788 pgac_save_CFLAGS=$CFLAGS
17789 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17791 /* end confdefs.h. */
17792 #include <nmmintrin.h>
17794 main ()
17796 unsigned int crc = 0;
17797 crc = _mm_crc32_u8(crc, 0);
17798 crc = _mm_crc32_u32(crc, 0);
17799 /* return computed value, to prevent the above being optimized away */
17800 return crc == 0;
17802 return 0;
17804 _ACEOF
17805 if ac_fn_c_try_link "$LINENO"; then :
17806 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17807 else
17808 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17810 rm -f core conftest.err conftest.$ac_objext \
17811 conftest$ac_exeext conftest.$ac_ext
17812 CFLAGS="$pgac_save_CFLAGS"
17814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17815 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17816 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17817 CFLAGS_CRC="-msse4.2"
17818 pgac_sse42_crc32_intrinsics=yes
17823 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17824 # define __SSE4_2__ in that case.
17825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17826 /* end confdefs.h. */
17829 main ()
17832 #ifndef __SSE4_2__
17833 #error __SSE4_2__ not defined
17834 #endif
17837 return 0;
17839 _ACEOF
17840 if ac_fn_c_try_compile "$LINENO"; then :
17841 SSE4_2_TARGETED=1
17843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17845 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17847 # First check if __crc32c* intrinsics can be used with the default compiler
17848 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17849 # CFLAGS_CRC is set if the extra flag is required.
17850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17851 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17852 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17853 $as_echo_n "(cached) " >&6
17854 else
17855 pgac_save_CFLAGS=$CFLAGS
17856 CFLAGS="$pgac_save_CFLAGS "
17857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17858 /* end confdefs.h. */
17859 #include <arm_acle.h>
17861 main ()
17863 unsigned int crc = 0;
17864 crc = __crc32cb(crc, 0);
17865 crc = __crc32ch(crc, 0);
17866 crc = __crc32cw(crc, 0);
17867 crc = __crc32cd(crc, 0);
17868 /* return computed value, to prevent the above being optimized away */
17869 return crc == 0;
17871 return 0;
17873 _ACEOF
17874 if ac_fn_c_try_link "$LINENO"; then :
17875 pgac_cv_armv8_crc32c_intrinsics_=yes
17876 else
17877 pgac_cv_armv8_crc32c_intrinsics_=no
17879 rm -f core conftest.err conftest.$ac_objext \
17880 conftest$ac_exeext conftest.$ac_ext
17881 CFLAGS="$pgac_save_CFLAGS"
17883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17884 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17885 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17886 CFLAGS_CRC=""
17887 pgac_armv8_crc32c_intrinsics=yes
17890 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17892 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17893 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17894 $as_echo_n "(cached) " >&6
17895 else
17896 pgac_save_CFLAGS=$CFLAGS
17897 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17899 /* end confdefs.h. */
17900 #include <arm_acle.h>
17902 main ()
17904 unsigned int crc = 0;
17905 crc = __crc32cb(crc, 0);
17906 crc = __crc32ch(crc, 0);
17907 crc = __crc32cw(crc, 0);
17908 crc = __crc32cd(crc, 0);
17909 /* return computed value, to prevent the above being optimized away */
17910 return crc == 0;
17912 return 0;
17914 _ACEOF
17915 if ac_fn_c_try_link "$LINENO"; then :
17916 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17917 else
17918 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17920 rm -f core conftest.err conftest.$ac_objext \
17921 conftest$ac_exeext conftest.$ac_ext
17922 CFLAGS="$pgac_save_CFLAGS"
17924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17925 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17926 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17927 CFLAGS_CRC="-march=armv8-a+crc"
17928 pgac_armv8_crc32c_intrinsics=yes
17933 # Check for LoongArch CRC intrinsics to do CRC calculations.
17935 # Check if __builtin_loongarch_crcc_* intrinsics can be used
17936 # with the default compiler flags.
17937 { $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
17938 $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; }
17939 if ${pgac_cv_loongarch_crc32c_intrinsics+:} false; then :
17940 $as_echo_n "(cached) " >&6
17941 else
17942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17943 /* end confdefs.h. */
17946 main ()
17948 unsigned int crc = 0;
17949 crc = __builtin_loongarch_crcc_w_b_w(0, crc);
17950 crc = __builtin_loongarch_crcc_w_h_w(0, crc);
17951 crc = __builtin_loongarch_crcc_w_w_w(0, crc);
17952 crc = __builtin_loongarch_crcc_w_d_w(0, crc);
17953 /* return computed value, to prevent the above being optimized away */
17954 return crc == 0;
17956 return 0;
17958 _ACEOF
17959 if ac_fn_c_try_link "$LINENO"; then :
17960 pgac_cv_loongarch_crc32c_intrinsics=yes
17961 else
17962 pgac_cv_loongarch_crc32c_intrinsics=no
17964 rm -f core conftest.err conftest.$ac_objext \
17965 conftest$ac_exeext conftest.$ac_ext
17967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_loongarch_crc32c_intrinsics" >&5
17968 $as_echo "$pgac_cv_loongarch_crc32c_intrinsics" >&6; }
17969 if test x"$pgac_cv_loongarch_crc32c_intrinsics" = x"yes"; then
17970 pgac_loongarch_crc32c_intrinsics=yes
17976 # Select CRC-32C implementation.
17978 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17979 # use the special CRC instructions for calculating CRC-32C. If we're not
17980 # targeting such a processor, but we can nevertheless produce code that uses
17981 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17982 # implementations and select which one to use at runtime, depending on whether
17983 # SSE 4.2 is supported by the processor we're running on.
17985 # Similarly, if we are targeting an ARM processor that has the CRC
17986 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17987 # we're not targeting such a processor, but can nevertheless produce code that
17988 # uses the CRC instructions, compile both, and select at runtime.
17990 # You can skip the runtime check by setting the appropriate USE_*_CRC32 flag to 1
17991 # in the template or configure command line.
17993 # If we are targeting a LoongArch processor, CRC instructions are
17994 # always available (at least on 64 bit), so no runtime check is needed.
17995 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
17996 # Use Intel SSE 4.2 if available.
17997 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17998 USE_SSE42_CRC32C=1
17999 else
18000 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
18001 # the runtime check.
18002 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
18003 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
18004 else
18005 # Use ARM CRC Extension if available.
18006 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_CRC" = x""; then
18007 USE_ARMV8_CRC32C=1
18008 else
18009 # ARM CRC Extension, with runtime check?
18010 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
18011 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
18012 else
18013 # LoongArch CRCC instructions.
18014 if test x"$pgac_loongarch_crc32c_intrinsics" = x"yes"; then
18015 USE_LOONGARCH_CRC32C=1
18016 else
18017 # fall back to slicing-by-8 algorithm, which doesn't require any
18018 # special CPU support.
18019 USE_SLICING_BY_8_CRC32C=1
18027 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
18028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
18029 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
18030 if test x"$USE_SSE42_CRC32C" = x"1"; then
18032 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
18034 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
18035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
18036 $as_echo "SSE 4.2" >&6; }
18037 else
18038 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18040 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18042 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
18043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
18044 $as_echo "SSE 4.2 with runtime check" >&6; }
18045 else
18046 if test x"$USE_ARMV8_CRC32C" = x"1"; then
18048 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
18050 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
18051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
18052 $as_echo "ARMv8 CRC instructions" >&6; }
18053 else
18054 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18056 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18058 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
18059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
18060 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
18061 else
18062 if test x"$USE_LOONGARCH_CRC32C" = x"1"; then
18064 $as_echo "#define USE_LOONGARCH_CRC32C 1" >>confdefs.h
18066 PG_CRC32C_OBJS="pg_crc32c_loongarch.o"
18067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: LoongArch CRCC instructions" >&5
18068 $as_echo "LoongArch CRCC instructions" >&6; }
18069 else
18071 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
18073 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
18074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
18075 $as_echo "slicing-by-8" >&6; }
18084 # Select semaphore implementation type.
18085 if test "$PORTNAME" != "win32"; then
18086 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
18087 # Need sem_open for this
18088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
18089 $as_echo_n "checking for library containing sem_open... " >&6; }
18090 if ${ac_cv_search_sem_open+:} false; then :
18091 $as_echo_n "(cached) " >&6
18092 else
18093 ac_func_search_save_LIBS=$LIBS
18094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18095 /* end confdefs.h. */
18097 /* Override any GCC internal prototype to avoid an error.
18098 Use char because int might match the return type of a GCC
18099 builtin and then its argument prototype would still apply. */
18100 #ifdef __cplusplus
18101 extern "C"
18102 #endif
18103 char sem_open ();
18105 main ()
18107 return sem_open ();
18109 return 0;
18111 _ACEOF
18112 for ac_lib in '' rt pthread; do
18113 if test -z "$ac_lib"; then
18114 ac_res="none required"
18115 else
18116 ac_res=-l$ac_lib
18117 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18119 if ac_fn_c_try_link "$LINENO"; then :
18120 ac_cv_search_sem_open=$ac_res
18122 rm -f core conftest.err conftest.$ac_objext \
18123 conftest$ac_exeext
18124 if ${ac_cv_search_sem_open+:} false; then :
18125 break
18127 done
18128 if ${ac_cv_search_sem_open+:} false; then :
18130 else
18131 ac_cv_search_sem_open=no
18133 rm conftest.$ac_ext
18134 LIBS=$ac_func_search_save_LIBS
18136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18137 $as_echo "$ac_cv_search_sem_open" >&6; }
18138 ac_res=$ac_cv_search_sem_open
18139 if test "$ac_res" != no; then :
18140 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18141 USE_NAMED_POSIX_SEMAPHORES=1
18145 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18146 # Need sem_init for this
18147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18148 $as_echo_n "checking for library containing sem_init... " >&6; }
18149 if ${ac_cv_search_sem_init+:} false; then :
18150 $as_echo_n "(cached) " >&6
18151 else
18152 ac_func_search_save_LIBS=$LIBS
18153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18154 /* end confdefs.h. */
18156 /* Override any GCC internal prototype to avoid an error.
18157 Use char because int might match the return type of a GCC
18158 builtin and then its argument prototype would still apply. */
18159 #ifdef __cplusplus
18160 extern "C"
18161 #endif
18162 char sem_init ();
18164 main ()
18166 return sem_init ();
18168 return 0;
18170 _ACEOF
18171 for ac_lib in '' rt pthread; do
18172 if test -z "$ac_lib"; then
18173 ac_res="none required"
18174 else
18175 ac_res=-l$ac_lib
18176 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18178 if ac_fn_c_try_link "$LINENO"; then :
18179 ac_cv_search_sem_init=$ac_res
18181 rm -f core conftest.err conftest.$ac_objext \
18182 conftest$ac_exeext
18183 if ${ac_cv_search_sem_init+:} false; then :
18184 break
18186 done
18187 if ${ac_cv_search_sem_init+:} false; then :
18189 else
18190 ac_cv_search_sem_init=no
18192 rm conftest.$ac_ext
18193 LIBS=$ac_func_search_save_LIBS
18195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18196 $as_echo "$ac_cv_search_sem_init" >&6; }
18197 ac_res=$ac_cv_search_sem_init
18198 if test "$ac_res" != no; then :
18199 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18200 USE_UNNAMED_POSIX_SEMAPHORES=1
18204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18205 $as_echo_n "checking which semaphore API to use... " >&6; }
18206 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18208 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18210 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18211 sematype="named POSIX"
18212 else
18213 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18215 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18217 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18218 sematype="unnamed POSIX"
18219 else
18221 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18223 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18224 sematype="System V"
18227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18228 $as_echo "$sematype" >&6; }
18229 else
18231 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18233 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18237 # Select shared-memory implementation type.
18238 if test "$PORTNAME" != "win32"; then
18240 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18242 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18243 else
18245 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18247 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18250 # Select random number source. If a TLS library is used then it will be the
18251 # first choice, else the native platform sources (Windows API or /dev/urandom)
18252 # will be used.
18253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18254 $as_echo_n "checking which random number source to use... " >&6; }
18255 if test x"$with_ssl" = x"openssl" ; then
18256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18257 $as_echo "OpenSSL" >&6; }
18258 elif test x"$PORTNAME" = x"win32" ; then
18259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18260 $as_echo "Windows native" >&6; }
18261 elif test x"$cross_compiling" = x"yes"; then
18262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming /dev/urandom" >&5
18263 $as_echo "assuming /dev/urandom" >&6; }
18264 else
18265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18266 $as_echo "/dev/urandom" >&6; }
18267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18268 $as_echo_n "checking for /dev/urandom... " >&6; }
18269 if ${ac_cv_file__dev_urandom+:} false; then :
18270 $as_echo_n "(cached) " >&6
18271 else
18272 test "$cross_compiling" = yes &&
18273 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18274 if test -r "/dev/urandom"; then
18275 ac_cv_file__dev_urandom=yes
18276 else
18277 ac_cv_file__dev_urandom=no
18280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18281 $as_echo "$ac_cv_file__dev_urandom" >&6; }
18282 if test "x$ac_cv_file__dev_urandom" = xyes; then :
18287 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
18288 as_fn_error $? "
18289 no source of strong random numbers was found
18290 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
18294 # If not set in template file, set bytes to use libc memset()
18295 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18296 MEMSET_LOOP_LIMIT=1024
18299 cat >>confdefs.h <<_ACEOF
18300 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18301 _ACEOF
18305 if test "$enable_nls" = yes ; then
18307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18308 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18309 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18310 $as_echo_n "(cached) " >&6
18311 else
18312 ac_func_search_save_LIBS=$LIBS
18313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18314 /* end confdefs.h. */
18316 /* Override any GCC internal prototype to avoid an error.
18317 Use char because int might match the return type of a GCC
18318 builtin and then its argument prototype would still apply. */
18319 #ifdef __cplusplus
18320 extern "C"
18321 #endif
18322 char bind_textdomain_codeset ();
18324 main ()
18326 return bind_textdomain_codeset ();
18328 return 0;
18330 _ACEOF
18331 for ac_lib in '' intl; do
18332 if test -z "$ac_lib"; then
18333 ac_res="none required"
18334 else
18335 ac_res=-l$ac_lib
18336 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18338 if ac_fn_c_try_link "$LINENO"; then :
18339 ac_cv_search_bind_textdomain_codeset=$ac_res
18341 rm -f core conftest.err conftest.$ac_objext \
18342 conftest$ac_exeext
18343 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18344 break
18346 done
18347 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18349 else
18350 ac_cv_search_bind_textdomain_codeset=no
18352 rm conftest.$ac_ext
18353 LIBS=$ac_func_search_save_LIBS
18355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18356 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18357 ac_res=$ac_cv_search_bind_textdomain_codeset
18358 if test "$ac_res" != no; then :
18359 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18361 else
18362 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18365 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18366 if test "x$ac_cv_header_libintl_h" = xyes; then :
18368 else
18369 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18373 if test -z "$MSGFMT"; then
18374 for ac_prog in msgfmt
18376 # Extract the first word of "$ac_prog", so it can be a program name with args.
18377 set dummy $ac_prog; ac_word=$2
18378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18379 $as_echo_n "checking for $ac_word... " >&6; }
18380 if ${ac_cv_path_MSGFMT+:} false; then :
18381 $as_echo_n "(cached) " >&6
18382 else
18383 case $MSGFMT in
18384 [\\/]* | ?:[\\/]*)
18385 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18389 for as_dir in $PATH
18391 IFS=$as_save_IFS
18392 test -z "$as_dir" && as_dir=.
18393 for ac_exec_ext in '' $ac_executable_extensions; do
18394 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18395 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18396 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18397 break 2
18399 done
18400 done
18401 IFS=$as_save_IFS
18404 esac
18406 MSGFMT=$ac_cv_path_MSGFMT
18407 if test -n "$MSGFMT"; then
18408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18409 $as_echo "$MSGFMT" >&6; }
18410 else
18411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18412 $as_echo "no" >&6; }
18416 test -n "$MSGFMT" && break
18417 done
18419 else
18420 # Report the value of MSGFMT in configure's output in all cases.
18421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18422 $as_echo_n "checking for MSGFMT... " >&6; }
18423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18424 $as_echo "$MSGFMT" >&6; }
18427 if test -z "$MSGFMT"; then
18428 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18431 $as_echo_n "checking for msgfmt flags... " >&6; }
18432 if ${pgac_cv_msgfmt_flags+:} false; then :
18433 $as_echo_n "(cached) " >&6
18434 else
18435 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18436 pgac_cv_msgfmt_flags=-c
18439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18440 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18441 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18443 if test -z "$MSGMERGE"; then
18444 for ac_prog in msgmerge
18446 # Extract the first word of "$ac_prog", so it can be a program name with args.
18447 set dummy $ac_prog; ac_word=$2
18448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18449 $as_echo_n "checking for $ac_word... " >&6; }
18450 if ${ac_cv_path_MSGMERGE+:} false; then :
18451 $as_echo_n "(cached) " >&6
18452 else
18453 case $MSGMERGE in
18454 [\\/]* | ?:[\\/]*)
18455 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18458 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18459 for as_dir in $PATH
18461 IFS=$as_save_IFS
18462 test -z "$as_dir" && as_dir=.
18463 for ac_exec_ext in '' $ac_executable_extensions; do
18464 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18465 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18466 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18467 break 2
18469 done
18470 done
18471 IFS=$as_save_IFS
18474 esac
18476 MSGMERGE=$ac_cv_path_MSGMERGE
18477 if test -n "$MSGMERGE"; then
18478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18479 $as_echo "$MSGMERGE" >&6; }
18480 else
18481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18482 $as_echo "no" >&6; }
18486 test -n "$MSGMERGE" && break
18487 done
18489 else
18490 # Report the value of MSGMERGE in configure's output in all cases.
18491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18492 $as_echo_n "checking for MSGMERGE... " >&6; }
18493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18494 $as_echo "$MSGMERGE" >&6; }
18497 if test -z "$XGETTEXT"; then
18498 for ac_prog in xgettext
18500 # Extract the first word of "$ac_prog", so it can be a program name with args.
18501 set dummy $ac_prog; ac_word=$2
18502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18503 $as_echo_n "checking for $ac_word... " >&6; }
18504 if ${ac_cv_path_XGETTEXT+:} false; then :
18505 $as_echo_n "(cached) " >&6
18506 else
18507 case $XGETTEXT in
18508 [\\/]* | ?:[\\/]*)
18509 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18512 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18513 for as_dir in $PATH
18515 IFS=$as_save_IFS
18516 test -z "$as_dir" && as_dir=.
18517 for ac_exec_ext in '' $ac_executable_extensions; do
18518 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18519 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18520 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18521 break 2
18523 done
18524 done
18525 IFS=$as_save_IFS
18528 esac
18530 XGETTEXT=$ac_cv_path_XGETTEXT
18531 if test -n "$XGETTEXT"; then
18532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18533 $as_echo "$XGETTEXT" >&6; }
18534 else
18535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18536 $as_echo "no" >&6; }
18540 test -n "$XGETTEXT" && break
18541 done
18543 else
18544 # Report the value of XGETTEXT in configure's output in all cases.
18545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18546 $as_echo_n "checking for XGETTEXT... " >&6; }
18547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18548 $as_echo "$XGETTEXT" >&6; }
18554 # Check for Tcl configuration script tclConfig.sh
18555 if test "$with_tcl" = yes; then
18556 if test -z "$TCLSH"; then
18557 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18559 # Extract the first word of "$ac_prog", so it can be a program name with args.
18560 set dummy $ac_prog; ac_word=$2
18561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18562 $as_echo_n "checking for $ac_word... " >&6; }
18563 if ${ac_cv_path_TCLSH+:} false; then :
18564 $as_echo_n "(cached) " >&6
18565 else
18566 case $TCLSH in
18567 [\\/]* | ?:[\\/]*)
18568 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18571 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18572 for as_dir in $PATH
18574 IFS=$as_save_IFS
18575 test -z "$as_dir" && as_dir=.
18576 for ac_exec_ext in '' $ac_executable_extensions; do
18577 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18578 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18579 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18580 break 2
18582 done
18583 done
18584 IFS=$as_save_IFS
18587 esac
18589 TCLSH=$ac_cv_path_TCLSH
18590 if test -n "$TCLSH"; then
18591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18592 $as_echo "$TCLSH" >&6; }
18593 else
18594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18595 $as_echo "no" >&6; }
18599 test -n "$TCLSH" && break
18600 done
18602 else
18603 # Report the value of TCLSH in configure's output in all cases.
18604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18605 $as_echo_n "checking for TCLSH... " >&6; }
18606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18607 $as_echo "$TCLSH" >&6; }
18610 if test x"$TCLSH" = x""; then
18611 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18615 $as_echo_n "checking for tclConfig.sh... " >&6; }
18616 # Let user override test
18617 if test -z "$TCL_CONFIG_SH"; then
18618 pgac_test_dirs="$with_tclconfig"
18620 set X $pgac_test_dirs; shift
18621 if test $# -eq 0; then
18622 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18623 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18624 # On newer macOS, $auto_path frequently doesn't include the place
18625 # where tclConfig.sh actually lives. Append that to the end, so as not
18626 # to break cases where a non-default Tcl installation is being used.
18627 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18628 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18630 set X $pgac_test_dirs; shift
18633 for pgac_dir do
18634 if test -r "$pgac_dir/tclConfig.sh"; then
18635 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18636 break
18638 done
18641 if test -z "$TCL_CONFIG_SH"; then
18642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18643 $as_echo "no" >&6; }
18644 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18645 else
18646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18647 $as_echo "$TCL_CONFIG_SH" >&6; }
18652 . "$TCL_CONFIG_SH"
18653 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18654 eval TCL_LIBS=\"$TCL_LIBS\"
18655 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18656 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18658 if test "$TCL_SHARED_BUILD" != 1; then
18659 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18660 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18662 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18663 ac_save_CPPFLAGS=$CPPFLAGS
18664 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18665 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18666 if test "x$ac_cv_header_tcl_h" = xyes; then :
18668 else
18669 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18673 CPPFLAGS=$ac_save_CPPFLAGS
18676 # check for <perl.h>
18677 if test "$with_perl" = yes; then
18678 ac_save_CPPFLAGS=$CPPFLAGS
18679 CPPFLAGS="$CPPFLAGS $perl_includespec"
18680 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18682 if test "x$ac_cv_header_perl_h" = xyes; then :
18684 else
18685 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18689 # While we're at it, check that we can link to libperl.
18690 # On most platforms, if perl.h is there then libperl.so will be too, but at
18691 # this writing Debian packages them separately. There is no known reason to
18692 # waste cycles on separate probes for the Tcl or Python libraries, though.
18693 # On some Red Hat platforms, the link attempt can fail if we don't use
18694 # CFLAGS_SL while building the test program.
18695 ac_save_CFLAGS=$CFLAGS
18696 CFLAGS="$CFLAGS $CFLAGS_SL"
18697 pgac_save_LIBS=$LIBS
18698 LIBS="$perl_embed_ldflags"
18699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18700 $as_echo_n "checking for libperl... " >&6; }
18701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18702 /* end confdefs.h. */
18704 #include <EXTERN.h>
18705 #include <perl.h>
18708 main ()
18710 perl_alloc();
18712 return 0;
18714 _ACEOF
18715 if ac_fn_c_try_link "$LINENO"; then :
18716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18717 $as_echo "yes" >&6; }
18718 else
18719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18720 $as_echo "no" >&6; }
18721 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18723 rm -f core conftest.err conftest.$ac_objext \
18724 conftest$ac_exeext conftest.$ac_ext
18725 LIBS=$pgac_save_LIBS
18726 CFLAGS=$ac_save_CFLAGS
18727 CPPFLAGS=$ac_save_CPPFLAGS
18730 # check for <Python.h>
18731 if test "$with_python" = yes; then
18732 ac_save_CPPFLAGS=$CPPFLAGS
18733 CPPFLAGS="$python_includespec $CPPFLAGS"
18734 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18735 if test "x$ac_cv_header_Python_h" = xyes; then :
18737 else
18738 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18742 CPPFLAGS=$ac_save_CPPFLAGS
18746 # Check for documentation-building tools
18748 if test -z "$XMLLINT"; then
18749 for ac_prog in xmllint
18751 # Extract the first word of "$ac_prog", so it can be a program name with args.
18752 set dummy $ac_prog; ac_word=$2
18753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18754 $as_echo_n "checking for $ac_word... " >&6; }
18755 if ${ac_cv_path_XMLLINT+:} false; then :
18756 $as_echo_n "(cached) " >&6
18757 else
18758 case $XMLLINT in
18759 [\\/]* | ?:[\\/]*)
18760 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18764 for as_dir in $PATH
18766 IFS=$as_save_IFS
18767 test -z "$as_dir" && as_dir=.
18768 for ac_exec_ext in '' $ac_executable_extensions; do
18769 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18770 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18771 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18772 break 2
18774 done
18775 done
18776 IFS=$as_save_IFS
18779 esac
18781 XMLLINT=$ac_cv_path_XMLLINT
18782 if test -n "$XMLLINT"; then
18783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18784 $as_echo "$XMLLINT" >&6; }
18785 else
18786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18787 $as_echo "no" >&6; }
18791 test -n "$XMLLINT" && break
18792 done
18794 else
18795 # Report the value of XMLLINT in configure's output in all cases.
18796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18797 $as_echo_n "checking for XMLLINT... " >&6; }
18798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18799 $as_echo "$XMLLINT" >&6; }
18802 if test -z "$XSLTPROC"; then
18803 for ac_prog in xsltproc
18805 # Extract the first word of "$ac_prog", so it can be a program name with args.
18806 set dummy $ac_prog; ac_word=$2
18807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18808 $as_echo_n "checking for $ac_word... " >&6; }
18809 if ${ac_cv_path_XSLTPROC+:} false; then :
18810 $as_echo_n "(cached) " >&6
18811 else
18812 case $XSLTPROC in
18813 [\\/]* | ?:[\\/]*)
18814 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18817 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18818 for as_dir in $PATH
18820 IFS=$as_save_IFS
18821 test -z "$as_dir" && as_dir=.
18822 for ac_exec_ext in '' $ac_executable_extensions; do
18823 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18824 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18825 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18826 break 2
18828 done
18829 done
18830 IFS=$as_save_IFS
18833 esac
18835 XSLTPROC=$ac_cv_path_XSLTPROC
18836 if test -n "$XSLTPROC"; then
18837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18838 $as_echo "$XSLTPROC" >&6; }
18839 else
18840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18841 $as_echo "no" >&6; }
18845 test -n "$XSLTPROC" && break
18846 done
18848 else
18849 # Report the value of XSLTPROC in configure's output in all cases.
18850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18851 $as_echo_n "checking for XSLTPROC... " >&6; }
18852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18853 $as_echo "$XSLTPROC" >&6; }
18856 if test -z "$FOP"; then
18857 for ac_prog in fop
18859 # Extract the first word of "$ac_prog", so it can be a program name with args.
18860 set dummy $ac_prog; ac_word=$2
18861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18862 $as_echo_n "checking for $ac_word... " >&6; }
18863 if ${ac_cv_path_FOP+:} false; then :
18864 $as_echo_n "(cached) " >&6
18865 else
18866 case $FOP in
18867 [\\/]* | ?:[\\/]*)
18868 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18871 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18872 for as_dir in $PATH
18874 IFS=$as_save_IFS
18875 test -z "$as_dir" && as_dir=.
18876 for ac_exec_ext in '' $ac_executable_extensions; do
18877 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18878 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18879 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18880 break 2
18882 done
18883 done
18884 IFS=$as_save_IFS
18887 esac
18889 FOP=$ac_cv_path_FOP
18890 if test -n "$FOP"; then
18891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18892 $as_echo "$FOP" >&6; }
18893 else
18894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18895 $as_echo "no" >&6; }
18899 test -n "$FOP" && break
18900 done
18902 else
18903 # Report the value of FOP in configure's output in all cases.
18904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18905 $as_echo_n "checking for FOP... " >&6; }
18906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18907 $as_echo "$FOP" >&6; }
18910 if test -z "$DBTOEPUB"; then
18911 for ac_prog in dbtoepub
18913 # Extract the first word of "$ac_prog", so it can be a program name with args.
18914 set dummy $ac_prog; ac_word=$2
18915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18916 $as_echo_n "checking for $ac_word... " >&6; }
18917 if ${ac_cv_path_DBTOEPUB+:} false; then :
18918 $as_echo_n "(cached) " >&6
18919 else
18920 case $DBTOEPUB in
18921 [\\/]* | ?:[\\/]*)
18922 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18925 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18926 for as_dir in $PATH
18928 IFS=$as_save_IFS
18929 test -z "$as_dir" && as_dir=.
18930 for ac_exec_ext in '' $ac_executable_extensions; do
18931 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18932 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18933 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18934 break 2
18936 done
18937 done
18938 IFS=$as_save_IFS
18941 esac
18943 DBTOEPUB=$ac_cv_path_DBTOEPUB
18944 if test -n "$DBTOEPUB"; then
18945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18946 $as_echo "$DBTOEPUB" >&6; }
18947 else
18948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18949 $as_echo "no" >&6; }
18953 test -n "$DBTOEPUB" && break
18954 done
18956 else
18957 # Report the value of DBTOEPUB in configure's output in all cases.
18958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18959 $as_echo_n "checking for DBTOEPUB... " >&6; }
18960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18961 $as_echo "$DBTOEPUB" >&6; }
18966 # Check for test tools
18968 if test "$enable_tap_tests" = yes; then
18969 # Make sure we know where prove is.
18970 if test -z "$PROVE"; then
18971 for ac_prog in prove
18973 # Extract the first word of "$ac_prog", so it can be a program name with args.
18974 set dummy $ac_prog; ac_word=$2
18975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18976 $as_echo_n "checking for $ac_word... " >&6; }
18977 if ${ac_cv_path_PROVE+:} false; then :
18978 $as_echo_n "(cached) " >&6
18979 else
18980 case $PROVE in
18981 [\\/]* | ?:[\\/]*)
18982 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18986 for as_dir in $PATH
18988 IFS=$as_save_IFS
18989 test -z "$as_dir" && as_dir=.
18990 for ac_exec_ext in '' $ac_executable_extensions; do
18991 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18992 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18994 break 2
18996 done
18997 done
18998 IFS=$as_save_IFS
19001 esac
19003 PROVE=$ac_cv_path_PROVE
19004 if test -n "$PROVE"; then
19005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19006 $as_echo "$PROVE" >&6; }
19007 else
19008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19009 $as_echo "no" >&6; }
19013 test -n "$PROVE" && break
19014 done
19016 else
19017 # Report the value of PROVE in configure's output in all cases.
19018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
19019 $as_echo_n "checking for PROVE... " >&6; }
19020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19021 $as_echo "$PROVE" >&6; }
19024 if test -z "$PROVE"; then
19025 as_fn_error $? "prove not found" "$LINENO" 5
19027 # Check for necessary Perl modules. You might think we should use
19028 # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
19029 # installation than perl, eg on MSys, so we have to check using prove.
19030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
19031 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
19032 __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__
19033 modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
19034 if test $? -eq 0; then
19035 # log the module version details, but don't show them interactively
19036 echo "$modulestderr" >&5
19037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19038 $as_echo "yes" >&6; }
19039 else
19040 # on failure, though, show the results to the user
19041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modulestderr" >&5
19042 $as_echo "$modulestderr" >&6; }
19043 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
19047 # If compiler will take -Wl,--as-needed (or various platform-specific
19048 # spellings thereof) then add that to LDFLAGS. This is much easier than
19049 # trying to filter LIBS to the minimum for each executable.
19050 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
19051 # libreadline; therefore we postpone testing it until we know what library
19052 # dependencies readline has. The test code will try to link with $LIBS.
19053 if test "$with_readline" = yes; then
19054 link_test_func=readline
19055 else
19056 link_test_func=exit
19059 if test "$PORTNAME" = "darwin"; then
19060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS" >&5
19061 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS... " >&6; }
19062 if ${pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs+:} false; then :
19063 $as_echo_n "(cached) " >&6
19064 else
19065 pgac_save_LDFLAGS=$LDFLAGS
19066 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19067 if test "$cross_compiling" = yes; then :
19068 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs="assuming no"
19069 else
19070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19071 /* end confdefs.h. */
19072 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19074 main ()
19078 return 0;
19080 _ACEOF
19081 if ac_fn_c_try_run "$LINENO"; then :
19082 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=yes
19083 else
19084 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=no
19086 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19087 conftest.$ac_objext conftest.beam conftest.$ac_ext
19090 LDFLAGS="$pgac_save_LDFLAGS"
19092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&5
19093 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&6; }
19094 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" = x"yes"; then
19095 LDFLAGS="${LDFLAGS} -Wl,-dead_strip_dylibs"
19099 elif test "$PORTNAME" = "openbsd"; then
19100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS" >&5
19101 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS... " >&6; }
19102 if ${pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic+:} false; then :
19103 $as_echo_n "(cached) " >&6
19104 else
19105 pgac_save_LDFLAGS=$LDFLAGS
19106 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19107 if test "$cross_compiling" = yes; then :
19108 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic="assuming no"
19109 else
19110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19111 /* end confdefs.h. */
19112 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19114 main ()
19118 return 0;
19120 _ACEOF
19121 if ac_fn_c_try_run "$LINENO"; then :
19122 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=yes
19123 else
19124 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=no
19126 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19127 conftest.$ac_objext conftest.beam conftest.$ac_ext
19130 LDFLAGS="$pgac_save_LDFLAGS"
19132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&5
19133 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&6; }
19134 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" = x"yes"; then
19135 LDFLAGS="${LDFLAGS} -Wl,-Bdynamic"
19139 else
19140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed, for LDFLAGS" >&5
19141 $as_echo_n "checking whether $CC supports -Wl,--as-needed, for LDFLAGS... " >&6; }
19142 if ${pgac_cv_prog_cc_LDFLAGS__Wl___as_needed+:} false; then :
19143 $as_echo_n "(cached) " >&6
19144 else
19145 pgac_save_LDFLAGS=$LDFLAGS
19146 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19147 if test "$cross_compiling" = yes; then :
19148 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed="assuming no"
19149 else
19150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19151 /* end confdefs.h. */
19152 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19154 main ()
19158 return 0;
19160 _ACEOF
19161 if ac_fn_c_try_run "$LINENO"; then :
19162 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=yes
19163 else
19164 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=no
19166 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19167 conftest.$ac_objext conftest.beam conftest.$ac_ext
19170 LDFLAGS="$pgac_save_LDFLAGS"
19172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&5
19173 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&6; }
19174 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" = x"yes"; then
19175 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
19181 # For linkers that understand --export-dynamic, add that to the LDFLAGS_EX_BE
19182 # (backend specific ldflags). One some platforms this will always fail (e.g.,
19183 # windows), but on others it depends on the choice of linker (e.g., solaris).
19184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE" >&5
19185 $as_echo_n "checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE... " >&6; }
19186 if ${pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic+:} false; then :
19187 $as_echo_n "(cached) " >&6
19188 else
19189 pgac_save_LDFLAGS=$LDFLAGS
19190 LDFLAGS="$pgac_save_LDFLAGS -Wl,--export-dynamic"
19191 if test "$cross_compiling" = yes; then :
19192 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic="assuming no"
19193 else
19194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19195 /* end confdefs.h. */
19196 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19198 main ()
19202 return 0;
19204 _ACEOF
19205 if ac_fn_c_try_run "$LINENO"; then :
19206 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=yes
19207 else
19208 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=no
19210 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19211 conftest.$ac_objext conftest.beam conftest.$ac_ext
19214 LDFLAGS="$pgac_save_LDFLAGS"
19216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&5
19217 $as_echo "$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&6; }
19218 if test x"$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" = x"yes"; then
19219 LDFLAGS_EX_BE="${LDFLAGS_EX_BE} -Wl,--export-dynamic"
19224 # Create compiler version string
19225 if test x"$GCC" = x"yes" ; then
19226 cc_string=`${CC} --version | sed q`
19227 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19228 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19229 cc_string=`${CC} -V 2>&1 | sed q`
19230 else
19231 cc_string=$CC
19235 cat >>confdefs.h <<_ACEOF
19236 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19237 _ACEOF
19240 # Supply a numeric version string for use by 3rd party add-ons
19241 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19242 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
19243 $AWK '{printf "%d%04d", $1, $2}'`"
19245 cat >>confdefs.h <<_ACEOF
19246 #define PG_VERSION_NUM $PG_VERSION_NUM
19247 _ACEOF
19251 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19252 # literally, so that it's possible to override it at build time using
19253 # a command like "make ... PG_SYSROOT=path". This has to be done after
19254 # we've finished all configure checks that depend on CPPFLAGS.
19255 # The same for LDFLAGS, too.
19256 if test x"$PG_SYSROOT" != x; then
19257 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19258 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19263 # Begin output steps
19265 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19266 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19267 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19268 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19269 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19270 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19271 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19272 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19273 # Currently only used when LLVM is used
19274 if test "$with_llvm" = yes ; then
19275 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19276 $as_echo "$as_me: using CXX=$CXX" >&6;}
19277 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19278 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19279 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19280 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19281 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19282 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19283 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19284 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19287 # prepare build tree if outside source tree
19288 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19289 # Note 2: /bin/pwd might be better than shell's built-in at getting
19290 # a symlink-free name.
19291 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19292 vpath_build=no
19293 else
19294 vpath_build=yes
19295 if test "$no_create" != yes; then
19296 $as_echo_n "preparing build tree... " >&6
19297 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19298 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19299 || as_fn_error $? "failed" "$LINENO" 5
19300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19301 $as_echo "done" >&6; }
19307 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19310 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}"
19313 if test "$PORTNAME" = "win32"; then
19314 ac_config_commands="$ac_config_commands check_win32_symlinks"
19318 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19321 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19324 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19327 cat >confcache <<\_ACEOF
19328 # This file is a shell script that caches the results of configure
19329 # tests run on this system so they can be shared between configure
19330 # scripts and configure runs, see configure's option --config-cache.
19331 # It is not useful on other systems. If it contains results you don't
19332 # want to keep, you may remove or edit it.
19334 # config.status only pays attention to the cache file if you give it
19335 # the --recheck option to rerun configure.
19337 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19338 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19339 # following values.
19341 _ACEOF
19343 # The following way of writing the cache mishandles newlines in values,
19344 # but we know of no workaround that is simple, portable, and efficient.
19345 # So, we kill variables containing newlines.
19346 # Ultrix sh set writes to stderr and can't be redirected directly,
19347 # and sets the high bit in the cache file unless we assign to the vars.
19349 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19350 eval ac_val=\$$ac_var
19351 case $ac_val in #(
19352 *${as_nl}*)
19353 case $ac_var in #(
19354 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19355 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19356 esac
19357 case $ac_var in #(
19358 _ | IFS | as_nl) ;; #(
19359 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19360 *) { eval $ac_var=; unset $ac_var;} ;;
19361 esac ;;
19362 esac
19363 done
19365 (set) 2>&1 |
19366 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19367 *${as_nl}ac_space=\ *)
19368 # `set' does not quote correctly, so add quotes: double-quote
19369 # substitution turns \\\\ into \\, and sed turns \\ into \.
19370 sed -n \
19371 "s/'/'\\\\''/g;
19372 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19373 ;; #(
19375 # `set' quotes correctly as required by POSIX, so do not add quotes.
19376 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19378 esac |
19379 sort
19381 sed '
19382 /^ac_cv_env_/b end
19383 t clear
19384 :clear
19385 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19386 t end
19387 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19388 :end' >>confcache
19389 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19390 if test -w "$cache_file"; then
19391 if test "x$cache_file" != "x/dev/null"; then
19392 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19393 $as_echo "$as_me: updating cache $cache_file" >&6;}
19394 if test ! -f "$cache_file" || test -h "$cache_file"; then
19395 cat confcache >"$cache_file"
19396 else
19397 case $cache_file in #(
19398 */* | ?:*)
19399 mv -f confcache "$cache_file"$$ &&
19400 mv -f "$cache_file"$$ "$cache_file" ;; #(
19402 mv -f confcache "$cache_file" ;;
19403 esac
19406 else
19407 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19408 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19411 rm -f confcache
19413 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19414 # Let make expand exec_prefix.
19415 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19417 DEFS=-DHAVE_CONFIG_H
19419 ac_libobjs=
19420 ac_ltlibobjs=
19422 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19423 # 1. Remove the extension, and $U if already installed.
19424 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19425 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19426 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19427 # will be set to the directory where LIBOBJS objects are built.
19428 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19429 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19430 done
19431 LIBOBJS=$ac_libobjs
19433 LTLIBOBJS=$ac_ltlibobjs
19438 : "${CONFIG_STATUS=./config.status}"
19439 ac_write_fail=0
19440 ac_clean_files_save=$ac_clean_files
19441 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19442 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19443 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19444 as_write_fail=0
19445 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19446 #! $SHELL
19447 # Generated by $as_me.
19448 # Run this file to recreate the current configuration.
19449 # Compiler output produced by configure, useful for debugging
19450 # configure, is in config.log if it exists.
19452 debug=false
19453 ac_cs_recheck=false
19454 ac_cs_silent=false
19456 SHELL=\${CONFIG_SHELL-$SHELL}
19457 export SHELL
19458 _ASEOF
19459 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19460 ## -------------------- ##
19461 ## M4sh Initialization. ##
19462 ## -------------------- ##
19464 # Be more Bourne compatible
19465 DUALCASE=1; export DUALCASE # for MKS sh
19466 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19467 emulate sh
19468 NULLCMD=:
19469 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19470 # is contrary to our usage. Disable this feature.
19471 alias -g '${1+"$@"}'='"$@"'
19472 setopt NO_GLOB_SUBST
19473 else
19474 case `(set -o) 2>/dev/null` in #(
19475 *posix*) :
19476 set -o posix ;; #(
19477 *) :
19479 esac
19483 as_nl='
19485 export as_nl
19486 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19487 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19488 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19489 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19490 # Prefer a ksh shell builtin over an external printf program on Solaris,
19491 # but without wasting forks for bash or zsh.
19492 if test -z "$BASH_VERSION$ZSH_VERSION" \
19493 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19494 as_echo='print -r --'
19495 as_echo_n='print -rn --'
19496 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19497 as_echo='printf %s\n'
19498 as_echo_n='printf %s'
19499 else
19500 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19501 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19502 as_echo_n='/usr/ucb/echo -n'
19503 else
19504 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19505 as_echo_n_body='eval
19506 arg=$1;
19507 case $arg in #(
19508 *"$as_nl"*)
19509 expr "X$arg" : "X\\(.*\\)$as_nl";
19510 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19511 esac;
19512 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19514 export as_echo_n_body
19515 as_echo_n='sh -c $as_echo_n_body as_echo'
19517 export as_echo_body
19518 as_echo='sh -c $as_echo_body as_echo'
19521 # The user is always right.
19522 if test "${PATH_SEPARATOR+set}" != set; then
19523 PATH_SEPARATOR=:
19524 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19525 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19526 PATH_SEPARATOR=';'
19531 # IFS
19532 # We need space, tab and new line, in precisely that order. Quoting is
19533 # there to prevent editors from complaining about space-tab.
19534 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19535 # splitting by setting IFS to empty value.)
19536 IFS=" "" $as_nl"
19538 # Find who we are. Look in the path if we contain no directory separator.
19539 as_myself=
19540 case $0 in #((
19541 *[\\/]* ) as_myself=$0 ;;
19542 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19543 for as_dir in $PATH
19545 IFS=$as_save_IFS
19546 test -z "$as_dir" && as_dir=.
19547 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19548 done
19549 IFS=$as_save_IFS
19552 esac
19553 # We did not find ourselves, most probably we were run as `sh COMMAND'
19554 # in which case we are not to be found in the path.
19555 if test "x$as_myself" = x; then
19556 as_myself=$0
19558 if test ! -f "$as_myself"; then
19559 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19560 exit 1
19563 # Unset variables that we do not need and which cause bugs (e.g. in
19564 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19565 # suppresses any "Segmentation fault" message there. '((' could
19566 # trigger a bug in pdksh 5.2.14.
19567 for as_var in BASH_ENV ENV MAIL MAILPATH
19568 do eval test x\${$as_var+set} = xset \
19569 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19570 done
19571 PS1='$ '
19572 PS2='> '
19573 PS4='+ '
19575 # NLS nuisances.
19576 LC_ALL=C
19577 export LC_ALL
19578 LANGUAGE=C
19579 export LANGUAGE
19581 # CDPATH.
19582 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19585 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19586 # ----------------------------------------
19587 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19588 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19589 # script with STATUS, using 1 if that was 0.
19590 as_fn_error ()
19592 as_status=$1; test $as_status -eq 0 && as_status=1
19593 if test "$4"; then
19594 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19595 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19597 $as_echo "$as_me: error: $2" >&2
19598 as_fn_exit $as_status
19599 } # as_fn_error
19602 # as_fn_set_status STATUS
19603 # -----------------------
19604 # Set $? to STATUS, without forking.
19605 as_fn_set_status ()
19607 return $1
19608 } # as_fn_set_status
19610 # as_fn_exit STATUS
19611 # -----------------
19612 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19613 as_fn_exit ()
19615 set +e
19616 as_fn_set_status $1
19617 exit $1
19618 } # as_fn_exit
19620 # as_fn_unset VAR
19621 # ---------------
19622 # Portably unset VAR.
19623 as_fn_unset ()
19625 { eval $1=; unset $1;}
19627 as_unset=as_fn_unset
19628 # as_fn_append VAR VALUE
19629 # ----------------------
19630 # Append the text in VALUE to the end of the definition contained in VAR. Take
19631 # advantage of any shell optimizations that allow amortized linear growth over
19632 # repeated appends, instead of the typical quadratic growth present in naive
19633 # implementations.
19634 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19635 eval 'as_fn_append ()
19637 eval $1+=\$2
19639 else
19640 as_fn_append ()
19642 eval $1=\$$1\$2
19644 fi # as_fn_append
19646 # as_fn_arith ARG...
19647 # ------------------
19648 # Perform arithmetic evaluation on the ARGs, and store the result in the
19649 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19650 # must be portable across $(()) and expr.
19651 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19652 eval 'as_fn_arith ()
19654 as_val=$(( $* ))
19656 else
19657 as_fn_arith ()
19659 as_val=`expr "$@" || test $? -eq 1`
19661 fi # as_fn_arith
19664 if expr a : '\(a\)' >/dev/null 2>&1 &&
19665 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19666 as_expr=expr
19667 else
19668 as_expr=false
19671 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19672 as_basename=basename
19673 else
19674 as_basename=false
19677 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19678 as_dirname=dirname
19679 else
19680 as_dirname=false
19683 as_me=`$as_basename -- "$0" ||
19684 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19685 X"$0" : 'X\(//\)$' \| \
19686 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19687 $as_echo X/"$0" |
19688 sed '/^.*\/\([^/][^/]*\)\/*$/{
19689 s//\1/
19692 /^X\/\(\/\/\)$/{
19693 s//\1/
19696 /^X\/\(\/\).*/{
19697 s//\1/
19700 s/.*/./; q'`
19702 # Avoid depending upon Character Ranges.
19703 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19704 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19705 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19706 as_cr_digits='0123456789'
19707 as_cr_alnum=$as_cr_Letters$as_cr_digits
19709 ECHO_C= ECHO_N= ECHO_T=
19710 case `echo -n x` in #(((((
19711 -n*)
19712 case `echo 'xy\c'` in
19713 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19714 xy) ECHO_C='\c';;
19715 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19716 ECHO_T=' ';;
19717 esac;;
19719 ECHO_N='-n';;
19720 esac
19722 rm -f conf$$ conf$$.exe conf$$.file
19723 if test -d conf$$.dir; then
19724 rm -f conf$$.dir/conf$$.file
19725 else
19726 rm -f conf$$.dir
19727 mkdir conf$$.dir 2>/dev/null
19729 if (echo >conf$$.file) 2>/dev/null; then
19730 if ln -s conf$$.file conf$$ 2>/dev/null; then
19731 as_ln_s='ln -s'
19732 # ... but there are two gotchas:
19733 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19734 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19735 # In both cases, we have to default to `cp -pR'.
19736 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19737 as_ln_s='cp -pR'
19738 elif ln conf$$.file conf$$ 2>/dev/null; then
19739 as_ln_s=ln
19740 else
19741 as_ln_s='cp -pR'
19743 else
19744 as_ln_s='cp -pR'
19746 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19747 rmdir conf$$.dir 2>/dev/null
19750 # as_fn_mkdir_p
19751 # -------------
19752 # Create "$as_dir" as a directory, including parents if necessary.
19753 as_fn_mkdir_p ()
19756 case $as_dir in #(
19757 -*) as_dir=./$as_dir;;
19758 esac
19759 test -d "$as_dir" || eval $as_mkdir_p || {
19760 as_dirs=
19761 while :; do
19762 case $as_dir in #(
19763 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19764 *) as_qdir=$as_dir;;
19765 esac
19766 as_dirs="'$as_qdir' $as_dirs"
19767 as_dir=`$as_dirname -- "$as_dir" ||
19768 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19769 X"$as_dir" : 'X\(//\)[^/]' \| \
19770 X"$as_dir" : 'X\(//\)$' \| \
19771 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19772 $as_echo X"$as_dir" |
19773 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19774 s//\1/
19777 /^X\(\/\/\)[^/].*/{
19778 s//\1/
19781 /^X\(\/\/\)$/{
19782 s//\1/
19785 /^X\(\/\).*/{
19786 s//\1/
19789 s/.*/./; q'`
19790 test -d "$as_dir" && break
19791 done
19792 test -z "$as_dirs" || eval "mkdir $as_dirs"
19793 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19796 } # as_fn_mkdir_p
19797 if mkdir -p . 2>/dev/null; then
19798 as_mkdir_p='mkdir -p "$as_dir"'
19799 else
19800 test -d ./-p && rmdir ./-p
19801 as_mkdir_p=false
19805 # as_fn_executable_p FILE
19806 # -----------------------
19807 # Test if FILE is an executable regular file.
19808 as_fn_executable_p ()
19810 test -f "$1" && test -x "$1"
19811 } # as_fn_executable_p
19812 as_test_x='test -x'
19813 as_executable_p=as_fn_executable_p
19815 # Sed expression to map a string onto a valid CPP name.
19816 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19818 # Sed expression to map a string onto a valid variable name.
19819 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19822 exec 6>&1
19823 ## ----------------------------------- ##
19824 ## Main body of $CONFIG_STATUS script. ##
19825 ## ----------------------------------- ##
19826 _ASEOF
19827 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19829 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19830 # Save the log message, to keep $0 and so on meaningful, and to
19831 # report actual input values of CONFIG_FILES etc. instead of their
19832 # values after options handling.
19833 ac_log="
19834 This file was extended by PostgreSQL $as_me 17devel, which was
19835 generated by GNU Autoconf 2.69. Invocation command line was
19837 CONFIG_FILES = $CONFIG_FILES
19838 CONFIG_HEADERS = $CONFIG_HEADERS
19839 CONFIG_LINKS = $CONFIG_LINKS
19840 CONFIG_COMMANDS = $CONFIG_COMMANDS
19841 $ $0 $@
19843 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19846 _ACEOF
19848 case $ac_config_files in *"
19849 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19850 esac
19852 case $ac_config_headers in *"
19853 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19854 esac
19857 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19858 # Files that config.status was made for.
19859 config_files="$ac_config_files"
19860 config_headers="$ac_config_headers"
19861 config_links="$ac_config_links"
19862 config_commands="$ac_config_commands"
19864 _ACEOF
19866 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19867 ac_cs_usage="\
19868 \`$as_me' instantiates files and other configuration actions
19869 from templates according to the current configuration. Unless the files
19870 and actions are specified as TAGs, all are instantiated by default.
19872 Usage: $0 [OPTION]... [TAG]...
19874 -h, --help print this help, then exit
19875 -V, --version print version number and configuration settings, then exit
19876 --config print configuration, then exit
19877 -q, --quiet, --silent
19878 do not print progress messages
19879 -d, --debug don't remove temporary files
19880 --recheck update $as_me by reconfiguring in the same conditions
19881 --file=FILE[:TEMPLATE]
19882 instantiate the configuration file FILE
19883 --header=FILE[:TEMPLATE]
19884 instantiate the configuration header FILE
19886 Configuration files:
19887 $config_files
19889 Configuration headers:
19890 $config_headers
19892 Configuration links:
19893 $config_links
19895 Configuration commands:
19896 $config_commands
19898 Report bugs to <pgsql-bugs@lists.postgresql.org>.
19899 PostgreSQL home page: <https://www.postgresql.org/>."
19901 _ACEOF
19902 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19903 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19904 ac_cs_version="\\
19905 PostgreSQL config.status 17devel
19906 configured by $0, generated by GNU Autoconf 2.69,
19907 with options \\"\$ac_cs_config\\"
19909 Copyright (C) 2012 Free Software Foundation, Inc.
19910 This config.status script is free software; the Free Software Foundation
19911 gives unlimited permission to copy, distribute and modify it."
19913 ac_pwd='$ac_pwd'
19914 srcdir='$srcdir'
19915 INSTALL='$INSTALL'
19916 MKDIR_P='$MKDIR_P'
19917 AWK='$AWK'
19918 test -n "\$AWK" || AWK=awk
19919 _ACEOF
19921 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19922 # The default lists apply if the user does not specify any file.
19923 ac_need_defaults=:
19924 while test $# != 0
19926 case $1 in
19927 --*=?*)
19928 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19929 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19930 ac_shift=:
19932 --*=)
19933 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19934 ac_optarg=
19935 ac_shift=:
19938 ac_option=$1
19939 ac_optarg=$2
19940 ac_shift=shift
19942 esac
19944 case $ac_option in
19945 # Handling of the options.
19946 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19947 ac_cs_recheck=: ;;
19948 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19949 $as_echo "$ac_cs_version"; exit ;;
19950 --config | --confi | --conf | --con | --co | --c )
19951 $as_echo "$ac_cs_config"; exit ;;
19952 --debug | --debu | --deb | --de | --d | -d )
19953 debug=: ;;
19954 --file | --fil | --fi | --f )
19955 $ac_shift
19956 case $ac_optarg in
19957 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19958 '') as_fn_error $? "missing file argument" ;;
19959 esac
19960 as_fn_append CONFIG_FILES " '$ac_optarg'"
19961 ac_need_defaults=false;;
19962 --header | --heade | --head | --hea )
19963 $ac_shift
19964 case $ac_optarg in
19965 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19966 esac
19967 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19968 ac_need_defaults=false;;
19969 --he | --h)
19970 # Conflict between --help and --header
19971 as_fn_error $? "ambiguous option: \`$1'
19972 Try \`$0 --help' for more information.";;
19973 --help | --hel | -h )
19974 $as_echo "$ac_cs_usage"; exit ;;
19975 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19976 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19977 ac_cs_silent=: ;;
19979 # This is an error.
19980 -*) as_fn_error $? "unrecognized option: \`$1'
19981 Try \`$0 --help' for more information." ;;
19983 *) as_fn_append ac_config_targets " $1"
19984 ac_need_defaults=false ;;
19986 esac
19987 shift
19988 done
19990 ac_configure_extra_args=
19992 if $ac_cs_silent; then
19993 exec 6>/dev/null
19994 ac_configure_extra_args="$ac_configure_extra_args --silent"
19997 _ACEOF
19998 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19999 if \$ac_cs_recheck; then
20000 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20001 shift
20002 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20003 CONFIG_SHELL='$SHELL'
20004 export CONFIG_SHELL
20005 exec "\$@"
20008 _ACEOF
20009 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20010 exec 5>>config.log
20012 echo
20013 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20014 ## Running $as_me. ##
20015 _ASBOX
20016 $as_echo "$ac_log"
20017 } >&5
20019 _ACEOF
20020 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20021 _ACEOF
20023 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20025 # Handling of arguments.
20026 for ac_config_target in $ac_config_targets
20028 case $ac_config_target in
20029 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
20030 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
20031 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
20032 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
20033 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
20034 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
20035 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
20036 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
20037 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
20038 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
20039 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
20041 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20042 esac
20043 done
20046 # If the user did not use the arguments to specify the items to instantiate,
20047 # then the envvar interface is used. Set only those that are not.
20048 # We use the long form for the default assignment because of an extremely
20049 # bizarre bug on SunOS 4.1.3.
20050 if $ac_need_defaults; then
20051 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20052 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20053 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20054 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20057 # Have a temporary directory for convenience. Make it in the build tree
20058 # simply because there is no reason against having it here, and in addition,
20059 # creating and moving files from /tmp can sometimes cause problems.
20060 # Hook for its removal unless debugging.
20061 # Note that there is a small window in which the directory will not be cleaned:
20062 # after its creation but before its name has been assigned to `$tmp'.
20063 $debug ||
20065 tmp= ac_tmp=
20066 trap 'exit_status=$?
20067 : "${ac_tmp:=$tmp}"
20068 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20070 trap 'as_fn_exit 1' 1 2 13 15
20072 # Create a (secure) tmp directory for tmp files.
20075 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20076 test -d "$tmp"
20077 } ||
20079 tmp=./conf$$-$RANDOM
20080 (umask 077 && mkdir "$tmp")
20081 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20082 ac_tmp=$tmp
20084 # Set up the scripts for CONFIG_FILES section.
20085 # No need to generate them if there are no CONFIG_FILES.
20086 # This happens for instance with `./config.status config.h'.
20087 if test -n "$CONFIG_FILES"; then
20090 ac_cr=`echo X | tr X '\015'`
20091 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20092 # But we know of no other shell where ac_cr would be empty at this
20093 # point, so we can use a bashism as a fallback.
20094 if test "x$ac_cr" = x; then
20095 eval ac_cr=\$\'\\r\'
20097 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20098 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20099 ac_cs_awk_cr='\\r'
20100 else
20101 ac_cs_awk_cr=$ac_cr
20104 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20105 _ACEOF
20109 echo "cat >conf$$subs.awk <<_ACEOF" &&
20110 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20111 echo "_ACEOF"
20112 } >conf$$subs.sh ||
20113 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20114 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20115 ac_delim='%!_!# '
20116 for ac_last_try in false false false false false :; do
20117 . ./conf$$subs.sh ||
20118 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20120 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20121 if test $ac_delim_n = $ac_delim_num; then
20122 break
20123 elif $ac_last_try; then
20124 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20125 else
20126 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20128 done
20129 rm -f conf$$subs.sh
20131 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20132 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20133 _ACEOF
20134 sed -n '
20136 s/^/S["/; s/!.*/"]=/
20139 s/^[^!]*!//
20140 :repl
20141 t repl
20142 s/'"$ac_delim"'$//
20143 t delim
20146 s/\(.\{148\}\)..*/\1/
20147 t more1
20148 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20151 b repl
20152 :more1
20153 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20156 s/.\{148\}//
20157 t nl
20158 :delim
20160 s/\(.\{148\}\)..*/\1/
20161 t more2
20162 s/["\\]/\\&/g; s/^/"/; s/$/"/
20165 :more2
20166 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20169 s/.\{148\}//
20170 t delim
20171 ' <conf$$subs.awk | sed '
20172 /^[^""]/{
20174 s/\n//
20176 ' >>$CONFIG_STATUS || ac_write_fail=1
20177 rm -f conf$$subs.awk
20178 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20179 _ACAWK
20180 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20181 for (key in S) S_is_set[key] = 1
20182 FS = "\a"
20186 line = $ 0
20187 nfields = split(line, field, "@")
20188 substed = 0
20189 len = length(field[1])
20190 for (i = 2; i < nfields; i++) {
20191 key = field[i]
20192 keylen = length(key)
20193 if (S_is_set[key]) {
20194 value = S[key]
20195 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20196 len += length(value) + length(field[++i])
20197 substed = 1
20198 } else
20199 len += 1 + keylen
20202 print line
20205 _ACAWK
20206 _ACEOF
20207 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20208 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20209 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20210 else
20212 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20213 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20214 _ACEOF
20216 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20217 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20218 # trailing colons and then remove the whole line if VPATH becomes empty
20219 # (actually we leave an empty line to preserve line numbers).
20220 if test "x$srcdir" = x.; then
20221 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20223 s///
20224 s/^/:/
20225 s/[ ]*$/:/
20226 s/:\$(srcdir):/:/g
20227 s/:\${srcdir}:/:/g
20228 s/:@srcdir@:/:/g
20229 s/^:*//
20230 s/:*$//
20232 s/\(=[ ]*\).*/\1/
20234 s/\n//
20235 s/^[^=]*=[ ]*$//
20239 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20240 fi # test -n "$CONFIG_FILES"
20242 # Set up the scripts for CONFIG_HEADERS section.
20243 # No need to generate them if there are no CONFIG_HEADERS.
20244 # This happens for instance with `./config.status Makefile'.
20245 if test -n "$CONFIG_HEADERS"; then
20246 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20247 BEGIN {
20248 _ACEOF
20250 # Transform confdefs.h into an awk script `defines.awk', embedded as
20251 # here-document in config.status, that substitutes the proper values into
20252 # config.h.in to produce config.h.
20254 # Create a delimiter string that does not exist in confdefs.h, to ease
20255 # handling of long lines.
20256 ac_delim='%!_!# '
20257 for ac_last_try in false false :; do
20258 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20259 if test -z "$ac_tt"; then
20260 break
20261 elif $ac_last_try; then
20262 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20263 else
20264 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20266 done
20268 # For the awk script, D is an array of macro values keyed by name,
20269 # likewise P contains macro parameters if any. Preserve backslash
20270 # newline sequences.
20272 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20273 sed -n '
20274 s/.\{148\}/&'"$ac_delim"'/g
20275 t rset
20276 :rset
20277 s/^[ ]*#[ ]*define[ ][ ]*/ /
20278 t def
20280 :def
20281 s/\\$//
20282 t bsnl
20283 s/["\\]/\\&/g
20284 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20285 D["\1"]=" \3"/p
20286 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20288 :bsnl
20289 s/["\\]/\\&/g
20290 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20291 D["\1"]=" \3\\\\\\n"\\/p
20292 t cont
20293 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20294 t cont
20296 :cont
20298 s/.\{148\}/&'"$ac_delim"'/g
20299 t clear
20300 :clear
20301 s/\\$//
20302 t bsnlc
20303 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20305 :bsnlc
20306 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20307 b cont
20308 ' <confdefs.h | sed '
20309 s/'"$ac_delim"'/"\\\
20310 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20312 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20313 for (key in D) D_is_set[key] = 1
20314 FS = "\a"
20316 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20317 line = \$ 0
20318 split(line, arg, " ")
20319 if (arg[1] == "#") {
20320 defundef = arg[2]
20321 mac1 = arg[3]
20322 } else {
20323 defundef = substr(arg[1], 2)
20324 mac1 = arg[2]
20326 split(mac1, mac2, "(") #)
20327 macro = mac2[1]
20328 prefix = substr(line, 1, index(line, defundef) - 1)
20329 if (D_is_set[macro]) {
20330 # Preserve the white space surrounding the "#".
20331 print prefix "define", macro P[macro] D[macro]
20332 next
20333 } else {
20334 # Replace #undef with comments. This is necessary, for example,
20335 # in the case of _POSIX_SOURCE, which is predefined and required
20336 # on some systems where configure will not decide to define it.
20337 if (defundef == "undef") {
20338 print "/*", prefix defundef, macro, "*/"
20339 next
20343 { print }
20344 _ACAWK
20345 _ACEOF
20346 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20347 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20348 fi # test -n "$CONFIG_HEADERS"
20351 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20352 shift
20353 for ac_tag
20355 case $ac_tag in
20356 :[FHLC]) ac_mode=$ac_tag; continue;;
20357 esac
20358 case $ac_mode$ac_tag in
20359 :[FHL]*:*);;
20360 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20361 :[FH]-) ac_tag=-:-;;
20362 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20363 esac
20364 ac_save_IFS=$IFS
20365 IFS=:
20366 set x $ac_tag
20367 IFS=$ac_save_IFS
20368 shift
20369 ac_file=$1
20370 shift
20372 case $ac_mode in
20373 :L) ac_source=$1;;
20374 :[FH])
20375 ac_file_inputs=
20376 for ac_f
20378 case $ac_f in
20379 -) ac_f="$ac_tmp/stdin";;
20380 *) # Look for the file first in the build tree, then in the source tree
20381 # (if the path is not absolute). The absolute path cannot be DOS-style,
20382 # because $ac_f cannot contain `:'.
20383 test -f "$ac_f" ||
20384 case $ac_f in
20385 [\\/$]*) false;;
20386 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20387 esac ||
20388 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20389 esac
20390 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20391 as_fn_append ac_file_inputs " '$ac_f'"
20392 done
20394 # Let's still pretend it is `configure' which instantiates (i.e., don't
20395 # use $as_me), people would be surprised to read:
20396 # /* config.h. Generated by config.status. */
20397 configure_input='Generated from '`
20398 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20399 `' by configure.'
20400 if test x"$ac_file" != x-; then
20401 configure_input="$ac_file. $configure_input"
20402 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20403 $as_echo "$as_me: creating $ac_file" >&6;}
20405 # Neutralize special characters interpreted by sed in replacement strings.
20406 case $configure_input in #(
20407 *\&* | *\|* | *\\* )
20408 ac_sed_conf_input=`$as_echo "$configure_input" |
20409 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20410 *) ac_sed_conf_input=$configure_input;;
20411 esac
20413 case $ac_tag in
20414 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20415 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20416 esac
20418 esac
20420 ac_dir=`$as_dirname -- "$ac_file" ||
20421 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20422 X"$ac_file" : 'X\(//\)[^/]' \| \
20423 X"$ac_file" : 'X\(//\)$' \| \
20424 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20425 $as_echo X"$ac_file" |
20426 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20427 s//\1/
20430 /^X\(\/\/\)[^/].*/{
20431 s//\1/
20434 /^X\(\/\/\)$/{
20435 s//\1/
20438 /^X\(\/\).*/{
20439 s//\1/
20442 s/.*/./; q'`
20443 as_dir="$ac_dir"; as_fn_mkdir_p
20444 ac_builddir=.
20446 case "$ac_dir" in
20447 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20449 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20450 # A ".." for each directory in $ac_dir_suffix.
20451 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20452 case $ac_top_builddir_sub in
20453 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20454 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20455 esac ;;
20456 esac
20457 ac_abs_top_builddir=$ac_pwd
20458 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20459 # for backward compatibility:
20460 ac_top_builddir=$ac_top_build_prefix
20462 case $srcdir in
20463 .) # We are building in place.
20464 ac_srcdir=.
20465 ac_top_srcdir=$ac_top_builddir_sub
20466 ac_abs_top_srcdir=$ac_pwd ;;
20467 [\\/]* | ?:[\\/]* ) # Absolute name.
20468 ac_srcdir=$srcdir$ac_dir_suffix;
20469 ac_top_srcdir=$srcdir
20470 ac_abs_top_srcdir=$srcdir ;;
20471 *) # Relative name.
20472 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20473 ac_top_srcdir=$ac_top_build_prefix$srcdir
20474 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20475 esac
20476 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20479 case $ac_mode in
20482 # CONFIG_FILE
20485 case $INSTALL in
20486 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20487 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20488 esac
20489 ac_MKDIR_P=$MKDIR_P
20490 case $MKDIR_P in
20491 [\\/$]* | ?:[\\/]* ) ;;
20492 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20493 esac
20494 _ACEOF
20496 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20497 # If the template does not know about datarootdir, expand it.
20498 # FIXME: This hack should be removed a few years after 2.60.
20499 ac_datarootdir_hack=; ac_datarootdir_seen=
20500 ac_sed_dataroot='
20501 /datarootdir/ {
20505 /@datadir@/p
20506 /@docdir@/p
20507 /@infodir@/p
20508 /@localedir@/p
20509 /@mandir@/p'
20510 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20511 *datarootdir*) ac_datarootdir_seen=yes;;
20512 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20513 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20514 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20515 _ACEOF
20516 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20517 ac_datarootdir_hack='
20518 s&@datadir@&$datadir&g
20519 s&@docdir@&$docdir&g
20520 s&@infodir@&$infodir&g
20521 s&@localedir@&$localedir&g
20522 s&@mandir@&$mandir&g
20523 s&\\\${datarootdir}&$datarootdir&g' ;;
20524 esac
20525 _ACEOF
20527 # Neutralize VPATH when `$srcdir' = `.'.
20528 # Shell code in configure.ac might set extrasub.
20529 # FIXME: do we really want to maintain this feature?
20530 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20531 ac_sed_extra="$ac_vpsub
20532 $extrasub
20533 _ACEOF
20534 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20536 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20537 s|@configure_input@|$ac_sed_conf_input|;t t
20538 s&@top_builddir@&$ac_top_builddir_sub&;t t
20539 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20540 s&@srcdir@&$ac_srcdir&;t t
20541 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20542 s&@top_srcdir@&$ac_top_srcdir&;t t
20543 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20544 s&@builddir@&$ac_builddir&;t t
20545 s&@abs_builddir@&$ac_abs_builddir&;t t
20546 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20547 s&@INSTALL@&$ac_INSTALL&;t t
20548 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20549 $ac_datarootdir_hack
20551 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20552 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20554 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20555 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20556 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20557 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20558 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20559 which seems to be undefined. Please make sure it is defined" >&5
20560 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20561 which seems to be undefined. Please make sure it is defined" >&2;}
20563 rm -f "$ac_tmp/stdin"
20564 case $ac_file in
20565 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20566 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20567 esac \
20568 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20572 # CONFIG_HEADER
20574 if test x"$ac_file" != x-; then
20576 $as_echo "/* $configure_input */" \
20577 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20578 } >"$ac_tmp/config.h" \
20579 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20580 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20581 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20582 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20583 else
20584 rm -f "$ac_file"
20585 mv "$ac_tmp/config.h" "$ac_file" \
20586 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20588 else
20589 $as_echo "/* $configure_input */" \
20590 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20591 || as_fn_error $? "could not create -" "$LINENO" 5
20596 # CONFIG_LINK
20599 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20601 else
20602 # Prefer the file from the source tree if names are identical.
20603 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20604 ac_source=$srcdir/$ac_source
20607 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20608 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20610 if test ! -r "$ac_source"; then
20611 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20613 rm -f "$ac_file"
20615 # Try a relative symlink, then a hard link, then a copy.
20616 case $ac_source in
20617 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20618 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20619 esac
20620 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20621 ln "$ac_source" "$ac_file" 2>/dev/null ||
20622 cp -p "$ac_source" "$ac_file" ||
20623 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20626 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20627 $as_echo "$as_me: executing $ac_file commands" >&6;}
20629 esac
20632 case $ac_file$ac_mode in
20633 "check_win32_symlinks":C)
20634 # Links sometimes fail undetected on Mingw -
20635 # so here we detect it and warn the user
20636 for FILE in $CONFIG_LINKS
20638 # test -e works for symlinks in the MinGW console
20639 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20640 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20641 done
20643 "src/include/pg_config.h":H)
20644 # Update timestamp for pg_config.h (see Makefile.global)
20645 echo >src/include/stamp-h
20647 "src/include/pg_config_ext.h":H)
20648 # Update timestamp for pg_config_ext.h (see Makefile.global)
20649 echo >src/include/stamp-ext-h
20651 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20653 esac
20654 done # for ac_tag
20657 as_fn_exit 0
20658 _ACEOF
20659 ac_clean_files=$ac_clean_files_save
20661 test $ac_write_fail = 0 ||
20662 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20665 # configure is writing to config.log, and then calls config.status.
20666 # config.status does its own redirection, appending to config.log.
20667 # Unfortunately, on DOS this fails, as config.log is still kept open
20668 # by configure, so config.status won't be able to write to it; its
20669 # output is simply discarded. So we exec the FD to /dev/null,
20670 # effectively closing config.log, so it can be properly (re)opened and
20671 # appended to by config.status. When coming back to configure, we
20672 # need to make the FD available again.
20673 if test "$no_create" != yes; then
20674 ac_cs_success=:
20675 ac_config_status_args=
20676 test "$silent" = yes &&
20677 ac_config_status_args="$ac_config_status_args --quiet"
20678 exec 5>/dev/null
20679 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20680 exec 5>>config.log
20681 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20682 # would make configure fail if this is the last instruction.
20683 $ac_cs_success || as_fn_exit 1
20685 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20686 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20687 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20691 # Ensure that any meson build directories would reconfigure and see that
20692 # there's a conflicting in-tree build and can error out.
20693 if test "$vpath_build"="no"; then
20694 touch meson.build