doc: clarify pg_dump --no-comments meaning as SQL comments
[pgsql.git] / configure
blobf58eae1baa8aac665524b3c5c2cd36c1d560d66a
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 18devel.
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='18devel'
586 PACKAGE_STRING='PostgreSQL 18devel'
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 autodepend
726 PKG_CONFIG_LIBDIR
727 PKG_CONFIG_PATH
728 PKG_CONFIG
729 DLSUFFIX
733 CFLAGS_SL
734 BITCODE_CXXFLAGS
735 BITCODE_CFLAGS
736 CXXFLAGS_SL_MODULE
737 CFLAGS_SL_MODULE
738 CFLAGS_VECTORIZE
739 CFLAGS_UNROLL_LOOPS
740 PERMIT_MISSING_VARIABLE_DECLARATIONS
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 PG_TEST_EXTRA
764 enable_tap_tests
765 enable_dtrace
766 DTRACEFLAGS
767 DTRACE
768 enable_coverage
769 GENHTML
770 LCOV
771 GCOV
772 enable_debug
773 enable_rpath
774 default_port
775 WANTED_LANGUAGES
776 enable_nls
777 PORTNAME
778 host_os
779 host_vendor
780 host_cpu
781 host
782 build_os
783 build_vendor
784 build_cpu
785 build
786 PG_MAJORVERSION
787 target_alias
788 host_alias
789 build_alias
790 LIBS
791 ECHO_T
792 ECHO_N
793 ECHO_C
794 DEFS
795 mandir
796 localedir
797 libdir
798 psdir
799 pdfdir
800 dvidir
801 htmldir
802 infodir
803 docdir
804 oldincludedir
805 includedir
806 localstatedir
807 sharedstatedir
808 sysconfdir
809 datadir
810 datarootdir
811 libexecdir
812 sbindir
813 bindir
814 program_transform_name
815 prefix
816 exec_prefix
817 PACKAGE_URL
818 PACKAGE_BUGREPORT
819 PACKAGE_STRING
820 PACKAGE_VERSION
821 PACKAGE_TARNAME
822 PACKAGE_NAME
823 PATH_SEPARATOR
824 SHELL'
825 ac_subst_files=''
826 ac_user_opts='
827 enable_option_checking
828 with_extra_version
829 with_template
830 with_includes
831 with_libraries
832 with_libs
833 enable_integer_datetimes
834 enable_nls
835 with_pgport
836 enable_rpath
837 enable_debug
838 enable_profiling
839 enable_coverage
840 enable_dtrace
841 enable_tap_tests
842 enable_injection_points
843 with_blocksize
844 with_segsize
845 with_segsize_blocks
846 with_wal_blocksize
847 with_llvm
848 enable_depend
849 enable_cassert
850 with_icu
851 with_tcl
852 with_tclconfig
853 with_perl
854 with_python
855 with_gssapi
856 with_krb_srvnam
857 with_pam
858 with_bsd_auth
859 with_ldap
860 with_bonjour
861 with_selinux
862 with_systemd
863 with_readline
864 with_libedit_preferred
865 with_uuid
866 with_ossp_uuid
867 with_libxml
868 with_libxslt
869 with_system_tzdata
870 with_zlib
871 with_lz4
872 with_zstd
873 with_ssl
874 with_openssl
875 enable_largefile
877 ac_precious_vars='build_alias
878 host_alias
879 target_alias
880 PG_TEST_EXTRA
882 CFLAGS
883 LDFLAGS
884 LIBS
885 CPPFLAGS
887 CXXFLAGS
889 LLVM_CONFIG
890 CLANG
892 PKG_CONFIG
893 PKG_CONFIG_PATH
894 PKG_CONFIG_LIBDIR
895 ICU_CFLAGS
896 ICU_LIBS
897 XML2_CONFIG
898 XML2_CFLAGS
899 XML2_LIBS
900 LZ4_CFLAGS
901 LZ4_LIBS
902 ZSTD_CFLAGS
903 ZSTD_LIBS
904 LDFLAGS_EX
905 LDFLAGS_SL
906 PERL
907 PYTHON
908 MSGFMT
909 TCLSH'
912 # Initialize some variables set by options.
913 ac_init_help=
914 ac_init_version=false
915 ac_unrecognized_opts=
916 ac_unrecognized_sep=
917 # The variables have the same names as the options, with
918 # dashes changed to underlines.
919 cache_file=/dev/null
920 exec_prefix=NONE
921 no_create=
922 no_recursion=
923 prefix=NONE
924 program_prefix=NONE
925 program_suffix=NONE
926 program_transform_name=s,x,x,
927 silent=
928 site=
929 srcdir=
930 verbose=
931 x_includes=NONE
932 x_libraries=NONE
934 # Installation directory options.
935 # These are left unexpanded so users can "make install exec_prefix=/foo"
936 # and all the variables that are supposed to be based on exec_prefix
937 # by default will actually change.
938 # Use braces instead of parens because sh, perl, etc. also accept them.
939 # (The list follows the same order as the GNU Coding Standards.)
940 bindir='${exec_prefix}/bin'
941 sbindir='${exec_prefix}/sbin'
942 libexecdir='${exec_prefix}/libexec'
943 datarootdir='${prefix}/share'
944 datadir='${datarootdir}'
945 sysconfdir='${prefix}/etc'
946 sharedstatedir='${prefix}/com'
947 localstatedir='${prefix}/var'
948 includedir='${prefix}/include'
949 oldincludedir='/usr/include'
950 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
951 infodir='${datarootdir}/info'
952 htmldir='${docdir}'
953 dvidir='${docdir}'
954 pdfdir='${docdir}'
955 psdir='${docdir}'
956 libdir='${exec_prefix}/lib'
957 localedir='${datarootdir}/locale'
958 mandir='${datarootdir}/man'
960 ac_prev=
961 ac_dashdash=
962 for ac_option
964 # If the previous option needs an argument, assign it.
965 if test -n "$ac_prev"; then
966 eval $ac_prev=\$ac_option
967 ac_prev=
968 continue
971 case $ac_option in
972 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
973 *=) ac_optarg= ;;
974 *) ac_optarg=yes ;;
975 esac
977 # Accept the important Cygnus configure options, so we can diagnose typos.
979 case $ac_dashdash$ac_option in
981 ac_dashdash=yes ;;
983 -bindir | --bindir | --bindi | --bind | --bin | --bi)
984 ac_prev=bindir ;;
985 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
986 bindir=$ac_optarg ;;
988 -build | --build | --buil | --bui | --bu)
989 ac_prev=build_alias ;;
990 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
991 build_alias=$ac_optarg ;;
993 -cache-file | --cache-file | --cache-fil | --cache-fi \
994 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
995 ac_prev=cache_file ;;
996 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
997 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
998 cache_file=$ac_optarg ;;
1000 --config-cache | -C)
1001 cache_file=config.cache ;;
1003 -datadir | --datadir | --datadi | --datad)
1004 ac_prev=datadir ;;
1005 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1006 datadir=$ac_optarg ;;
1008 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1009 | --dataroo | --dataro | --datar)
1010 ac_prev=datarootdir ;;
1011 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1012 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1013 datarootdir=$ac_optarg ;;
1015 -disable-* | --disable-*)
1016 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1017 # Reject names that are not valid shell variable names.
1018 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1019 as_fn_error $? "invalid feature name: $ac_useropt"
1020 ac_useropt_orig=$ac_useropt
1021 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1022 case $ac_user_opts in
1024 "enable_$ac_useropt"
1025 "*) ;;
1026 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1027 ac_unrecognized_sep=', ';;
1028 esac
1029 eval enable_$ac_useropt=no ;;
1031 -docdir | --docdir | --docdi | --doc | --do)
1032 ac_prev=docdir ;;
1033 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1034 docdir=$ac_optarg ;;
1036 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1037 ac_prev=dvidir ;;
1038 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1039 dvidir=$ac_optarg ;;
1041 -enable-* | --enable-*)
1042 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1043 # Reject names that are not valid shell variable names.
1044 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1045 as_fn_error $? "invalid feature name: $ac_useropt"
1046 ac_useropt_orig=$ac_useropt
1047 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1048 case $ac_user_opts in
1050 "enable_$ac_useropt"
1051 "*) ;;
1052 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1053 ac_unrecognized_sep=', ';;
1054 esac
1055 eval enable_$ac_useropt=\$ac_optarg ;;
1057 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1058 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1059 | --exec | --exe | --ex)
1060 ac_prev=exec_prefix ;;
1061 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1062 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1063 | --exec=* | --exe=* | --ex=*)
1064 exec_prefix=$ac_optarg ;;
1066 -gas | --gas | --ga | --g)
1067 # Obsolete; use --with-gas.
1068 with_gas=yes ;;
1070 -help | --help | --hel | --he | -h)
1071 ac_init_help=long ;;
1072 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1073 ac_init_help=recursive ;;
1074 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1075 ac_init_help=short ;;
1077 -host | --host | --hos | --ho)
1078 ac_prev=host_alias ;;
1079 -host=* | --host=* | --hos=* | --ho=*)
1080 host_alias=$ac_optarg ;;
1082 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1083 ac_prev=htmldir ;;
1084 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1085 | --ht=*)
1086 htmldir=$ac_optarg ;;
1088 -includedir | --includedir | --includedi | --included | --include \
1089 | --includ | --inclu | --incl | --inc)
1090 ac_prev=includedir ;;
1091 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1092 | --includ=* | --inclu=* | --incl=* | --inc=*)
1093 includedir=$ac_optarg ;;
1095 -infodir | --infodir | --infodi | --infod | --info | --inf)
1096 ac_prev=infodir ;;
1097 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1098 infodir=$ac_optarg ;;
1100 -libdir | --libdir | --libdi | --libd)
1101 ac_prev=libdir ;;
1102 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1103 libdir=$ac_optarg ;;
1105 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1106 | --libexe | --libex | --libe)
1107 ac_prev=libexecdir ;;
1108 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1109 | --libexe=* | --libex=* | --libe=*)
1110 libexecdir=$ac_optarg ;;
1112 -localedir | --localedir | --localedi | --localed | --locale)
1113 ac_prev=localedir ;;
1114 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1115 localedir=$ac_optarg ;;
1117 -localstatedir | --localstatedir | --localstatedi | --localstated \
1118 | --localstate | --localstat | --localsta | --localst | --locals)
1119 ac_prev=localstatedir ;;
1120 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1121 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1122 localstatedir=$ac_optarg ;;
1124 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1125 ac_prev=mandir ;;
1126 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1127 mandir=$ac_optarg ;;
1129 -nfp | --nfp | --nf)
1130 # Obsolete; use --without-fp.
1131 with_fp=no ;;
1133 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1134 | --no-cr | --no-c | -n)
1135 no_create=yes ;;
1137 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1138 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1139 no_recursion=yes ;;
1141 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1142 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1143 | --oldin | --oldi | --old | --ol | --o)
1144 ac_prev=oldincludedir ;;
1145 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1146 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1147 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1148 oldincludedir=$ac_optarg ;;
1150 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1151 ac_prev=prefix ;;
1152 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1153 prefix=$ac_optarg ;;
1155 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1156 | --program-pre | --program-pr | --program-p)
1157 ac_prev=program_prefix ;;
1158 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1159 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1160 program_prefix=$ac_optarg ;;
1162 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1163 | --program-suf | --program-su | --program-s)
1164 ac_prev=program_suffix ;;
1165 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1166 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1167 program_suffix=$ac_optarg ;;
1169 -program-transform-name | --program-transform-name \
1170 | --program-transform-nam | --program-transform-na \
1171 | --program-transform-n | --program-transform- \
1172 | --program-transform | --program-transfor \
1173 | --program-transfo | --program-transf \
1174 | --program-trans | --program-tran \
1175 | --progr-tra | --program-tr | --program-t)
1176 ac_prev=program_transform_name ;;
1177 -program-transform-name=* | --program-transform-name=* \
1178 | --program-transform-nam=* | --program-transform-na=* \
1179 | --program-transform-n=* | --program-transform-=* \
1180 | --program-transform=* | --program-transfor=* \
1181 | --program-transfo=* | --program-transf=* \
1182 | --program-trans=* | --program-tran=* \
1183 | --progr-tra=* | --program-tr=* | --program-t=*)
1184 program_transform_name=$ac_optarg ;;
1186 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1187 ac_prev=pdfdir ;;
1188 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1189 pdfdir=$ac_optarg ;;
1191 -psdir | --psdir | --psdi | --psd | --ps)
1192 ac_prev=psdir ;;
1193 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1194 psdir=$ac_optarg ;;
1196 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1197 | -silent | --silent | --silen | --sile | --sil)
1198 silent=yes ;;
1200 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1201 ac_prev=sbindir ;;
1202 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1203 | --sbi=* | --sb=*)
1204 sbindir=$ac_optarg ;;
1206 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1207 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1208 | --sharedst | --shareds | --shared | --share | --shar \
1209 | --sha | --sh)
1210 ac_prev=sharedstatedir ;;
1211 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1212 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1213 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1214 | --sha=* | --sh=*)
1215 sharedstatedir=$ac_optarg ;;
1217 -site | --site | --sit)
1218 ac_prev=site ;;
1219 -site=* | --site=* | --sit=*)
1220 site=$ac_optarg ;;
1222 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1223 ac_prev=srcdir ;;
1224 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1225 srcdir=$ac_optarg ;;
1227 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1228 | --syscon | --sysco | --sysc | --sys | --sy)
1229 ac_prev=sysconfdir ;;
1230 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1231 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1232 sysconfdir=$ac_optarg ;;
1234 -target | --target | --targe | --targ | --tar | --ta | --t)
1235 ac_prev=target_alias ;;
1236 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1237 target_alias=$ac_optarg ;;
1239 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1240 verbose=yes ;;
1242 -version | --version | --versio | --versi | --vers | -V)
1243 ac_init_version=: ;;
1245 -with-* | --with-*)
1246 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1247 # Reject names that are not valid shell variable names.
1248 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1249 as_fn_error $? "invalid package name: $ac_useropt"
1250 ac_useropt_orig=$ac_useropt
1251 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1252 case $ac_user_opts in
1254 "with_$ac_useropt"
1255 "*) ;;
1256 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1257 ac_unrecognized_sep=', ';;
1258 esac
1259 eval with_$ac_useropt=\$ac_optarg ;;
1261 -without-* | --without-*)
1262 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1263 # Reject names that are not valid shell variable names.
1264 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1265 as_fn_error $? "invalid package name: $ac_useropt"
1266 ac_useropt_orig=$ac_useropt
1267 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1268 case $ac_user_opts in
1270 "with_$ac_useropt"
1271 "*) ;;
1272 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1273 ac_unrecognized_sep=', ';;
1274 esac
1275 eval with_$ac_useropt=no ;;
1277 --x)
1278 # Obsolete; use --with-x.
1279 with_x=yes ;;
1281 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1282 | --x-incl | --x-inc | --x-in | --x-i)
1283 ac_prev=x_includes ;;
1284 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1285 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1286 x_includes=$ac_optarg ;;
1288 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1289 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1290 ac_prev=x_libraries ;;
1291 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1292 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1293 x_libraries=$ac_optarg ;;
1295 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1296 Try \`$0 --help' for more information"
1299 *=*)
1300 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1301 # Reject names that are not valid shell variable names.
1302 case $ac_envvar in #(
1303 '' | [0-9]* | *[!_$as_cr_alnum]* )
1304 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1305 esac
1306 eval $ac_envvar=\$ac_optarg
1307 export $ac_envvar ;;
1310 # FIXME: should be removed in autoconf 3.0.
1311 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1312 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1313 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1314 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1317 esac
1318 done
1320 if test -n "$ac_prev"; then
1321 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1322 as_fn_error $? "missing argument to $ac_option"
1325 if test -n "$ac_unrecognized_opts"; then
1326 case $enable_option_checking in
1327 no) ;;
1328 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1329 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1330 esac
1333 # Check all directory arguments for consistency.
1334 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1335 datadir sysconfdir sharedstatedir localstatedir includedir \
1336 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1337 libdir localedir mandir
1339 eval ac_val=\$$ac_var
1340 # Remove trailing slashes.
1341 case $ac_val in
1342 */ )
1343 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1344 eval $ac_var=\$ac_val;;
1345 esac
1346 # Be sure to have absolute directory names.
1347 case $ac_val in
1348 [\\/$]* | ?:[\\/]* ) continue;;
1349 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1350 esac
1351 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1352 done
1354 # There might be people who depend on the old broken behavior: `$host'
1355 # used to hold the argument of --host etc.
1356 # FIXME: To remove some day.
1357 build=$build_alias
1358 host=$host_alias
1359 target=$target_alias
1361 # FIXME: To remove some day.
1362 if test "x$host_alias" != x; then
1363 if test "x$build_alias" = x; then
1364 cross_compiling=maybe
1365 elif test "x$build_alias" != "x$host_alias"; then
1366 cross_compiling=yes
1370 ac_tool_prefix=
1371 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1373 test "$silent" = yes && exec 6>/dev/null
1376 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1377 ac_ls_di=`ls -di .` &&
1378 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1379 as_fn_error $? "working directory cannot be determined"
1380 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1381 as_fn_error $? "pwd does not report name of working directory"
1384 # Find the source files, if location was not specified.
1385 if test -z "$srcdir"; then
1386 ac_srcdir_defaulted=yes
1387 # Try the directory containing this script, then the parent directory.
1388 ac_confdir=`$as_dirname -- "$as_myself" ||
1389 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1390 X"$as_myself" : 'X\(//\)[^/]' \| \
1391 X"$as_myself" : 'X\(//\)$' \| \
1392 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1393 $as_echo X"$as_myself" |
1394 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1395 s//\1/
1398 /^X\(\/\/\)[^/].*/{
1399 s//\1/
1402 /^X\(\/\/\)$/{
1403 s//\1/
1406 /^X\(\/\).*/{
1407 s//\1/
1410 s/.*/./; q'`
1411 srcdir=$ac_confdir
1412 if test ! -r "$srcdir/$ac_unique_file"; then
1413 srcdir=..
1415 else
1416 ac_srcdir_defaulted=no
1418 if test ! -r "$srcdir/$ac_unique_file"; then
1419 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1420 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1422 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1423 ac_abs_confdir=`(
1424 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1425 pwd)`
1426 # When building in place, set srcdir=.
1427 if test "$ac_abs_confdir" = "$ac_pwd"; then
1428 srcdir=.
1430 # Remove unnecessary trailing slashes from srcdir.
1431 # Double slashes in file names in object file debugging info
1432 # mess up M-x gdb in Emacs.
1433 case $srcdir in
1434 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1435 esac
1436 for ac_var in $ac_precious_vars; do
1437 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1438 eval ac_env_${ac_var}_value=\$${ac_var}
1439 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1440 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1441 done
1444 # Report the --help message.
1446 if test "$ac_init_help" = "long"; then
1447 # Omit some internal or obsolete options to make the list less imposing.
1448 # This message is too long to be a string in the A/UX 3.1 sh.
1449 cat <<_ACEOF
1450 \`configure' configures PostgreSQL 18devel to adapt to many kinds of systems.
1452 Usage: $0 [OPTION]... [VAR=VALUE]...
1454 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1455 VAR=VALUE. See below for descriptions of some of the useful variables.
1457 Defaults for the options are specified in brackets.
1459 Configuration:
1460 -h, --help display this help and exit
1461 --help=short display options specific to this package
1462 --help=recursive display the short help of all the included packages
1463 -V, --version display version information and exit
1464 -q, --quiet, --silent do not print \`checking ...' messages
1465 --cache-file=FILE cache test results in FILE [disabled]
1466 -C, --config-cache alias for \`--cache-file=config.cache'
1467 -n, --no-create do not create output files
1468 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1470 Installation directories:
1471 --prefix=PREFIX install architecture-independent files in PREFIX
1472 [$ac_default_prefix]
1473 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1474 [PREFIX]
1476 By default, \`make install' will install all the files in
1477 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1478 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1479 for instance \`--prefix=\$HOME'.
1481 For better control, use the options below.
1483 Fine tuning of the installation directories:
1484 --bindir=DIR user executables [EPREFIX/bin]
1485 --sbindir=DIR system admin executables [EPREFIX/sbin]
1486 --libexecdir=DIR program executables [EPREFIX/libexec]
1487 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1488 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1489 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1490 --libdir=DIR object code libraries [EPREFIX/lib]
1491 --includedir=DIR C header files [PREFIX/include]
1492 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1493 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1494 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1495 --infodir=DIR info documentation [DATAROOTDIR/info]
1496 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1497 --mandir=DIR man documentation [DATAROOTDIR/man]
1498 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1499 --htmldir=DIR html documentation [DOCDIR]
1500 --dvidir=DIR dvi documentation [DOCDIR]
1501 --pdfdir=DIR pdf documentation [DOCDIR]
1502 --psdir=DIR ps documentation [DOCDIR]
1503 _ACEOF
1505 cat <<\_ACEOF
1507 System types:
1508 --build=BUILD configure for building on BUILD [guessed]
1509 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1510 _ACEOF
1513 if test -n "$ac_init_help"; then
1514 case $ac_init_help in
1515 short | recursive ) echo "Configuration of PostgreSQL 18devel:";;
1516 esac
1517 cat <<\_ACEOF
1519 Optional Features:
1520 --disable-option-checking ignore unrecognized --enable/--with options
1521 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1522 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1523 --disable-integer-datetimes
1524 obsolete option, no longer supported
1525 --enable-nls[=LANGUAGES]
1526 enable Native Language Support
1527 --disable-rpath do not embed shared library search path in
1528 executables
1529 --enable-debug build with debugging symbols (-g)
1530 --enable-profiling build with profiling enabled
1531 --enable-coverage build with coverage testing instrumentation
1532 --enable-dtrace build with DTrace support
1533 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1534 --enable-injection-points
1535 enable injection points (for testing)
1536 --enable-depend turn on automatic dependency tracking
1537 --enable-cassert enable assertion checks (for debugging)
1538 --disable-largefile omit support for large files
1540 Optional Packages:
1541 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1542 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1543 --with-extra-version=STRING
1544 append STRING to version
1545 --with-template=NAME override operating system template
1546 --with-includes=DIRS look for additional header files in DIRS
1547 --with-libraries=DIRS look for additional libraries in DIRS
1548 --with-libs=DIRS alternative spelling of --with-libraries
1549 --with-pgport=PORTNUM set default port number [5432]
1550 --with-blocksize=BLOCKSIZE
1551 set table block size in kB [8]
1552 --with-segsize=SEGSIZE set table segment size in GB [1]
1553 --with-segsize-blocks=SEGSIZE_BLOCKS
1554 set table segment size in blocks [0]
1555 --with-wal-blocksize=BLOCKSIZE
1556 set WAL block size in kB [8]
1557 --with-llvm build with LLVM based JIT support
1558 --without-icu build without ICU support
1559 --with-tcl build Tcl modules (PL/Tcl)
1560 --with-tclconfig=DIR tclConfig.sh is in DIR
1561 --with-perl build Perl modules (PL/Perl)
1562 --with-python build Python modules (PL/Python)
1563 --with-gssapi build with GSSAPI support
1564 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1565 [postgres]
1566 --with-pam build with PAM support
1567 --with-bsd-auth build with BSD Authentication support
1568 --with-ldap build with LDAP support
1569 --with-bonjour build with Bonjour support
1570 --with-selinux build with SELinux support
1571 --with-systemd build with systemd support
1572 --without-readline do not use GNU Readline nor BSD Libedit for editing
1573 --with-libedit-preferred
1574 prefer BSD Libedit over GNU Readline
1575 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1576 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1577 --with-libxml build with XML support
1578 --with-libxslt use XSLT support when building contrib/xml2
1579 --with-system-tzdata=DIR
1580 use system time zone data in DIR
1581 --without-zlib do not use Zlib
1582 --with-lz4 build with LZ4 support
1583 --with-zstd build with ZSTD support
1584 --with-ssl=LIB use LIB for SSL/TLS support (openssl)
1585 --with-openssl obsolete spelling of --with-ssl=openssl
1587 Some influential environment variables:
1588 PG_TEST_EXTRA
1589 enable selected extra tests (overridden at runtime by
1590 PG_TEST_EXTRA environment variable)
1591 CC C compiler command
1592 CFLAGS C compiler flags
1593 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1594 nonstandard directory <lib dir>
1595 LIBS libraries to pass to the linker, e.g. -l<library>
1596 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1597 you have headers in a nonstandard directory <include dir>
1598 CXX C++ compiler command
1599 CXXFLAGS C++ compiler flags
1600 LLVM_CONFIG path to llvm-config command
1601 CLANG path to clang compiler to generate bitcode
1602 CPP C preprocessor
1603 PKG_CONFIG path to pkg-config utility
1604 PKG_CONFIG_PATH
1605 directories to add to pkg-config's search path
1606 PKG_CONFIG_LIBDIR
1607 path overriding pkg-config's built-in search path
1608 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1609 ICU_LIBS linker flags for ICU, overriding pkg-config
1610 XML2_CONFIG path to xml2-config utility
1611 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1612 XML2_LIBS linker flags for XML2, overriding pkg-config
1613 LZ4_CFLAGS C compiler flags for LZ4, overriding pkg-config
1614 LZ4_LIBS linker flags for LZ4, overriding pkg-config
1615 ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
1616 ZSTD_LIBS linker flags for ZSTD, overriding pkg-config
1617 LDFLAGS_EX extra linker flags for linking executables only
1618 LDFLAGS_SL extra linker flags for linking shared libraries only
1619 PERL Perl program
1620 PYTHON Python program
1621 MSGFMT msgfmt program for NLS
1622 TCLSH Tcl interpreter program (tclsh)
1624 Use these variables to override the choices made by `configure' or to help
1625 it to find libraries and programs with nonstandard names/locations.
1627 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1628 PostgreSQL home page: <https://www.postgresql.org/>.
1629 _ACEOF
1630 ac_status=$?
1633 if test "$ac_init_help" = "recursive"; then
1634 # If there are subdirs, report their specific --help.
1635 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1636 test -d "$ac_dir" ||
1637 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1638 continue
1639 ac_builddir=.
1641 case "$ac_dir" in
1642 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1644 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1645 # A ".." for each directory in $ac_dir_suffix.
1646 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1647 case $ac_top_builddir_sub in
1648 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1649 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1650 esac ;;
1651 esac
1652 ac_abs_top_builddir=$ac_pwd
1653 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1654 # for backward compatibility:
1655 ac_top_builddir=$ac_top_build_prefix
1657 case $srcdir in
1658 .) # We are building in place.
1659 ac_srcdir=.
1660 ac_top_srcdir=$ac_top_builddir_sub
1661 ac_abs_top_srcdir=$ac_pwd ;;
1662 [\\/]* | ?:[\\/]* ) # Absolute name.
1663 ac_srcdir=$srcdir$ac_dir_suffix;
1664 ac_top_srcdir=$srcdir
1665 ac_abs_top_srcdir=$srcdir ;;
1666 *) # Relative name.
1667 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1668 ac_top_srcdir=$ac_top_build_prefix$srcdir
1669 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1670 esac
1671 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1673 cd "$ac_dir" || { ac_status=$?; continue; }
1674 # Check for guested configure.
1675 if test -f "$ac_srcdir/configure.gnu"; then
1676 echo &&
1677 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1678 elif test -f "$ac_srcdir/configure"; then
1679 echo &&
1680 $SHELL "$ac_srcdir/configure" --help=recursive
1681 else
1682 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1683 fi || ac_status=$?
1684 cd "$ac_pwd" || { ac_status=$?; break; }
1685 done
1688 test -n "$ac_init_help" && exit $ac_status
1689 if $ac_init_version; then
1690 cat <<\_ACEOF
1691 PostgreSQL configure 18devel
1692 generated by GNU Autoconf 2.69
1694 Copyright (C) 2012 Free Software Foundation, Inc.
1695 This configure script is free software; the Free Software Foundation
1696 gives unlimited permission to copy, distribute and modify it.
1698 Copyright (c) 1996-2024, PostgreSQL Global Development Group
1699 _ACEOF
1700 exit
1703 ## ------------------------ ##
1704 ## Autoconf initialization. ##
1705 ## ------------------------ ##
1707 # ac_fn_c_try_compile LINENO
1708 # --------------------------
1709 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1710 ac_fn_c_try_compile ()
1712 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1713 rm -f conftest.$ac_objext
1714 if { { ac_try="$ac_compile"
1715 case "(($ac_try" in
1716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1717 *) ac_try_echo=$ac_try;;
1718 esac
1719 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1720 $as_echo "$ac_try_echo"; } >&5
1721 (eval "$ac_compile") 2>conftest.err
1722 ac_status=$?
1723 if test -s conftest.err; then
1724 grep -v '^ *+' conftest.err >conftest.er1
1725 cat conftest.er1 >&5
1726 mv -f conftest.er1 conftest.err
1728 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1729 test $ac_status = 0; } && {
1730 test -z "$ac_c_werror_flag" ||
1731 test ! -s conftest.err
1732 } && test -s conftest.$ac_objext; then :
1733 ac_retval=0
1734 else
1735 $as_echo "$as_me: failed program was:" >&5
1736 sed 's/^/| /' conftest.$ac_ext >&5
1738 ac_retval=1
1740 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1741 as_fn_set_status $ac_retval
1743 } # ac_fn_c_try_compile
1745 # ac_fn_cxx_try_compile LINENO
1746 # ----------------------------
1747 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1748 ac_fn_cxx_try_compile ()
1750 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1751 rm -f conftest.$ac_objext
1752 if { { ac_try="$ac_compile"
1753 case "(($ac_try" in
1754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1755 *) ac_try_echo=$ac_try;;
1756 esac
1757 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1758 $as_echo "$ac_try_echo"; } >&5
1759 (eval "$ac_compile") 2>conftest.err
1760 ac_status=$?
1761 if test -s conftest.err; then
1762 grep -v '^ *+' conftest.err >conftest.er1
1763 cat conftest.er1 >&5
1764 mv -f conftest.er1 conftest.err
1766 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1767 test $ac_status = 0; } && {
1768 test -z "$ac_cxx_werror_flag" ||
1769 test ! -s conftest.err
1770 } && test -s conftest.$ac_objext; then :
1771 ac_retval=0
1772 else
1773 $as_echo "$as_me: failed program was:" >&5
1774 sed 's/^/| /' conftest.$ac_ext >&5
1776 ac_retval=1
1778 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1779 as_fn_set_status $ac_retval
1781 } # ac_fn_cxx_try_compile
1783 # ac_fn_c_try_link LINENO
1784 # -----------------------
1785 # Try to link conftest.$ac_ext, and return whether this succeeded.
1786 ac_fn_c_try_link ()
1788 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1789 rm -f conftest.$ac_objext conftest$ac_exeext
1790 if { { ac_try="$ac_link"
1791 case "(($ac_try" in
1792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1793 *) ac_try_echo=$ac_try;;
1794 esac
1795 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1796 $as_echo "$ac_try_echo"; } >&5
1797 (eval "$ac_link") 2>conftest.err
1798 ac_status=$?
1799 if test -s conftest.err; then
1800 grep -v '^ *+' conftest.err >conftest.er1
1801 cat conftest.er1 >&5
1802 mv -f conftest.er1 conftest.err
1804 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1805 test $ac_status = 0; } && {
1806 test -z "$ac_c_werror_flag" ||
1807 test ! -s conftest.err
1808 } && test -s conftest$ac_exeext && {
1809 test "$cross_compiling" = yes ||
1810 test -x conftest$ac_exeext
1811 }; then :
1812 ac_retval=0
1813 else
1814 $as_echo "$as_me: failed program was:" >&5
1815 sed 's/^/| /' conftest.$ac_ext >&5
1817 ac_retval=1
1819 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1820 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1821 # interfere with the next link command; also delete a directory that is
1822 # left behind by Apple's compiler. We do this before executing the actions.
1823 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1824 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1825 as_fn_set_status $ac_retval
1827 } # ac_fn_c_try_link
1829 # ac_fn_c_try_cpp LINENO
1830 # ----------------------
1831 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1832 ac_fn_c_try_cpp ()
1834 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1835 if { { ac_try="$ac_cpp conftest.$ac_ext"
1836 case "(($ac_try" in
1837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1838 *) ac_try_echo=$ac_try;;
1839 esac
1840 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1841 $as_echo "$ac_try_echo"; } >&5
1842 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1843 ac_status=$?
1844 if test -s conftest.err; then
1845 grep -v '^ *+' conftest.err >conftest.er1
1846 cat conftest.er1 >&5
1847 mv -f conftest.er1 conftest.err
1849 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1850 test $ac_status = 0; } > conftest.i && {
1851 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1852 test ! -s conftest.err
1853 }; then :
1854 ac_retval=0
1855 else
1856 $as_echo "$as_me: failed program was:" >&5
1857 sed 's/^/| /' conftest.$ac_ext >&5
1859 ac_retval=1
1861 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1862 as_fn_set_status $ac_retval
1864 } # ac_fn_c_try_cpp
1866 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1867 # -------------------------------------------------------
1868 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1869 # the include files in INCLUDES and setting the cache variable VAR
1870 # accordingly.
1871 ac_fn_c_check_header_mongrel ()
1873 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1874 if eval \${$3+:} false; then :
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1876 $as_echo_n "checking for $2... " >&6; }
1877 if eval \${$3+:} false; then :
1878 $as_echo_n "(cached) " >&6
1880 eval ac_res=\$$3
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1882 $as_echo "$ac_res" >&6; }
1883 else
1884 # Is the header compilable?
1885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1886 $as_echo_n "checking $2 usability... " >&6; }
1887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1888 /* end confdefs.h. */
1890 #include <$2>
1891 _ACEOF
1892 if ac_fn_c_try_compile "$LINENO"; then :
1893 ac_header_compiler=yes
1894 else
1895 ac_header_compiler=no
1897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1899 $as_echo "$ac_header_compiler" >&6; }
1901 # Is the header present?
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1903 $as_echo_n "checking $2 presence... " >&6; }
1904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1905 /* end confdefs.h. */
1906 #include <$2>
1907 _ACEOF
1908 if ac_fn_c_try_cpp "$LINENO"; then :
1909 ac_header_preproc=yes
1910 else
1911 ac_header_preproc=no
1913 rm -f conftest.err conftest.i conftest.$ac_ext
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1915 $as_echo "$ac_header_preproc" >&6; }
1917 # So? What about this header?
1918 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1919 yes:no: )
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1921 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1923 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1925 no:yes:* )
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1927 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1929 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1931 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1933 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1935 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1936 ( $as_echo "## ---------------------------------------------- ##
1937 ## Report this to pgsql-bugs@lists.postgresql.org ##
1938 ## ---------------------------------------------- ##"
1939 ) | sed "s/^/$as_me: WARNING: /" >&2
1941 esac
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1943 $as_echo_n "checking for $2... " >&6; }
1944 if eval \${$3+:} false; then :
1945 $as_echo_n "(cached) " >&6
1946 else
1947 eval "$3=\$ac_header_compiler"
1949 eval ac_res=\$$3
1950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1951 $as_echo "$ac_res" >&6; }
1953 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1955 } # ac_fn_c_check_header_mongrel
1957 # ac_fn_c_try_run LINENO
1958 # ----------------------
1959 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1960 # that executables *can* be run.
1961 ac_fn_c_try_run ()
1963 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1964 if { { ac_try="$ac_link"
1965 case "(($ac_try" in
1966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1967 *) ac_try_echo=$ac_try;;
1968 esac
1969 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1970 $as_echo "$ac_try_echo"; } >&5
1971 (eval "$ac_link") 2>&5
1972 ac_status=$?
1973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1974 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1975 { { case "(($ac_try" in
1976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1977 *) ac_try_echo=$ac_try;;
1978 esac
1979 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1980 $as_echo "$ac_try_echo"; } >&5
1981 (eval "$ac_try") 2>&5
1982 ac_status=$?
1983 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1984 test $ac_status = 0; }; }; then :
1985 ac_retval=0
1986 else
1987 $as_echo "$as_me: program exited with status $ac_status" >&5
1988 $as_echo "$as_me: failed program was:" >&5
1989 sed 's/^/| /' conftest.$ac_ext >&5
1991 ac_retval=$ac_status
1993 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1994 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1995 as_fn_set_status $ac_retval
1997 } # ac_fn_c_try_run
1999 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2000 # -------------------------------------------------------
2001 # Tests whether HEADER exists and can be compiled using the include files in
2002 # INCLUDES, setting the cache variable VAR accordingly.
2003 ac_fn_c_check_header_compile ()
2005 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2007 $as_echo_n "checking for $2... " >&6; }
2008 if eval \${$3+:} false; then :
2009 $as_echo_n "(cached) " >&6
2010 else
2011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012 /* end confdefs.h. */
2014 #include <$2>
2015 _ACEOF
2016 if ac_fn_c_try_compile "$LINENO"; then :
2017 eval "$3=yes"
2018 else
2019 eval "$3=no"
2021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2023 eval ac_res=\$$3
2024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2025 $as_echo "$ac_res" >&6; }
2026 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2028 } # ac_fn_c_check_header_compile
2030 # ac_fn_c_check_func LINENO FUNC VAR
2031 # ----------------------------------
2032 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2033 ac_fn_c_check_func ()
2035 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2037 $as_echo_n "checking for $2... " >&6; }
2038 if eval \${$3+:} false; then :
2039 $as_echo_n "(cached) " >&6
2040 else
2041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042 /* end confdefs.h. */
2043 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2044 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2045 #define $2 innocuous_$2
2047 /* System header to define __stub macros and hopefully few prototypes,
2048 which can conflict with char $2 (); below.
2049 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2050 <limits.h> exists even on freestanding compilers. */
2052 #ifdef __STDC__
2053 # include <limits.h>
2054 #else
2055 # include <assert.h>
2056 #endif
2058 #undef $2
2060 /* Override any GCC internal prototype to avoid an error.
2061 Use char because int might match the return type of a GCC
2062 builtin and then its argument prototype would still apply. */
2063 #ifdef __cplusplus
2064 extern "C"
2065 #endif
2066 char $2 ();
2067 /* The GNU C library defines this for functions which it implements
2068 to always fail with ENOSYS. Some functions are actually named
2069 something starting with __ and the normal name is an alias. */
2070 #if defined __stub_$2 || defined __stub___$2
2071 choke me
2072 #endif
2075 main ()
2077 return $2 ();
2079 return 0;
2081 _ACEOF
2082 if ac_fn_c_try_link "$LINENO"; then :
2083 eval "$3=yes"
2084 else
2085 eval "$3=no"
2087 rm -f core conftest.err conftest.$ac_objext \
2088 conftest$ac_exeext conftest.$ac_ext
2090 eval ac_res=\$$3
2091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2092 $as_echo "$ac_res" >&6; }
2093 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2095 } # ac_fn_c_check_func
2097 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2098 # -------------------------------------------
2099 # Tests whether TYPE exists after having included INCLUDES, setting cache
2100 # variable VAR accordingly.
2101 ac_fn_c_check_type ()
2103 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2105 $as_echo_n "checking for $2... " >&6; }
2106 if eval \${$3+:} false; then :
2107 $as_echo_n "(cached) " >&6
2108 else
2109 eval "$3=no"
2110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2111 /* end confdefs.h. */
2114 main ()
2116 if (sizeof ($2))
2117 return 0;
2119 return 0;
2121 _ACEOF
2122 if ac_fn_c_try_compile "$LINENO"; then :
2123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2124 /* end confdefs.h. */
2127 main ()
2129 if (sizeof (($2)))
2130 return 0;
2132 return 0;
2134 _ACEOF
2135 if ac_fn_c_try_compile "$LINENO"; then :
2137 else
2138 eval "$3=yes"
2140 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2144 eval ac_res=\$$3
2145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2146 $as_echo "$ac_res" >&6; }
2147 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2149 } # ac_fn_c_check_type
2151 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2152 # ----------------------------------------------------
2153 # Tries to find if the field MEMBER exists in type AGGR, after including
2154 # INCLUDES, setting cache variable VAR accordingly.
2155 ac_fn_c_check_member ()
2157 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2159 $as_echo_n "checking for $2.$3... " >&6; }
2160 if eval \${$4+:} false; then :
2161 $as_echo_n "(cached) " >&6
2162 else
2163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2164 /* end confdefs.h. */
2167 main ()
2169 static $2 ac_aggr;
2170 if (ac_aggr.$3)
2171 return 0;
2173 return 0;
2175 _ACEOF
2176 if ac_fn_c_try_compile "$LINENO"; then :
2177 eval "$4=yes"
2178 else
2179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2180 /* end confdefs.h. */
2183 main ()
2185 static $2 ac_aggr;
2186 if (sizeof ac_aggr.$3)
2187 return 0;
2189 return 0;
2191 _ACEOF
2192 if ac_fn_c_try_compile "$LINENO"; then :
2193 eval "$4=yes"
2194 else
2195 eval "$4=no"
2197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2201 eval ac_res=\$$4
2202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2203 $as_echo "$ac_res" >&6; }
2204 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2206 } # ac_fn_c_check_member
2208 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2209 # --------------------------------------------
2210 # Tries to find the compile-time value of EXPR in a program that includes
2211 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2212 # computed
2213 ac_fn_c_compute_int ()
2215 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2216 if test "$cross_compiling" = yes; then
2217 # Depending upon the size, compute the lo and hi bounds.
2218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2219 /* end confdefs.h. */
2222 main ()
2224 static int test_array [1 - 2 * !(($2) >= 0)];
2225 test_array [0] = 0;
2226 return test_array [0];
2229 return 0;
2231 _ACEOF
2232 if ac_fn_c_try_compile "$LINENO"; then :
2233 ac_lo=0 ac_mid=0
2234 while :; do
2235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2236 /* end confdefs.h. */
2239 main ()
2241 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2242 test_array [0] = 0;
2243 return test_array [0];
2246 return 0;
2248 _ACEOF
2249 if ac_fn_c_try_compile "$LINENO"; then :
2250 ac_hi=$ac_mid; break
2251 else
2252 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2253 if test $ac_lo -le $ac_mid; then
2254 ac_lo= ac_hi=
2255 break
2257 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2259 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2260 done
2261 else
2262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2263 /* end confdefs.h. */
2266 main ()
2268 static int test_array [1 - 2 * !(($2) < 0)];
2269 test_array [0] = 0;
2270 return test_array [0];
2273 return 0;
2275 _ACEOF
2276 if ac_fn_c_try_compile "$LINENO"; then :
2277 ac_hi=-1 ac_mid=-1
2278 while :; do
2279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2280 /* end confdefs.h. */
2283 main ()
2285 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2286 test_array [0] = 0;
2287 return test_array [0];
2290 return 0;
2292 _ACEOF
2293 if ac_fn_c_try_compile "$LINENO"; then :
2294 ac_lo=$ac_mid; break
2295 else
2296 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2297 if test $ac_mid -le $ac_hi; then
2298 ac_lo= ac_hi=
2299 break
2301 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2304 done
2305 else
2306 ac_lo= ac_hi=
2308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2311 # Binary search between lo and hi bounds.
2312 while test "x$ac_lo" != "x$ac_hi"; do
2313 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2315 /* end confdefs.h. */
2318 main ()
2320 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2321 test_array [0] = 0;
2322 return test_array [0];
2325 return 0;
2327 _ACEOF
2328 if ac_fn_c_try_compile "$LINENO"; then :
2329 ac_hi=$ac_mid
2330 else
2331 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2334 done
2335 case $ac_lo in #((
2336 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2337 '') ac_retval=1 ;;
2338 esac
2339 else
2340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2341 /* end confdefs.h. */
2343 static long int longval () { return $2; }
2344 static unsigned long int ulongval () { return $2; }
2345 #include <stdio.h>
2346 #include <stdlib.h>
2348 main ()
2351 FILE *f = fopen ("conftest.val", "w");
2352 if (! f)
2353 return 1;
2354 if (($2) < 0)
2356 long int i = longval ();
2357 if (i != ($2))
2358 return 1;
2359 fprintf (f, "%ld", i);
2361 else
2363 unsigned long int i = ulongval ();
2364 if (i != ($2))
2365 return 1;
2366 fprintf (f, "%lu", i);
2368 /* Do not output a trailing newline, as this causes \r\n confusion
2369 on some platforms. */
2370 return ferror (f) || fclose (f) != 0;
2373 return 0;
2375 _ACEOF
2376 if ac_fn_c_try_run "$LINENO"; then :
2377 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2378 else
2379 ac_retval=1
2381 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2382 conftest.$ac_objext conftest.beam conftest.$ac_ext
2383 rm -f conftest.val
2386 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2387 as_fn_set_status $ac_retval
2389 } # ac_fn_c_compute_int
2391 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2392 # ---------------------------------------------
2393 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2394 # accordingly.
2395 ac_fn_c_check_decl ()
2397 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2398 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2399 as_decl_name=`echo $2|sed 's/ *(.*//'`
2400 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2402 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2403 if eval \${$3+:} false; then :
2404 $as_echo_n "(cached) " >&6
2405 else
2406 ac_save_werror_flag=$ac_c_werror_flag
2407 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2409 /* end confdefs.h. */
2412 main ()
2414 #ifndef $as_decl_name
2415 #ifdef __cplusplus
2416 (void) $as_decl_use;
2417 #else
2418 (void) $as_decl_name;
2419 #endif
2420 #endif
2423 return 0;
2425 _ACEOF
2426 if ac_fn_c_try_compile "$LINENO"; then :
2427 eval "$3=yes"
2428 else
2429 eval "$3=no"
2431 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2432 ac_c_werror_flag=$ac_save_werror_flag
2434 eval ac_res=\$$3
2435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2436 $as_echo "$ac_res" >&6; }
2437 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2439 } # ac_fn_c_check_decl
2440 cat >config.log <<_ACEOF
2441 This file contains any messages produced by compilers while
2442 running configure, to aid debugging if configure makes a mistake.
2444 It was created by PostgreSQL $as_me 18devel, which was
2445 generated by GNU Autoconf 2.69. Invocation command line was
2447 $ $0 $@
2449 _ACEOF
2450 exec 5>>config.log
2452 cat <<_ASUNAME
2453 ## --------- ##
2454 ## Platform. ##
2455 ## --------- ##
2457 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2458 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2459 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2460 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2461 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2463 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2464 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2466 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2467 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2468 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2469 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2470 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2471 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2472 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2474 _ASUNAME
2476 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2477 for as_dir in $PATH
2479 IFS=$as_save_IFS
2480 test -z "$as_dir" && as_dir=.
2481 $as_echo "PATH: $as_dir"
2482 done
2483 IFS=$as_save_IFS
2485 } >&5
2487 cat >&5 <<_ACEOF
2490 ## ----------- ##
2491 ## Core tests. ##
2492 ## ----------- ##
2494 _ACEOF
2497 # Keep a trace of the command line.
2498 # Strip out --no-create and --no-recursion so they do not pile up.
2499 # Strip out --silent because we don't want to record it for future runs.
2500 # Also quote any args containing shell meta-characters.
2501 # Make two passes to allow for proper duplicate-argument suppression.
2502 ac_configure_args=
2503 ac_configure_args0=
2504 ac_configure_args1=
2505 ac_must_keep_next=false
2506 for ac_pass in 1 2
2508 for ac_arg
2510 case $ac_arg in
2511 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2512 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2513 | -silent | --silent | --silen | --sile | --sil)
2514 continue ;;
2515 *\'*)
2516 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2517 esac
2518 case $ac_pass in
2519 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2521 as_fn_append ac_configure_args1 " '$ac_arg'"
2522 if test $ac_must_keep_next = true; then
2523 ac_must_keep_next=false # Got value, back to normal.
2524 else
2525 case $ac_arg in
2526 *=* | --config-cache | -C | -disable-* | --disable-* \
2527 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2528 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2529 | -with-* | --with-* | -without-* | --without-* | --x)
2530 case "$ac_configure_args0 " in
2531 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2532 esac
2534 -* ) ac_must_keep_next=true ;;
2535 esac
2537 as_fn_append ac_configure_args " '$ac_arg'"
2539 esac
2540 done
2541 done
2542 { ac_configure_args0=; unset ac_configure_args0;}
2543 { ac_configure_args1=; unset ac_configure_args1;}
2545 # When interrupted or exit'd, cleanup temporary files, and complete
2546 # config.log. We remove comments because anyway the quotes in there
2547 # would cause problems or look ugly.
2548 # WARNING: Use '\'' to represent an apostrophe within the trap.
2549 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2550 trap 'exit_status=$?
2551 # Save into config.log some information that might help in debugging.
2553 echo
2555 $as_echo "## ---------------- ##
2556 ## Cache variables. ##
2557 ## ---------------- ##"
2558 echo
2559 # The following way of writing the cache mishandles newlines in values,
2561 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2562 eval ac_val=\$$ac_var
2563 case $ac_val in #(
2564 *${as_nl}*)
2565 case $ac_var in #(
2566 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2567 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2568 esac
2569 case $ac_var in #(
2570 _ | IFS | as_nl) ;; #(
2571 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2572 *) { eval $ac_var=; unset $ac_var;} ;;
2573 esac ;;
2574 esac
2575 done
2576 (set) 2>&1 |
2577 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2578 *${as_nl}ac_space=\ *)
2579 sed -n \
2580 "s/'\''/'\''\\\\'\'''\''/g;
2581 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2582 ;; #(
2584 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2586 esac |
2587 sort
2589 echo
2591 $as_echo "## ----------------- ##
2592 ## Output variables. ##
2593 ## ----------------- ##"
2594 echo
2595 for ac_var in $ac_subst_vars
2597 eval ac_val=\$$ac_var
2598 case $ac_val in
2599 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2600 esac
2601 $as_echo "$ac_var='\''$ac_val'\''"
2602 done | sort
2603 echo
2605 if test -n "$ac_subst_files"; then
2606 $as_echo "## ------------------- ##
2607 ## File substitutions. ##
2608 ## ------------------- ##"
2609 echo
2610 for ac_var in $ac_subst_files
2612 eval ac_val=\$$ac_var
2613 case $ac_val in
2614 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2615 esac
2616 $as_echo "$ac_var='\''$ac_val'\''"
2617 done | sort
2618 echo
2621 if test -s confdefs.h; then
2622 $as_echo "## ----------- ##
2623 ## confdefs.h. ##
2624 ## ----------- ##"
2625 echo
2626 cat confdefs.h
2627 echo
2629 test "$ac_signal" != 0 &&
2630 $as_echo "$as_me: caught signal $ac_signal"
2631 $as_echo "$as_me: exit $exit_status"
2632 } >&5
2633 rm -f core *.core core.conftest.* &&
2634 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2635 exit $exit_status
2637 for ac_signal in 1 2 13 15; do
2638 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2639 done
2640 ac_signal=0
2642 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2643 rm -f -r conftest* confdefs.h
2645 $as_echo "/* confdefs.h */" > confdefs.h
2647 # Predefined preprocessor variables.
2649 cat >>confdefs.h <<_ACEOF
2650 #define PACKAGE_NAME "$PACKAGE_NAME"
2651 _ACEOF
2653 cat >>confdefs.h <<_ACEOF
2654 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2655 _ACEOF
2657 cat >>confdefs.h <<_ACEOF
2658 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2659 _ACEOF
2661 cat >>confdefs.h <<_ACEOF
2662 #define PACKAGE_STRING "$PACKAGE_STRING"
2663 _ACEOF
2665 cat >>confdefs.h <<_ACEOF
2666 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2667 _ACEOF
2669 cat >>confdefs.h <<_ACEOF
2670 #define PACKAGE_URL "$PACKAGE_URL"
2671 _ACEOF
2674 # Let the site file select an alternate cache file if it wants to.
2675 # Prefer an explicitly selected file to automatically selected ones.
2676 ac_site_file1=NONE
2677 ac_site_file2=NONE
2678 if test -n "$CONFIG_SITE"; then
2679 # We do not want a PATH search for config.site.
2680 case $CONFIG_SITE in #((
2681 -*) ac_site_file1=./$CONFIG_SITE;;
2682 */*) ac_site_file1=$CONFIG_SITE;;
2683 *) ac_site_file1=./$CONFIG_SITE;;
2684 esac
2685 elif test "x$prefix" != xNONE; then
2686 ac_site_file1=$prefix/share/config.site
2687 ac_site_file2=$prefix/etc/config.site
2688 else
2689 ac_site_file1=$ac_default_prefix/share/config.site
2690 ac_site_file2=$ac_default_prefix/etc/config.site
2692 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2694 test "x$ac_site_file" = xNONE && continue
2695 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2697 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2698 sed 's/^/| /' "$ac_site_file" >&5
2699 . "$ac_site_file" \
2700 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2701 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2702 as_fn_error $? "failed to load site script $ac_site_file
2703 See \`config.log' for more details" "$LINENO" 5; }
2705 done
2707 if test -r "$cache_file"; then
2708 # Some versions of bash will fail to source /dev/null (special files
2709 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2710 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2711 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2712 $as_echo "$as_me: loading cache $cache_file" >&6;}
2713 case $cache_file in
2714 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2715 *) . "./$cache_file";;
2716 esac
2718 else
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2720 $as_echo "$as_me: creating cache $cache_file" >&6;}
2721 >$cache_file
2724 # Check that the precious variables saved in the cache have kept the same
2725 # value.
2726 ac_cache_corrupted=false
2727 for ac_var in $ac_precious_vars; do
2728 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2729 eval ac_new_set=\$ac_env_${ac_var}_set
2730 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2731 eval ac_new_val=\$ac_env_${ac_var}_value
2732 case $ac_old_set,$ac_new_set in
2733 set,)
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2735 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2736 ac_cache_corrupted=: ;;
2737 ,set)
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2739 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2740 ac_cache_corrupted=: ;;
2741 ,);;
2743 if test "x$ac_old_val" != "x$ac_new_val"; then
2744 # differences in whitespace do not lead to failure.
2745 ac_old_val_w=`echo x $ac_old_val`
2746 ac_new_val_w=`echo x $ac_new_val`
2747 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2749 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2750 ac_cache_corrupted=:
2751 else
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2753 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2754 eval $ac_var=\$ac_old_val
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2757 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2758 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2759 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2760 fi;;
2761 esac
2762 # Pass precious variables to config.status.
2763 if test "$ac_new_set" = set; then
2764 case $ac_new_val in
2765 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2766 *) ac_arg=$ac_var=$ac_new_val ;;
2767 esac
2768 case " $ac_configure_args " in
2769 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2770 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2771 esac
2773 done
2774 if $ac_cache_corrupted; then
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2776 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2778 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2779 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2781 ## -------------------- ##
2782 ## Main body of script. ##
2783 ## -------------------- ##
2785 ac_ext=c
2786 ac_cpp='$CPP $CPPFLAGS'
2787 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2788 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2789 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2796 ac_aux_dir=
2797 for ac_dir in config "$srcdir"/config; do
2798 if test -f "$ac_dir/install-sh"; then
2799 ac_aux_dir=$ac_dir
2800 ac_install_sh="$ac_aux_dir/install-sh -c"
2801 break
2802 elif test -f "$ac_dir/install.sh"; then
2803 ac_aux_dir=$ac_dir
2804 ac_install_sh="$ac_aux_dir/install.sh -c"
2805 break
2806 elif test -f "$ac_dir/shtool"; then
2807 ac_aux_dir=$ac_dir
2808 ac_install_sh="$ac_aux_dir/shtool install -c"
2809 break
2811 done
2812 if test -z "$ac_aux_dir"; then
2813 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2816 # These three variables are undocumented and unsupported,
2817 # and are intended to be withdrawn in a future Autoconf release.
2818 # They can cause serious problems if a builder's source tree is in a directory
2819 # whose full name contains unusual characters.
2820 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2821 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2822 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2827 cat >>confdefs.h <<_ACEOF
2828 #define CONFIGURE_ARGS "$ac_configure_args"
2829 _ACEOF
2832 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2833 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2834 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2837 cat >>confdefs.h <<_ACEOF
2838 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2839 _ACEOF
2842 cat >>confdefs.h <<_ACEOF
2843 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2844 _ACEOF
2847 cat >>confdefs.h <<_ACEOF
2848 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2849 _ACEOF
2855 # Check whether --with-extra-version was given.
2856 if test "${with_extra_version+set}" = set; then :
2857 withval=$with_extra_version;
2858 case $withval in
2859 yes)
2860 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2863 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2866 PG_VERSION="$PACKAGE_VERSION$withval"
2868 esac
2870 else
2871 PG_VERSION="$PACKAGE_VERSION"
2876 cat >>confdefs.h <<_ACEOF
2877 #define PG_VERSION "$PG_VERSION"
2878 _ACEOF
2881 # Make sure we can run config.sub.
2882 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2883 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2886 $as_echo_n "checking build system type... " >&6; }
2887 if ${ac_cv_build+:} false; then :
2888 $as_echo_n "(cached) " >&6
2889 else
2890 ac_build_alias=$build_alias
2891 test "x$ac_build_alias" = x &&
2892 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2893 test "x$ac_build_alias" = x &&
2894 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2895 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2896 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2900 $as_echo "$ac_cv_build" >&6; }
2901 case $ac_cv_build in
2902 *-*-*) ;;
2903 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2904 esac
2905 build=$ac_cv_build
2906 ac_save_IFS=$IFS; IFS='-'
2907 set x $ac_cv_build
2908 shift
2909 build_cpu=$1
2910 build_vendor=$2
2911 shift; shift
2912 # Remember, the first character of IFS is used to create $*,
2913 # except with old shells:
2914 build_os=$*
2915 IFS=$ac_save_IFS
2916 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2920 $as_echo_n "checking host system type... " >&6; }
2921 if ${ac_cv_host+:} false; then :
2922 $as_echo_n "(cached) " >&6
2923 else
2924 if test "x$host_alias" = x; then
2925 ac_cv_host=$ac_cv_build
2926 else
2927 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2928 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2933 $as_echo "$ac_cv_host" >&6; }
2934 case $ac_cv_host in
2935 *-*-*) ;;
2936 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2937 esac
2938 host=$ac_cv_host
2939 ac_save_IFS=$IFS; IFS='-'
2940 set x $ac_cv_host
2941 shift
2942 host_cpu=$1
2943 host_vendor=$2
2944 shift; shift
2945 # Remember, the first character of IFS is used to create $*,
2946 # except with old shells:
2947 host_os=$*
2948 IFS=$ac_save_IFS
2949 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2953 template=
2954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2955 $as_echo_n "checking which template to use... " >&6; }
2960 # Check whether --with-template was given.
2961 if test "${with_template+set}" = set; then :
2962 withval=$with_template;
2963 case $withval in
2964 yes)
2965 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2968 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2972 case $withval in
2973 list) echo; ls "$srcdir/src/template"; exit;;
2974 *) if test -f "$srcdir/src/template/$with_template" ; then
2975 template=$withval
2976 else
2977 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2978 fi;;
2979 esac
2982 esac
2984 else
2986 # --with-template not given
2988 case $host_os in
2989 cygwin*|msys*) template=cygwin ;;
2990 darwin*) template=darwin ;;
2991 dragonfly*) template=netbsd ;;
2992 freebsd*) template=freebsd ;;
2993 linux*|gnu*|k*bsd*-gnu)
2994 template=linux ;;
2995 mingw*) template=win32 ;;
2996 netbsd*) template=netbsd ;;
2997 openbsd*) template=openbsd ;;
2998 solaris*) template=solaris ;;
2999 esac
3001 if test x"$template" = x"" ; then
3002 as_fn_error $? "
3003 *******************************************************************
3004 PostgreSQL has apparently not been ported to your platform yet.
3005 To try a manual configuration, look into the src/template directory
3006 for a similar platform and use the '--with-template=' option.
3008 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
3009 rectifying this. Include the above 'checking host system type...'
3010 line.
3011 *******************************************************************
3012 " "$LINENO" 5
3020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3021 $as_echo "$template" >&6; }
3023 PORTNAME=$template
3026 # Initialize default assumption that we do not need separate assembly code
3027 # for TAS (test-and-set). This can be overridden by the template file
3028 # when it's executed.
3029 need_tas=no
3030 tas_file=dummy.s
3032 # Default, works for most platforms, override in template file if needed
3033 DLSUFFIX=".so"
3038 ## Command line options
3042 # Add non-standard directories to the include path
3047 # Check whether --with-includes was given.
3048 if test "${with_includes+set}" = set; then :
3049 withval=$with_includes;
3050 case $withval in
3051 yes)
3052 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3055 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3060 esac
3068 # Add non-standard directories to the library search path
3073 # Check whether --with-libraries was given.
3074 if test "${with_libraries+set}" = set; then :
3075 withval=$with_libraries;
3076 case $withval in
3077 yes)
3078 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3081 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3084 LIBRARY_DIRS=$withval
3086 esac
3095 # Check whether --with-libs was given.
3096 if test "${with_libs+set}" = set; then :
3097 withval=$with_libs;
3098 case $withval in
3099 yes)
3100 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3103 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3106 LIBRARY_DIRS=$withval
3108 esac
3116 # 64-bit integer date/time storage is now the only option, but to avoid
3117 # unnecessary breakage of build scripts, continue to accept an explicit
3118 # "--enable-integer-datetimes" switch.
3122 # Check whether --enable-integer-datetimes was given.
3123 if test "${enable_integer_datetimes+set}" = set; then :
3124 enableval=$enable_integer_datetimes;
3125 case $enableval in
3126 yes)
3130 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3133 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3135 esac
3137 else
3138 enable_integer_datetimes=yes
3146 # NLS
3148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3149 $as_echo_n "checking whether NLS is wanted... " >&6; }
3152 # Check whether --enable-nls was given.
3153 if test "${enable_nls+set}" = set; then :
3154 enableval=$enable_nls;
3155 case $enableval in
3156 yes)
3163 enable_nls=yes
3164 WANTED_LANGUAGES=$enableval
3166 esac
3168 else
3169 enable_nls=no
3174 if test "$enable_nls" = yes; then
3176 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3181 $as_echo "$enable_nls" >&6; }
3186 # Default port number (--with-pgport), default 5432
3188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3189 $as_echo_n "checking for default port number... " >&6; }
3193 # Check whether --with-pgport was given.
3194 if test "${with_pgport+set}" = set; then :
3195 withval=$with_pgport;
3196 case $withval in
3197 yes)
3198 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3201 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3204 default_port=$withval
3206 esac
3208 else
3209 default_port=5432
3213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3214 $as_echo "$default_port" >&6; }
3215 # Need both of these because some places want an integer and some a string
3217 cat >>confdefs.h <<_ACEOF
3218 #define DEF_PGPORT ${default_port}
3219 _ACEOF
3222 cat >>confdefs.h <<_ACEOF
3223 #define DEF_PGPORT_STR "${default_port}"
3224 _ACEOF
3228 # It's worth validating port; you can get very confusing errors otherwise
3229 if test x"$default_port" = x""; then
3230 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3231 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3232 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3233 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3234 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3235 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3236 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3240 # '-rpath'-like feature can be disabled
3244 # Check whether --enable-rpath was given.
3245 if test "${enable_rpath+set}" = set; then :
3246 enableval=$enable_rpath;
3247 case $enableval in
3248 yes)
3255 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3257 esac
3259 else
3260 enable_rpath=yes
3268 # --enable-debug adds -g to compiler flags
3272 # Check whether --enable-debug was given.
3273 if test "${enable_debug+set}" = set; then :
3274 enableval=$enable_debug;
3275 case $enableval in
3276 yes)
3283 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3285 esac
3287 else
3288 enable_debug=no
3296 # --enable-profiling enables gcc profiling
3300 # Check whether --enable-profiling was given.
3301 if test "${enable_profiling+set}" = set; then :
3302 enableval=$enable_profiling;
3303 case $enableval in
3304 yes)
3311 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3313 esac
3315 else
3316 enable_profiling=no
3323 # --enable-coverage enables generation of code coverage metrics with gcov
3327 # Check whether --enable-coverage was given.
3328 if test "${enable_coverage+set}" = set; then :
3329 enableval=$enable_coverage;
3330 case $enableval in
3331 yes)
3332 if test -z "$GCOV"; then
3333 for ac_prog in gcov
3335 # Extract the first word of "$ac_prog", so it can be a program name with args.
3336 set dummy $ac_prog; ac_word=$2
3337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3338 $as_echo_n "checking for $ac_word... " >&6; }
3339 if ${ac_cv_path_GCOV+:} false; then :
3340 $as_echo_n "(cached) " >&6
3341 else
3342 case $GCOV in
3343 [\\/]* | ?:[\\/]*)
3344 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3348 for as_dir in $PATH
3350 IFS=$as_save_IFS
3351 test -z "$as_dir" && as_dir=.
3352 for ac_exec_ext in '' $ac_executable_extensions; do
3353 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3354 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3355 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3356 break 2
3358 done
3359 done
3360 IFS=$as_save_IFS
3363 esac
3365 GCOV=$ac_cv_path_GCOV
3366 if test -n "$GCOV"; then
3367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3368 $as_echo "$GCOV" >&6; }
3369 else
3370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3371 $as_echo "no" >&6; }
3375 test -n "$GCOV" && break
3376 done
3378 else
3379 # Report the value of GCOV in configure's output in all cases.
3380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3381 $as_echo_n "checking for GCOV... " >&6; }
3382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3383 $as_echo "$GCOV" >&6; }
3386 if test -z "$GCOV"; then
3387 as_fn_error $? "gcov not found" "$LINENO" 5
3389 if test -z "$LCOV"; then
3390 for ac_prog in lcov
3392 # Extract the first word of "$ac_prog", so it can be a program name with args.
3393 set dummy $ac_prog; ac_word=$2
3394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3395 $as_echo_n "checking for $ac_word... " >&6; }
3396 if ${ac_cv_path_LCOV+:} false; then :
3397 $as_echo_n "(cached) " >&6
3398 else
3399 case $LCOV in
3400 [\\/]* | ?:[\\/]*)
3401 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3404 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3405 for as_dir in $PATH
3407 IFS=$as_save_IFS
3408 test -z "$as_dir" && as_dir=.
3409 for ac_exec_ext in '' $ac_executable_extensions; do
3410 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3411 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3412 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3413 break 2
3415 done
3416 done
3417 IFS=$as_save_IFS
3420 esac
3422 LCOV=$ac_cv_path_LCOV
3423 if test -n "$LCOV"; then
3424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3425 $as_echo "$LCOV" >&6; }
3426 else
3427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3428 $as_echo "no" >&6; }
3432 test -n "$LCOV" && break
3433 done
3435 else
3436 # Report the value of LCOV in configure's output in all cases.
3437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3438 $as_echo_n "checking for LCOV... " >&6; }
3439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3440 $as_echo "$LCOV" >&6; }
3443 if test -z "$LCOV"; then
3444 as_fn_error $? "lcov not found" "$LINENO" 5
3446 if test -z "$GENHTML"; then
3447 for ac_prog in genhtml
3449 # Extract the first word of "$ac_prog", so it can be a program name with args.
3450 set dummy $ac_prog; ac_word=$2
3451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3452 $as_echo_n "checking for $ac_word... " >&6; }
3453 if ${ac_cv_path_GENHTML+:} false; then :
3454 $as_echo_n "(cached) " >&6
3455 else
3456 case $GENHTML in
3457 [\\/]* | ?:[\\/]*)
3458 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3461 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3462 for as_dir in $PATH
3464 IFS=$as_save_IFS
3465 test -z "$as_dir" && as_dir=.
3466 for ac_exec_ext in '' $ac_executable_extensions; do
3467 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3468 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3469 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3470 break 2
3472 done
3473 done
3474 IFS=$as_save_IFS
3477 esac
3479 GENHTML=$ac_cv_path_GENHTML
3480 if test -n "$GENHTML"; then
3481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3482 $as_echo "$GENHTML" >&6; }
3483 else
3484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3485 $as_echo "no" >&6; }
3489 test -n "$GENHTML" && break
3490 done
3492 else
3493 # Report the value of GENHTML in configure's output in all cases.
3494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3495 $as_echo_n "checking for GENHTML... " >&6; }
3496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3497 $as_echo "$GENHTML" >&6; }
3500 if test -z "$GENHTML"; then
3501 as_fn_error $? "genhtml not found" "$LINENO" 5
3508 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3510 esac
3512 else
3513 enable_coverage=no
3521 # DTrace
3525 # Check whether --enable-dtrace was given.
3526 if test "${enable_dtrace+set}" = set; then :
3527 enableval=$enable_dtrace;
3528 case $enableval in
3529 yes)
3530 if test -z "$DTRACE"; then
3531 for ac_prog in dtrace
3533 # Extract the first word of "$ac_prog", so it can be a program name with args.
3534 set dummy $ac_prog; ac_word=$2
3535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3536 $as_echo_n "checking for $ac_word... " >&6; }
3537 if ${ac_cv_path_DTRACE+:} false; then :
3538 $as_echo_n "(cached) " >&6
3539 else
3540 case $DTRACE in
3541 [\\/]* | ?:[\\/]*)
3542 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3545 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3546 for as_dir in $PATH
3548 IFS=$as_save_IFS
3549 test -z "$as_dir" && as_dir=.
3550 for ac_exec_ext in '' $ac_executable_extensions; do
3551 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3552 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3553 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3554 break 2
3556 done
3557 done
3558 IFS=$as_save_IFS
3561 esac
3563 DTRACE=$ac_cv_path_DTRACE
3564 if test -n "$DTRACE"; then
3565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3566 $as_echo "$DTRACE" >&6; }
3567 else
3568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3569 $as_echo "no" >&6; }
3573 test -n "$DTRACE" && break
3574 done
3576 else
3577 # Report the value of DTRACE in configure's output in all cases.
3578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3579 $as_echo_n "checking for DTRACE... " >&6; }
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3581 $as_echo "$DTRACE" >&6; }
3584 if test -z "$DTRACE"; then
3585 as_fn_error $? "dtrace not found" "$LINENO" 5
3593 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3595 esac
3597 else
3598 enable_dtrace=no
3606 # TAP tests
3610 # Check whether --enable-tap-tests was given.
3611 if test "${enable_tap_tests+set}" = set; then :
3612 enableval=$enable_tap_tests;
3613 case $enableval in
3614 yes)
3621 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3623 esac
3625 else
3626 enable_tap_tests=no
3635 # Injection points
3639 # Check whether --enable-injection-points was given.
3640 if test "${enable_injection_points+set}" = set; then :
3641 enableval=$enable_injection_points;
3642 case $enableval in
3643 yes)
3645 $as_echo "#define USE_INJECTION_POINTS 1" >>confdefs.h
3652 as_fn_error $? "no argument expected for --enable-injection-points option" "$LINENO" 5
3654 esac
3656 else
3657 enable_injection_points=no
3665 # Block size
3667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3668 $as_echo_n "checking for block size... " >&6; }
3672 # Check whether --with-blocksize was given.
3673 if test "${with_blocksize+set}" = set; then :
3674 withval=$with_blocksize;
3675 case $withval in
3676 yes)
3677 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3680 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3683 blocksize=$withval
3685 esac
3687 else
3688 blocksize=8
3692 case ${blocksize} in
3693 1) BLCKSZ=1024;;
3694 2) BLCKSZ=2048;;
3695 4) BLCKSZ=4096;;
3696 8) BLCKSZ=8192;;
3697 16) BLCKSZ=16384;;
3698 32) BLCKSZ=32768;;
3699 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3700 esac
3701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3702 $as_echo "${blocksize}kB" >&6; }
3705 cat >>confdefs.h <<_ACEOF
3706 #define BLCKSZ ${BLCKSZ}
3707 _ACEOF
3711 # Relation segment size
3716 # Check whether --with-segsize was given.
3717 if test "${with_segsize+set}" = set; then :
3718 withval=$with_segsize;
3719 case $withval in
3720 yes)
3721 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3724 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3727 segsize=$withval
3729 esac
3731 else
3732 segsize=1
3739 # Check whether --with-segsize-blocks was given.
3740 if test "${with_segsize_blocks+set}" = set; then :
3741 withval=$with_segsize_blocks;
3742 case $withval in
3743 yes)
3744 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3747 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3750 segsize_blocks=$withval
3752 esac
3754 else
3755 segsize_blocks=0
3760 # If --with-segsize-blocks is non-zero, it is used, --with-segsize
3761 # otherwise. segsize-blocks is only really useful for developers wanting to
3762 # test segment related code. Warn if both are used.
3763 if test $segsize_blocks -ne 0 -a $segsize -ne 1; then
3764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&5
3765 $as_echo "$as_me: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&2;}
3768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3769 $as_echo_n "checking for segment size... " >&6; }
3770 if test $segsize_blocks -eq 0; then
3771 # this expression is set up to avoid unnecessary integer overflow
3772 # blocksize is already guaranteed to be a factor of 1024
3773 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3774 test $? -eq 0 || exit 1
3775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3776 $as_echo "${segsize}GB" >&6; }
3777 else
3778 RELSEG_SIZE=$segsize_blocks
3779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${RELSEG_SIZE} blocks" >&5
3780 $as_echo "${RELSEG_SIZE} blocks" >&6; }
3784 cat >>confdefs.h <<_ACEOF
3785 #define RELSEG_SIZE ${RELSEG_SIZE}
3786 _ACEOF
3790 # WAL block size
3792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3793 $as_echo_n "checking for WAL block size... " >&6; }
3797 # Check whether --with-wal-blocksize was given.
3798 if test "${with_wal_blocksize+set}" = set; then :
3799 withval=$with_wal_blocksize;
3800 case $withval in
3801 yes)
3802 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3805 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3808 wal_blocksize=$withval
3810 esac
3812 else
3813 wal_blocksize=8
3817 case ${wal_blocksize} in
3818 1) XLOG_BLCKSZ=1024;;
3819 2) XLOG_BLCKSZ=2048;;
3820 4) XLOG_BLCKSZ=4096;;
3821 8) XLOG_BLCKSZ=8192;;
3822 16) XLOG_BLCKSZ=16384;;
3823 32) XLOG_BLCKSZ=32768;;
3824 64) XLOG_BLCKSZ=65536;;
3825 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3826 esac
3827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3828 $as_echo "${wal_blocksize}kB" >&6; }
3831 cat >>confdefs.h <<_ACEOF
3832 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3833 _ACEOF
3837 # C compiler
3840 # If you don't specify a list of compilers to test, the AC_PROG_CC and
3841 # AC_PROG_CXX macros test for a long list of unsupported compilers.
3842 pgac_cc_list="gcc cc"
3843 pgac_cxx_list="g++ c++"
3845 ac_ext=c
3846 ac_cpp='$CPP $CPPFLAGS'
3847 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3848 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3849 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3850 if test -n "$ac_tool_prefix"; then
3851 for ac_prog in $pgac_cc_list
3853 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3854 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3856 $as_echo_n "checking for $ac_word... " >&6; }
3857 if ${ac_cv_prog_CC+:} false; then :
3858 $as_echo_n "(cached) " >&6
3859 else
3860 if test -n "$CC"; then
3861 ac_cv_prog_CC="$CC" # Let the user override the test.
3862 else
3863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3864 for as_dir in $PATH
3866 IFS=$as_save_IFS
3867 test -z "$as_dir" && as_dir=.
3868 for ac_exec_ext in '' $ac_executable_extensions; do
3869 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3870 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3871 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3872 break 2
3874 done
3875 done
3876 IFS=$as_save_IFS
3880 CC=$ac_cv_prog_CC
3881 if test -n "$CC"; then
3882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3883 $as_echo "$CC" >&6; }
3884 else
3885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3886 $as_echo "no" >&6; }
3890 test -n "$CC" && break
3891 done
3893 if test -z "$CC"; then
3894 ac_ct_CC=$CC
3895 for ac_prog in $pgac_cc_list
3897 # Extract the first word of "$ac_prog", so it can be a program name with args.
3898 set dummy $ac_prog; ac_word=$2
3899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3900 $as_echo_n "checking for $ac_word... " >&6; }
3901 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3902 $as_echo_n "(cached) " >&6
3903 else
3904 if test -n "$ac_ct_CC"; then
3905 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3906 else
3907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3908 for as_dir in $PATH
3910 IFS=$as_save_IFS
3911 test -z "$as_dir" && as_dir=.
3912 for ac_exec_ext in '' $ac_executable_extensions; do
3913 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3914 ac_cv_prog_ac_ct_CC="$ac_prog"
3915 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3916 break 2
3918 done
3919 done
3920 IFS=$as_save_IFS
3924 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3925 if test -n "$ac_ct_CC"; then
3926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3927 $as_echo "$ac_ct_CC" >&6; }
3928 else
3929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3930 $as_echo "no" >&6; }
3934 test -n "$ac_ct_CC" && break
3935 done
3937 if test "x$ac_ct_CC" = x; then
3938 CC=""
3939 else
3940 case $cross_compiling:$ac_tool_warned in
3941 yes:)
3942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3943 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3944 ac_tool_warned=yes ;;
3945 esac
3946 CC=$ac_ct_CC
3951 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3952 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3953 as_fn_error $? "no acceptable C compiler found in \$PATH
3954 See \`config.log' for more details" "$LINENO" 5; }
3956 # Provide some information about the compiler.
3957 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3958 set X $ac_compile
3959 ac_compiler=$2
3960 for ac_option in --version -v -V -qversion; do
3961 { { ac_try="$ac_compiler $ac_option >&5"
3962 case "(($ac_try" in
3963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3964 *) ac_try_echo=$ac_try;;
3965 esac
3966 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3967 $as_echo "$ac_try_echo"; } >&5
3968 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3969 ac_status=$?
3970 if test -s conftest.err; then
3971 sed '10a\
3972 ... rest of stderr output deleted ...
3973 10q' conftest.err >conftest.er1
3974 cat conftest.er1 >&5
3976 rm -f conftest.er1 conftest.err
3977 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3978 test $ac_status = 0; }
3979 done
3981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3982 /* end confdefs.h. */
3985 main ()
3989 return 0;
3991 _ACEOF
3992 ac_clean_files_save=$ac_clean_files
3993 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3994 # Try to create an executable without -o first, disregard a.out.
3995 # It will help us diagnose broken compilers, and finding out an intuition
3996 # of exeext.
3997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3998 $as_echo_n "checking whether the C compiler works... " >&6; }
3999 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4001 # The possible output files:
4002 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4004 ac_rmfiles=
4005 for ac_file in $ac_files
4007 case $ac_file in
4008 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4009 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4010 esac
4011 done
4012 rm -f $ac_rmfiles
4014 if { { ac_try="$ac_link_default"
4015 case "(($ac_try" in
4016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4017 *) ac_try_echo=$ac_try;;
4018 esac
4019 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4020 $as_echo "$ac_try_echo"; } >&5
4021 (eval "$ac_link_default") 2>&5
4022 ac_status=$?
4023 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4024 test $ac_status = 0; }; then :
4025 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4026 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4027 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4028 # so that the user can short-circuit this test for compilers unknown to
4029 # Autoconf.
4030 for ac_file in $ac_files ''
4032 test -f "$ac_file" || continue
4033 case $ac_file in
4034 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4036 [ab].out )
4037 # We found the default executable, but exeext='' is most
4038 # certainly right.
4039 break;;
4040 *.* )
4041 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4042 then :; else
4043 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4045 # We set ac_cv_exeext here because the later test for it is not
4046 # safe: cross compilers may not add the suffix if given an `-o'
4047 # argument, so we may need to know it at that point already.
4048 # Even if this section looks crufty: it has the advantage of
4049 # actually working.
4050 break;;
4052 break;;
4053 esac
4054 done
4055 test "$ac_cv_exeext" = no && ac_cv_exeext=
4057 else
4058 ac_file=''
4060 if test -z "$ac_file"; then :
4061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4062 $as_echo "no" >&6; }
4063 $as_echo "$as_me: failed program was:" >&5
4064 sed 's/^/| /' conftest.$ac_ext >&5
4066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4067 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4068 as_fn_error 77 "C compiler cannot create executables
4069 See \`config.log' for more details" "$LINENO" 5; }
4070 else
4071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4072 $as_echo "yes" >&6; }
4074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4075 $as_echo_n "checking for C compiler default output file name... " >&6; }
4076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4077 $as_echo "$ac_file" >&6; }
4078 ac_exeext=$ac_cv_exeext
4080 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4081 ac_clean_files=$ac_clean_files_save
4082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4083 $as_echo_n "checking for suffix of executables... " >&6; }
4084 if { { ac_try="$ac_link"
4085 case "(($ac_try" in
4086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4087 *) ac_try_echo=$ac_try;;
4088 esac
4089 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4090 $as_echo "$ac_try_echo"; } >&5
4091 (eval "$ac_link") 2>&5
4092 ac_status=$?
4093 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4094 test $ac_status = 0; }; then :
4095 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4096 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4097 # work properly (i.e., refer to `conftest.exe'), while it won't with
4098 # `rm'.
4099 for ac_file in conftest.exe conftest conftest.*; do
4100 test -f "$ac_file" || continue
4101 case $ac_file in
4102 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4103 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4104 break;;
4105 * ) break;;
4106 esac
4107 done
4108 else
4109 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4110 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4111 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4112 See \`config.log' for more details" "$LINENO" 5; }
4114 rm -f conftest conftest$ac_cv_exeext
4115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4116 $as_echo "$ac_cv_exeext" >&6; }
4118 rm -f conftest.$ac_ext
4119 EXEEXT=$ac_cv_exeext
4120 ac_exeext=$EXEEXT
4121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4122 /* end confdefs.h. */
4123 #include <stdio.h>
4125 main ()
4127 FILE *f = fopen ("conftest.out", "w");
4128 return ferror (f) || fclose (f) != 0;
4131 return 0;
4133 _ACEOF
4134 ac_clean_files="$ac_clean_files conftest.out"
4135 # Check that the compiler produces executables we can run. If not, either
4136 # the compiler is broken, or we cross compile.
4137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4138 $as_echo_n "checking whether we are cross compiling... " >&6; }
4139 if test "$cross_compiling" != yes; then
4140 { { ac_try="$ac_link"
4141 case "(($ac_try" in
4142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4143 *) ac_try_echo=$ac_try;;
4144 esac
4145 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4146 $as_echo "$ac_try_echo"; } >&5
4147 (eval "$ac_link") 2>&5
4148 ac_status=$?
4149 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4150 test $ac_status = 0; }
4151 if { ac_try='./conftest$ac_cv_exeext'
4152 { { case "(($ac_try" in
4153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4154 *) ac_try_echo=$ac_try;;
4155 esac
4156 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4157 $as_echo "$ac_try_echo"; } >&5
4158 (eval "$ac_try") 2>&5
4159 ac_status=$?
4160 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4161 test $ac_status = 0; }; }; then
4162 cross_compiling=no
4163 else
4164 if test "$cross_compiling" = maybe; then
4165 cross_compiling=yes
4166 else
4167 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4168 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4169 as_fn_error $? "cannot run C compiled programs.
4170 If you meant to cross compile, use \`--host'.
4171 See \`config.log' for more details" "$LINENO" 5; }
4175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4176 $as_echo "$cross_compiling" >&6; }
4178 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4179 ac_clean_files=$ac_clean_files_save
4180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4181 $as_echo_n "checking for suffix of object files... " >&6; }
4182 if ${ac_cv_objext+:} false; then :
4183 $as_echo_n "(cached) " >&6
4184 else
4185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4186 /* end confdefs.h. */
4189 main ()
4193 return 0;
4195 _ACEOF
4196 rm -f conftest.o conftest.obj
4197 if { { ac_try="$ac_compile"
4198 case "(($ac_try" in
4199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4200 *) ac_try_echo=$ac_try;;
4201 esac
4202 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4203 $as_echo "$ac_try_echo"; } >&5
4204 (eval "$ac_compile") 2>&5
4205 ac_status=$?
4206 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4207 test $ac_status = 0; }; then :
4208 for ac_file in conftest.o conftest.obj conftest.*; do
4209 test -f "$ac_file" || continue;
4210 case $ac_file in
4211 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4212 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4213 break;;
4214 esac
4215 done
4216 else
4217 $as_echo "$as_me: failed program was:" >&5
4218 sed 's/^/| /' conftest.$ac_ext >&5
4220 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4221 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4222 as_fn_error $? "cannot compute suffix of object files: cannot compile
4223 See \`config.log' for more details" "$LINENO" 5; }
4225 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4228 $as_echo "$ac_cv_objext" >&6; }
4229 OBJEXT=$ac_cv_objext
4230 ac_objext=$OBJEXT
4231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4232 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4233 if ${ac_cv_c_compiler_gnu+:} false; then :
4234 $as_echo_n "(cached) " >&6
4235 else
4236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4237 /* end confdefs.h. */
4240 main ()
4242 #ifndef __GNUC__
4243 choke me
4244 #endif
4247 return 0;
4249 _ACEOF
4250 if ac_fn_c_try_compile "$LINENO"; then :
4251 ac_compiler_gnu=yes
4252 else
4253 ac_compiler_gnu=no
4255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4256 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4260 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4261 if test $ac_compiler_gnu = yes; then
4262 GCC=yes
4263 else
4264 GCC=
4266 ac_test_CFLAGS=${CFLAGS+set}
4267 ac_save_CFLAGS=$CFLAGS
4268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4269 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4270 if ${ac_cv_prog_cc_g+:} false; then :
4271 $as_echo_n "(cached) " >&6
4272 else
4273 ac_save_c_werror_flag=$ac_c_werror_flag
4274 ac_c_werror_flag=yes
4275 ac_cv_prog_cc_g=no
4276 CFLAGS="-g"
4277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4278 /* end confdefs.h. */
4281 main ()
4285 return 0;
4287 _ACEOF
4288 if ac_fn_c_try_compile "$LINENO"; then :
4289 ac_cv_prog_cc_g=yes
4290 else
4291 CFLAGS=""
4292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4293 /* end confdefs.h. */
4296 main ()
4300 return 0;
4302 _ACEOF
4303 if ac_fn_c_try_compile "$LINENO"; then :
4305 else
4306 ac_c_werror_flag=$ac_save_c_werror_flag
4307 CFLAGS="-g"
4308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4309 /* end confdefs.h. */
4312 main ()
4316 return 0;
4318 _ACEOF
4319 if ac_fn_c_try_compile "$LINENO"; then :
4320 ac_cv_prog_cc_g=yes
4322 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4327 ac_c_werror_flag=$ac_save_c_werror_flag
4329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4330 $as_echo "$ac_cv_prog_cc_g" >&6; }
4331 if test "$ac_test_CFLAGS" = set; then
4332 CFLAGS=$ac_save_CFLAGS
4333 elif test $ac_cv_prog_cc_g = yes; then
4334 if test "$GCC" = yes; then
4335 CFLAGS="-g -O2"
4336 else
4337 CFLAGS="-g"
4339 else
4340 if test "$GCC" = yes; then
4341 CFLAGS="-O2"
4342 else
4343 CFLAGS=
4346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4347 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4348 if ${ac_cv_prog_cc_c89+:} false; then :
4349 $as_echo_n "(cached) " >&6
4350 else
4351 ac_cv_prog_cc_c89=no
4352 ac_save_CC=$CC
4353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4354 /* end confdefs.h. */
4355 #include <stdarg.h>
4356 #include <stdio.h>
4357 struct stat;
4358 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4359 struct buf { int x; };
4360 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4361 static char *e (p, i)
4362 char **p;
4363 int i;
4365 return p[i];
4367 static char *f (char * (*g) (char **, int), char **p, ...)
4369 char *s;
4370 va_list v;
4371 va_start (v,p);
4372 s = g (p, va_arg (v,int));
4373 va_end (v);
4374 return s;
4377 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4378 function prototypes and stuff, but not '\xHH' hex character constants.
4379 These don't provoke an error unfortunately, instead are silently treated
4380 as 'x'. The following induces an error, until -std is added to get
4381 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4382 array size at least. It's necessary to write '\x00'==0 to get something
4383 that's true only with -std. */
4384 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4386 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4387 inside strings and character constants. */
4388 #define FOO(x) 'x'
4389 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4391 int test (int i, double x);
4392 struct s1 {int (*f) (int a);};
4393 struct s2 {int (*f) (double a);};
4394 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4395 int argc;
4396 char **argv;
4398 main ()
4400 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4402 return 0;
4404 _ACEOF
4405 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4406 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4408 CC="$ac_save_CC $ac_arg"
4409 if ac_fn_c_try_compile "$LINENO"; then :
4410 ac_cv_prog_cc_c89=$ac_arg
4412 rm -f core conftest.err conftest.$ac_objext
4413 test "x$ac_cv_prog_cc_c89" != "xno" && break
4414 done
4415 rm -f conftest.$ac_ext
4416 CC=$ac_save_CC
4419 # AC_CACHE_VAL
4420 case "x$ac_cv_prog_cc_c89" in
4422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4423 $as_echo "none needed" >&6; } ;;
4424 xno)
4425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4426 $as_echo "unsupported" >&6; } ;;
4428 CC="$CC $ac_cv_prog_cc_c89"
4429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4430 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4431 esac
4432 if test "x$ac_cv_prog_cc_c89" != xno; then :
4436 ac_ext=c
4437 ac_cpp='$CPP $CPPFLAGS'
4438 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4439 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4440 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4443 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4444 if ${ac_cv_prog_cc_c99+:} false; then :
4445 $as_echo_n "(cached) " >&6
4446 else
4447 ac_cv_prog_cc_c99=no
4448 ac_save_CC=$CC
4449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4450 /* end confdefs.h. */
4451 #include <stdarg.h>
4452 #include <stdbool.h>
4453 #include <stdlib.h>
4454 #include <wchar.h>
4455 #include <stdio.h>
4457 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4458 #define debug(...) fprintf (stderr, __VA_ARGS__)
4459 #define showlist(...) puts (#__VA_ARGS__)
4460 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4461 static void
4462 test_varargs_macros (void)
4464 int x = 1234;
4465 int y = 5678;
4466 debug ("Flag");
4467 debug ("X = %d\n", x);
4468 showlist (The first, second, and third items.);
4469 report (x>y, "x is %d but y is %d", x, y);
4472 // Check long long types.
4473 #define BIG64 18446744073709551615ull
4474 #define BIG32 4294967295ul
4475 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4476 #if !BIG_OK
4477 your preprocessor is broken;
4478 #endif
4479 #if BIG_OK
4480 #else
4481 your preprocessor is broken;
4482 #endif
4483 static long long int bignum = -9223372036854775807LL;
4484 static unsigned long long int ubignum = BIG64;
4486 struct incomplete_array
4488 int datasize;
4489 double data[];
4492 struct named_init {
4493 int number;
4494 const wchar_t *name;
4495 double average;
4498 typedef const char *ccp;
4500 static inline int
4501 test_restrict (ccp restrict text)
4503 // See if C++-style comments work.
4504 // Iterate through items via the restricted pointer.
4505 // Also check for declarations in for loops.
4506 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4507 continue;
4508 return 0;
4511 // Check varargs and va_copy.
4512 static void
4513 test_varargs (const char *format, ...)
4515 va_list args;
4516 va_start (args, format);
4517 va_list args_copy;
4518 va_copy (args_copy, args);
4520 const char *str;
4521 int number;
4522 float fnumber;
4524 while (*format)
4526 switch (*format++)
4528 case 's': // string
4529 str = va_arg (args_copy, const char *);
4530 break;
4531 case 'd': // int
4532 number = va_arg (args_copy, int);
4533 break;
4534 case 'f': // float
4535 fnumber = va_arg (args_copy, double);
4536 break;
4537 default:
4538 break;
4541 va_end (args_copy);
4542 va_end (args);
4546 main ()
4549 // Check bool.
4550 _Bool success = false;
4552 // Check restrict.
4553 if (test_restrict ("String literal") == 0)
4554 success = true;
4555 char *restrict newvar = "Another string";
4557 // Check varargs.
4558 test_varargs ("s, d' f .", "string", 65, 34.234);
4559 test_varargs_macros ();
4561 // Check flexible array members.
4562 struct incomplete_array *ia =
4563 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4564 ia->datasize = 10;
4565 for (int i = 0; i < ia->datasize; ++i)
4566 ia->data[i] = i * 1.234;
4568 // Check named initializers.
4569 struct named_init ni = {
4570 .number = 34,
4571 .name = L"Test wide string",
4572 .average = 543.34343,
4575 ni.number = 58;
4577 int dynamic_array[ni.number];
4578 dynamic_array[ni.number - 1] = 543;
4580 // work around unused variable warnings
4581 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4582 || dynamic_array[ni.number - 1] != 543);
4585 return 0;
4587 _ACEOF
4588 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4590 CC="$ac_save_CC $ac_arg"
4591 if ac_fn_c_try_compile "$LINENO"; then :
4592 ac_cv_prog_cc_c99=$ac_arg
4594 rm -f core conftest.err conftest.$ac_objext
4595 test "x$ac_cv_prog_cc_c99" != "xno" && break
4596 done
4597 rm -f conftest.$ac_ext
4598 CC=$ac_save_CC
4601 # AC_CACHE_VAL
4602 case "x$ac_cv_prog_cc_c99" in
4604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4605 $as_echo "none needed" >&6; } ;;
4606 xno)
4607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4608 $as_echo "unsupported" >&6; } ;;
4610 CC="$CC $ac_cv_prog_cc_c99"
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4612 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4613 esac
4614 if test "x$ac_cv_prog_cc_c99" != xno; then :
4620 # Error out if the compiler does not support C99, as the codebase
4621 # relies on that.
4622 if test "$ac_cv_prog_cc_c99" = no; then
4623 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4626 ac_ext=cpp
4627 ac_cpp='$CXXCPP $CPPFLAGS'
4628 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4629 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4630 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4631 if test -z "$CXX"; then
4632 if test -n "$CCC"; then
4633 CXX=$CCC
4634 else
4635 if test -n "$ac_tool_prefix"; then
4636 for ac_prog in $pgac_cxx_list
4638 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4639 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4641 $as_echo_n "checking for $ac_word... " >&6; }
4642 if ${ac_cv_prog_CXX+:} false; then :
4643 $as_echo_n "(cached) " >&6
4644 else
4645 if test -n "$CXX"; then
4646 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4647 else
4648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4649 for as_dir in $PATH
4651 IFS=$as_save_IFS
4652 test -z "$as_dir" && as_dir=.
4653 for ac_exec_ext in '' $ac_executable_extensions; do
4654 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4655 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4656 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4657 break 2
4659 done
4660 done
4661 IFS=$as_save_IFS
4665 CXX=$ac_cv_prog_CXX
4666 if test -n "$CXX"; then
4667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4668 $as_echo "$CXX" >&6; }
4669 else
4670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4671 $as_echo "no" >&6; }
4675 test -n "$CXX" && break
4676 done
4678 if test -z "$CXX"; then
4679 ac_ct_CXX=$CXX
4680 for ac_prog in $pgac_cxx_list
4682 # Extract the first word of "$ac_prog", so it can be a program name with args.
4683 set dummy $ac_prog; ac_word=$2
4684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4685 $as_echo_n "checking for $ac_word... " >&6; }
4686 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4687 $as_echo_n "(cached) " >&6
4688 else
4689 if test -n "$ac_ct_CXX"; then
4690 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4691 else
4692 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4693 for as_dir in $PATH
4695 IFS=$as_save_IFS
4696 test -z "$as_dir" && as_dir=.
4697 for ac_exec_ext in '' $ac_executable_extensions; do
4698 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4699 ac_cv_prog_ac_ct_CXX="$ac_prog"
4700 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4701 break 2
4703 done
4704 done
4705 IFS=$as_save_IFS
4709 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4710 if test -n "$ac_ct_CXX"; then
4711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4712 $as_echo "$ac_ct_CXX" >&6; }
4713 else
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4715 $as_echo "no" >&6; }
4719 test -n "$ac_ct_CXX" && break
4720 done
4722 if test "x$ac_ct_CXX" = x; then
4723 CXX="g++"
4724 else
4725 case $cross_compiling:$ac_tool_warned in
4726 yes:)
4727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4728 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4729 ac_tool_warned=yes ;;
4730 esac
4731 CXX=$ac_ct_CXX
4737 # Provide some information about the compiler.
4738 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4739 set X $ac_compile
4740 ac_compiler=$2
4741 for ac_option in --version -v -V -qversion; do
4742 { { ac_try="$ac_compiler $ac_option >&5"
4743 case "(($ac_try" in
4744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4745 *) ac_try_echo=$ac_try;;
4746 esac
4747 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4748 $as_echo "$ac_try_echo"; } >&5
4749 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4750 ac_status=$?
4751 if test -s conftest.err; then
4752 sed '10a\
4753 ... rest of stderr output deleted ...
4754 10q' conftest.err >conftest.er1
4755 cat conftest.er1 >&5
4757 rm -f conftest.er1 conftest.err
4758 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4759 test $ac_status = 0; }
4760 done
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4763 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4764 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4765 $as_echo_n "(cached) " >&6
4766 else
4767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4768 /* end confdefs.h. */
4771 main ()
4773 #ifndef __GNUC__
4774 choke me
4775 #endif
4778 return 0;
4780 _ACEOF
4781 if ac_fn_cxx_try_compile "$LINENO"; then :
4782 ac_compiler_gnu=yes
4783 else
4784 ac_compiler_gnu=no
4786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4787 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4791 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4792 if test $ac_compiler_gnu = yes; then
4793 GXX=yes
4794 else
4795 GXX=
4797 ac_test_CXXFLAGS=${CXXFLAGS+set}
4798 ac_save_CXXFLAGS=$CXXFLAGS
4799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4800 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4801 if ${ac_cv_prog_cxx_g+:} false; then :
4802 $as_echo_n "(cached) " >&6
4803 else
4804 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4805 ac_cxx_werror_flag=yes
4806 ac_cv_prog_cxx_g=no
4807 CXXFLAGS="-g"
4808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4809 /* end confdefs.h. */
4812 main ()
4816 return 0;
4818 _ACEOF
4819 if ac_fn_cxx_try_compile "$LINENO"; then :
4820 ac_cv_prog_cxx_g=yes
4821 else
4822 CXXFLAGS=""
4823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4824 /* end confdefs.h. */
4827 main ()
4831 return 0;
4833 _ACEOF
4834 if ac_fn_cxx_try_compile "$LINENO"; then :
4836 else
4837 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4838 CXXFLAGS="-g"
4839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4840 /* end confdefs.h. */
4843 main ()
4847 return 0;
4849 _ACEOF
4850 if ac_fn_cxx_try_compile "$LINENO"; then :
4851 ac_cv_prog_cxx_g=yes
4853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4858 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4861 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4862 if test "$ac_test_CXXFLAGS" = set; then
4863 CXXFLAGS=$ac_save_CXXFLAGS
4864 elif test $ac_cv_prog_cxx_g = yes; then
4865 if test "$GXX" = yes; then
4866 CXXFLAGS="-g -O2"
4867 else
4868 CXXFLAGS="-g"
4870 else
4871 if test "$GXX" = yes; then
4872 CXXFLAGS="-O2"
4873 else
4874 CXXFLAGS=
4877 ac_ext=c
4878 ac_cpp='$CPP $CPPFLAGS'
4879 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4880 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4881 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4884 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4885 # but has idiosyncrasies of its own. We assume icc will define
4886 # __INTEL_COMPILER regardless of CFLAGS.
4888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4889 /* end confdefs.h. */
4892 main ()
4894 #ifndef __INTEL_COMPILER
4895 choke me
4896 #endif
4898 return 0;
4900 _ACEOF
4901 if ac_fn_c_try_compile "$LINENO"; then :
4902 ICC=yes
4903 else
4904 ICC=no
4906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4908 # Check if it's Sun Studio compiler. We assume that
4909 # __SUNPRO_C will be defined for Sun Studio compilers
4910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4911 /* end confdefs.h. */
4914 main ()
4916 #ifndef __SUNPRO_C
4917 choke me
4918 #endif
4920 return 0;
4922 _ACEOF
4923 if ac_fn_c_try_compile "$LINENO"; then :
4924 SUN_STUDIO_CC=yes
4925 else
4926 SUN_STUDIO_CC=no
4928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4934 # LLVM
4936 # Checked early because subsequent tests depend on it.
4940 # Check whether --with-llvm was given.
4941 if test "${with_llvm+set}" = set; then :
4942 withval=$with_llvm;
4943 case $withval in
4944 yes)
4946 $as_echo "#define USE_LLVM 1" >>confdefs.h
4953 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4955 esac
4957 else
4958 with_llvm=no
4964 for ac_prog in gawk mawk nawk awk
4966 # Extract the first word of "$ac_prog", so it can be a program name with args.
4967 set dummy $ac_prog; ac_word=$2
4968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4969 $as_echo_n "checking for $ac_word... " >&6; }
4970 if ${ac_cv_prog_AWK+:} false; then :
4971 $as_echo_n "(cached) " >&6
4972 else
4973 if test -n "$AWK"; then
4974 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4975 else
4976 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4977 for as_dir in $PATH
4979 IFS=$as_save_IFS
4980 test -z "$as_dir" && as_dir=.
4981 for ac_exec_ext in '' $ac_executable_extensions; do
4982 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4983 ac_cv_prog_AWK="$ac_prog"
4984 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4985 break 2
4987 done
4988 done
4989 IFS=$as_save_IFS
4993 AWK=$ac_cv_prog_AWK
4994 if test -n "$AWK"; then
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4996 $as_echo "$AWK" >&6; }
4997 else
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4999 $as_echo "no" >&6; }
5003 test -n "$AWK" && break
5004 done
5006 if test "$with_llvm" = yes; then :
5012 if test -z "$LLVM_CONFIG"; then
5013 for ac_prog in llvm-config
5015 # Extract the first word of "$ac_prog", so it can be a program name with args.
5016 set dummy $ac_prog; ac_word=$2
5017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5018 $as_echo_n "checking for $ac_word... " >&6; }
5019 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5020 $as_echo_n "(cached) " >&6
5021 else
5022 case $LLVM_CONFIG in
5023 [\\/]* | ?:[\\/]*)
5024 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5027 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5028 for as_dir in $PATH
5030 IFS=$as_save_IFS
5031 test -z "$as_dir" && as_dir=.
5032 for ac_exec_ext in '' $ac_executable_extensions; do
5033 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5034 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5035 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5036 break 2
5038 done
5039 done
5040 IFS=$as_save_IFS
5043 esac
5045 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5046 if test -n "$LLVM_CONFIG"; then
5047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5048 $as_echo "$LLVM_CONFIG" >&6; }
5049 else
5050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5051 $as_echo "no" >&6; }
5055 test -n "$LLVM_CONFIG" && break
5056 done
5058 else
5059 # Report the value of LLVM_CONFIG in configure's output in all cases.
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5061 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5063 $as_echo "$LLVM_CONFIG" >&6; }
5067 # no point continuing if llvm wasn't found
5068 if test -z "$LLVM_CONFIG"; then
5069 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5071 # check if detected $LLVM_CONFIG is executable
5072 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5073 if test "x$pgac_llvm_version" = "xno"; then
5074 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5076 # and whether the version is supported
5077 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 14) exit 1; else exit 0;}';then
5078 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 14 is required" "$LINENO" 5
5080 { $as_echo "$as_me:${as_lineno-$LINENO}: using llvm $pgac_llvm_version" >&5
5081 $as_echo "$as_me: using llvm $pgac_llvm_version" >&6;}
5083 # need clang to create some bitcode files
5085 if test -z "$CLANG"; then
5086 for ac_prog in clang
5088 # Extract the first word of "$ac_prog", so it can be a program name with args.
5089 set dummy $ac_prog; ac_word=$2
5090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5091 $as_echo_n "checking for $ac_word... " >&6; }
5092 if ${ac_cv_path_CLANG+:} false; then :
5093 $as_echo_n "(cached) " >&6
5094 else
5095 case $CLANG in
5096 [\\/]* | ?:[\\/]*)
5097 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5100 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5101 for as_dir in $PATH
5103 IFS=$as_save_IFS
5104 test -z "$as_dir" && as_dir=.
5105 for ac_exec_ext in '' $ac_executable_extensions; do
5106 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5107 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5108 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5109 break 2
5111 done
5112 done
5113 IFS=$as_save_IFS
5116 esac
5118 CLANG=$ac_cv_path_CLANG
5119 if test -n "$CLANG"; then
5120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5121 $as_echo "$CLANG" >&6; }
5122 else
5123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5124 $as_echo "no" >&6; }
5128 test -n "$CLANG" && break
5129 done
5131 else
5132 # Report the value of CLANG in configure's output in all cases.
5133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5134 $as_echo_n "checking for CLANG... " >&6; }
5135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5136 $as_echo "$CLANG" >&6; }
5139 if test -z "$CLANG"; then
5140 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5142 # make sure clang is executable
5143 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5144 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5146 # Could check clang version, but it doesn't seem that
5147 # important. Systems with a new enough LLVM version are usually
5148 # going to have a decent clang version too. It's also not entirely
5149 # clear what the minimum version is.
5151 # Collect compiler flags necessary to build the LLVM dependent
5152 # shared library.
5153 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5154 case $pgac_option in
5155 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5156 esac
5157 done
5159 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5160 case $pgac_option in
5161 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5162 esac
5163 done
5165 # ABI influencing options, standard influencing options
5166 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5167 case $pgac_option in
5168 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5169 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5170 esac
5171 done
5173 # Look for components we're interested in, collect necessary
5174 # libs. As some components are optional, we can't just list all of
5175 # them as it'd raise an error.
5176 pgac_components='';
5177 for pgac_component in `$LLVM_CONFIG --components`; do
5178 case $pgac_component in
5179 engine) pgac_components="$pgac_components $pgac_component";;
5180 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5181 orcjit) pgac_components="$pgac_components $pgac_component";;
5182 passes) pgac_components="$pgac_components $pgac_component";;
5183 native) pgac_components="$pgac_components $pgac_component";;
5184 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5185 esac
5186 done;
5188 # And then get the libraries that need to be linked in for the
5189 # selected components. They're large libraries, we only want to
5190 # link them into the LLVM using shared library.
5191 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5192 case $pgac_option in
5193 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5194 esac
5195 done
5197 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5207 fi # fi
5210 unset CFLAGS
5211 unset CXXFLAGS
5214 # Read the template
5216 . "$srcdir/src/template/$template" || exit
5218 # C[XX]FLAGS are selected so:
5219 # If the user specifies something in the environment, that is used.
5220 # else: If the template file set something, that is used.
5221 # else: If coverage was enabled, don't set anything.
5222 # else: If the compiler is GCC, then we use -O2.
5223 # else: If the compiler is something else, then we use -O, unless debugging.
5225 if test "$ac_env_CFLAGS_set" = set; then
5226 CFLAGS=$ac_env_CFLAGS_value
5227 elif test "${CFLAGS+set}" = set; then
5228 : # (keep what template set)
5229 elif test "$enable_coverage" = yes; then
5230 : # no optimization by default
5231 elif test "$GCC" = yes; then
5232 CFLAGS="-O2"
5233 else
5234 # if the user selected debug mode, don't use -O
5235 if test "$enable_debug" != yes; then
5236 CFLAGS="-O"
5240 if test "$ac_env_CXXFLAGS_set" = set; then
5241 CXXFLAGS=$ac_env_CXXFLAGS_value
5242 elif test "${CXXFLAGS+set}" = set; then
5243 : # (keep what template set)
5244 elif test "$enable_coverage" = yes; then
5245 : # no optimization by default
5246 elif test "$GCC" = yes; then
5247 CXXFLAGS="-O2"
5248 else
5249 # if the user selected debug mode, don't use -O
5250 if test "$enable_debug" != yes; then
5251 CXXFLAGS="-O"
5255 # When generating bitcode (for inlining) we always want to use -O2
5256 # even when --enable-debug is specified. The bitcode is not going to
5257 # be used for line-by-line debugging, and JIT inlining doesn't work
5258 # without at least -O1 (otherwise clang will emit 'noinline'
5259 # attributes everywhere), which is bad for testing. Still allow the
5260 # environment to override if done explicitly.
5261 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5262 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5263 else
5264 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5266 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5267 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5268 else
5269 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5272 # C[XX]FLAGS we determined above will be added back at the end
5273 user_CFLAGS=$CFLAGS
5274 CFLAGS=""
5275 user_CXXFLAGS=$CXXFLAGS
5276 CXXFLAGS=""
5277 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5278 BITCODE_CFLAGS=""
5279 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5280 BITCODE_CXXFLAGS=""
5282 # set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5283 if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5284 CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5286 if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5287 CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5290 # Some versions of GCC support some additional useful warning flags.
5291 # Check whether they are supported, and add them to CFLAGS if so.
5292 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5293 # but has its own. Also check other compiler-specific flags here.
5295 if test "$GCC" = yes -a "$ICC" = no; then
5296 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5297 CXXFLAGS="-Wall -Wpointer-arith"
5298 # These work in some but not all gcc versions
5299 save_CFLAGS=$CFLAGS
5301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5302 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5303 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5304 $as_echo_n "(cached) " >&6
5305 else
5306 pgac_save_CFLAGS=$CFLAGS
5307 pgac_save_CC=$CC
5308 CC=${CC}
5309 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5310 ac_save_c_werror_flag=$ac_c_werror_flag
5311 ac_c_werror_flag=yes
5312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5313 /* end confdefs.h. */
5316 main ()
5320 return 0;
5322 _ACEOF
5323 if ac_fn_c_try_compile "$LINENO"; then :
5324 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5325 else
5326 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5329 ac_c_werror_flag=$ac_save_c_werror_flag
5330 CFLAGS="$pgac_save_CFLAGS"
5331 CC="$pgac_save_CC"
5333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5334 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5335 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5336 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5340 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5341 # disable it, so AC_SUBST the negative form.
5342 PERMIT_DECLARATION_AFTER_STATEMENT=
5343 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5344 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5347 # Really don't want VLAs to be used in our dialect of C
5349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5350 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5351 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5352 $as_echo_n "(cached) " >&6
5353 else
5354 pgac_save_CFLAGS=$CFLAGS
5355 pgac_save_CC=$CC
5356 CC=${CC}
5357 CFLAGS="${CFLAGS} -Werror=vla"
5358 ac_save_c_werror_flag=$ac_c_werror_flag
5359 ac_c_werror_flag=yes
5360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5361 /* end confdefs.h. */
5364 main ()
5368 return 0;
5370 _ACEOF
5371 if ac_fn_c_try_compile "$LINENO"; then :
5372 pgac_cv_prog_CC_cflags__Werror_vla=yes
5373 else
5374 pgac_cv_prog_CC_cflags__Werror_vla=no
5376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5377 ac_c_werror_flag=$ac_save_c_werror_flag
5378 CFLAGS="$pgac_save_CFLAGS"
5379 CC="$pgac_save_CC"
5381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5382 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5383 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5384 CFLAGS="${CFLAGS} -Werror=vla"
5388 # On macOS, complain about usage of symbols newer than the deployment target
5390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS" >&5
5391 $as_echo_n "checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS... " >&6; }
5392 if ${pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new+:} false; then :
5393 $as_echo_n "(cached) " >&6
5394 else
5395 pgac_save_CFLAGS=$CFLAGS
5396 pgac_save_CC=$CC
5397 CC=${CC}
5398 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5399 ac_save_c_werror_flag=$ac_c_werror_flag
5400 ac_c_werror_flag=yes
5401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5402 /* end confdefs.h. */
5405 main ()
5409 return 0;
5411 _ACEOF
5412 if ac_fn_c_try_compile "$LINENO"; then :
5413 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=yes
5414 else
5415 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=no
5417 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5418 ac_c_werror_flag=$ac_save_c_werror_flag
5419 CFLAGS="$pgac_save_CFLAGS"
5420 CC="$pgac_save_CC"
5422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&5
5423 $as_echo "$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&6; }
5424 if test x"$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" = x"yes"; then
5425 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS" >&5
5430 $as_echo_n "checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS... " >&6; }
5431 if ${pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new+:} false; then :
5432 $as_echo_n "(cached) " >&6
5433 else
5434 pgac_save_CXXFLAGS=$CXXFLAGS
5435 pgac_save_CXX=$CXX
5436 CXX=${CXX}
5437 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5438 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5439 ac_cxx_werror_flag=yes
5440 ac_ext=cpp
5441 ac_cpp='$CXXCPP $CPPFLAGS'
5442 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5443 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5444 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5447 /* end confdefs.h. */
5450 main ()
5454 return 0;
5456 _ACEOF
5457 if ac_fn_cxx_try_compile "$LINENO"; then :
5458 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=yes
5459 else
5460 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=no
5462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5463 ac_ext=c
5464 ac_cpp='$CPP $CPPFLAGS'
5465 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5466 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5467 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5469 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5470 CXXFLAGS="$pgac_save_CXXFLAGS"
5471 CXX="$pgac_save_CXX"
5473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&5
5474 $as_echo "$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&6; }
5475 if test x"$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" = x"yes"; then
5476 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5480 # -Wvla is not applicable for C++
5482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5483 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5484 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5485 $as_echo_n "(cached) " >&6
5486 else
5487 pgac_save_CFLAGS=$CFLAGS
5488 pgac_save_CC=$CC
5489 CC=${CC}
5490 CFLAGS="${CFLAGS} -Wendif-labels"
5491 ac_save_c_werror_flag=$ac_c_werror_flag
5492 ac_c_werror_flag=yes
5493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5494 /* end confdefs.h. */
5497 main ()
5501 return 0;
5503 _ACEOF
5504 if ac_fn_c_try_compile "$LINENO"; then :
5505 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5506 else
5507 pgac_cv_prog_CC_cflags__Wendif_labels=no
5509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5510 ac_c_werror_flag=$ac_save_c_werror_flag
5511 CFLAGS="$pgac_save_CFLAGS"
5512 CC="$pgac_save_CC"
5514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5515 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5516 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5517 CFLAGS="${CFLAGS} -Wendif-labels"
5521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5522 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5523 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5524 $as_echo_n "(cached) " >&6
5525 else
5526 pgac_save_CXXFLAGS=$CXXFLAGS
5527 pgac_save_CXX=$CXX
5528 CXX=${CXX}
5529 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5530 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5531 ac_cxx_werror_flag=yes
5532 ac_ext=cpp
5533 ac_cpp='$CXXCPP $CPPFLAGS'
5534 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5535 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5536 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5539 /* end confdefs.h. */
5542 main ()
5546 return 0;
5548 _ACEOF
5549 if ac_fn_cxx_try_compile "$LINENO"; then :
5550 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5551 else
5552 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5555 ac_ext=c
5556 ac_cpp='$CPP $CPPFLAGS'
5557 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5558 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5559 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5561 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5562 CXXFLAGS="$pgac_save_CXXFLAGS"
5563 CXX="$pgac_save_CXX"
5565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5566 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5567 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5568 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5574 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5575 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5576 $as_echo_n "(cached) " >&6
5577 else
5578 pgac_save_CFLAGS=$CFLAGS
5579 pgac_save_CC=$CC
5580 CC=${CC}
5581 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5582 ac_save_c_werror_flag=$ac_c_werror_flag
5583 ac_c_werror_flag=yes
5584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5585 /* end confdefs.h. */
5588 main ()
5592 return 0;
5594 _ACEOF
5595 if ac_fn_c_try_compile "$LINENO"; then :
5596 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5597 else
5598 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5601 ac_c_werror_flag=$ac_save_c_werror_flag
5602 CFLAGS="$pgac_save_CFLAGS"
5603 CC="$pgac_save_CC"
5605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5606 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5607 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5608 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5613 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5614 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5615 $as_echo_n "(cached) " >&6
5616 else
5617 pgac_save_CXXFLAGS=$CXXFLAGS
5618 pgac_save_CXX=$CXX
5619 CXX=${CXX}
5620 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5621 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5622 ac_cxx_werror_flag=yes
5623 ac_ext=cpp
5624 ac_cpp='$CXXCPP $CPPFLAGS'
5625 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5626 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5627 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5630 /* end confdefs.h. */
5633 main ()
5637 return 0;
5639 _ACEOF
5640 if ac_fn_cxx_try_compile "$LINENO"; then :
5641 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5642 else
5643 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5646 ac_ext=c
5647 ac_cpp='$CPP $CPPFLAGS'
5648 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5649 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5650 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5652 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5653 CXXFLAGS="$pgac_save_CXXFLAGS"
5654 CXX="$pgac_save_CXX"
5656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5657 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5658 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5659 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5665 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5666 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5667 $as_echo_n "(cached) " >&6
5668 else
5669 pgac_save_CFLAGS=$CFLAGS
5670 pgac_save_CC=$CC
5671 CC=${CC}
5672 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5673 ac_save_c_werror_flag=$ac_c_werror_flag
5674 ac_c_werror_flag=yes
5675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5676 /* end confdefs.h. */
5679 main ()
5683 return 0;
5685 _ACEOF
5686 if ac_fn_c_try_compile "$LINENO"; then :
5687 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5688 else
5689 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5692 ac_c_werror_flag=$ac_save_c_werror_flag
5693 CFLAGS="$pgac_save_CFLAGS"
5694 CC="$pgac_save_CC"
5696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5697 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5698 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5699 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5704 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5705 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5706 $as_echo_n "(cached) " >&6
5707 else
5708 pgac_save_CXXFLAGS=$CXXFLAGS
5709 pgac_save_CXX=$CXX
5710 CXX=${CXX}
5711 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5712 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5713 ac_cxx_werror_flag=yes
5714 ac_ext=cpp
5715 ac_cpp='$CXXCPP $CPPFLAGS'
5716 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5717 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5718 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5721 /* end confdefs.h. */
5724 main ()
5728 return 0;
5730 _ACEOF
5731 if ac_fn_cxx_try_compile "$LINENO"; then :
5732 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5733 else
5734 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5737 ac_ext=c
5738 ac_cpp='$CPP $CPPFLAGS'
5739 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5740 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5741 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5743 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5744 CXXFLAGS="$pgac_save_CXXFLAGS"
5745 CXX="$pgac_save_CXX"
5747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5748 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5749 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5750 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5756 $as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5757 if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5758 $as_echo_n "(cached) " >&6
5759 else
5760 pgac_save_CFLAGS=$CFLAGS
5761 pgac_save_CC=$CC
5762 CC=${CC}
5763 CFLAGS="${CFLAGS} -Wcast-function-type"
5764 ac_save_c_werror_flag=$ac_c_werror_flag
5765 ac_c_werror_flag=yes
5766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5767 /* end confdefs.h. */
5770 main ()
5774 return 0;
5776 _ACEOF
5777 if ac_fn_c_try_compile "$LINENO"; then :
5778 pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5779 else
5780 pgac_cv_prog_CC_cflags__Wcast_function_type=no
5782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5783 ac_c_werror_flag=$ac_save_c_werror_flag
5784 CFLAGS="$pgac_save_CFLAGS"
5785 CC="$pgac_save_CC"
5787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5788 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5789 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5790 CFLAGS="${CFLAGS} -Wcast-function-type"
5794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5795 $as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5796 if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5797 $as_echo_n "(cached) " >&6
5798 else
5799 pgac_save_CXXFLAGS=$CXXFLAGS
5800 pgac_save_CXX=$CXX
5801 CXX=${CXX}
5802 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5803 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5804 ac_cxx_werror_flag=yes
5805 ac_ext=cpp
5806 ac_cpp='$CXXCPP $CPPFLAGS'
5807 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5808 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5809 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5812 /* end confdefs.h. */
5815 main ()
5819 return 0;
5821 _ACEOF
5822 if ac_fn_cxx_try_compile "$LINENO"; then :
5823 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5824 else
5825 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5828 ac_ext=c
5829 ac_cpp='$CPP $CPPFLAGS'
5830 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5831 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5832 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5834 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5835 CXXFLAGS="$pgac_save_CXXFLAGS"
5836 CXX="$pgac_save_CXX"
5838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5839 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5840 if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5841 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS" >&5
5847 $as_echo_n "checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS... " >&6; }
5848 if ${pgac_cv_prog_CC_cflags__Wshadow_compatible_local+:} false; then :
5849 $as_echo_n "(cached) " >&6
5850 else
5851 pgac_save_CFLAGS=$CFLAGS
5852 pgac_save_CC=$CC
5853 CC=${CC}
5854 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5855 ac_save_c_werror_flag=$ac_c_werror_flag
5856 ac_c_werror_flag=yes
5857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5858 /* end confdefs.h. */
5861 main ()
5865 return 0;
5867 _ACEOF
5868 if ac_fn_c_try_compile "$LINENO"; then :
5869 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=yes
5870 else
5871 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=no
5873 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5874 ac_c_werror_flag=$ac_save_c_werror_flag
5875 CFLAGS="$pgac_save_CFLAGS"
5876 CC="$pgac_save_CC"
5878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&5
5879 $as_echo "$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&6; }
5880 if test x"$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" = x"yes"; then
5881 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS" >&5
5886 $as_echo_n "checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS... " >&6; }
5887 if ${pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local+:} false; then :
5888 $as_echo_n "(cached) " >&6
5889 else
5890 pgac_save_CXXFLAGS=$CXXFLAGS
5891 pgac_save_CXX=$CXX
5892 CXX=${CXX}
5893 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5894 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5895 ac_cxx_werror_flag=yes
5896 ac_ext=cpp
5897 ac_cpp='$CXXCPP $CPPFLAGS'
5898 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5899 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5900 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5903 /* end confdefs.h. */
5906 main ()
5910 return 0;
5912 _ACEOF
5913 if ac_fn_cxx_try_compile "$LINENO"; then :
5914 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=yes
5915 else
5916 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=no
5918 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5919 ac_ext=c
5920 ac_cpp='$CPP $CPPFLAGS'
5921 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5922 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5923 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5925 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5926 CXXFLAGS="$pgac_save_CXXFLAGS"
5927 CXX="$pgac_save_CXX"
5929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&5
5930 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&6; }
5931 if test x"$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" = x"yes"; then
5932 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5936 # This was included in -Wall/-Wformat in older GCC versions
5938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5939 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5940 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5941 $as_echo_n "(cached) " >&6
5942 else
5943 pgac_save_CFLAGS=$CFLAGS
5944 pgac_save_CC=$CC
5945 CC=${CC}
5946 CFLAGS="${CFLAGS} -Wformat-security"
5947 ac_save_c_werror_flag=$ac_c_werror_flag
5948 ac_c_werror_flag=yes
5949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5950 /* end confdefs.h. */
5953 main ()
5957 return 0;
5959 _ACEOF
5960 if ac_fn_c_try_compile "$LINENO"; then :
5961 pgac_cv_prog_CC_cflags__Wformat_security=yes
5962 else
5963 pgac_cv_prog_CC_cflags__Wformat_security=no
5965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5966 ac_c_werror_flag=$ac_save_c_werror_flag
5967 CFLAGS="$pgac_save_CFLAGS"
5968 CC="$pgac_save_CC"
5970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5971 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5972 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5973 CFLAGS="${CFLAGS} -Wformat-security"
5977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5978 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5979 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5980 $as_echo_n "(cached) " >&6
5981 else
5982 pgac_save_CXXFLAGS=$CXXFLAGS
5983 pgac_save_CXX=$CXX
5984 CXX=${CXX}
5985 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5986 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5987 ac_cxx_werror_flag=yes
5988 ac_ext=cpp
5989 ac_cpp='$CXXCPP $CPPFLAGS'
5990 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5991 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5992 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5995 /* end confdefs.h. */
5998 main ()
6002 return 0;
6004 _ACEOF
6005 if ac_fn_cxx_try_compile "$LINENO"; then :
6006 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
6007 else
6008 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
6010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6011 ac_ext=c
6012 ac_cpp='$CPP $CPPFLAGS'
6013 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6014 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6015 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6017 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6018 CXXFLAGS="$pgac_save_CXXFLAGS"
6019 CXX="$pgac_save_CXX"
6021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
6022 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
6023 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
6024 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6028 # gcc 14+, clang for a while
6029 # (Supported in C++ by clang but not gcc. For consistency, omit in C++.)
6030 save_CFLAGS=$CFLAGS
6032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-variable-declarations, for CFLAGS" >&5
6033 $as_echo_n "checking whether ${CC} supports -Wmissing-variable-declarations, for CFLAGS... " >&6; }
6034 if ${pgac_cv_prog_CC_cflags__Wmissing_variable_declarations+:} false; then :
6035 $as_echo_n "(cached) " >&6
6036 else
6037 pgac_save_CFLAGS=$CFLAGS
6038 pgac_save_CC=$CC
6039 CC=${CC}
6040 CFLAGS="${CFLAGS} -Wmissing-variable-declarations"
6041 ac_save_c_werror_flag=$ac_c_werror_flag
6042 ac_c_werror_flag=yes
6043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6044 /* end confdefs.h. */
6047 main ()
6051 return 0;
6053 _ACEOF
6054 if ac_fn_c_try_compile "$LINENO"; then :
6055 pgac_cv_prog_CC_cflags__Wmissing_variable_declarations=yes
6056 else
6057 pgac_cv_prog_CC_cflags__Wmissing_variable_declarations=no
6059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6060 ac_c_werror_flag=$ac_save_c_werror_flag
6061 CFLAGS="$pgac_save_CFLAGS"
6062 CC="$pgac_save_CC"
6064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_variable_declarations" >&5
6065 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_variable_declarations" >&6; }
6066 if test x"$pgac_cv_prog_CC_cflags__Wmissing_variable_declarations" = x"yes"; then
6067 CFLAGS="${CFLAGS} -Wmissing-variable-declarations"
6071 PERMIT_MISSING_VARIABLE_DECLARATIONS=
6072 if test x"$save_CFLAGS" != x"$CFLAGS"; then
6073 PERMIT_MISSING_VARIABLE_DECLARATIONS=-Wno-missing-variable-declarations
6076 # Disable strict-aliasing rules; needed for gcc 3.3+
6078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6079 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6080 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6081 $as_echo_n "(cached) " >&6
6082 else
6083 pgac_save_CFLAGS=$CFLAGS
6084 pgac_save_CC=$CC
6085 CC=${CC}
6086 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6087 ac_save_c_werror_flag=$ac_c_werror_flag
6088 ac_c_werror_flag=yes
6089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6090 /* end confdefs.h. */
6093 main ()
6097 return 0;
6099 _ACEOF
6100 if ac_fn_c_try_compile "$LINENO"; then :
6101 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6102 else
6103 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6105 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6106 ac_c_werror_flag=$ac_save_c_werror_flag
6107 CFLAGS="$pgac_save_CFLAGS"
6108 CC="$pgac_save_CC"
6110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6111 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6112 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6113 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6118 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6119 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6120 $as_echo_n "(cached) " >&6
6121 else
6122 pgac_save_CXXFLAGS=$CXXFLAGS
6123 pgac_save_CXX=$CXX
6124 CXX=${CXX}
6125 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6126 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6127 ac_cxx_werror_flag=yes
6128 ac_ext=cpp
6129 ac_cpp='$CXXCPP $CPPFLAGS'
6130 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6131 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6132 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6135 /* end confdefs.h. */
6138 main ()
6142 return 0;
6144 _ACEOF
6145 if ac_fn_cxx_try_compile "$LINENO"; then :
6146 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6147 else
6148 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6151 ac_ext=c
6152 ac_cpp='$CPP $CPPFLAGS'
6153 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6154 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6155 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6157 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6158 CXXFLAGS="$pgac_save_CXXFLAGS"
6159 CXX="$pgac_save_CXX"
6161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6162 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6163 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6164 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6168 # Disable optimizations that assume no overflow; needed for gcc 4.3+
6170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
6171 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
6172 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
6173 $as_echo_n "(cached) " >&6
6174 else
6175 pgac_save_CFLAGS=$CFLAGS
6176 pgac_save_CC=$CC
6177 CC=${CC}
6178 CFLAGS="${CFLAGS} -fwrapv"
6179 ac_save_c_werror_flag=$ac_c_werror_flag
6180 ac_c_werror_flag=yes
6181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6182 /* end confdefs.h. */
6185 main ()
6189 return 0;
6191 _ACEOF
6192 if ac_fn_c_try_compile "$LINENO"; then :
6193 pgac_cv_prog_CC_cflags__fwrapv=yes
6194 else
6195 pgac_cv_prog_CC_cflags__fwrapv=no
6197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6198 ac_c_werror_flag=$ac_save_c_werror_flag
6199 CFLAGS="$pgac_save_CFLAGS"
6200 CC="$pgac_save_CC"
6202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
6203 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
6204 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
6205 CFLAGS="${CFLAGS} -fwrapv"
6209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
6210 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
6211 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
6212 $as_echo_n "(cached) " >&6
6213 else
6214 pgac_save_CXXFLAGS=$CXXFLAGS
6215 pgac_save_CXX=$CXX
6216 CXX=${CXX}
6217 CXXFLAGS="${CXXFLAGS} -fwrapv"
6218 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6219 ac_cxx_werror_flag=yes
6220 ac_ext=cpp
6221 ac_cpp='$CXXCPP $CPPFLAGS'
6222 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6223 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6224 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6227 /* end confdefs.h. */
6230 main ()
6234 return 0;
6236 _ACEOF
6237 if ac_fn_cxx_try_compile "$LINENO"; then :
6238 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6239 else
6240 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6243 ac_ext=c
6244 ac_cpp='$CPP $CPPFLAGS'
6245 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6246 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6247 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6249 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6250 CXXFLAGS="$pgac_save_CXXFLAGS"
6251 CXX="$pgac_save_CXX"
6253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6254 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6255 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6256 CXXFLAGS="${CXXFLAGS} -fwrapv"
6260 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6263 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6264 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6265 $as_echo_n "(cached) " >&6
6266 else
6267 pgac_save_CFLAGS=$CFLAGS
6268 pgac_save_CC=$CC
6269 CC=${CC}
6270 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6271 ac_save_c_werror_flag=$ac_c_werror_flag
6272 ac_c_werror_flag=yes
6273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6274 /* end confdefs.h. */
6277 main ()
6281 return 0;
6283 _ACEOF
6284 if ac_fn_c_try_compile "$LINENO"; then :
6285 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6286 else
6287 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6290 ac_c_werror_flag=$ac_save_c_werror_flag
6291 CFLAGS="$pgac_save_CFLAGS"
6292 CC="$pgac_save_CC"
6294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6295 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6296 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6297 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6302 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6303 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6304 $as_echo_n "(cached) " >&6
6305 else
6306 pgac_save_CXXFLAGS=$CXXFLAGS
6307 pgac_save_CXX=$CXX
6308 CXX=${CXX}
6309 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6310 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6311 ac_cxx_werror_flag=yes
6312 ac_ext=cpp
6313 ac_cpp='$CXXCPP $CPPFLAGS'
6314 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6315 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6316 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6319 /* end confdefs.h. */
6322 main ()
6326 return 0;
6328 _ACEOF
6329 if ac_fn_cxx_try_compile "$LINENO"; then :
6330 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6331 else
6332 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6335 ac_ext=c
6336 ac_cpp='$CPP $CPPFLAGS'
6337 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6338 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6339 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6341 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6342 CXXFLAGS="$pgac_save_CXXFLAGS"
6343 CXX="$pgac_save_CXX"
6345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6346 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6347 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6348 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6352 # Optimization flags for specific files that benefit from loop unrolling
6353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6354 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6355 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6356 $as_echo_n "(cached) " >&6
6357 else
6358 pgac_save_CFLAGS=$CFLAGS
6359 pgac_save_CC=$CC
6360 CC=${CC}
6361 CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6362 ac_save_c_werror_flag=$ac_c_werror_flag
6363 ac_c_werror_flag=yes
6364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6365 /* end confdefs.h. */
6368 main ()
6372 return 0;
6374 _ACEOF
6375 if ac_fn_c_try_compile "$LINENO"; then :
6376 pgac_cv_prog_CC_cflags__funroll_loops=yes
6377 else
6378 pgac_cv_prog_CC_cflags__funroll_loops=no
6380 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6381 ac_c_werror_flag=$ac_save_c_werror_flag
6382 CFLAGS="$pgac_save_CFLAGS"
6383 CC="$pgac_save_CC"
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6386 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6387 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6388 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6392 # Optimization flags for specific files that benefit from vectorization
6393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6394 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6395 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6396 $as_echo_n "(cached) " >&6
6397 else
6398 pgac_save_CFLAGS=$CFLAGS
6399 pgac_save_CC=$CC
6400 CC=${CC}
6401 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6402 ac_save_c_werror_flag=$ac_c_werror_flag
6403 ac_c_werror_flag=yes
6404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6405 /* end confdefs.h. */
6408 main ()
6412 return 0;
6414 _ACEOF
6415 if ac_fn_c_try_compile "$LINENO"; then :
6416 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6417 else
6418 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6421 ac_c_werror_flag=$ac_save_c_werror_flag
6422 CFLAGS="$pgac_save_CFLAGS"
6423 CC="$pgac_save_CC"
6425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6426 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6427 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6428 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6433 # The following tests want to suppress various unhelpful warnings by adding
6434 # -Wno-foo switches. But gcc won't complain about unrecognized -Wno-foo
6435 # switches, so we have to test for the positive form and if that works,
6436 # add the negative form. Note that tests of this form typically need to
6437 # be duplicated in the BITCODE_CFLAGS setup stanza below.
6439 # Suppress clang's unhelpful unused-command-line-argument warnings.
6440 NOT_THE_CFLAGS=""
6441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6442 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6443 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6444 $as_echo_n "(cached) " >&6
6445 else
6446 pgac_save_CFLAGS=$CFLAGS
6447 pgac_save_CC=$CC
6448 CC=${CC}
6449 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6450 ac_save_c_werror_flag=$ac_c_werror_flag
6451 ac_c_werror_flag=yes
6452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6453 /* end confdefs.h. */
6456 main ()
6460 return 0;
6462 _ACEOF
6463 if ac_fn_c_try_compile "$LINENO"; then :
6464 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6465 else
6466 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6469 ac_c_werror_flag=$ac_save_c_werror_flag
6470 CFLAGS="$pgac_save_CFLAGS"
6471 CC="$pgac_save_CC"
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6474 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6475 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6476 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6480 if test -n "$NOT_THE_CFLAGS"; then
6481 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6483 # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
6484 # of warnings when building plperl because of usages in the Perl headers.
6485 NOT_THE_CFLAGS=""
6486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
6487 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
6488 if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then :
6489 $as_echo_n "(cached) " >&6
6490 else
6491 pgac_save_CFLAGS=$CFLAGS
6492 pgac_save_CC=$CC
6493 CC=${CC}
6494 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6495 ac_save_c_werror_flag=$ac_c_werror_flag
6496 ac_c_werror_flag=yes
6497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6498 /* end confdefs.h. */
6501 main ()
6505 return 0;
6507 _ACEOF
6508 if ac_fn_c_try_compile "$LINENO"; then :
6509 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes
6510 else
6511 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no
6513 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6514 ac_c_werror_flag=$ac_save_c_werror_flag
6515 CFLAGS="$pgac_save_CFLAGS"
6516 CC="$pgac_save_CC"
6518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5
6519 $as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; }
6520 if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then
6521 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6525 if test -n "$NOT_THE_CFLAGS"; then
6526 CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
6528 # Similarly disable useless truncation warnings from gcc 8+
6529 NOT_THE_CFLAGS=""
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6531 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6532 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6533 $as_echo_n "(cached) " >&6
6534 else
6535 pgac_save_CFLAGS=$CFLAGS
6536 pgac_save_CC=$CC
6537 CC=${CC}
6538 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6539 ac_save_c_werror_flag=$ac_c_werror_flag
6540 ac_c_werror_flag=yes
6541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6542 /* end confdefs.h. */
6545 main ()
6549 return 0;
6551 _ACEOF
6552 if ac_fn_c_try_compile "$LINENO"; then :
6553 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6554 else
6555 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6557 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6558 ac_c_werror_flag=$ac_save_c_werror_flag
6559 CFLAGS="$pgac_save_CFLAGS"
6560 CC="$pgac_save_CC"
6562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6563 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6564 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6565 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6569 if test -n "$NOT_THE_CFLAGS"; then
6570 CFLAGS="$CFLAGS -Wno-format-truncation"
6572 NOT_THE_CFLAGS=""
6573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6574 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6575 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6576 $as_echo_n "(cached) " >&6
6577 else
6578 pgac_save_CFLAGS=$CFLAGS
6579 pgac_save_CC=$CC
6580 CC=${CC}
6581 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6582 ac_save_c_werror_flag=$ac_c_werror_flag
6583 ac_c_werror_flag=yes
6584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6585 /* end confdefs.h. */
6588 main ()
6592 return 0;
6594 _ACEOF
6595 if ac_fn_c_try_compile "$LINENO"; then :
6596 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6597 else
6598 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6601 ac_c_werror_flag=$ac_save_c_werror_flag
6602 CFLAGS="$pgac_save_CFLAGS"
6603 CC="$pgac_save_CC"
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6606 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6607 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6608 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6612 if test -n "$NOT_THE_CFLAGS"; then
6613 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6615 # Suppress clang 16's strict warnings about function casts
6616 NOT_THE_CFLAGS=""
6617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS" >&5
6618 $as_echo_n "checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS... " >&6; }
6619 if ${pgac_cv_prog_CC_cflags__Wcast_function_type_strict+:} false; then :
6620 $as_echo_n "(cached) " >&6
6621 else
6622 pgac_save_CFLAGS=$CFLAGS
6623 pgac_save_CC=$CC
6624 CC=${CC}
6625 CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6626 ac_save_c_werror_flag=$ac_c_werror_flag
6627 ac_c_werror_flag=yes
6628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6629 /* end confdefs.h. */
6632 main ()
6636 return 0;
6638 _ACEOF
6639 if ac_fn_c_try_compile "$LINENO"; then :
6640 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=yes
6641 else
6642 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=no
6644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6645 ac_c_werror_flag=$ac_save_c_werror_flag
6646 CFLAGS="$pgac_save_CFLAGS"
6647 CC="$pgac_save_CC"
6649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&5
6650 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&6; }
6651 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" = x"yes"; then
6652 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6656 if test -n "$NOT_THE_CFLAGS"; then
6657 CFLAGS="$CFLAGS -Wno-cast-function-type-strict"
6659 elif test "$ICC" = yes; then
6660 # Intel's compiler has a bug/misoptimization in checking for
6661 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6664 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6665 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6666 $as_echo_n "(cached) " >&6
6667 else
6668 pgac_save_CFLAGS=$CFLAGS
6669 pgac_save_CC=$CC
6670 CC=${CC}
6671 CFLAGS="${CFLAGS} -mp1"
6672 ac_save_c_werror_flag=$ac_c_werror_flag
6673 ac_c_werror_flag=yes
6674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6675 /* end confdefs.h. */
6678 main ()
6682 return 0;
6684 _ACEOF
6685 if ac_fn_c_try_compile "$LINENO"; then :
6686 pgac_cv_prog_CC_cflags__mp1=yes
6687 else
6688 pgac_cv_prog_CC_cflags__mp1=no
6690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6691 ac_c_werror_flag=$ac_save_c_werror_flag
6692 CFLAGS="$pgac_save_CFLAGS"
6693 CC="$pgac_save_CC"
6695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6696 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6697 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6698 CFLAGS="${CFLAGS} -mp1"
6702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6703 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6704 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6705 $as_echo_n "(cached) " >&6
6706 else
6707 pgac_save_CXXFLAGS=$CXXFLAGS
6708 pgac_save_CXX=$CXX
6709 CXX=${CXX}
6710 CXXFLAGS="${CXXFLAGS} -mp1"
6711 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6712 ac_cxx_werror_flag=yes
6713 ac_ext=cpp
6714 ac_cpp='$CXXCPP $CPPFLAGS'
6715 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6716 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6717 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6720 /* end confdefs.h. */
6723 main ()
6727 return 0;
6729 _ACEOF
6730 if ac_fn_cxx_try_compile "$LINENO"; then :
6731 pgac_cv_prog_CXX_cxxflags__mp1=yes
6732 else
6733 pgac_cv_prog_CXX_cxxflags__mp1=no
6735 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6736 ac_ext=c
6737 ac_cpp='$CPP $CPPFLAGS'
6738 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6739 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6740 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6742 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6743 CXXFLAGS="$pgac_save_CXXFLAGS"
6744 CXX="$pgac_save_CXX"
6746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6747 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6748 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6749 CXXFLAGS="${CXXFLAGS} -mp1"
6753 # Make sure strict aliasing is off (though this is said to be the default)
6755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6756 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6757 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6758 $as_echo_n "(cached) " >&6
6759 else
6760 pgac_save_CFLAGS=$CFLAGS
6761 pgac_save_CC=$CC
6762 CC=${CC}
6763 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6764 ac_save_c_werror_flag=$ac_c_werror_flag
6765 ac_c_werror_flag=yes
6766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6767 /* end confdefs.h. */
6770 main ()
6774 return 0;
6776 _ACEOF
6777 if ac_fn_c_try_compile "$LINENO"; then :
6778 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6779 else
6780 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6783 ac_c_werror_flag=$ac_save_c_werror_flag
6784 CFLAGS="$pgac_save_CFLAGS"
6785 CC="$pgac_save_CC"
6787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6788 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6789 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6790 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6795 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6796 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6797 $as_echo_n "(cached) " >&6
6798 else
6799 pgac_save_CXXFLAGS=$CXXFLAGS
6800 pgac_save_CXX=$CXX
6801 CXX=${CXX}
6802 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6803 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6804 ac_cxx_werror_flag=yes
6805 ac_ext=cpp
6806 ac_cpp='$CXXCPP $CPPFLAGS'
6807 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6808 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6809 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6812 /* end confdefs.h. */
6815 main ()
6819 return 0;
6821 _ACEOF
6822 if ac_fn_cxx_try_compile "$LINENO"; then :
6823 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6824 else
6825 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6828 ac_ext=c
6829 ac_cpp='$CPP $CPPFLAGS'
6830 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6831 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6832 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6834 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6835 CXXFLAGS="$pgac_save_CXXFLAGS"
6836 CXX="$pgac_save_CXX"
6838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6839 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6840 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6841 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6847 # If the compiler knows how to hide symbols, add the switch needed for that to
6848 # CFLAGS_SL_MODULE and define HAVE_VISIBILITY_ATTRIBUTE.
6850 # This is done separately from the above because -fvisibility is supported by
6851 # quite a few different compilers, making the required repetition bothersome.
6853 # We might need to add a separate test to check if
6854 # __attribute__((visibility("hidden"))) is supported, if we encounter a
6855 # compiler that supports one of the supported variants of -fvisibility=hidden
6856 # but uses a different syntax to mark a symbol as exported.
6857 if test "$GCC" = yes -o "$SUN_STUDIO_CC" = yes ; then
6858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE" >&5
6859 $as_echo_n "checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
6860 if ${pgac_cv_prog_CC_cflags__fvisibility_hidden+:} false; then :
6861 $as_echo_n "(cached) " >&6
6862 else
6863 pgac_save_CFLAGS=$CFLAGS
6864 pgac_save_CC=$CC
6865 CC=${CC}
6866 CFLAGS="${CFLAGS_SL_MODULE} -fvisibility=hidden"
6867 ac_save_c_werror_flag=$ac_c_werror_flag
6868 ac_c_werror_flag=yes
6869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6870 /* end confdefs.h. */
6873 main ()
6877 return 0;
6879 _ACEOF
6880 if ac_fn_c_try_compile "$LINENO"; then :
6881 pgac_cv_prog_CC_cflags__fvisibility_hidden=yes
6882 else
6883 pgac_cv_prog_CC_cflags__fvisibility_hidden=no
6885 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6886 ac_c_werror_flag=$ac_save_c_werror_flag
6887 CFLAGS="$pgac_save_CFLAGS"
6888 CC="$pgac_save_CC"
6890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fvisibility_hidden" >&5
6891 $as_echo "$pgac_cv_prog_CC_cflags__fvisibility_hidden" >&6; }
6892 if test x"$pgac_cv_prog_CC_cflags__fvisibility_hidden" = x"yes"; then
6893 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -fvisibility=hidden"
6897 # For C++ we additionally want -fvisibility-inlines-hidden
6898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
6899 $as_echo_n "checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
6900 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_hidden+:} false; then :
6901 $as_echo_n "(cached) " >&6
6902 else
6903 pgac_save_CXXFLAGS=$CXXFLAGS
6904 pgac_save_CXX=$CXX
6905 CXX=${CXX}
6906 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
6907 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6908 ac_cxx_werror_flag=yes
6909 ac_ext=cpp
6910 ac_cpp='$CXXCPP $CPPFLAGS'
6911 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6912 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6913 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6916 /* end confdefs.h. */
6919 main ()
6923 return 0;
6925 _ACEOF
6926 if ac_fn_cxx_try_compile "$LINENO"; then :
6927 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=yes
6928 else
6929 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=no
6931 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6932 ac_ext=c
6933 ac_cpp='$CPP $CPPFLAGS'
6934 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6935 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6936 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6938 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6939 CXXFLAGS="$pgac_save_CXXFLAGS"
6940 CXX="$pgac_save_CXX"
6942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&5
6943 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&6; }
6944 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" = x"yes"; then
6945 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
6948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE" >&5
6949 $as_echo_n "checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE... " >&6; }
6950 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden+:} false; then :
6951 $as_echo_n "(cached) " >&6
6952 else
6953 pgac_save_CXXFLAGS=$CXXFLAGS
6954 pgac_save_CXX=$CXX
6955 CXX=${CXX}
6956 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
6957 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6958 ac_cxx_werror_flag=yes
6959 ac_ext=cpp
6960 ac_cpp='$CXXCPP $CPPFLAGS'
6961 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6962 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6963 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6966 /* end confdefs.h. */
6969 main ()
6973 return 0;
6975 _ACEOF
6976 if ac_fn_cxx_try_compile "$LINENO"; then :
6977 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=yes
6978 else
6979 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=no
6981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6982 ac_ext=c
6983 ac_cpp='$CPP $CPPFLAGS'
6984 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6985 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6986 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6988 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6989 CXXFLAGS="$pgac_save_CXXFLAGS"
6990 CXX="$pgac_save_CXX"
6992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&5
6993 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&6; }
6994 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" = x"yes"; then
6995 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
6998 have_visibility_attribute=$pgac_cv_prog_CC_cflags__fvisibility_hidden
7001 if test "$have_visibility_attribute" = "yes"; then
7003 $as_echo "#define HAVE_VISIBILITY_ATTRIBUTE 1" >>confdefs.h
7012 # Determine flags used to emit bitcode for JIT inlining.
7013 # 1. We must duplicate any behaviour-changing compiler flags used above,
7014 # to keep compatibility with the compiler used for normal Postgres code.
7015 # 2. We don't bother to duplicate extra-warnings switches --- seeing a
7016 # warning in the main build is enough.
7017 # 3. But we must duplicate -Wno-warning flags, else we'll see those anyway.
7018 if test "$with_llvm" = yes ; then
7019 CLANGXX="$CLANG -xc++"
7021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
7022 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
7023 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
7024 $as_echo_n "(cached) " >&6
7025 else
7026 pgac_save_CFLAGS=$CFLAGS
7027 pgac_save_CC=$CC
7028 CC=${CLANG}
7029 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7030 ac_save_c_werror_flag=$ac_c_werror_flag
7031 ac_c_werror_flag=yes
7032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7033 /* end confdefs.h. */
7036 main ()
7040 return 0;
7042 _ACEOF
7043 if ac_fn_c_try_compile "$LINENO"; then :
7044 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
7045 else
7046 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
7048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7049 ac_c_werror_flag=$ac_save_c_werror_flag
7050 CFLAGS="$pgac_save_CFLAGS"
7051 CC="$pgac_save_CC"
7053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
7054 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
7055 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
7056 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
7060 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
7061 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
7062 $as_echo_n "(cached) " >&6
7063 else
7064 pgac_save_CXXFLAGS=$CXXFLAGS
7065 pgac_save_CXX=$CXX
7066 CXX=${CLANGXX}
7067 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7068 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7069 ac_cxx_werror_flag=yes
7070 ac_ext=cpp
7071 ac_cpp='$CXXCPP $CPPFLAGS'
7072 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7073 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7074 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7077 /* end confdefs.h. */
7080 main ()
7084 return 0;
7086 _ACEOF
7087 if ac_fn_cxx_try_compile "$LINENO"; then :
7088 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
7089 else
7090 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
7092 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7093 ac_ext=c
7094 ac_cpp='$CPP $CPPFLAGS'
7095 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7096 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7097 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7099 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7100 CXXFLAGS="$pgac_save_CXXFLAGS"
7101 CXX="$pgac_save_CXX"
7103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
7104 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
7105 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
7106 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
7110 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
7111 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
7112 $as_echo_n "(cached) " >&6
7113 else
7114 pgac_save_CFLAGS=$CFLAGS
7115 pgac_save_CC=$CC
7116 CC=${CLANG}
7117 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7118 ac_save_c_werror_flag=$ac_c_werror_flag
7119 ac_c_werror_flag=yes
7120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7121 /* end confdefs.h. */
7124 main ()
7128 return 0;
7130 _ACEOF
7131 if ac_fn_c_try_compile "$LINENO"; then :
7132 pgac_cv_prog_CLANG_cflags__fwrapv=yes
7133 else
7134 pgac_cv_prog_CLANG_cflags__fwrapv=no
7136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7137 ac_c_werror_flag=$ac_save_c_werror_flag
7138 CFLAGS="$pgac_save_CFLAGS"
7139 CC="$pgac_save_CC"
7141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
7142 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
7143 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
7144 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
7148 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
7149 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
7150 $as_echo_n "(cached) " >&6
7151 else
7152 pgac_save_CXXFLAGS=$CXXFLAGS
7153 pgac_save_CXX=$CXX
7154 CXX=${CLANGXX}
7155 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7156 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7157 ac_cxx_werror_flag=yes
7158 ac_ext=cpp
7159 ac_cpp='$CXXCPP $CPPFLAGS'
7160 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7161 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7162 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7165 /* end confdefs.h. */
7168 main ()
7172 return 0;
7174 _ACEOF
7175 if ac_fn_cxx_try_compile "$LINENO"; then :
7176 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
7177 else
7178 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
7180 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7181 ac_ext=c
7182 ac_cpp='$CPP $CPPFLAGS'
7183 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7184 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7185 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7187 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7188 CXXFLAGS="$pgac_save_CXXFLAGS"
7189 CXX="$pgac_save_CXX"
7191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
7192 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
7193 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
7194 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
7198 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
7199 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
7200 $as_echo_n "(cached) " >&6
7201 else
7202 pgac_save_CFLAGS=$CFLAGS
7203 pgac_save_CC=$CC
7204 CC=${CLANG}
7205 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7206 ac_save_c_werror_flag=$ac_c_werror_flag
7207 ac_c_werror_flag=yes
7208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7209 /* end confdefs.h. */
7212 main ()
7216 return 0;
7218 _ACEOF
7219 if ac_fn_c_try_compile "$LINENO"; then :
7220 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7221 else
7222 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7225 ac_c_werror_flag=$ac_save_c_werror_flag
7226 CFLAGS="$pgac_save_CFLAGS"
7227 CC="$pgac_save_CC"
7229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7230 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7231 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7232 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7236 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7237 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7238 $as_echo_n "(cached) " >&6
7239 else
7240 pgac_save_CXXFLAGS=$CXXFLAGS
7241 pgac_save_CXX=$CXX
7242 CXX=${CLANGXX}
7243 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7244 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7245 ac_cxx_werror_flag=yes
7246 ac_ext=cpp
7247 ac_cpp='$CXXCPP $CPPFLAGS'
7248 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7249 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7250 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7253 /* end confdefs.h. */
7256 main ()
7260 return 0;
7262 _ACEOF
7263 if ac_fn_cxx_try_compile "$LINENO"; then :
7264 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7265 else
7266 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7269 ac_ext=c
7270 ac_cpp='$CPP $CPPFLAGS'
7271 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7272 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7273 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7275 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7276 CXXFLAGS="$pgac_save_CXXFLAGS"
7277 CXX="$pgac_save_CXX"
7279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7280 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7281 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7282 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7286 NOT_THE_CFLAGS=""
7287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
7288 $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
7289 if ${pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument+:} false; then :
7290 $as_echo_n "(cached) " >&6
7291 else
7292 pgac_save_CFLAGS=$CFLAGS
7293 pgac_save_CC=$CC
7294 CC=${CLANG}
7295 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7296 ac_save_c_werror_flag=$ac_c_werror_flag
7297 ac_c_werror_flag=yes
7298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7299 /* end confdefs.h. */
7302 main ()
7306 return 0;
7308 _ACEOF
7309 if ac_fn_c_try_compile "$LINENO"; then :
7310 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=yes
7311 else
7312 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=no
7314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7315 ac_c_werror_flag=$ac_save_c_werror_flag
7316 CFLAGS="$pgac_save_CFLAGS"
7317 CC="$pgac_save_CC"
7319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&5
7320 $as_echo "$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&6; }
7321 if test x"$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" = x"yes"; then
7322 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7325 if test -n "$NOT_THE_CFLAGS"; then
7326 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-unused-command-line-argument"
7328 NOT_THE_CFLAGS=""
7329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
7330 $as_echo_n "checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
7331 if ${pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro+:} false; then :
7332 $as_echo_n "(cached) " >&6
7333 else
7334 pgac_save_CFLAGS=$CFLAGS
7335 pgac_save_CC=$CC
7336 CC=${CLANG}
7337 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7338 ac_save_c_werror_flag=$ac_c_werror_flag
7339 ac_c_werror_flag=yes
7340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7341 /* end confdefs.h. */
7344 main ()
7348 return 0;
7350 _ACEOF
7351 if ac_fn_c_try_compile "$LINENO"; then :
7352 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=yes
7353 else
7354 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=no
7356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7357 ac_c_werror_flag=$ac_save_c_werror_flag
7358 CFLAGS="$pgac_save_CFLAGS"
7359 CC="$pgac_save_CC"
7361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&5
7362 $as_echo "$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&6; }
7363 if test x"$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" = x"yes"; then
7364 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7367 if test -n "$NOT_THE_CFLAGS"; then
7368 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
7370 NOT_THE_CFLAGS=""
7371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
7372 $as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
7373 if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :
7374 $as_echo_n "(cached) " >&6
7375 else
7376 pgac_save_CFLAGS=$CFLAGS
7377 pgac_save_CC=$CC
7378 CC=${CLANG}
7379 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7380 ac_save_c_werror_flag=$ac_c_werror_flag
7381 ac_c_werror_flag=yes
7382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7383 /* end confdefs.h. */
7386 main ()
7390 return 0;
7392 _ACEOF
7393 if ac_fn_c_try_compile "$LINENO"; then :
7394 pgac_cv_prog_CLANG_cflags__Wformat_truncation=yes
7395 else
7396 pgac_cv_prog_CLANG_cflags__Wformat_truncation=no
7398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7399 ac_c_werror_flag=$ac_save_c_werror_flag
7400 CFLAGS="$pgac_save_CFLAGS"
7401 CC="$pgac_save_CC"
7403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&5
7404 $as_echo "$pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&6; }
7405 if test x"$pgac_cv_prog_CLANG_cflags__Wformat_truncation" = x"yes"; then
7406 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7409 if test -n "$NOT_THE_CFLAGS"; then
7410 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"
7412 NOT_THE_CFLAGS=""
7413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
7414 $as_echo_n "checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
7415 if ${pgac_cv_prog_CLANG_cflags__Wstringop_truncation+:} false; then :
7416 $as_echo_n "(cached) " >&6
7417 else
7418 pgac_save_CFLAGS=$CFLAGS
7419 pgac_save_CC=$CC
7420 CC=${CLANG}
7421 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7422 ac_save_c_werror_flag=$ac_c_werror_flag
7423 ac_c_werror_flag=yes
7424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7425 /* end confdefs.h. */
7428 main ()
7432 return 0;
7434 _ACEOF
7435 if ac_fn_c_try_compile "$LINENO"; then :
7436 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=yes
7437 else
7438 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=no
7440 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7441 ac_c_werror_flag=$ac_save_c_werror_flag
7442 CFLAGS="$pgac_save_CFLAGS"
7443 CC="$pgac_save_CC"
7445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&5
7446 $as_echo "$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&6; }
7447 if test x"$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" = x"yes"; then
7448 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7451 if test -n "$NOT_THE_CFLAGS"; then
7452 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-stringop-truncation"
7456 # supply -g if --enable-debug
7457 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7458 CFLAGS="$CFLAGS -g"
7461 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7462 CXXFLAGS="$CXXFLAGS -g"
7465 # enable code coverage if --enable-coverage
7466 if test "$enable_coverage" = yes; then
7467 if test "$GCC" = yes; then
7468 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7469 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7470 else
7471 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7475 # enable profiling if --enable-profiling
7476 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7477 if test "$GCC" = yes; then
7479 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7481 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7482 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7483 else
7484 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7488 # On Solaris, we need this #define to get POSIX-conforming versions
7489 # of many interfaces (sigwait, getpwuid_r, ...).
7490 if test "$PORTNAME" = "solaris"; then
7491 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
7494 # We already have this in Makefile.win32, but configure needs it too
7495 if test "$PORTNAME" = "win32"; then
7496 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7499 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7500 # user-specified flags (if any) at the end. This lets users override
7501 # the automatic additions.
7502 CFLAGS="$CFLAGS $user_CFLAGS"
7503 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7504 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7505 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7510 # The template file must set up CFLAGS_SL; we don't support user override
7513 # Check if the compiler still works with the final flag settings
7514 # (note, we're not checking that for CXX, which is optional)
7515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7516 $as_echo_n "checking whether the C compiler still works... " >&6; }
7517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7518 /* end confdefs.h. */
7521 main ()
7523 return 0;
7525 return 0;
7527 _ACEOF
7528 if ac_fn_c_try_link "$LINENO"; then :
7529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7530 $as_echo "yes" >&6; }
7531 else
7532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7533 $as_echo "no" >&6; }
7534 as_fn_error $? "cannot proceed" "$LINENO" 5
7536 rm -f core conftest.err conftest.$ac_objext \
7537 conftest$ac_exeext conftest.$ac_ext
7539 # Defend against gcc -ffast-math
7540 if test "$GCC" = yes; then
7541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7542 /* end confdefs.h. */
7545 main ()
7547 #ifdef __FAST_MATH__
7548 choke me
7549 #endif
7551 return 0;
7553 _ACEOF
7554 if ac_fn_c_try_compile "$LINENO"; then :
7556 else
7557 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7562 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7563 # versions of clang do not understand -fexcess-precision=standard, the use of
7564 # x87 floating point operations leads to problems like isinf possibly returning
7565 # false for a value that is infinite when converted from the 80bit register to
7566 # the 8byte memory representation.
7568 # Only perform the test if the compiler doesn't understand
7569 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7570 # automatically.
7571 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7573 /* end confdefs.h. */
7576 main ()
7579 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7580 choke me
7581 #endif
7584 return 0;
7586 _ACEOF
7587 if ac_fn_c_try_compile "$LINENO"; then :
7589 else
7590 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7592 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7595 ac_ext=c
7596 ac_cpp='$CPP $CPPFLAGS'
7597 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7598 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7599 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7601 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7602 # On Suns, sometimes $CPP names a directory.
7603 if test -n "$CPP" && test -d "$CPP"; then
7604 CPP=
7606 if test -z "$CPP"; then
7607 if ${ac_cv_prog_CPP+:} false; then :
7608 $as_echo_n "(cached) " >&6
7609 else
7610 # Double quotes because CPP needs to be expanded
7611 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7613 ac_preproc_ok=false
7614 for ac_c_preproc_warn_flag in '' yes
7616 # Use a header file that comes with gcc, so configuring glibc
7617 # with a fresh cross-compiler works.
7618 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7619 # <limits.h> exists even on freestanding compilers.
7620 # On the NeXT, cc -E runs the code through the compiler's parser,
7621 # not just through cpp. "Syntax error" is here to catch this case.
7622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7623 /* end confdefs.h. */
7624 #ifdef __STDC__
7625 # include <limits.h>
7626 #else
7627 # include <assert.h>
7628 #endif
7629 Syntax error
7630 _ACEOF
7631 if ac_fn_c_try_cpp "$LINENO"; then :
7633 else
7634 # Broken: fails on valid input.
7635 continue
7637 rm -f conftest.err conftest.i conftest.$ac_ext
7639 # OK, works on sane cases. Now check whether nonexistent headers
7640 # can be detected and how.
7641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7642 /* end confdefs.h. */
7643 #include <ac_nonexistent.h>
7644 _ACEOF
7645 if ac_fn_c_try_cpp "$LINENO"; then :
7646 # Broken: success on invalid input.
7647 continue
7648 else
7649 # Passes both tests.
7650 ac_preproc_ok=:
7651 break
7653 rm -f conftest.err conftest.i conftest.$ac_ext
7655 done
7656 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7657 rm -f conftest.i conftest.err conftest.$ac_ext
7658 if $ac_preproc_ok; then :
7659 break
7662 done
7663 ac_cv_prog_CPP=$CPP
7666 CPP=$ac_cv_prog_CPP
7667 else
7668 ac_cv_prog_CPP=$CPP
7670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7671 $as_echo "$CPP" >&6; }
7672 ac_preproc_ok=false
7673 for ac_c_preproc_warn_flag in '' yes
7675 # Use a header file that comes with gcc, so configuring glibc
7676 # with a fresh cross-compiler works.
7677 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7678 # <limits.h> exists even on freestanding compilers.
7679 # On the NeXT, cc -E runs the code through the compiler's parser,
7680 # not just through cpp. "Syntax error" is here to catch this case.
7681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7682 /* end confdefs.h. */
7683 #ifdef __STDC__
7684 # include <limits.h>
7685 #else
7686 # include <assert.h>
7687 #endif
7688 Syntax error
7689 _ACEOF
7690 if ac_fn_c_try_cpp "$LINENO"; then :
7692 else
7693 # Broken: fails on valid input.
7694 continue
7696 rm -f conftest.err conftest.i conftest.$ac_ext
7698 # OK, works on sane cases. Now check whether nonexistent headers
7699 # can be detected and how.
7700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7701 /* end confdefs.h. */
7702 #include <ac_nonexistent.h>
7703 _ACEOF
7704 if ac_fn_c_try_cpp "$LINENO"; then :
7705 # Broken: success on invalid input.
7706 continue
7707 else
7708 # Passes both tests.
7709 ac_preproc_ok=:
7710 break
7712 rm -f conftest.err conftest.i conftest.$ac_ext
7714 done
7715 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7716 rm -f conftest.i conftest.err conftest.$ac_ext
7717 if $ac_preproc_ok; then :
7719 else
7720 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7721 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7722 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7723 See \`config.log' for more details" "$LINENO" 5; }
7726 ac_ext=c
7727 ac_cpp='$CPP $CPPFLAGS'
7728 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7729 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7730 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7736 # Set up TAS assembly code if needed; the template file has now had its
7737 # chance to request this.
7739 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7742 if test "$need_tas" = yes ; then
7743 TAS=tas.o
7744 else
7745 TAS=""
7750 cat >>confdefs.h <<_ACEOF
7751 #define DLSUFFIX "$DLSUFFIX"
7752 _ACEOF
7756 # Set up pkg_config in case we need it below
7765 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7766 if test -n "$ac_tool_prefix"; then
7767 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7768 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7770 $as_echo_n "checking for $ac_word... " >&6; }
7771 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7772 $as_echo_n "(cached) " >&6
7773 else
7774 case $PKG_CONFIG in
7775 [\\/]* | ?:[\\/]*)
7776 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7780 for as_dir in $PATH
7782 IFS=$as_save_IFS
7783 test -z "$as_dir" && as_dir=.
7784 for ac_exec_ext in '' $ac_executable_extensions; do
7785 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7786 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7787 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7788 break 2
7790 done
7791 done
7792 IFS=$as_save_IFS
7795 esac
7797 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7798 if test -n "$PKG_CONFIG"; then
7799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7800 $as_echo "$PKG_CONFIG" >&6; }
7801 else
7802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7803 $as_echo "no" >&6; }
7808 if test -z "$ac_cv_path_PKG_CONFIG"; then
7809 ac_pt_PKG_CONFIG=$PKG_CONFIG
7810 # Extract the first word of "pkg-config", so it can be a program name with args.
7811 set dummy pkg-config; ac_word=$2
7812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7813 $as_echo_n "checking for $ac_word... " >&6; }
7814 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7815 $as_echo_n "(cached) " >&6
7816 else
7817 case $ac_pt_PKG_CONFIG in
7818 [\\/]* | ?:[\\/]*)
7819 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7823 for as_dir in $PATH
7825 IFS=$as_save_IFS
7826 test -z "$as_dir" && as_dir=.
7827 for ac_exec_ext in '' $ac_executable_extensions; do
7828 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7829 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7830 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7831 break 2
7833 done
7834 done
7835 IFS=$as_save_IFS
7838 esac
7840 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7841 if test -n "$ac_pt_PKG_CONFIG"; then
7842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7843 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7844 else
7845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7846 $as_echo "no" >&6; }
7849 if test "x$ac_pt_PKG_CONFIG" = x; then
7850 PKG_CONFIG=""
7851 else
7852 case $cross_compiling:$ac_tool_warned in
7853 yes:)
7854 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7855 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7856 ac_tool_warned=yes ;;
7857 esac
7858 PKG_CONFIG=$ac_pt_PKG_CONFIG
7860 else
7861 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7865 if test -n "$PKG_CONFIG"; then
7866 _pkg_min_version=0.9.0
7867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7868 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7869 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7871 $as_echo "yes" >&6; }
7872 else
7873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7874 $as_echo "no" >&6; }
7875 PKG_CONFIG=""
7880 # Automatic dependency tracking
7884 # Check whether --enable-depend was given.
7885 if test "${enable_depend+set}" = set; then :
7886 enableval=$enable_depend;
7887 case $enableval in
7888 yes)
7889 autodepend=yes
7895 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7897 esac
7899 else
7900 enable_depend=no
7909 # Enable assert checks
7913 # Check whether --enable-cassert was given.
7914 if test "${enable_cassert+set}" = set; then :
7915 enableval=$enable_cassert;
7916 case $enableval in
7917 yes)
7919 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7926 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7928 esac
7930 else
7931 enable_cassert=no
7939 # Include directories
7941 ac_save_IFS=$IFS
7942 IFS="${IFS}${PATH_SEPARATOR}"
7943 # SRCH_INC comes from the template file
7944 for dir in $with_includes $SRCH_INC; do
7945 if test -d "$dir"; then
7946 INCLUDES="$INCLUDES -I$dir"
7947 else
7948 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7949 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7951 done
7952 IFS=$ac_save_IFS
7956 # Library directories
7958 ac_save_IFS=$IFS
7959 IFS="${IFS}${PATH_SEPARATOR}"
7960 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7961 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7962 if test -d "$dir"; then
7963 LIBDIRS="$LIBDIRS -L$dir"
7964 else
7965 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7966 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7968 done
7969 IFS=$ac_save_IFS
7972 # ICU
7974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7975 $as_echo_n "checking whether to build with ICU support... " >&6; }
7979 # Check whether --with-icu was given.
7980 if test "${with_icu+set}" = set; then :
7981 withval=$with_icu;
7982 case $withval in
7983 yes)
7985 $as_echo "#define USE_ICU 1" >>confdefs.h
7992 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7994 esac
7996 else
7997 with_icu=yes
7999 $as_echo "#define USE_ICU 1" >>confdefs.h
8004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
8005 $as_echo "$with_icu" >&6; }
8008 if test "$with_icu" = yes; then
8010 pkg_failed=no
8011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
8012 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
8014 if test -n "$ICU_CFLAGS"; then
8015 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
8016 elif test -n "$PKG_CONFIG"; then
8017 if test -n "$PKG_CONFIG" && \
8018 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8019 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8020 ac_status=$?
8021 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8022 test $ac_status = 0; }; then
8023 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
8024 test "x$?" != "x0" && pkg_failed=yes
8025 else
8026 pkg_failed=yes
8028 else
8029 pkg_failed=untried
8031 if test -n "$ICU_LIBS"; then
8032 pkg_cv_ICU_LIBS="$ICU_LIBS"
8033 elif test -n "$PKG_CONFIG"; then
8034 if test -n "$PKG_CONFIG" && \
8035 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8036 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8037 ac_status=$?
8038 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8039 test $ac_status = 0; }; then
8040 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
8041 test "x$?" != "x0" && pkg_failed=yes
8042 else
8043 pkg_failed=yes
8045 else
8046 pkg_failed=untried
8051 if test $pkg_failed = yes; then
8052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8053 $as_echo "no" >&6; }
8055 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8056 _pkg_short_errors_supported=yes
8057 else
8058 _pkg_short_errors_supported=no
8060 if test $_pkg_short_errors_supported = yes; then
8061 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8062 else
8063 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8065 # Put the nasty error message in config.log where it belongs
8066 echo "$ICU_PKG_ERRORS" >&5
8068 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
8070 $ICU_PKG_ERRORS
8072 Consider adjusting the PKG_CONFIG_PATH environment variable if you
8073 installed software in a non-standard prefix.
8075 Alternatively, you may set the environment variables ICU_CFLAGS
8076 and ICU_LIBS to avoid the need to call pkg-config.
8077 See the pkg-config man page for more details." "$LINENO" 5
8078 elif test $pkg_failed = untried; then
8079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8080 $as_echo "no" >&6; }
8081 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8082 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8083 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
8084 is in your PATH or set the PKG_CONFIG environment variable to the full
8085 path to pkg-config.
8087 Alternatively, you may set the environment variables ICU_CFLAGS
8088 and ICU_LIBS to avoid the need to call pkg-config.
8089 See the pkg-config man page for more details.
8091 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
8092 See \`config.log' for more details" "$LINENO" 5; }
8093 else
8094 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
8095 ICU_LIBS=$pkg_cv_ICU_LIBS
8096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8097 $as_echo "yes" >&6; }
8103 # Optionally build Tcl modules (PL/Tcl)
8105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
8106 $as_echo_n "checking whether to build with Tcl... " >&6; }
8110 # Check whether --with-tcl was given.
8111 if test "${with_tcl+set}" = set; then :
8112 withval=$with_tcl;
8113 case $withval in
8114 yes)
8121 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
8123 esac
8125 else
8126 with_tcl=no
8131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
8132 $as_echo "$with_tcl" >&6; }
8135 # We see if the path to the Tcl/Tk configuration scripts is specified.
8136 # This will override the use of tclsh to find the paths to search.
8141 # Check whether --with-tclconfig was given.
8142 if test "${with_tclconfig+set}" = set; then :
8143 withval=$with_tclconfig;
8144 case $withval in
8145 yes)
8146 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8149 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8154 esac
8161 # Optionally build Perl modules (PL/Perl)
8163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
8164 $as_echo_n "checking whether to build Perl modules... " >&6; }
8168 # Check whether --with-perl was given.
8169 if test "${with_perl+set}" = set; then :
8170 withval=$with_perl;
8171 case $withval in
8172 yes)
8179 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
8181 esac
8183 else
8184 with_perl=no
8189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
8190 $as_echo "$with_perl" >&6; }
8194 # Optionally build Python modules (PL/Python)
8196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
8197 $as_echo_n "checking whether to build Python modules... " >&6; }
8201 # Check whether --with-python was given.
8202 if test "${with_python+set}" = set; then :
8203 withval=$with_python;
8204 case $withval in
8205 yes)
8212 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
8214 esac
8216 else
8217 with_python=no
8222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8223 $as_echo "$with_python" >&6; }
8227 # GSSAPI
8229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
8230 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
8234 # Check whether --with-gssapi was given.
8235 if test "${with_gssapi+set}" = set; then :
8236 withval=$with_gssapi;
8237 case $withval in
8238 yes)
8241 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
8243 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
8250 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
8252 esac
8254 else
8255 with_gssapi=no
8260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8261 $as_echo "$with_gssapi" >&6; }
8269 # Kerberos configuration parameters
8274 # Check whether --with-krb-srvnam was given.
8275 if test "${with_krb_srvnam+set}" = set; then :
8276 withval=$with_krb_srvnam;
8277 case $withval in
8278 yes)
8279 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8282 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8287 esac
8289 else
8290 with_krb_srvnam="postgres"
8296 cat >>confdefs.h <<_ACEOF
8297 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8298 _ACEOF
8303 # PAM
8305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8306 $as_echo_n "checking whether to build with PAM support... " >&6; }
8310 # Check whether --with-pam was given.
8311 if test "${with_pam+set}" = set; then :
8312 withval=$with_pam;
8313 case $withval in
8314 yes)
8316 $as_echo "#define USE_PAM 1" >>confdefs.h
8323 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8325 esac
8327 else
8328 with_pam=no
8333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8334 $as_echo "$with_pam" >&6; }
8338 # BSD AUTH
8340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8341 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8345 # Check whether --with-bsd-auth was given.
8346 if test "${with_bsd_auth+set}" = set; then :
8347 withval=$with_bsd_auth;
8348 case $withval in
8349 yes)
8351 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8358 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8360 esac
8362 else
8363 with_bsd_auth=no
8368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8369 $as_echo "$with_bsd_auth" >&6; }
8373 # LDAP
8375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8376 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8380 # Check whether --with-ldap was given.
8381 if test "${with_ldap+set}" = set; then :
8382 withval=$with_ldap;
8383 case $withval in
8384 yes)
8386 $as_echo "#define USE_LDAP 1" >>confdefs.h
8393 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8395 esac
8397 else
8398 with_ldap=no
8403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8404 $as_echo "$with_ldap" >&6; }
8409 # Bonjour
8411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8412 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8416 # Check whether --with-bonjour was given.
8417 if test "${with_bonjour+set}" = set; then :
8418 withval=$with_bonjour;
8419 case $withval in
8420 yes)
8422 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8429 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8431 esac
8433 else
8434 with_bonjour=no
8439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8440 $as_echo "$with_bonjour" >&6; }
8444 # SELinux
8446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8447 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8451 # Check whether --with-selinux was given.
8452 if test "${with_selinux+set}" = set; then :
8453 withval=$with_selinux;
8454 case $withval in
8455 yes)
8462 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8464 esac
8466 else
8467 with_selinux=no
8473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8474 $as_echo "$with_selinux" >&6; }
8477 # Systemd
8479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8480 $as_echo_n "checking whether to build with systemd support... " >&6; }
8484 # Check whether --with-systemd was given.
8485 if test "${with_systemd+set}" = set; then :
8486 withval=$with_systemd;
8487 case $withval in
8488 yes)
8490 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8497 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8499 esac
8501 else
8502 with_systemd=no
8508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8509 $as_echo "$with_systemd" >&6; }
8512 # Readline
8517 # Check whether --with-readline was given.
8518 if test "${with_readline+set}" = set; then :
8519 withval=$with_readline;
8520 case $withval in
8521 yes)
8528 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8530 esac
8532 else
8533 with_readline=yes
8538 # readline on MinGW has problems with backslashes in psql and other bugs.
8539 # This is particularly a problem with non-US code pages.
8540 # Therefore disable its use until we understand the cause. 2004-07-20
8541 if test "$PORTNAME" = "win32"; then
8542 if test "$with_readline" = yes; then
8543 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8544 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8545 with_readline=no
8552 # Prefer libedit
8557 # Check whether --with-libedit-preferred was given.
8558 if test "${with_libedit_preferred+set}" = set; then :
8559 withval=$with_libedit_preferred;
8560 case $withval in
8561 yes)
8568 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8570 esac
8572 else
8573 with_libedit_preferred=no
8581 # UUID library
8583 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8584 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8585 # UUID library. More than one of these might be present on a given platform,
8586 # so we make the user say which one she wants.
8591 # Check whether --with-uuid was given.
8592 if test "${with_uuid+set}" = set; then :
8593 withval=$with_uuid;
8594 case $withval in
8595 yes)
8596 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8599 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8604 esac
8609 if test x"$with_uuid" = x"" ; then
8610 with_uuid=no
8615 # Check whether --with-ossp-uuid was given.
8616 if test "${with_ossp_uuid+set}" = set; then :
8617 withval=$with_ossp_uuid;
8618 case $withval in
8619 yes)
8626 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8628 esac
8630 else
8631 with_ossp_uuid=no
8636 if test "$with_ossp_uuid" = yes ; then
8637 with_uuid=ossp
8640 if test "$with_uuid" != no ; then
8641 if test "$with_uuid" = bsd ; then
8643 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8645 elif test "$with_uuid" = e2fs ; then
8647 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8649 elif test "$with_uuid" = ossp ; then
8651 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8653 else
8654 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8661 # XML
8663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
8664 $as_echo_n "checking whether to build with XML support... " >&6; }
8668 # Check whether --with-libxml was given.
8669 if test "${with_libxml+set}" = set; then :
8670 withval=$with_libxml;
8671 case $withval in
8672 yes)
8674 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8681 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8683 esac
8685 else
8686 with_libxml=no
8691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
8692 $as_echo "$with_libxml" >&6; }
8695 if test "$with_libxml" = yes ; then
8696 # Check pkg-config, then xml2-config. But for backwards compatibility,
8697 # setting XML2_CONFIG overrides pkg-config.
8698 have_libxml2_pkg_config=no
8699 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
8701 pkg_failed=no
8702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
8703 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
8705 if test -n "$XML2_CFLAGS"; then
8706 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
8707 elif test -n "$PKG_CONFIG"; then
8708 if test -n "$PKG_CONFIG" && \
8709 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8710 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8711 ac_status=$?
8712 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8713 test $ac_status = 0; }; then
8714 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
8715 test "x$?" != "x0" && pkg_failed=yes
8716 else
8717 pkg_failed=yes
8719 else
8720 pkg_failed=untried
8722 if test -n "$XML2_LIBS"; then
8723 pkg_cv_XML2_LIBS="$XML2_LIBS"
8724 elif test -n "$PKG_CONFIG"; then
8725 if test -n "$PKG_CONFIG" && \
8726 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8727 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8728 ac_status=$?
8729 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8730 test $ac_status = 0; }; then
8731 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
8732 test "x$?" != "x0" && pkg_failed=yes
8733 else
8734 pkg_failed=yes
8736 else
8737 pkg_failed=untried
8742 if test $pkg_failed = yes; then
8743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8744 $as_echo "no" >&6; }
8746 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8747 _pkg_short_errors_supported=yes
8748 else
8749 _pkg_short_errors_supported=no
8751 if test $_pkg_short_errors_supported = yes; then
8752 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8753 else
8754 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8756 # Put the nasty error message in config.log where it belongs
8757 echo "$XML2_PKG_ERRORS" >&5
8759 # do nothing
8760 elif test $pkg_failed = untried; then
8761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8762 $as_echo "no" >&6; }
8763 # do nothing
8764 else
8765 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
8766 XML2_LIBS=$pkg_cv_XML2_LIBS
8767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8768 $as_echo "yes" >&6; }
8769 have_libxml2_pkg_config=yes
8772 if test "$have_libxml2_pkg_config" = no ; then
8773 if test -z "$XML2_CONFIG"; then
8774 for ac_prog in xml2-config
8776 # Extract the first word of "$ac_prog", so it can be a program name with args.
8777 set dummy $ac_prog; ac_word=$2
8778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8779 $as_echo_n "checking for $ac_word... " >&6; }
8780 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8781 $as_echo_n "(cached) " >&6
8782 else
8783 case $XML2_CONFIG in
8784 [\\/]* | ?:[\\/]*)
8785 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8788 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8789 for as_dir in $PATH
8791 IFS=$as_save_IFS
8792 test -z "$as_dir" && as_dir=.
8793 for ac_exec_ext in '' $ac_executable_extensions; do
8794 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8795 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8796 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8797 break 2
8799 done
8800 done
8801 IFS=$as_save_IFS
8804 esac
8806 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8807 if test -n "$XML2_CONFIG"; then
8808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8809 $as_echo "$XML2_CONFIG" >&6; }
8810 else
8811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8812 $as_echo "no" >&6; }
8816 test -n "$XML2_CONFIG" && break
8817 done
8819 else
8820 # Report the value of XML2_CONFIG in configure's output in all cases.
8821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8822 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8824 $as_echo "$XML2_CONFIG" >&6; }
8827 if test -n "$XML2_CONFIG"; then
8828 XML2_CFLAGS=`$XML2_CONFIG --cflags`
8829 XML2_LIBS=`$XML2_CONFIG --libs`
8832 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
8833 for pgac_option in $XML2_CFLAGS; do
8834 case $pgac_option in
8835 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8836 esac
8837 done
8838 for pgac_option in $XML2_LIBS; do
8839 case $pgac_option in
8840 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8841 esac
8842 done
8847 # XSLT
8852 # Check whether --with-libxslt was given.
8853 if test "${with_libxslt+set}" = set; then :
8854 withval=$with_libxslt;
8855 case $withval in
8856 yes)
8858 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8865 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8867 esac
8869 else
8870 with_libxslt=no
8880 # tzdata
8885 # Check whether --with-system-tzdata was given.
8886 if test "${with_system_tzdata+set}" = set; then :
8887 withval=$with_system_tzdata;
8888 case $withval in
8889 yes)
8890 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8893 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8898 esac
8906 # Zlib
8911 # Check whether --with-zlib was given.
8912 if test "${with_zlib+set}" = set; then :
8913 withval=$with_zlib;
8914 case $withval in
8915 yes)
8922 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8924 esac
8926 else
8927 with_zlib=yes
8935 # LZ4
8937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
8938 $as_echo_n "checking whether to build with LZ4 support... " >&6; }
8942 # Check whether --with-lz4 was given.
8943 if test "${with_lz4+set}" = set; then :
8944 withval=$with_lz4;
8945 case $withval in
8946 yes)
8948 $as_echo "#define USE_LZ4 1" >>confdefs.h
8955 as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
8957 esac
8959 else
8960 with_lz4=no
8965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
8966 $as_echo "$with_lz4" >&6; }
8969 if test "$with_lz4" = yes; then
8971 pkg_failed=no
8972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
8973 $as_echo_n "checking for liblz4... " >&6; }
8975 if test -n "$LZ4_CFLAGS"; then
8976 pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
8977 elif test -n "$PKG_CONFIG"; then
8978 if test -n "$PKG_CONFIG" && \
8979 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
8980 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
8981 ac_status=$?
8982 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8983 test $ac_status = 0; }; then
8984 pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
8985 test "x$?" != "x0" && pkg_failed=yes
8986 else
8987 pkg_failed=yes
8989 else
8990 pkg_failed=untried
8992 if test -n "$LZ4_LIBS"; then
8993 pkg_cv_LZ4_LIBS="$LZ4_LIBS"
8994 elif test -n "$PKG_CONFIG"; then
8995 if test -n "$PKG_CONFIG" && \
8996 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
8997 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
8998 ac_status=$?
8999 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9000 test $ac_status = 0; }; then
9001 pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
9002 test "x$?" != "x0" && pkg_failed=yes
9003 else
9004 pkg_failed=yes
9006 else
9007 pkg_failed=untried
9012 if test $pkg_failed = yes; then
9013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9014 $as_echo "no" >&6; }
9016 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9017 _pkg_short_errors_supported=yes
9018 else
9019 _pkg_short_errors_supported=no
9021 if test $_pkg_short_errors_supported = yes; then
9022 LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
9023 else
9024 LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
9026 # Put the nasty error message in config.log where it belongs
9027 echo "$LZ4_PKG_ERRORS" >&5
9029 as_fn_error $? "Package requirements (liblz4) were not met:
9031 $LZ4_PKG_ERRORS
9033 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9034 installed software in a non-standard prefix.
9036 Alternatively, you may set the environment variables LZ4_CFLAGS
9037 and LZ4_LIBS to avoid the need to call pkg-config.
9038 See the pkg-config man page for more details." "$LINENO" 5
9039 elif test $pkg_failed = untried; then
9040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9041 $as_echo "no" >&6; }
9042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9043 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9044 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9045 is in your PATH or set the PKG_CONFIG environment variable to the full
9046 path to pkg-config.
9048 Alternatively, you may set the environment variables LZ4_CFLAGS
9049 and LZ4_LIBS to avoid the need to call pkg-config.
9050 See the pkg-config man page for more details.
9052 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9053 See \`config.log' for more details" "$LINENO" 5; }
9054 else
9055 LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
9056 LZ4_LIBS=$pkg_cv_LZ4_LIBS
9057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9058 $as_echo "yes" >&6; }
9061 # We only care about -I, -D, and -L switches;
9062 # note that -llz4 will be added by AC_CHECK_LIB below.
9063 for pgac_option in $LZ4_CFLAGS; do
9064 case $pgac_option in
9065 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9066 esac
9067 done
9068 for pgac_option in $LZ4_LIBS; do
9069 case $pgac_option in
9070 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9071 esac
9072 done
9076 # ZSTD
9078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ZSTD support" >&5
9079 $as_echo_n "checking whether to build with ZSTD support... " >&6; }
9083 # Check whether --with-zstd was given.
9084 if test "${with_zstd+set}" = set; then :
9085 withval=$with_zstd;
9086 case $withval in
9087 yes)
9089 $as_echo "#define USE_ZSTD 1" >>confdefs.h
9096 as_fn_error $? "no argument expected for --with-zstd option" "$LINENO" 5
9098 esac
9100 else
9101 with_zstd=no
9106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_zstd" >&5
9107 $as_echo "$with_zstd" >&6; }
9110 if test "$with_zstd" = yes; then
9112 pkg_failed=no
9113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd >= 1.4.0" >&5
9114 $as_echo_n "checking for libzstd >= 1.4.0... " >&6; }
9116 if test -n "$ZSTD_CFLAGS"; then
9117 pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
9118 elif test -n "$PKG_CONFIG"; then
9119 if test -n "$PKG_CONFIG" && \
9120 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9121 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9122 ac_status=$?
9123 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9124 test $ac_status = 0; }; then
9125 pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd >= 1.4.0" 2>/dev/null`
9126 test "x$?" != "x0" && pkg_failed=yes
9127 else
9128 pkg_failed=yes
9130 else
9131 pkg_failed=untried
9133 if test -n "$ZSTD_LIBS"; then
9134 pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
9135 elif test -n "$PKG_CONFIG"; then
9136 if test -n "$PKG_CONFIG" && \
9137 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9138 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9139 ac_status=$?
9140 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9141 test $ac_status = 0; }; then
9142 pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd >= 1.4.0" 2>/dev/null`
9143 test "x$?" != "x0" && pkg_failed=yes
9144 else
9145 pkg_failed=yes
9147 else
9148 pkg_failed=untried
9153 if test $pkg_failed = yes; then
9154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9155 $as_echo "no" >&6; }
9157 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9158 _pkg_short_errors_supported=yes
9159 else
9160 _pkg_short_errors_supported=no
9162 if test $_pkg_short_errors_supported = yes; then
9163 ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9164 else
9165 ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9167 # Put the nasty error message in config.log where it belongs
9168 echo "$ZSTD_PKG_ERRORS" >&5
9170 as_fn_error $? "Package requirements (libzstd >= 1.4.0) were not met:
9172 $ZSTD_PKG_ERRORS
9174 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9175 installed software in a non-standard prefix.
9177 Alternatively, you may set the environment variables ZSTD_CFLAGS
9178 and ZSTD_LIBS to avoid the need to call pkg-config.
9179 See the pkg-config man page for more details." "$LINENO" 5
9180 elif test $pkg_failed = untried; then
9181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9182 $as_echo "no" >&6; }
9183 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9184 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9185 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9186 is in your PATH or set the PKG_CONFIG environment variable to the full
9187 path to pkg-config.
9189 Alternatively, you may set the environment variables ZSTD_CFLAGS
9190 and ZSTD_LIBS to avoid the need to call pkg-config.
9191 See the pkg-config man page for more details.
9193 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9194 See \`config.log' for more details" "$LINENO" 5; }
9195 else
9196 ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
9197 ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
9198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9199 $as_echo "yes" >&6; }
9202 # We only care about -I, -D, and -L switches;
9203 # note that -lzstd will be added by AC_CHECK_LIB below.
9204 for pgac_option in $ZSTD_CFLAGS; do
9205 case $pgac_option in
9206 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9207 esac
9208 done
9209 for pgac_option in $ZSTD_LIBS; do
9210 case $pgac_option in
9211 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9212 esac
9213 done
9216 # Assignments
9219 CPPFLAGS="$CPPFLAGS $INCLUDES"
9220 LDFLAGS="$LDFLAGS $LIBDIRS"
9226 if test -n "$ac_tool_prefix"; then
9227 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9228 set dummy ${ac_tool_prefix}strip; ac_word=$2
9229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9230 $as_echo_n "checking for $ac_word... " >&6; }
9231 if ${ac_cv_prog_STRIP+:} false; then :
9232 $as_echo_n "(cached) " >&6
9233 else
9234 if test -n "$STRIP"; then
9235 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9236 else
9237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9238 for as_dir in $PATH
9240 IFS=$as_save_IFS
9241 test -z "$as_dir" && as_dir=.
9242 for ac_exec_ext in '' $ac_executable_extensions; do
9243 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9244 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9245 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9246 break 2
9248 done
9249 done
9250 IFS=$as_save_IFS
9254 STRIP=$ac_cv_prog_STRIP
9255 if test -n "$STRIP"; then
9256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9257 $as_echo "$STRIP" >&6; }
9258 else
9259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9260 $as_echo "no" >&6; }
9265 if test -z "$ac_cv_prog_STRIP"; then
9266 ac_ct_STRIP=$STRIP
9267 # Extract the first word of "strip", so it can be a program name with args.
9268 set dummy strip; ac_word=$2
9269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9270 $as_echo_n "checking for $ac_word... " >&6; }
9271 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9272 $as_echo_n "(cached) " >&6
9273 else
9274 if test -n "$ac_ct_STRIP"; then
9275 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9276 else
9277 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9278 for as_dir in $PATH
9280 IFS=$as_save_IFS
9281 test -z "$as_dir" && as_dir=.
9282 for ac_exec_ext in '' $ac_executable_extensions; do
9283 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9284 ac_cv_prog_ac_ct_STRIP="strip"
9285 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9286 break 2
9288 done
9289 done
9290 IFS=$as_save_IFS
9294 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9295 if test -n "$ac_ct_STRIP"; then
9296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9297 $as_echo "$ac_ct_STRIP" >&6; }
9298 else
9299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9300 $as_echo "no" >&6; }
9303 if test "x$ac_ct_STRIP" = x; then
9304 STRIP=":"
9305 else
9306 case $cross_compiling:$ac_tool_warned in
9307 yes:)
9308 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9309 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9310 ac_tool_warned=yes ;;
9311 esac
9312 STRIP=$ac_ct_STRIP
9314 else
9315 STRIP="$ac_cv_prog_STRIP"
9319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9320 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9321 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9322 STRIP_STATIC_LIB="$STRIP --strip-unneeded"
9323 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9325 $as_echo "yes" >&6; }
9326 else
9327 case $host_os in
9328 darwin*)
9329 STRIP="$STRIP -x"
9330 STRIP_STATIC_LIB=$STRIP
9331 STRIP_SHARED_LIB=$STRIP
9332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9333 $as_echo "yes" >&6; }
9336 STRIP_STATIC_LIB=:
9337 STRIP_SHARED_LIB=:
9338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9339 $as_echo "no" >&6; }
9341 esac
9346 if test -n "$ac_tool_prefix"; then
9347 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9348 set dummy ${ac_tool_prefix}ar; ac_word=$2
9349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9350 $as_echo_n "checking for $ac_word... " >&6; }
9351 if ${ac_cv_prog_AR+:} false; then :
9352 $as_echo_n "(cached) " >&6
9353 else
9354 if test -n "$AR"; then
9355 ac_cv_prog_AR="$AR" # Let the user override the test.
9356 else
9357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9358 for as_dir in $PATH
9360 IFS=$as_save_IFS
9361 test -z "$as_dir" && as_dir=.
9362 for ac_exec_ext in '' $ac_executable_extensions; do
9363 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9364 ac_cv_prog_AR="${ac_tool_prefix}ar"
9365 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9366 break 2
9368 done
9369 done
9370 IFS=$as_save_IFS
9374 AR=$ac_cv_prog_AR
9375 if test -n "$AR"; then
9376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9377 $as_echo "$AR" >&6; }
9378 else
9379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9380 $as_echo "no" >&6; }
9385 if test -z "$ac_cv_prog_AR"; then
9386 ac_ct_AR=$AR
9387 # Extract the first word of "ar", so it can be a program name with args.
9388 set dummy ar; ac_word=$2
9389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9390 $as_echo_n "checking for $ac_word... " >&6; }
9391 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9392 $as_echo_n "(cached) " >&6
9393 else
9394 if test -n "$ac_ct_AR"; then
9395 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9396 else
9397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9398 for as_dir in $PATH
9400 IFS=$as_save_IFS
9401 test -z "$as_dir" && as_dir=.
9402 for ac_exec_ext in '' $ac_executable_extensions; do
9403 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9404 ac_cv_prog_ac_ct_AR="ar"
9405 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9406 break 2
9408 done
9409 done
9410 IFS=$as_save_IFS
9414 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9415 if test -n "$ac_ct_AR"; then
9416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9417 $as_echo "$ac_ct_AR" >&6; }
9418 else
9419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9420 $as_echo "no" >&6; }
9423 if test "x$ac_ct_AR" = x; then
9424 AR="ar"
9425 else
9426 case $cross_compiling:$ac_tool_warned in
9427 yes:)
9428 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9429 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9430 ac_tool_warned=yes ;;
9431 esac
9432 AR=$ac_ct_AR
9434 else
9435 AR="$ac_cv_prog_AR"
9438 if test "$PORTNAME" = "win32"; then
9439 if test -n "$ac_tool_prefix"; then
9440 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9441 set dummy ${ac_tool_prefix}windres; ac_word=$2
9442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9443 $as_echo_n "checking for $ac_word... " >&6; }
9444 if ${ac_cv_prog_WINDRES+:} false; then :
9445 $as_echo_n "(cached) " >&6
9446 else
9447 if test -n "$WINDRES"; then
9448 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9449 else
9450 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9451 for as_dir in $PATH
9453 IFS=$as_save_IFS
9454 test -z "$as_dir" && as_dir=.
9455 for ac_exec_ext in '' $ac_executable_extensions; do
9456 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9457 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9458 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9459 break 2
9461 done
9462 done
9463 IFS=$as_save_IFS
9467 WINDRES=$ac_cv_prog_WINDRES
9468 if test -n "$WINDRES"; then
9469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9470 $as_echo "$WINDRES" >&6; }
9471 else
9472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9473 $as_echo "no" >&6; }
9478 if test -z "$ac_cv_prog_WINDRES"; then
9479 ac_ct_WINDRES=$WINDRES
9480 # Extract the first word of "windres", so it can be a program name with args.
9481 set dummy windres; ac_word=$2
9482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9483 $as_echo_n "checking for $ac_word... " >&6; }
9484 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9485 $as_echo_n "(cached) " >&6
9486 else
9487 if test -n "$ac_ct_WINDRES"; then
9488 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9489 else
9490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9491 for as_dir in $PATH
9493 IFS=$as_save_IFS
9494 test -z "$as_dir" && as_dir=.
9495 for ac_exec_ext in '' $ac_executable_extensions; do
9496 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9497 ac_cv_prog_ac_ct_WINDRES="windres"
9498 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9499 break 2
9501 done
9502 done
9503 IFS=$as_save_IFS
9507 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9508 if test -n "$ac_ct_WINDRES"; then
9509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9510 $as_echo "$ac_ct_WINDRES" >&6; }
9511 else
9512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9513 $as_echo "no" >&6; }
9516 if test "x$ac_ct_WINDRES" = x; then
9517 WINDRES="windres"
9518 else
9519 case $cross_compiling:$ac_tool_warned in
9520 yes:)
9521 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9522 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9523 ac_tool_warned=yes ;;
9524 esac
9525 WINDRES=$ac_ct_WINDRES
9527 else
9528 WINDRES="$ac_cv_prog_WINDRES"
9533 # Find a good install program. We prefer a C program (faster),
9534 # so one script is as good as another. But avoid the broken or
9535 # incompatible versions:
9536 # SysV /etc/install, /usr/sbin/install
9537 # SunOS /usr/etc/install
9538 # IRIX /sbin/install
9539 # AIX /bin/install
9540 # AmigaOS /C/install, which installs bootblocks on floppy discs
9541 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9542 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9543 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9544 # OS/2's system install, which has a completely different semantic
9545 # ./install, which can be erroneously created by make from ./install.sh.
9546 # Reject install programs that cannot install multiple files.
9547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9548 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9549 if test -z "$INSTALL"; then
9550 if ${ac_cv_path_install+:} false; then :
9551 $as_echo_n "(cached) " >&6
9552 else
9553 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9554 for as_dir in $PATH
9556 IFS=$as_save_IFS
9557 test -z "$as_dir" && as_dir=.
9558 # Account for people who put trailing slashes in PATH elements.
9559 case $as_dir/ in #((
9560 ./ | .// | /[cC]/* | \
9561 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9562 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9563 /usr/ucb/* ) ;;
9565 # OSF1 and SCO ODT 3.0 have their own names for install.
9566 # Don't use installbsd from OSF since it installs stuff as root
9567 # by default.
9568 for ac_prog in ginstall scoinst install; do
9569 for ac_exec_ext in '' $ac_executable_extensions; do
9570 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9571 if test $ac_prog = install &&
9572 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9573 # AIX install. It has an incompatible calling convention.
9575 elif test $ac_prog = install &&
9576 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9577 # program-specific install script used by HP pwplus--don't use.
9579 else
9580 rm -rf conftest.one conftest.two conftest.dir
9581 echo one > conftest.one
9582 echo two > conftest.two
9583 mkdir conftest.dir
9584 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9585 test -s conftest.one && test -s conftest.two &&
9586 test -s conftest.dir/conftest.one &&
9587 test -s conftest.dir/conftest.two
9588 then
9589 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9590 break 3
9594 done
9595 done
9597 esac
9599 done
9600 IFS=$as_save_IFS
9602 rm -rf conftest.one conftest.two conftest.dir
9605 if test "${ac_cv_path_install+set}" = set; then
9606 INSTALL=$ac_cv_path_install
9607 else
9608 # As a last resort, use the slow shell script. Don't cache a
9609 # value for INSTALL within a source directory, because that will
9610 # break other packages using the cache if that directory is
9611 # removed, or if the value is a relative name.
9612 INSTALL=$ac_install_sh
9615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9616 $as_echo "$INSTALL" >&6; }
9618 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9619 # It thinks the first close brace ends the variable substitution.
9620 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9622 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9624 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9626 # When Autoconf chooses install-sh as install program it tries to generate
9627 # a relative path to it in each makefile where it substitutes it. This clashes
9628 # with our Makefile.global concept. This workaround helps.
9629 case $INSTALL in
9630 *install-sh*) install_bin='';;
9631 *) install_bin=$INSTALL;;
9632 esac
9635 if test -z "$TAR"; then
9636 for ac_prog in tar
9638 # Extract the first word of "$ac_prog", so it can be a program name with args.
9639 set dummy $ac_prog; ac_word=$2
9640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9641 $as_echo_n "checking for $ac_word... " >&6; }
9642 if ${ac_cv_path_TAR+:} false; then :
9643 $as_echo_n "(cached) " >&6
9644 else
9645 case $TAR in
9646 [\\/]* | ?:[\\/]*)
9647 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9651 for as_dir in $PATH
9653 IFS=$as_save_IFS
9654 test -z "$as_dir" && as_dir=.
9655 for ac_exec_ext in '' $ac_executable_extensions; do
9656 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9657 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9658 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9659 break 2
9661 done
9662 done
9663 IFS=$as_save_IFS
9666 esac
9668 TAR=$ac_cv_path_TAR
9669 if test -n "$TAR"; then
9670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9671 $as_echo "$TAR" >&6; }
9672 else
9673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9674 $as_echo "no" >&6; }
9678 test -n "$TAR" && break
9679 done
9681 else
9682 # Report the value of TAR in configure's output in all cases.
9683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9684 $as_echo_n "checking for TAR... " >&6; }
9685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9686 $as_echo "$TAR" >&6; }
9689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9690 $as_echo_n "checking whether ln -s works... " >&6; }
9691 LN_S=$as_ln_s
9692 if test "$LN_S" = "ln -s"; then
9693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9694 $as_echo "yes" >&6; }
9695 else
9696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9697 $as_echo "no, using $LN_S" >&6; }
9700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9701 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9702 if test -z "$MKDIR_P"; then
9703 if ${ac_cv_path_mkdir+:} false; then :
9704 $as_echo_n "(cached) " >&6
9705 else
9706 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9707 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9709 IFS=$as_save_IFS
9710 test -z "$as_dir" && as_dir=.
9711 for ac_prog in mkdir gmkdir; do
9712 for ac_exec_ext in '' $ac_executable_extensions; do
9713 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9714 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9715 'mkdir (GNU coreutils) '* | \
9716 'mkdir (coreutils) '* | \
9717 'mkdir (fileutils) '4.1*)
9718 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9719 break 3;;
9720 esac
9721 done
9722 done
9723 done
9724 IFS=$as_save_IFS
9728 test -d ./--version && rmdir ./--version
9729 if test "${ac_cv_path_mkdir+set}" = set; then
9730 MKDIR_P="$ac_cv_path_mkdir -p"
9731 else
9732 # As a last resort, use the slow shell script. Don't cache a
9733 # value for MKDIR_P within a source directory, because that will
9734 # break other packages using the cache if that directory is
9735 # removed, or if the value is a relative name.
9736 MKDIR_P="$ac_install_sh -d"
9739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9740 $as_echo "$MKDIR_P" >&6; }
9742 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9743 # a relative path to it in each makefile where it substitutes it. This clashes
9744 # with our Makefile.global concept. This workaround helps.
9745 case $MKDIR_P in
9746 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9747 esac
9749 if test -z "$BISON"; then
9750 for ac_prog in bison
9752 # Extract the first word of "$ac_prog", so it can be a program name with args.
9753 set dummy $ac_prog; ac_word=$2
9754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9755 $as_echo_n "checking for $ac_word... " >&6; }
9756 if ${ac_cv_path_BISON+:} false; then :
9757 $as_echo_n "(cached) " >&6
9758 else
9759 case $BISON in
9760 [\\/]* | ?:[\\/]*)
9761 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9764 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9765 for as_dir in $PATH
9767 IFS=$as_save_IFS
9768 test -z "$as_dir" && as_dir=.
9769 for ac_exec_ext in '' $ac_executable_extensions; do
9770 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9771 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9772 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9773 break 2
9775 done
9776 done
9777 IFS=$as_save_IFS
9780 esac
9782 BISON=$ac_cv_path_BISON
9783 if test -n "$BISON"; then
9784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9785 $as_echo "$BISON" >&6; }
9786 else
9787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9788 $as_echo "no" >&6; }
9792 test -n "$BISON" && break
9793 done
9795 else
9796 # Report the value of BISON in configure's output in all cases.
9797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9798 $as_echo_n "checking for BISON... " >&6; }
9799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9800 $as_echo "$BISON" >&6; }
9804 if test "$BISON"; then
9805 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9806 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9807 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9808 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 2.3) exit 0; else exit 1;}'
9809 then
9810 as_fn_error $? "
9811 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9812 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." "$LINENO" 5
9814 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9815 # of the now preferred %name-prefix "base_yy", but the latter
9816 # doesn't work with Bison 2.3 or less. So for now we silence the
9817 # deprecation warnings.
9818 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9819 then
9820 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9824 if test -z "$BISON"; then
9825 as_fn_error $? "bison not found" "$LINENO" 5
9829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9830 $as_echo_n "checking for flex... " >&6; }
9831 if ${pgac_cv_path_flex+:} false; then :
9832 $as_echo_n "(cached) " >&6
9833 else
9834 # Let the user override the test
9835 if test -n "$FLEX"; then
9836 pgac_cv_path_flex=$FLEX
9837 else
9838 pgac_save_IFS=$IFS
9839 IFS=$PATH_SEPARATOR
9840 for pgac_dir in $PATH; do
9841 IFS=$pgac_save_IFS
9842 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9843 pgac_dir=`pwd`
9845 for pgac_prog in flex lex; do
9846 pgac_candidate="$pgac_dir/$pgac_prog"
9847 if test -f "$pgac_candidate" \
9848 && $pgac_candidate --version </dev/null >/dev/null 2>&1
9849 then
9850 echo '%%' > conftest.l
9851 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9852 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9853 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;}'
9854 then
9855 pgac_cv_path_flex=$pgac_candidate
9856 break 2
9857 else
9858 as_fn_error $? "
9859 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9860 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." "$LINENO" 5
9864 done
9865 done
9866 rm -f conftest.l lex.yy.c
9867 : ${pgac_cv_path_flex=no}
9871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9872 $as_echo "$pgac_cv_path_flex" >&6; }
9873 if test x"$pgac_cv_path_flex" = x"no"; then
9874 as_fn_error $? "flex not found" "$LINENO" 5
9875 else
9876 FLEX=$pgac_cv_path_flex
9877 pgac_flex_version=`$FLEX --version 2>/dev/null`
9878 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9879 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9886 if test -z "$PERL"; then
9887 for ac_prog in perl
9889 # Extract the first word of "$ac_prog", so it can be a program name with args.
9890 set dummy $ac_prog; ac_word=$2
9891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9892 $as_echo_n "checking for $ac_word... " >&6; }
9893 if ${ac_cv_path_PERL+:} false; then :
9894 $as_echo_n "(cached) " >&6
9895 else
9896 case $PERL in
9897 [\\/]* | ?:[\\/]*)
9898 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9901 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9902 for as_dir in $PATH
9904 IFS=$as_save_IFS
9905 test -z "$as_dir" && as_dir=.
9906 for ac_exec_ext in '' $ac_executable_extensions; do
9907 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9908 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9909 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9910 break 2
9912 done
9913 done
9914 IFS=$as_save_IFS
9917 esac
9919 PERL=$ac_cv_path_PERL
9920 if test -n "$PERL"; then
9921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9922 $as_echo "$PERL" >&6; }
9923 else
9924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9925 $as_echo "no" >&6; }
9929 test -n "$PERL" && break
9930 done
9932 else
9933 # Report the value of PERL in configure's output in all cases.
9934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9935 $as_echo_n "checking for PERL... " >&6; }
9936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9937 $as_echo "$PERL" >&6; }
9941 if test "$PERL"; then
9942 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'`
9943 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9944 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9945 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9946 $AWK '{ if ($1 == 5 && ($2 >= 14)) exit 1; else exit 0;}'
9947 then
9948 as_fn_error $? "
9949 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9950 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." "$LINENO" 5
9954 if test -z "$PERL"; then
9955 as_fn_error $? "Perl not found" "$LINENO" 5
9958 if test "$with_perl" = yes; then
9959 if test -z "$PERL"; then
9960 as_fn_error $? "Perl not found" "$LINENO" 5
9963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9964 $as_echo_n "checking for Perl archlibexp... " >&6; }
9965 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9966 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9968 $as_echo "$perl_archlibexp" >&6; }
9969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9970 $as_echo_n "checking for Perl privlibexp... " >&6; }
9971 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9972 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9974 $as_echo "$perl_privlibexp" >&6; }
9975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9976 $as_echo_n "checking for Perl useshrplib... " >&6; }
9977 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9978 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9980 $as_echo "$perl_useshrplib" >&6; }
9981 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9982 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9983 You might have to rebuild your Perl installation. Refer to the
9984 documentation for details. Use --without-perl to disable building
9985 PL/Perl." "$LINENO" 5
9987 # On most platforms, archlibexp is also where the Perl include files live ...
9988 perl_includespec="-I$perl_archlibexp/CORE"
9989 # ... but on newer macOS versions, we must use -iwithsysroot to look
9990 # under $PG_SYSROOT
9991 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
9992 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
9993 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
9997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9998 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9999 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10001 $as_echo "$perl_ccflags" >&6; }
10002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10003 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10004 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10006 $as_echo "$perl_embed_ccflags" >&6; }
10009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10010 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10011 if test "$PORTNAME" = "win32" ; then
10012 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10013 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10014 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10015 else
10016 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10017 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10018 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10021 else
10022 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10023 pgac_tmp2=`$PERL -MConfig -e 'print "$Config{ccdlflags} $Config{ldflags}"'`
10024 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%"`
10026 if test -z "$perl_embed_ldflags" ; then
10027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10028 $as_echo "no" >&6; }
10029 as_fn_error $? "could not determine flags for linking embedded Perl.
10030 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10031 installed." "$LINENO" 5
10032 else
10033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10034 $as_echo "$perl_embed_ldflags" >&6; }
10039 if test "$with_python" = yes; then
10040 if test -z "$PYTHON"; then
10041 for ac_prog in python3 python
10043 # Extract the first word of "$ac_prog", so it can be a program name with args.
10044 set dummy $ac_prog; ac_word=$2
10045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10046 $as_echo_n "checking for $ac_word... " >&6; }
10047 if ${ac_cv_path_PYTHON+:} false; then :
10048 $as_echo_n "(cached) " >&6
10049 else
10050 case $PYTHON in
10051 [\\/]* | ?:[\\/]*)
10052 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10055 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10056 for as_dir in $PATH
10058 IFS=$as_save_IFS
10059 test -z "$as_dir" && as_dir=.
10060 for ac_exec_ext in '' $ac_executable_extensions; do
10061 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10062 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10064 break 2
10066 done
10067 done
10068 IFS=$as_save_IFS
10071 esac
10073 PYTHON=$ac_cv_path_PYTHON
10074 if test -n "$PYTHON"; then
10075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10076 $as_echo "$PYTHON" >&6; }
10077 else
10078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10079 $as_echo "no" >&6; }
10083 test -n "$PYTHON" && break
10084 done
10086 else
10087 # Report the value of PYTHON in configure's output in all cases.
10088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10089 $as_echo_n "checking for PYTHON... " >&6; }
10090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10091 $as_echo "$PYTHON" >&6; }
10094 if test x"$PYTHON" = x""; then
10095 as_fn_error $? "Python not found" "$LINENO" 5
10099 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10100 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10101 $as_echo "$as_me: using python $python_fullversion" >&6;}
10102 # python_fullversion is typically n.n.n plus some trailing junk
10103 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10104 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10105 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10106 # Reject unsupported Python versions as soon as practical.
10107 if test "$python_majorversion" -lt 3; then
10108 as_fn_error $? "Python version $python_version is too old (version 3 or later is required)" "$LINENO" 5
10111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
10112 $as_echo_n "checking for Python sysconfig module... " >&6; }
10113 if "${PYTHON}" -c 'import sysconfig' 2>&5
10114 then
10115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10116 $as_echo "yes" >&6; }
10117 else
10118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10119 $as_echo "no" >&6; }
10120 as_fn_error $? "sysconfig module not found" "$LINENO" 5
10123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10124 $as_echo_n "checking Python configuration directory... " >&6; }
10125 python_configdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBPL'))))"`
10126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10127 $as_echo "$python_configdir" >&6; }
10129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directory" >&5
10130 $as_echo_n "checking Python include directory... " >&6; }
10131 python_includespec=`${PYTHON} -c "import sysconfig; print('-I' + sysconfig.get_config_var('INCLUDEPY'))"`
10132 if test "$PORTNAME" = win32 ; then
10133 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10136 $as_echo "$python_includespec" >&6; }
10140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10141 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10143 python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10144 python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
10146 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10147 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10148 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10149 then
10150 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10151 found_shlib=1
10152 else
10153 # Otherwise, guess the base name of the shlib.
10154 # LDVERSION was added in Python 3.2, before that use VERSION,
10155 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10156 python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
10157 if test x"${python_ldversion}" != x""; then
10158 ldlibrary="python${python_ldversion}"
10159 else
10160 python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
10161 if test x"${python_version_var}" != x""; then
10162 ldlibrary="python${python_version_var}"
10163 else
10164 ldlibrary="python${python_version}"
10167 # Search for a likely-looking file.
10168 found_shlib=0
10169 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10171 if test -e "$d/lib${ldlibrary}${DLSUFFIX}"; then
10172 python_libdir="$d"
10173 found_shlib=1
10174 break 2
10176 done
10177 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10178 # (".so.n.n") as well. However, check this only after failing to find
10179 # ".so" anywhere, because yet other platforms (Debian) put the .so
10180 # symlink in a different directory from the underlying versioned shlib.
10181 if test "$found_shlib" != 1; then
10182 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10184 for f in "$d/lib${ldlibrary}.so."* ; do
10185 if test -e "$f"; then
10186 python_libdir="$d"
10187 found_shlib=1
10188 break 2
10190 done
10191 done
10193 # As usual, Windows has its own ideas. Possible default library
10194 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10195 # and the "lib" prefix might not be there.
10196 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10197 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10199 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10200 if test -e "$f"; then
10201 python_libdir="$d"
10202 found_shlib=1
10203 break 2
10205 done
10206 done
10209 if test "$found_shlib" != 1; then
10210 as_fn_error $? "could not find shared library for Python
10211 You might have to rebuild your Python installation. Refer to the
10212 documentation for details. Use --without-python to disable building
10213 PL/Python." "$LINENO" 5
10215 python_libspec="-L${python_libdir} -l${ldlibrary}"
10217 python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10220 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10226 if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then
10227 if test -z "$ZIC"; then
10228 for ac_prog in zic
10230 # Extract the first word of "$ac_prog", so it can be a program name with args.
10231 set dummy $ac_prog; ac_word=$2
10232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10233 $as_echo_n "checking for $ac_word... " >&6; }
10234 if ${ac_cv_path_ZIC+:} false; then :
10235 $as_echo_n "(cached) " >&6
10236 else
10237 case $ZIC in
10238 [\\/]* | ?:[\\/]*)
10239 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10242 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10243 for as_dir in $PATH
10245 IFS=$as_save_IFS
10246 test -z "$as_dir" && as_dir=.
10247 for ac_exec_ext in '' $ac_executable_extensions; do
10248 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10249 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10250 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10251 break 2
10253 done
10254 done
10255 IFS=$as_save_IFS
10258 esac
10260 ZIC=$ac_cv_path_ZIC
10261 if test -n "$ZIC"; then
10262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10263 $as_echo "$ZIC" >&6; }
10264 else
10265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10266 $as_echo "no" >&6; }
10270 test -n "$ZIC" && break
10271 done
10273 else
10274 # Report the value of ZIC in configure's output in all cases.
10275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10276 $as_echo_n "checking for ZIC... " >&6; }
10277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10278 $as_echo "$ZIC" >&6; }
10281 if test -z "$ZIC"; then
10282 as_fn_error $? "
10283 When cross-compiling, either use the option --with-system-tzdata to use
10284 existing time-zone data, or set the environment variable ZIC to a zic
10285 program to use during the build." "$LINENO" 5
10290 # Pthreads
10292 # For each platform, we need to know about any special compile and link
10293 # libraries, and whether the normal C function names are thread-safe.
10294 # WIN32 doesn't need the pthread tests; it always uses threads
10296 # These tests are run before the library-tests, because linking with the
10297 # other libraries can pull in the pthread functions as a side-effect. We
10298 # want to use the -pthread or similar flags directly, and not rely on
10299 # the side-effects of linking with some other library.
10301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10302 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10303 if ${ac_cv_path_SED+:} false; then :
10304 $as_echo_n "(cached) " >&6
10305 else
10306 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10307 for ac_i in 1 2 3 4 5 6 7; do
10308 ac_script="$ac_script$as_nl$ac_script"
10309 done
10310 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10311 { ac_script=; unset ac_script;}
10312 if test -z "$SED"; then
10313 ac_path_SED_found=false
10314 # Loop through the user's path and test for each of PROGNAME-LIST
10315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10316 for as_dir in $PATH
10318 IFS=$as_save_IFS
10319 test -z "$as_dir" && as_dir=.
10320 for ac_prog in sed gsed; do
10321 for ac_exec_ext in '' $ac_executable_extensions; do
10322 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10323 as_fn_executable_p "$ac_path_SED" || continue
10324 # Check for GNU ac_path_SED and select it if it is found.
10325 # Check for GNU $ac_path_SED
10326 case `"$ac_path_SED" --version 2>&1` in
10327 *GNU*)
10328 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10330 ac_count=0
10331 $as_echo_n 0123456789 >"conftest.in"
10332 while :
10334 cat "conftest.in" "conftest.in" >"conftest.tmp"
10335 mv "conftest.tmp" "conftest.in"
10336 cp "conftest.in" "conftest.nl"
10337 $as_echo '' >> "conftest.nl"
10338 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10339 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10340 as_fn_arith $ac_count + 1 && ac_count=$as_val
10341 if test $ac_count -gt ${ac_path_SED_max-0}; then
10342 # Best one so far, save it but keep looking for a better one
10343 ac_cv_path_SED="$ac_path_SED"
10344 ac_path_SED_max=$ac_count
10346 # 10*(2^10) chars as input seems more than enough
10347 test $ac_count -gt 10 && break
10348 done
10349 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10350 esac
10352 $ac_path_SED_found && break 3
10353 done
10354 done
10355 done
10356 IFS=$as_save_IFS
10357 if test -z "$ac_cv_path_SED"; then
10358 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10360 else
10361 ac_cv_path_SED=$SED
10365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10366 $as_echo "$ac_cv_path_SED" >&6; }
10367 SED="$ac_cv_path_SED"
10368 rm -f conftest.sed
10371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10372 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10373 if ${ac_cv_path_GREP+:} false; then :
10374 $as_echo_n "(cached) " >&6
10375 else
10376 if test -z "$GREP"; then
10377 ac_path_GREP_found=false
10378 # Loop through the user's path and test for each of PROGNAME-LIST
10379 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10380 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10382 IFS=$as_save_IFS
10383 test -z "$as_dir" && as_dir=.
10384 for ac_prog in grep ggrep; do
10385 for ac_exec_ext in '' $ac_executable_extensions; do
10386 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10387 as_fn_executable_p "$ac_path_GREP" || continue
10388 # Check for GNU ac_path_GREP and select it if it is found.
10389 # Check for GNU $ac_path_GREP
10390 case `"$ac_path_GREP" --version 2>&1` in
10391 *GNU*)
10392 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10394 ac_count=0
10395 $as_echo_n 0123456789 >"conftest.in"
10396 while :
10398 cat "conftest.in" "conftest.in" >"conftest.tmp"
10399 mv "conftest.tmp" "conftest.in"
10400 cp "conftest.in" "conftest.nl"
10401 $as_echo 'GREP' >> "conftest.nl"
10402 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10403 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10404 as_fn_arith $ac_count + 1 && ac_count=$as_val
10405 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10406 # Best one so far, save it but keep looking for a better one
10407 ac_cv_path_GREP="$ac_path_GREP"
10408 ac_path_GREP_max=$ac_count
10410 # 10*(2^10) chars as input seems more than enough
10411 test $ac_count -gt 10 && break
10412 done
10413 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10414 esac
10416 $ac_path_GREP_found && break 3
10417 done
10418 done
10419 done
10420 IFS=$as_save_IFS
10421 if test -z "$ac_cv_path_GREP"; then
10422 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10424 else
10425 ac_cv_path_GREP=$GREP
10429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10430 $as_echo "$ac_cv_path_GREP" >&6; }
10431 GREP="$ac_cv_path_GREP"
10434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10435 $as_echo_n "checking for egrep... " >&6; }
10436 if ${ac_cv_path_EGREP+:} false; then :
10437 $as_echo_n "(cached) " >&6
10438 else
10439 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10440 then ac_cv_path_EGREP="$GREP -E"
10441 else
10442 if test -z "$EGREP"; then
10443 ac_path_EGREP_found=false
10444 # Loop through the user's path and test for each of PROGNAME-LIST
10445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10446 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10448 IFS=$as_save_IFS
10449 test -z "$as_dir" && as_dir=.
10450 for ac_prog in egrep; do
10451 for ac_exec_ext in '' $ac_executable_extensions; do
10452 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10453 as_fn_executable_p "$ac_path_EGREP" || continue
10454 # Check for GNU ac_path_EGREP and select it if it is found.
10455 # Check for GNU $ac_path_EGREP
10456 case `"$ac_path_EGREP" --version 2>&1` in
10457 *GNU*)
10458 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10460 ac_count=0
10461 $as_echo_n 0123456789 >"conftest.in"
10462 while :
10464 cat "conftest.in" "conftest.in" >"conftest.tmp"
10465 mv "conftest.tmp" "conftest.in"
10466 cp "conftest.in" "conftest.nl"
10467 $as_echo 'EGREP' >> "conftest.nl"
10468 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10469 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10470 as_fn_arith $ac_count + 1 && ac_count=$as_val
10471 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10472 # Best one so far, save it but keep looking for a better one
10473 ac_cv_path_EGREP="$ac_path_EGREP"
10474 ac_path_EGREP_max=$ac_count
10476 # 10*(2^10) chars as input seems more than enough
10477 test $ac_count -gt 10 && break
10478 done
10479 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10480 esac
10482 $ac_path_EGREP_found && break 3
10483 done
10484 done
10485 done
10486 IFS=$as_save_IFS
10487 if test -z "$ac_cv_path_EGREP"; then
10488 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10490 else
10491 ac_cv_path_EGREP=$EGREP
10496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10497 $as_echo "$ac_cv_path_EGREP" >&6; }
10498 EGREP="$ac_cv_path_EGREP"
10501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10502 $as_echo_n "checking for ANSI C header files... " >&6; }
10503 if ${ac_cv_header_stdc+:} false; then :
10504 $as_echo_n "(cached) " >&6
10505 else
10506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10507 /* end confdefs.h. */
10508 #include <stdlib.h>
10509 #include <stdarg.h>
10510 #include <string.h>
10511 #include <float.h>
10514 main ()
10518 return 0;
10520 _ACEOF
10521 if ac_fn_c_try_compile "$LINENO"; then :
10522 ac_cv_header_stdc=yes
10523 else
10524 ac_cv_header_stdc=no
10526 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10528 if test $ac_cv_header_stdc = yes; then
10529 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10531 /* end confdefs.h. */
10532 #include <string.h>
10534 _ACEOF
10535 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10536 $EGREP "memchr" >/dev/null 2>&1; then :
10538 else
10539 ac_cv_header_stdc=no
10541 rm -f conftest*
10545 if test $ac_cv_header_stdc = yes; then
10546 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10548 /* end confdefs.h. */
10549 #include <stdlib.h>
10551 _ACEOF
10552 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10553 $EGREP "free" >/dev/null 2>&1; then :
10555 else
10556 ac_cv_header_stdc=no
10558 rm -f conftest*
10562 if test $ac_cv_header_stdc = yes; then
10563 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10564 if test "$cross_compiling" = yes; then :
10566 else
10567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568 /* end confdefs.h. */
10569 #include <ctype.h>
10570 #include <stdlib.h>
10571 #if ((' ' & 0x0FF) == 0x020)
10572 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10573 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10574 #else
10575 # define ISLOWER(c) \
10576 (('a' <= (c) && (c) <= 'i') \
10577 || ('j' <= (c) && (c) <= 'r') \
10578 || ('s' <= (c) && (c) <= 'z'))
10579 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10580 #endif
10582 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10584 main ()
10586 int i;
10587 for (i = 0; i < 256; i++)
10588 if (XOR (islower (i), ISLOWER (i))
10589 || toupper (i) != TOUPPER (i))
10590 return 2;
10591 return 0;
10593 _ACEOF
10594 if ac_fn_c_try_run "$LINENO"; then :
10596 else
10597 ac_cv_header_stdc=no
10599 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10600 conftest.$ac_objext conftest.beam conftest.$ac_ext
10605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10606 $as_echo "$ac_cv_header_stdc" >&6; }
10607 if test $ac_cv_header_stdc = yes; then
10609 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10613 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10614 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10615 inttypes.h stdint.h unistd.h
10616 do :
10617 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10618 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10620 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10621 cat >>confdefs.h <<_ACEOF
10622 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10623 _ACEOF
10627 done
10630 if test "$PORTNAME" != "win32"; then :
10631 # then
10636 ac_ext=c
10637 ac_cpp='$CPP $CPPFLAGS'
10638 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10639 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10640 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10642 ax_pthread_ok=no
10644 # We used to check for pthread.h first, but this fails if pthread.h
10645 # requires special compiler flags (e.g. on Tru64 or Sequent).
10646 # It gets checked for in the link test anyway.
10648 # First of all, check if the user has set any of the PTHREAD_LIBS,
10649 # etcetera environment variables, and if threads linking works using
10650 # them:
10651 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10652 ax_pthread_save_CC="$CC"
10653 ax_pthread_save_CFLAGS="$CFLAGS"
10654 ax_pthread_save_LIBS="$LIBS"
10655 if test "x$PTHREAD_CC" != "x"; then :
10656 CC="$PTHREAD_CC"
10658 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10659 LIBS="$PTHREAD_LIBS $LIBS"
10660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10661 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10663 /* end confdefs.h. */
10665 /* Override any GCC internal prototype to avoid an error.
10666 Use char because int might match the return type of a GCC
10667 builtin and then its argument prototype would still apply. */
10668 #ifdef __cplusplus
10669 extern "C"
10670 #endif
10671 char pthread_join ();
10673 main ()
10675 return pthread_join ();
10677 return 0;
10679 _ACEOF
10680 if ac_fn_c_try_link "$LINENO"; then :
10681 ax_pthread_ok=yes
10683 rm -f core conftest.err conftest.$ac_objext \
10684 conftest$ac_exeext conftest.$ac_ext
10685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10686 $as_echo "$ax_pthread_ok" >&6; }
10687 if test "x$ax_pthread_ok" = "xno"; then
10688 PTHREAD_LIBS=""
10689 PTHREAD_CFLAGS=""
10691 CC="$ax_pthread_save_CC"
10692 CFLAGS="$ax_pthread_save_CFLAGS"
10693 LIBS="$ax_pthread_save_LIBS"
10696 # We must check for the threads library under a number of different
10697 # names; the ordering is very important because some systems
10698 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10699 # libraries is broken (non-POSIX).
10701 # Create a list of thread flags to try. Items starting with a "-" are
10702 # C compiler flags, and other items are library names, except for "none"
10703 # which indicates that we try without any flags at all, and "pthread-config"
10704 # which is a program returning the flags for the Pth emulation library.
10706 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10708 # The ordering *is* (sometimes) important. Some notes on the
10709 # individual items follow:
10711 # pthreads: AIX (must check this before -lpthread)
10712 # none: in case threads are in libc; should be tried before -Kthread and
10713 # other compiler flags to prevent continual compiler warnings
10714 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10715 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10716 # (Note: HP C rejects this with "bad form for `-t' option")
10717 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10718 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10719 # doesn't hurt to check since this sometimes defines pthreads and
10720 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
10721 # is present but should not be used directly; and before -mthreads,
10722 # because the compiler interprets this as "-mt" + "-hreads")
10723 # -mthreads: Mingw32/gcc, Lynx/gcc
10724 # pthread: Linux, etcetera
10725 # --thread-safe: KAI C++
10726 # pthread-config: use pthread-config program (for GNU Pth library)
10728 case $host_os in
10730 freebsd*)
10732 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10733 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10735 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10738 hpux*)
10740 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10741 # multi-threading and also sets -lpthread."
10743 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10746 openedition*)
10748 # IBM z/OS requires a feature-test macro to be defined in order to
10749 # enable POSIX threads at all, so give the user a hint if this is
10750 # not set. (We don't define these ourselves, as they can affect
10751 # other portions of the system API in unpredictable ways.)
10753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10754 /* end confdefs.h. */
10756 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10757 AX_PTHREAD_ZOS_MISSING
10758 # endif
10760 _ACEOF
10761 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10762 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10763 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10764 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10766 rm -f conftest*
10770 solaris*)
10772 # On Solaris (at least, for some versions), libc contains stubbed
10773 # (non-functional) versions of the pthreads routines, so link-based
10774 # tests will erroneously succeed. (N.B.: The stubs are missing
10775 # pthread_cleanup_push, or rather a function called by this macro,
10776 # so we could check for that, but who knows whether they'll stub
10777 # that too in a future libc.) So we'll check first for the
10778 # standard Solaris way of linking pthreads (-mt -lpthread).
10780 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10782 esac
10784 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10786 if test "x$GCC" = "xyes"; then :
10787 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10790 # The presence of a feature test macro requesting re-entrant function
10791 # definitions is, on some systems, a strong hint that pthreads support is
10792 # correctly enabled
10794 case $host_os in
10795 darwin* | hpux* | linux* | osf* | solaris*)
10796 ax_pthread_check_macro="_REENTRANT"
10799 aix*)
10800 ax_pthread_check_macro="_THREAD_SAFE"
10804 ax_pthread_check_macro="--"
10806 esac
10807 if test "x$ax_pthread_check_macro" = "x--"; then :
10808 ax_pthread_check_cond=0
10809 else
10810 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10813 # Are we compiling with Clang?
10815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10816 $as_echo_n "checking whether $CC is Clang... " >&6; }
10817 if ${ax_cv_PTHREAD_CLANG+:} false; then :
10818 $as_echo_n "(cached) " >&6
10819 else
10820 ax_cv_PTHREAD_CLANG=no
10821 # Note that Autoconf sets GCC=yes for Clang as well as GCC
10822 if test "x$GCC" = "xyes"; then
10823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10824 /* end confdefs.h. */
10825 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10826 # if defined(__clang__) && defined(__llvm__)
10827 AX_PTHREAD_CC_IS_CLANG
10828 # endif
10830 _ACEOF
10831 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10832 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10833 ax_cv_PTHREAD_CLANG=yes
10835 rm -f conftest*
10840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10841 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10842 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10844 ax_pthread_clang_warning=no
10846 # Clang needs special handling, because older versions handle the -pthread
10847 # option in a rather... idiosyncratic way
10849 if test "x$ax_pthread_clang" = "xyes"; then
10851 # Clang takes -pthread; it has never supported any other flag
10853 # (Note 1: This will need to be revisited if a system that Clang
10854 # supports has POSIX threads in a separate library. This tends not
10855 # to be the way of modern systems, but it's conceivable.)
10857 # (Note 2: On some systems, notably Darwin, -pthread is not needed
10858 # to get POSIX threads support; the API is always present and
10859 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
10860 # -pthread does define _REENTRANT, and while the Darwin headers
10861 # ignore this macro, third-party headers might not.)
10863 PTHREAD_CFLAGS="-pthread"
10864 PTHREAD_LIBS=
10866 ax_pthread_ok=yes
10868 # However, older versions of Clang make a point of warning the user
10869 # that, in an invocation where only linking and no compilation is
10870 # taking place, the -pthread option has no effect ("argument unused
10871 # during compilation"). They expect -pthread to be passed in only
10872 # when source code is being compiled.
10874 # Problem is, this is at odds with the way Automake and most other
10875 # C build frameworks function, which is that the same flags used in
10876 # compilation (CFLAGS) are also used in linking. Many systems
10877 # supported by AX_PTHREAD require exactly this for POSIX threads
10878 # support, and in fact it is often not straightforward to specify a
10879 # flag that is used only in the compilation phase and not in
10880 # linking. Such a scenario is extremely rare in practice.
10882 # Even though use of the -pthread flag in linking would only print
10883 # a warning, this can be a nuisance for well-run software projects
10884 # that build with -Werror. So if the active version of Clang has
10885 # this misfeature, we search for an option to squash it.
10887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10888 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10889 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10890 $as_echo_n "(cached) " >&6
10891 else
10892 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10893 # Create an alternate version of $ac_link that compiles and
10894 # links in two steps (.c -> .o, .o -> exe) instead of one
10895 # (.c -> exe), because the warning occurs only in the second
10896 # step
10897 ax_pthread_save_ac_link="$ac_link"
10898 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10899 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
10900 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10901 ax_pthread_save_CFLAGS="$CFLAGS"
10902 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10903 if test "x$ax_pthread_try" = "xunknown"; then :
10904 break
10906 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10907 ac_link="$ax_pthread_save_ac_link"
10908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10909 /* end confdefs.h. */
10910 int main(void){return 0;}
10911 _ACEOF
10912 if ac_fn_c_try_link "$LINENO"; then :
10913 ac_link="$ax_pthread_2step_ac_link"
10914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10915 /* end confdefs.h. */
10916 int main(void){return 0;}
10917 _ACEOF
10918 if ac_fn_c_try_link "$LINENO"; then :
10919 break
10921 rm -f core conftest.err conftest.$ac_objext \
10922 conftest$ac_exeext conftest.$ac_ext
10925 rm -f core conftest.err conftest.$ac_objext \
10926 conftest$ac_exeext conftest.$ac_ext
10927 done
10928 ac_link="$ax_pthread_save_ac_link"
10929 CFLAGS="$ax_pthread_save_CFLAGS"
10930 if test "x$ax_pthread_try" = "x"; then :
10931 ax_pthread_try=no
10933 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
10936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
10937 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
10939 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
10940 no | unknown) ;;
10941 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
10942 esac
10944 fi # $ax_pthread_clang = yes
10946 if test "x$ax_pthread_ok" = "xno"; then
10947 for ax_pthread_try_flag in $ax_pthread_flags; do
10949 case $ax_pthread_try_flag in
10950 none)
10951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10952 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10955 -mt,pthread)
10956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10957 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10958 PTHREAD_CFLAGS="-mt"
10959 PTHREAD_LIBS="-lpthread"
10963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
10964 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
10965 PTHREAD_CFLAGS="$ax_pthread_try_flag"
10968 pthread-config)
10969 # Extract the first word of "pthread-config", so it can be a program name with args.
10970 set dummy pthread-config; ac_word=$2
10971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10972 $as_echo_n "checking for $ac_word... " >&6; }
10973 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10974 $as_echo_n "(cached) " >&6
10975 else
10976 if test -n "$ax_pthread_config"; then
10977 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10978 else
10979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10980 for as_dir in $PATH
10982 IFS=$as_save_IFS
10983 test -z "$as_dir" && as_dir=.
10984 for ac_exec_ext in '' $ac_executable_extensions; do
10985 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10986 ac_cv_prog_ax_pthread_config="yes"
10987 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10988 break 2
10990 done
10991 done
10992 IFS=$as_save_IFS
10994 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10997 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10998 if test -n "$ax_pthread_config"; then
10999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11000 $as_echo "$ax_pthread_config" >&6; }
11001 else
11002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11003 $as_echo "no" >&6; }
11007 if test "x$ax_pthread_config" = "xno"; then :
11008 continue
11010 PTHREAD_CFLAGS="`pthread-config --cflags`"
11011 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11016 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11017 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11019 esac
11021 ax_pthread_save_CFLAGS="$CFLAGS"
11022 ax_pthread_save_LIBS="$LIBS"
11023 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11024 LIBS="$PTHREAD_LIBS $LIBS"
11026 # Check for various functions. We must include pthread.h,
11027 # since some functions may be macros. (On the Sequent, we
11028 # need a special flag -Kthread to make this header compile.)
11029 # We check for pthread_join because it is in -lpthread on IRIX
11030 # while pthread_create is in libc. We check for pthread_attr_init
11031 # due to DEC craziness with -lpthreads. We check for
11032 # pthread_cleanup_push because it is one of the few pthread
11033 # functions on Solaris that doesn't have a non-functional libc stub.
11034 # We try pthread_create on general principles.
11036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11037 /* end confdefs.h. */
11038 #include <pthread.h>
11039 # if $ax_pthread_check_cond
11040 # error "$ax_pthread_check_macro must be defined"
11041 # endif
11042 static void routine(void *a) { a = 0; }
11043 static void *start_routine(void *a) { return a; }
11045 main ()
11047 pthread_t th; pthread_attr_t attr;
11048 pthread_create(&th, 0, start_routine, 0);
11049 pthread_join(th, 0);
11050 pthread_attr_init(&attr);
11051 pthread_cleanup_push(routine, 0);
11052 pthread_cleanup_pop(0) /* ; */
11054 return 0;
11056 _ACEOF
11057 if ac_fn_c_try_link "$LINENO"; then :
11058 ax_pthread_ok=yes
11060 rm -f core conftest.err conftest.$ac_objext \
11061 conftest$ac_exeext conftest.$ac_ext
11063 CFLAGS="$ax_pthread_save_CFLAGS"
11064 LIBS="$ax_pthread_save_LIBS"
11066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11067 $as_echo "$ax_pthread_ok" >&6; }
11068 if test "x$ax_pthread_ok" = "xyes"; then :
11069 break
11072 PTHREAD_LIBS=""
11073 PTHREAD_CFLAGS=""
11074 done
11077 # Various other checks:
11078 if test "x$ax_pthread_ok" = "xyes"; then
11079 ax_pthread_save_CFLAGS="$CFLAGS"
11080 ax_pthread_save_LIBS="$LIBS"
11081 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11082 LIBS="$PTHREAD_LIBS $LIBS"
11084 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11086 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11087 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11088 $as_echo_n "(cached) " >&6
11089 else
11090 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11091 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11093 /* end confdefs.h. */
11094 #include <pthread.h>
11096 main ()
11098 int attr = $ax_pthread_attr; return attr /* ; */
11100 return 0;
11102 _ACEOF
11103 if ac_fn_c_try_link "$LINENO"; then :
11104 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11106 rm -f core conftest.err conftest.$ac_objext \
11107 conftest$ac_exeext conftest.$ac_ext
11108 done
11111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11112 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11113 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11114 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11115 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11117 cat >>confdefs.h <<_ACEOF
11118 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11119 _ACEOF
11121 ax_pthread_joinable_attr_defined=yes
11125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11126 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11127 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11128 $as_echo_n "(cached) " >&6
11129 else
11130 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11131 case $host_os in
11132 solaris*)
11133 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11135 esac
11138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11139 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11140 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11141 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11142 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11143 ax_pthread_special_flags_added=yes
11146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11147 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11148 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11149 $as_echo_n "(cached) " >&6
11150 else
11151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11152 /* end confdefs.h. */
11153 #include <pthread.h>
11155 main ()
11157 int i = PTHREAD_PRIO_INHERIT;
11159 return 0;
11161 _ACEOF
11162 if ac_fn_c_try_link "$LINENO"; then :
11163 ax_cv_PTHREAD_PRIO_INHERIT=yes
11164 else
11165 ax_cv_PTHREAD_PRIO_INHERIT=no
11167 rm -f core conftest.err conftest.$ac_objext \
11168 conftest$ac_exeext conftest.$ac_ext
11171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11172 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11173 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11174 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11176 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11178 ax_pthread_prio_inherit_defined=yes
11182 CFLAGS="$ax_pthread_save_CFLAGS"
11183 LIBS="$ax_pthread_save_LIBS"
11185 # More AIX lossage: compile with *_r variant
11186 if test "x$GCC" != "xyes"; then
11187 case $host_os in
11188 aix*)
11189 case "x/$CC" in #(
11190 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11191 #handle absolute path differently from PATH based program lookup
11192 case "x$CC" in #(
11193 x/*) :
11194 if as_fn_executable_p ${CC}_r; then :
11195 PTHREAD_CC="${CC}_r"
11196 fi ;; #(
11197 *) :
11198 for ac_prog in ${CC}_r
11200 # Extract the first word of "$ac_prog", so it can be a program name with args.
11201 set dummy $ac_prog; ac_word=$2
11202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11203 $as_echo_n "checking for $ac_word... " >&6; }
11204 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11205 $as_echo_n "(cached) " >&6
11206 else
11207 if test -n "$PTHREAD_CC"; then
11208 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11209 else
11210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11211 for as_dir in $PATH
11213 IFS=$as_save_IFS
11214 test -z "$as_dir" && as_dir=.
11215 for ac_exec_ext in '' $ac_executable_extensions; do
11216 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11217 ac_cv_prog_PTHREAD_CC="$ac_prog"
11218 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11219 break 2
11221 done
11222 done
11223 IFS=$as_save_IFS
11227 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11228 if test -n "$PTHREAD_CC"; then
11229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11230 $as_echo "$PTHREAD_CC" >&6; }
11231 else
11232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11233 $as_echo "no" >&6; }
11237 test -n "$PTHREAD_CC" && break
11238 done
11239 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11241 esac ;; #(
11242 *) :
11244 esac
11246 esac
11250 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11256 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11257 if test "x$ax_pthread_ok" = "xyes"; then
11259 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11262 else
11263 ax_pthread_ok=no
11266 ac_ext=c
11267 ac_cpp='$CPP $CPPFLAGS'
11268 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11269 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11270 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11272 # set thread flags
11274 # Some platforms use these, so just define them. They can't hurt if they
11275 # are not supported.
11276 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE"
11278 # Check for *_r functions
11279 _CFLAGS="$CFLAGS"
11280 _LIBS="$LIBS"
11281 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11282 LIBS="$LIBS $PTHREAD_LIBS"
11284 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11285 if test "x$ac_cv_header_pthread_h" = xyes; then :
11287 else
11288 as_fn_error $? "
11289 pthread.h not found" "$LINENO" 5
11294 for ac_func in strerror_r
11295 do :
11296 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
11297 if test "x$ac_cv_func_strerror_r" = xyes; then :
11298 cat >>confdefs.h <<_ACEOF
11299 #define HAVE_STRERROR_R 1
11300 _ACEOF
11303 done
11306 # Do test here with the proper thread flags
11307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11308 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11309 if ${pgac_cv_func_strerror_r_int+:} false; then :
11310 $as_echo_n "(cached) " >&6
11311 else
11312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11313 /* end confdefs.h. */
11314 #include <string.h>
11316 main ()
11318 char buf[100];
11319 switch (strerror_r(1, buf, sizeof(buf)))
11320 { case 0: break; default: break; }
11323 return 0;
11325 _ACEOF
11326 if ac_fn_c_try_compile "$LINENO"; then :
11327 pgac_cv_func_strerror_r_int=yes
11328 else
11329 pgac_cv_func_strerror_r_int=no
11331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11334 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11335 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11337 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11342 CFLAGS="$_CFLAGS"
11343 LIBS="$_LIBS"
11346 else
11347 # else
11348 # do not use values from template file
11349 PTHREAD_CFLAGS=
11350 PTHREAD_LIBS=
11352 fi # fi
11359 ## Libraries
11361 ## Most libraries are included only if they demonstrably provide a function
11362 ## we need, but libm is an exception: always include it, because there are
11363 ## too many compilers that play cute optimization games that will break
11364 ## probes for standard functions such as pow().
11367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11368 $as_echo_n "checking for main in -lm... " >&6; }
11369 if ${ac_cv_lib_m_main+:} false; then :
11370 $as_echo_n "(cached) " >&6
11371 else
11372 ac_check_lib_save_LIBS=$LIBS
11373 LIBS="-lm $LIBS"
11374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11375 /* end confdefs.h. */
11379 main ()
11381 return main ();
11383 return 0;
11385 _ACEOF
11386 if ac_fn_c_try_link "$LINENO"; then :
11387 ac_cv_lib_m_main=yes
11388 else
11389 ac_cv_lib_m_main=no
11391 rm -f core conftest.err conftest.$ac_objext \
11392 conftest$ac_exeext conftest.$ac_ext
11393 LIBS=$ac_check_lib_save_LIBS
11395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11396 $as_echo "$ac_cv_lib_m_main" >&6; }
11397 if test "x$ac_cv_lib_m_main" = xyes; then :
11398 cat >>confdefs.h <<_ACEOF
11399 #define HAVE_LIBM 1
11400 _ACEOF
11402 LIBS="-lm $LIBS"
11406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11407 $as_echo_n "checking for library containing setproctitle... " >&6; }
11408 if ${ac_cv_search_setproctitle+:} false; then :
11409 $as_echo_n "(cached) " >&6
11410 else
11411 ac_func_search_save_LIBS=$LIBS
11412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11413 /* end confdefs.h. */
11415 /* Override any GCC internal prototype to avoid an error.
11416 Use char because int might match the return type of a GCC
11417 builtin and then its argument prototype would still apply. */
11418 #ifdef __cplusplus
11419 extern "C"
11420 #endif
11421 char setproctitle ();
11423 main ()
11425 return setproctitle ();
11427 return 0;
11429 _ACEOF
11430 for ac_lib in '' util; do
11431 if test -z "$ac_lib"; then
11432 ac_res="none required"
11433 else
11434 ac_res=-l$ac_lib
11435 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11437 if ac_fn_c_try_link "$LINENO"; then :
11438 ac_cv_search_setproctitle=$ac_res
11440 rm -f core conftest.err conftest.$ac_objext \
11441 conftest$ac_exeext
11442 if ${ac_cv_search_setproctitle+:} false; then :
11443 break
11445 done
11446 if ${ac_cv_search_setproctitle+:} false; then :
11448 else
11449 ac_cv_search_setproctitle=no
11451 rm conftest.$ac_ext
11452 LIBS=$ac_func_search_save_LIBS
11454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11455 $as_echo "$ac_cv_search_setproctitle" >&6; }
11456 ac_res=$ac_cv_search_setproctitle
11457 if test "$ac_res" != no; then :
11458 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11462 # gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
11463 # when enabling asan the dlopen check doesn't notice that -ldl is actually
11464 # required. Just checking for dlsym() ought to suffice.
11465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
11466 $as_echo_n "checking for library containing dlsym... " >&6; }
11467 if ${ac_cv_search_dlsym+:} false; then :
11468 $as_echo_n "(cached) " >&6
11469 else
11470 ac_func_search_save_LIBS=$LIBS
11471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11472 /* end confdefs.h. */
11474 /* Override any GCC internal prototype to avoid an error.
11475 Use char because int might match the return type of a GCC
11476 builtin and then its argument prototype would still apply. */
11477 #ifdef __cplusplus
11478 extern "C"
11479 #endif
11480 char dlsym ();
11482 main ()
11484 return dlsym ();
11486 return 0;
11488 _ACEOF
11489 for ac_lib in '' dl; do
11490 if test -z "$ac_lib"; then
11491 ac_res="none required"
11492 else
11493 ac_res=-l$ac_lib
11494 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11496 if ac_fn_c_try_link "$LINENO"; then :
11497 ac_cv_search_dlsym=$ac_res
11499 rm -f core conftest.err conftest.$ac_objext \
11500 conftest$ac_exeext
11501 if ${ac_cv_search_dlsym+:} false; then :
11502 break
11504 done
11505 if ${ac_cv_search_dlsym+:} false; then :
11507 else
11508 ac_cv_search_dlsym=no
11510 rm conftest.$ac_ext
11511 LIBS=$ac_func_search_save_LIBS
11513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
11514 $as_echo "$ac_cv_search_dlsym" >&6; }
11515 ac_res=$ac_cv_search_dlsym
11516 if test "$ac_res" != no; then :
11517 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11522 $as_echo_n "checking for library containing socket... " >&6; }
11523 if ${ac_cv_search_socket+:} false; then :
11524 $as_echo_n "(cached) " >&6
11525 else
11526 ac_func_search_save_LIBS=$LIBS
11527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11528 /* end confdefs.h. */
11530 /* Override any GCC internal prototype to avoid an error.
11531 Use char because int might match the return type of a GCC
11532 builtin and then its argument prototype would still apply. */
11533 #ifdef __cplusplus
11534 extern "C"
11535 #endif
11536 char socket ();
11538 main ()
11540 return socket ();
11542 return 0;
11544 _ACEOF
11545 for ac_lib in '' socket ws2_32; do
11546 if test -z "$ac_lib"; then
11547 ac_res="none required"
11548 else
11549 ac_res=-l$ac_lib
11550 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11552 if ac_fn_c_try_link "$LINENO"; then :
11553 ac_cv_search_socket=$ac_res
11555 rm -f core conftest.err conftest.$ac_objext \
11556 conftest$ac_exeext
11557 if ${ac_cv_search_socket+:} false; then :
11558 break
11560 done
11561 if ${ac_cv_search_socket+:} false; then :
11563 else
11564 ac_cv_search_socket=no
11566 rm conftest.$ac_ext
11567 LIBS=$ac_func_search_save_LIBS
11569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11570 $as_echo "$ac_cv_search_socket" >&6; }
11571 ac_res=$ac_cv_search_socket
11572 if test "$ac_res" != no; then :
11573 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11578 $as_echo_n "checking for library containing getopt_long... " >&6; }
11579 if ${ac_cv_search_getopt_long+:} false; then :
11580 $as_echo_n "(cached) " >&6
11581 else
11582 ac_func_search_save_LIBS=$LIBS
11583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11584 /* end confdefs.h. */
11586 /* Override any GCC internal prototype to avoid an error.
11587 Use char because int might match the return type of a GCC
11588 builtin and then its argument prototype would still apply. */
11589 #ifdef __cplusplus
11590 extern "C"
11591 #endif
11592 char getopt_long ();
11594 main ()
11596 return getopt_long ();
11598 return 0;
11600 _ACEOF
11601 for ac_lib in '' getopt gnugetopt; do
11602 if test -z "$ac_lib"; then
11603 ac_res="none required"
11604 else
11605 ac_res=-l$ac_lib
11606 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11608 if ac_fn_c_try_link "$LINENO"; then :
11609 ac_cv_search_getopt_long=$ac_res
11611 rm -f core conftest.err conftest.$ac_objext \
11612 conftest$ac_exeext
11613 if ${ac_cv_search_getopt_long+:} false; then :
11614 break
11616 done
11617 if ${ac_cv_search_getopt_long+:} false; then :
11619 else
11620 ac_cv_search_getopt_long=no
11622 rm conftest.$ac_ext
11623 LIBS=$ac_func_search_save_LIBS
11625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11626 $as_echo "$ac_cv_search_getopt_long" >&6; }
11627 ac_res=$ac_cv_search_getopt_long
11628 if test "$ac_res" != no; then :
11629 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11634 $as_echo_n "checking for library containing shm_open... " >&6; }
11635 if ${ac_cv_search_shm_open+:} false; then :
11636 $as_echo_n "(cached) " >&6
11637 else
11638 ac_func_search_save_LIBS=$LIBS
11639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11640 /* end confdefs.h. */
11642 /* Override any GCC internal prototype to avoid an error.
11643 Use char because int might match the return type of a GCC
11644 builtin and then its argument prototype would still apply. */
11645 #ifdef __cplusplus
11646 extern "C"
11647 #endif
11648 char shm_open ();
11650 main ()
11652 return shm_open ();
11654 return 0;
11656 _ACEOF
11657 for ac_lib in '' rt; do
11658 if test -z "$ac_lib"; then
11659 ac_res="none required"
11660 else
11661 ac_res=-l$ac_lib
11662 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11664 if ac_fn_c_try_link "$LINENO"; then :
11665 ac_cv_search_shm_open=$ac_res
11667 rm -f core conftest.err conftest.$ac_objext \
11668 conftest$ac_exeext
11669 if ${ac_cv_search_shm_open+:} false; then :
11670 break
11672 done
11673 if ${ac_cv_search_shm_open+:} false; then :
11675 else
11676 ac_cv_search_shm_open=no
11678 rm conftest.$ac_ext
11679 LIBS=$ac_func_search_save_LIBS
11681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11682 $as_echo "$ac_cv_search_shm_open" >&6; }
11683 ac_res=$ac_cv_search_shm_open
11684 if test "$ac_res" != no; then :
11685 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11690 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11691 if ${ac_cv_search_shm_unlink+:} false; then :
11692 $as_echo_n "(cached) " >&6
11693 else
11694 ac_func_search_save_LIBS=$LIBS
11695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11696 /* end confdefs.h. */
11698 /* Override any GCC internal prototype to avoid an error.
11699 Use char because int might match the return type of a GCC
11700 builtin and then its argument prototype would still apply. */
11701 #ifdef __cplusplus
11702 extern "C"
11703 #endif
11704 char shm_unlink ();
11706 main ()
11708 return shm_unlink ();
11710 return 0;
11712 _ACEOF
11713 for ac_lib in '' rt; do
11714 if test -z "$ac_lib"; then
11715 ac_res="none required"
11716 else
11717 ac_res=-l$ac_lib
11718 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11720 if ac_fn_c_try_link "$LINENO"; then :
11721 ac_cv_search_shm_unlink=$ac_res
11723 rm -f core conftest.err conftest.$ac_objext \
11724 conftest$ac_exeext
11725 if ${ac_cv_search_shm_unlink+:} false; then :
11726 break
11728 done
11729 if ${ac_cv_search_shm_unlink+:} false; then :
11731 else
11732 ac_cv_search_shm_unlink=no
11734 rm conftest.$ac_ext
11735 LIBS=$ac_func_search_save_LIBS
11737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11738 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11739 ac_res=$ac_cv_search_shm_unlink
11740 if test "$ac_res" != no; then :
11741 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11746 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11747 if ${ac_cv_search_clock_gettime+:} false; then :
11748 $as_echo_n "(cached) " >&6
11749 else
11750 ac_func_search_save_LIBS=$LIBS
11751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11752 /* end confdefs.h. */
11754 /* Override any GCC internal prototype to avoid an error.
11755 Use char because int might match the return type of a GCC
11756 builtin and then its argument prototype would still apply. */
11757 #ifdef __cplusplus
11758 extern "C"
11759 #endif
11760 char clock_gettime ();
11762 main ()
11764 return clock_gettime ();
11766 return 0;
11768 _ACEOF
11769 for ac_lib in '' rt; do
11770 if test -z "$ac_lib"; then
11771 ac_res="none required"
11772 else
11773 ac_res=-l$ac_lib
11774 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11776 if ac_fn_c_try_link "$LINENO"; then :
11777 ac_cv_search_clock_gettime=$ac_res
11779 rm -f core conftest.err conftest.$ac_objext \
11780 conftest$ac_exeext
11781 if ${ac_cv_search_clock_gettime+:} false; then :
11782 break
11784 done
11785 if ${ac_cv_search_clock_gettime+:} false; then :
11787 else
11788 ac_cv_search_clock_gettime=no
11790 rm conftest.$ac_ext
11791 LIBS=$ac_func_search_save_LIBS
11793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11794 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11795 ac_res=$ac_cv_search_clock_gettime
11796 if test "$ac_res" != no; then :
11797 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11801 # Cygwin:
11802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11803 $as_echo_n "checking for library containing shmget... " >&6; }
11804 if ${ac_cv_search_shmget+:} false; then :
11805 $as_echo_n "(cached) " >&6
11806 else
11807 ac_func_search_save_LIBS=$LIBS
11808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11809 /* end confdefs.h. */
11811 /* Override any GCC internal prototype to avoid an error.
11812 Use char because int might match the return type of a GCC
11813 builtin and then its argument prototype would still apply. */
11814 #ifdef __cplusplus
11815 extern "C"
11816 #endif
11817 char shmget ();
11819 main ()
11821 return shmget ();
11823 return 0;
11825 _ACEOF
11826 for ac_lib in '' cygipc; do
11827 if test -z "$ac_lib"; then
11828 ac_res="none required"
11829 else
11830 ac_res=-l$ac_lib
11831 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11833 if ac_fn_c_try_link "$LINENO"; then :
11834 ac_cv_search_shmget=$ac_res
11836 rm -f core conftest.err conftest.$ac_objext \
11837 conftest$ac_exeext
11838 if ${ac_cv_search_shmget+:} false; then :
11839 break
11841 done
11842 if ${ac_cv_search_shmget+:} false; then :
11844 else
11845 ac_cv_search_shmget=no
11847 rm conftest.$ac_ext
11848 LIBS=$ac_func_search_save_LIBS
11850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11851 $as_echo "$ac_cv_search_shmget" >&6; }
11852 ac_res=$ac_cv_search_shmget
11853 if test "$ac_res" != no; then :
11854 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11858 # *BSD:
11859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
11860 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
11861 if ${ac_cv_search_backtrace_symbols+:} false; then :
11862 $as_echo_n "(cached) " >&6
11863 else
11864 ac_func_search_save_LIBS=$LIBS
11865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11866 /* end confdefs.h. */
11868 /* Override any GCC internal prototype to avoid an error.
11869 Use char because int might match the return type of a GCC
11870 builtin and then its argument prototype would still apply. */
11871 #ifdef __cplusplus
11872 extern "C"
11873 #endif
11874 char backtrace_symbols ();
11876 main ()
11878 return backtrace_symbols ();
11880 return 0;
11882 _ACEOF
11883 for ac_lib in '' execinfo; do
11884 if test -z "$ac_lib"; then
11885 ac_res="none required"
11886 else
11887 ac_res=-l$ac_lib
11888 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11890 if ac_fn_c_try_link "$LINENO"; then :
11891 ac_cv_search_backtrace_symbols=$ac_res
11893 rm -f core conftest.err conftest.$ac_objext \
11894 conftest$ac_exeext
11895 if ${ac_cv_search_backtrace_symbols+:} false; then :
11896 break
11898 done
11899 if ${ac_cv_search_backtrace_symbols+:} false; then :
11901 else
11902 ac_cv_search_backtrace_symbols=no
11904 rm conftest.$ac_ext
11905 LIBS=$ac_func_search_save_LIBS
11907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
11908 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
11909 ac_res=$ac_cv_search_backtrace_symbols
11910 if test "$ac_res" != no; then :
11911 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
11917 $as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
11918 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
11919 $as_echo_n "(cached) " >&6
11920 else
11921 ac_func_search_save_LIBS=$LIBS
11922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11923 /* end confdefs.h. */
11925 /* Override any GCC internal prototype to avoid an error.
11926 Use char because int might match the return type of a GCC
11927 builtin and then its argument prototype would still apply. */
11928 #ifdef __cplusplus
11929 extern "C"
11930 #endif
11931 char pthread_barrier_wait ();
11933 main ()
11935 return pthread_barrier_wait ();
11937 return 0;
11939 _ACEOF
11940 for ac_lib in '' pthread; do
11941 if test -z "$ac_lib"; then
11942 ac_res="none required"
11943 else
11944 ac_res=-l$ac_lib
11945 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11947 if ac_fn_c_try_link "$LINENO"; then :
11948 ac_cv_search_pthread_barrier_wait=$ac_res
11950 rm -f core conftest.err conftest.$ac_objext \
11951 conftest$ac_exeext
11952 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
11953 break
11955 done
11956 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
11958 else
11959 ac_cv_search_pthread_barrier_wait=no
11961 rm conftest.$ac_ext
11962 LIBS=$ac_func_search_save_LIBS
11964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_barrier_wait" >&5
11965 $as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
11966 ac_res=$ac_cv_search_pthread_barrier_wait
11967 if test "$ac_res" != no; then :
11968 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11973 if test "$with_readline" = yes; then
11976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11977 $as_echo_n "checking for library containing readline... " >&6; }
11978 if ${pgac_cv_check_readline+:} false; then :
11979 $as_echo_n "(cached) " >&6
11980 else
11981 pgac_cv_check_readline=no
11982 pgac_save_LIBS=$LIBS
11983 if test x"$with_libedit_preferred" != x"yes"
11984 then READLINE_ORDER="-lreadline -ledit"
11985 else READLINE_ORDER="-ledit -lreadline"
11987 for pgac_rllib in $READLINE_ORDER ; do
11988 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11989 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11991 /* end confdefs.h. */
11993 /* Override any GCC internal prototype to avoid an error.
11994 Use char because int might match the return type of a GCC
11995 builtin and then its argument prototype would still apply. */
11996 #ifdef __cplusplus
11997 extern "C"
11998 #endif
11999 char readline ();
12001 main ()
12003 return readline ();
12005 return 0;
12007 _ACEOF
12008 if ac_fn_c_try_link "$LINENO"; then :
12010 # Older NetBSD and OpenBSD have a broken linker that does not
12011 # recognize dependent libraries; assume curses is needed if we didn't
12012 # find any dependency.
12013 case $host_os in
12014 netbsd* | openbsd*)
12015 if test x"$pgac_lib" = x"" ; then
12016 pgac_lib=" -lcurses"
12017 fi ;;
12018 esac
12020 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12021 break
12024 rm -f core conftest.err conftest.$ac_objext \
12025 conftest$ac_exeext conftest.$ac_ext
12026 done
12027 if test "$pgac_cv_check_readline" != no ; then
12028 break
12030 done
12031 LIBS=$pgac_save_LIBS
12034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12035 $as_echo "$pgac_cv_check_readline" >&6; }
12036 if test "$pgac_cv_check_readline" != no ; then
12037 LIBS="$pgac_cv_check_readline $LIBS"
12039 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12044 if test x"$pgac_cv_check_readline" = x"no"; then
12045 as_fn_error $? "readline library not found
12046 If you have readline already installed, see config.log for details on the
12047 failure. It is possible the compiler isn't looking in the proper directory.
12048 Use --without-readline to disable readline support." "$LINENO" 5
12052 if test "$with_zlib" = yes; then
12053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12054 $as_echo_n "checking for inflate in -lz... " >&6; }
12055 if ${ac_cv_lib_z_inflate+:} false; then :
12056 $as_echo_n "(cached) " >&6
12057 else
12058 ac_check_lib_save_LIBS=$LIBS
12059 LIBS="-lz $LIBS"
12060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12061 /* end confdefs.h. */
12063 /* Override any GCC internal prototype to avoid an error.
12064 Use char because int might match the return type of a GCC
12065 builtin and then its argument prototype would still apply. */
12066 #ifdef __cplusplus
12067 extern "C"
12068 #endif
12069 char inflate ();
12071 main ()
12073 return inflate ();
12075 return 0;
12077 _ACEOF
12078 if ac_fn_c_try_link "$LINENO"; then :
12079 ac_cv_lib_z_inflate=yes
12080 else
12081 ac_cv_lib_z_inflate=no
12083 rm -f core conftest.err conftest.$ac_objext \
12084 conftest$ac_exeext conftest.$ac_ext
12085 LIBS=$ac_check_lib_save_LIBS
12087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12088 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12089 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12090 cat >>confdefs.h <<_ACEOF
12091 #define HAVE_LIBZ 1
12092 _ACEOF
12094 LIBS="-lz $LIBS"
12096 else
12097 as_fn_error $? "zlib library not found
12098 If you have zlib already installed, see config.log for details on the
12099 failure. It is possible the compiler isn't looking in the proper directory.
12100 Use --without-zlib to disable zlib support." "$LINENO" 5
12105 if test "$with_gssapi" = yes ; then
12106 if test "$PORTNAME" != "win32"; then
12107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_store_cred_into" >&5
12108 $as_echo_n "checking for library containing gss_store_cred_into... " >&6; }
12109 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12110 $as_echo_n "(cached) " >&6
12111 else
12112 ac_func_search_save_LIBS=$LIBS
12113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12114 /* end confdefs.h. */
12116 /* Override any GCC internal prototype to avoid an error.
12117 Use char because int might match the return type of a GCC
12118 builtin and then its argument prototype would still apply. */
12119 #ifdef __cplusplus
12120 extern "C"
12121 #endif
12122 char gss_store_cred_into ();
12124 main ()
12126 return gss_store_cred_into ();
12128 return 0;
12130 _ACEOF
12131 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12132 if test -z "$ac_lib"; then
12133 ac_res="none required"
12134 else
12135 ac_res=-l$ac_lib
12136 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12138 if ac_fn_c_try_link "$LINENO"; then :
12139 ac_cv_search_gss_store_cred_into=$ac_res
12141 rm -f core conftest.err conftest.$ac_objext \
12142 conftest$ac_exeext
12143 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12144 break
12146 done
12147 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12149 else
12150 ac_cv_search_gss_store_cred_into=no
12152 rm conftest.$ac_ext
12153 LIBS=$ac_func_search_save_LIBS
12155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_store_cred_into" >&5
12156 $as_echo "$ac_cv_search_gss_store_cred_into" >&6; }
12157 ac_res=$ac_cv_search_gss_store_cred_into
12158 if test "$ac_res" != no; then :
12159 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12161 else
12162 as_fn_error $? "could not find function 'gss_store_cred_into' required for GSSAPI" "$LINENO" 5
12165 else
12166 LIBS="$LIBS -lgssapi32"
12171 # SSL Library
12173 # There is currently only one supported SSL/TLS library: OpenSSL.
12178 # Check whether --with-ssl was given.
12179 if test "${with_ssl+set}" = set; then :
12180 withval=$with_ssl;
12181 case $withval in
12182 yes)
12183 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12186 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12191 esac
12196 if test x"$with_ssl" = x"" ; then
12197 with_ssl=no
12202 # Check whether --with-openssl was given.
12203 if test "${with_openssl+set}" = set; then :
12204 withval=$with_openssl;
12205 case $withval in
12206 yes)
12213 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12215 esac
12217 else
12218 with_openssl=no
12223 if test "$with_openssl" = yes ; then
12224 with_ssl=openssl
12227 if test "$with_ssl" = openssl ; then
12228 # Minimum required OpenSSL version is 1.1.1
12230 $as_echo "#define OPENSSL_API_COMPAT 0x10101000L" >>confdefs.h
12232 if test "$PORTNAME" != "win32"; then
12233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12234 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12235 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12236 $as_echo_n "(cached) " >&6
12237 else
12238 ac_check_lib_save_LIBS=$LIBS
12239 LIBS="-lcrypto $LIBS"
12240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12241 /* end confdefs.h. */
12243 /* Override any GCC internal prototype to avoid an error.
12244 Use char because int might match the return type of a GCC
12245 builtin and then its argument prototype would still apply. */
12246 #ifdef __cplusplus
12247 extern "C"
12248 #endif
12249 char CRYPTO_new_ex_data ();
12251 main ()
12253 return CRYPTO_new_ex_data ();
12255 return 0;
12257 _ACEOF
12258 if ac_fn_c_try_link "$LINENO"; then :
12259 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12260 else
12261 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12263 rm -f core conftest.err conftest.$ac_objext \
12264 conftest$ac_exeext conftest.$ac_ext
12265 LIBS=$ac_check_lib_save_LIBS
12267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12268 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12269 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12270 cat >>confdefs.h <<_ACEOF
12271 #define HAVE_LIBCRYPTO 1
12272 _ACEOF
12274 LIBS="-lcrypto $LIBS"
12276 else
12277 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12281 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12282 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12283 $as_echo_n "(cached) " >&6
12284 else
12285 ac_check_lib_save_LIBS=$LIBS
12286 LIBS="-lssl $LIBS"
12287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12288 /* end confdefs.h. */
12290 /* Override any GCC internal prototype to avoid an error.
12291 Use char because int might match the return type of a GCC
12292 builtin and then its argument prototype would still apply. */
12293 #ifdef __cplusplus
12294 extern "C"
12295 #endif
12296 char SSL_new ();
12298 main ()
12300 return SSL_new ();
12302 return 0;
12304 _ACEOF
12305 if ac_fn_c_try_link "$LINENO"; then :
12306 ac_cv_lib_ssl_SSL_new=yes
12307 else
12308 ac_cv_lib_ssl_SSL_new=no
12310 rm -f core conftest.err conftest.$ac_objext \
12311 conftest$ac_exeext conftest.$ac_ext
12312 LIBS=$ac_check_lib_save_LIBS
12314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12315 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12316 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12317 cat >>confdefs.h <<_ACEOF
12318 #define HAVE_LIBSSL 1
12319 _ACEOF
12321 LIBS="-lssl $LIBS"
12323 else
12324 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12327 else
12328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12329 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12330 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12331 $as_echo_n "(cached) " >&6
12332 else
12333 ac_func_search_save_LIBS=$LIBS
12334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12335 /* end confdefs.h. */
12337 /* Override any GCC internal prototype to avoid an error.
12338 Use char because int might match the return type of a GCC
12339 builtin and then its argument prototype would still apply. */
12340 #ifdef __cplusplus
12341 extern "C"
12342 #endif
12343 char CRYPTO_new_ex_data ();
12345 main ()
12347 return CRYPTO_new_ex_data ();
12349 return 0;
12351 _ACEOF
12352 for ac_lib in '' eay32 crypto; do
12353 if test -z "$ac_lib"; then
12354 ac_res="none required"
12355 else
12356 ac_res=-l$ac_lib
12357 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12359 if ac_fn_c_try_link "$LINENO"; then :
12360 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12362 rm -f core conftest.err conftest.$ac_objext \
12363 conftest$ac_exeext
12364 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12365 break
12367 done
12368 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12370 else
12371 ac_cv_search_CRYPTO_new_ex_data=no
12373 rm conftest.$ac_ext
12374 LIBS=$ac_func_search_save_LIBS
12376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12377 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12378 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12379 if test "$ac_res" != no; then :
12380 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12382 else
12383 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12387 $as_echo_n "checking for library containing SSL_new... " >&6; }
12388 if ${ac_cv_search_SSL_new+:} false; then :
12389 $as_echo_n "(cached) " >&6
12390 else
12391 ac_func_search_save_LIBS=$LIBS
12392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12393 /* end confdefs.h. */
12395 /* Override any GCC internal prototype to avoid an error.
12396 Use char because int might match the return type of a GCC
12397 builtin and then its argument prototype would still apply. */
12398 #ifdef __cplusplus
12399 extern "C"
12400 #endif
12401 char SSL_new ();
12403 main ()
12405 return SSL_new ();
12407 return 0;
12409 _ACEOF
12410 for ac_lib in '' ssleay32 ssl; do
12411 if test -z "$ac_lib"; then
12412 ac_res="none required"
12413 else
12414 ac_res=-l$ac_lib
12415 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12417 if ac_fn_c_try_link "$LINENO"; then :
12418 ac_cv_search_SSL_new=$ac_res
12420 rm -f core conftest.err conftest.$ac_objext \
12421 conftest$ac_exeext
12422 if ${ac_cv_search_SSL_new+:} false; then :
12423 break
12425 done
12426 if ${ac_cv_search_SSL_new+:} false; then :
12428 else
12429 ac_cv_search_SSL_new=no
12431 rm conftest.$ac_ext
12432 LIBS=$ac_func_search_save_LIBS
12434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12435 $as_echo "$ac_cv_search_SSL_new" >&6; }
12436 ac_res=$ac_cv_search_SSL_new
12437 if test "$ac_res" != no; then :
12438 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12440 else
12441 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12445 # Functions introduced in OpenSSL 1.1.1.
12446 for ac_func in SSL_CTX_set_ciphersuites
12447 do :
12448 ac_fn_c_check_func "$LINENO" "SSL_CTX_set_ciphersuites" "ac_cv_func_SSL_CTX_set_ciphersuites"
12449 if test "x$ac_cv_func_SSL_CTX_set_ciphersuites" = xyes; then :
12450 cat >>confdefs.h <<_ACEOF
12451 #define HAVE_SSL_CTX_SET_CIPHERSUITES 1
12452 _ACEOF
12454 else
12455 as_fn_error $? "OpenSSL version >= 1.1.1 is required for SSL support" "$LINENO" 5
12457 done
12459 # Function introduced in OpenSSL 1.0.2, not in LibreSSL.
12460 for ac_func in SSL_CTX_set_cert_cb
12461 do :
12462 ac_fn_c_check_func "$LINENO" "SSL_CTX_set_cert_cb" "ac_cv_func_SSL_CTX_set_cert_cb"
12463 if test "x$ac_cv_func_SSL_CTX_set_cert_cb" = xyes; then :
12464 cat >>confdefs.h <<_ACEOF
12465 #define HAVE_SSL_CTX_SET_CERT_CB 1
12466 _ACEOF
12469 done
12471 # Function introduced in OpenSSL 1.1.1, not in LibreSSL.
12472 for ac_func in X509_get_signature_info SSL_CTX_set_num_tickets
12473 do :
12474 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12475 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12476 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12477 cat >>confdefs.h <<_ACEOF
12478 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12479 _ACEOF
12482 done
12485 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
12487 elif test "$with_ssl" != no ; then
12488 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
12492 if test "$with_pam" = yes ; then
12493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12494 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12495 if ${ac_cv_lib_pam_pam_start+:} false; then :
12496 $as_echo_n "(cached) " >&6
12497 else
12498 ac_check_lib_save_LIBS=$LIBS
12499 LIBS="-lpam $LIBS"
12500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12501 /* end confdefs.h. */
12503 /* Override any GCC internal prototype to avoid an error.
12504 Use char because int might match the return type of a GCC
12505 builtin and then its argument prototype would still apply. */
12506 #ifdef __cplusplus
12507 extern "C"
12508 #endif
12509 char pam_start ();
12511 main ()
12513 return pam_start ();
12515 return 0;
12517 _ACEOF
12518 if ac_fn_c_try_link "$LINENO"; then :
12519 ac_cv_lib_pam_pam_start=yes
12520 else
12521 ac_cv_lib_pam_pam_start=no
12523 rm -f core conftest.err conftest.$ac_objext \
12524 conftest$ac_exeext conftest.$ac_ext
12525 LIBS=$ac_check_lib_save_LIBS
12527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12528 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12529 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12530 cat >>confdefs.h <<_ACEOF
12531 #define HAVE_LIBPAM 1
12532 _ACEOF
12534 LIBS="-lpam $LIBS"
12536 else
12537 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12542 if test "$with_libxml" = yes ; then
12543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12544 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12545 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12546 $as_echo_n "(cached) " >&6
12547 else
12548 ac_check_lib_save_LIBS=$LIBS
12549 LIBS="-lxml2 $LIBS"
12550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12551 /* end confdefs.h. */
12553 /* Override any GCC internal prototype to avoid an error.
12554 Use char because int might match the return type of a GCC
12555 builtin and then its argument prototype would still apply. */
12556 #ifdef __cplusplus
12557 extern "C"
12558 #endif
12559 char xmlSaveToBuffer ();
12561 main ()
12563 return xmlSaveToBuffer ();
12565 return 0;
12567 _ACEOF
12568 if ac_fn_c_try_link "$LINENO"; then :
12569 ac_cv_lib_xml2_xmlSaveToBuffer=yes
12570 else
12571 ac_cv_lib_xml2_xmlSaveToBuffer=no
12573 rm -f core conftest.err conftest.$ac_objext \
12574 conftest$ac_exeext conftest.$ac_ext
12575 LIBS=$ac_check_lib_save_LIBS
12577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12578 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12579 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12580 cat >>confdefs.h <<_ACEOF
12581 #define HAVE_LIBXML2 1
12582 _ACEOF
12584 LIBS="-lxml2 $LIBS"
12586 else
12587 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12592 if test "$with_libxslt" = yes ; then
12593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12594 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12595 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12596 $as_echo_n "(cached) " >&6
12597 else
12598 ac_check_lib_save_LIBS=$LIBS
12599 LIBS="-lxslt $LIBS"
12600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12601 /* end confdefs.h. */
12603 /* Override any GCC internal prototype to avoid an error.
12604 Use char because int might match the return type of a GCC
12605 builtin and then its argument prototype would still apply. */
12606 #ifdef __cplusplus
12607 extern "C"
12608 #endif
12609 char xsltCleanupGlobals ();
12611 main ()
12613 return xsltCleanupGlobals ();
12615 return 0;
12617 _ACEOF
12618 if ac_fn_c_try_link "$LINENO"; then :
12619 ac_cv_lib_xslt_xsltCleanupGlobals=yes
12620 else
12621 ac_cv_lib_xslt_xsltCleanupGlobals=no
12623 rm -f core conftest.err conftest.$ac_objext \
12624 conftest$ac_exeext conftest.$ac_ext
12625 LIBS=$ac_check_lib_save_LIBS
12627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12628 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12629 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12630 cat >>confdefs.h <<_ACEOF
12631 #define HAVE_LIBXSLT 1
12632 _ACEOF
12634 LIBS="-lxslt $LIBS"
12636 else
12637 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12642 if test "$with_lz4" = yes ; then
12643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
12644 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
12645 if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
12646 $as_echo_n "(cached) " >&6
12647 else
12648 ac_check_lib_save_LIBS=$LIBS
12649 LIBS="-llz4 $LIBS"
12650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12651 /* end confdefs.h. */
12653 /* Override any GCC internal prototype to avoid an error.
12654 Use char because int might match the return type of a GCC
12655 builtin and then its argument prototype would still apply. */
12656 #ifdef __cplusplus
12657 extern "C"
12658 #endif
12659 char LZ4_compress_default ();
12661 main ()
12663 return LZ4_compress_default ();
12665 return 0;
12667 _ACEOF
12668 if ac_fn_c_try_link "$LINENO"; then :
12669 ac_cv_lib_lz4_LZ4_compress_default=yes
12670 else
12671 ac_cv_lib_lz4_LZ4_compress_default=no
12673 rm -f core conftest.err conftest.$ac_objext \
12674 conftest$ac_exeext conftest.$ac_ext
12675 LIBS=$ac_check_lib_save_LIBS
12677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5
12678 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
12679 if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
12680 cat >>confdefs.h <<_ACEOF
12681 #define HAVE_LIBLZ4 1
12682 _ACEOF
12684 LIBS="-llz4 $LIBS"
12686 else
12687 as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
12692 if test "$with_zstd" = yes ; then
12693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5
12694 $as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; }
12695 if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then :
12696 $as_echo_n "(cached) " >&6
12697 else
12698 ac_check_lib_save_LIBS=$LIBS
12699 LIBS="-lzstd $LIBS"
12700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12701 /* end confdefs.h. */
12703 /* Override any GCC internal prototype to avoid an error.
12704 Use char because int might match the return type of a GCC
12705 builtin and then its argument prototype would still apply. */
12706 #ifdef __cplusplus
12707 extern "C"
12708 #endif
12709 char ZSTD_compress ();
12711 main ()
12713 return ZSTD_compress ();
12715 return 0;
12717 _ACEOF
12718 if ac_fn_c_try_link "$LINENO"; then :
12719 ac_cv_lib_zstd_ZSTD_compress=yes
12720 else
12721 ac_cv_lib_zstd_ZSTD_compress=no
12723 rm -f core conftest.err conftest.$ac_objext \
12724 conftest$ac_exeext conftest.$ac_ext
12725 LIBS=$ac_check_lib_save_LIBS
12727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5
12728 $as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; }
12729 if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then :
12730 cat >>confdefs.h <<_ACEOF
12731 #define HAVE_LIBZSTD 1
12732 _ACEOF
12734 LIBS="-lzstd $LIBS"
12736 else
12737 as_fn_error $? "library 'zstd' is required for ZSTD support" "$LINENO" 5
12742 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12743 if test "$with_ldap" = yes ; then
12744 _LIBS="$LIBS"
12745 if test "$PORTNAME" != "win32"; then
12746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12747 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12748 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12749 $as_echo_n "(cached) " >&6
12750 else
12751 ac_check_lib_save_LIBS=$LIBS
12752 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12754 /* end confdefs.h. */
12756 /* Override any GCC internal prototype to avoid an error.
12757 Use char because int might match the return type of a GCC
12758 builtin and then its argument prototype would still apply. */
12759 #ifdef __cplusplus
12760 extern "C"
12761 #endif
12762 char ldap_bind ();
12764 main ()
12766 return ldap_bind ();
12768 return 0;
12770 _ACEOF
12771 if ac_fn_c_try_link "$LINENO"; then :
12772 ac_cv_lib_ldap_ldap_bind=yes
12773 else
12774 ac_cv_lib_ldap_ldap_bind=no
12776 rm -f core conftest.err conftest.$ac_objext \
12777 conftest$ac_exeext conftest.$ac_ext
12778 LIBS=$ac_check_lib_save_LIBS
12780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12781 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12782 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12783 cat >>confdefs.h <<_ACEOF
12784 #define HAVE_LIBLDAP 1
12785 _ACEOF
12787 LIBS="-lldap $LIBS"
12789 else
12790 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12793 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12794 # This test is carried out against libldap.
12795 for ac_func in ldap_initialize
12796 do :
12797 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12798 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12799 cat >>confdefs.h <<_ACEOF
12800 #define HAVE_LDAP_INITIALIZE 1
12801 _ACEOF
12804 done
12806 # The separate ldap_r library only exists in OpenLDAP < 2.5, and if we
12807 # have 2.5 or later, we shouldn't even probe for ldap_r (we might find a
12808 # library from a separate OpenLDAP installation). The most reliable
12809 # way to check that is to check for a function introduced in 2.5.
12810 ac_fn_c_check_func "$LINENO" "ldap_verify_credentials" "ac_cv_func_ldap_verify_credentials"
12811 if test "x$ac_cv_func_ldap_verify_credentials" = xyes; then :
12812 thread_safe_libldap=yes
12813 else
12814 thread_safe_libldap=no
12817 if test "$thread_safe_libldap" = no; then
12818 # Use ldap_r for FE if available, else assume ldap is thread-safe.
12819 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
12820 LIBS="$_LIBS"
12821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
12822 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
12823 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
12824 $as_echo_n "(cached) " >&6
12825 else
12826 ac_check_lib_save_LIBS=$LIBS
12827 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12829 /* end confdefs.h. */
12831 /* Override any GCC internal prototype to avoid an error.
12832 Use char because int might match the return type of a GCC
12833 builtin and then its argument prototype would still apply. */
12834 #ifdef __cplusplus
12835 extern "C"
12836 #endif
12837 char ldap_bind ();
12839 main ()
12841 return ldap_bind ();
12843 return 0;
12845 _ACEOF
12846 if ac_fn_c_try_link "$LINENO"; then :
12847 ac_cv_lib_ldap_r_ldap_bind=yes
12848 else
12849 ac_cv_lib_ldap_r_ldap_bind=no
12851 rm -f core conftest.err conftest.$ac_objext \
12852 conftest$ac_exeext conftest.$ac_ext
12853 LIBS=$ac_check_lib_save_LIBS
12855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
12856 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
12857 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
12858 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12859 else
12860 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12863 else
12864 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12866 else
12867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12868 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12869 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12870 $as_echo_n "(cached) " >&6
12871 else
12872 ac_check_lib_save_LIBS=$LIBS
12873 LIBS="-lwldap32 $LIBS"
12874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12875 /* end confdefs.h. */
12877 /* Override any GCC internal prototype to avoid an error.
12878 Use char because int might match the return type of a GCC
12879 builtin and then its argument prototype would still apply. */
12880 #ifdef __cplusplus
12881 extern "C"
12882 #endif
12883 char ldap_bind ();
12885 main ()
12887 return ldap_bind ();
12889 return 0;
12891 _ACEOF
12892 if ac_fn_c_try_link "$LINENO"; then :
12893 ac_cv_lib_wldap32_ldap_bind=yes
12894 else
12895 ac_cv_lib_wldap32_ldap_bind=no
12897 rm -f core conftest.err conftest.$ac_objext \
12898 conftest$ac_exeext conftest.$ac_ext
12899 LIBS=$ac_check_lib_save_LIBS
12901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12902 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12903 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12904 cat >>confdefs.h <<_ACEOF
12905 #define HAVE_LIBWLDAP32 1
12906 _ACEOF
12908 LIBS="-lwldap32 $LIBS"
12910 else
12911 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12914 LDAP_LIBS_FE="-lwldap32"
12915 LDAP_LIBS_BE="-lwldap32"
12917 LIBS="$_LIBS"
12922 # for contrib/sepgsql
12923 if test "$with_selinux" = yes; then
12924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12925 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12926 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12927 $as_echo_n "(cached) " >&6
12928 else
12929 ac_check_lib_save_LIBS=$LIBS
12930 LIBS="-lselinux $LIBS"
12931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12932 /* end confdefs.h. */
12934 /* Override any GCC internal prototype to avoid an error.
12935 Use char because int might match the return type of a GCC
12936 builtin and then its argument prototype would still apply. */
12937 #ifdef __cplusplus
12938 extern "C"
12939 #endif
12940 char security_compute_create_name ();
12942 main ()
12944 return security_compute_create_name ();
12946 return 0;
12948 _ACEOF
12949 if ac_fn_c_try_link "$LINENO"; then :
12950 ac_cv_lib_selinux_security_compute_create_name=yes
12951 else
12952 ac_cv_lib_selinux_security_compute_create_name=no
12954 rm -f core conftest.err conftest.$ac_objext \
12955 conftest$ac_exeext conftest.$ac_ext
12956 LIBS=$ac_check_lib_save_LIBS
12958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12959 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12960 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12961 cat >>confdefs.h <<_ACEOF
12962 #define HAVE_LIBSELINUX 1
12963 _ACEOF
12965 LIBS="-lselinux $LIBS"
12967 else
12968 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12973 # for contrib/uuid-ossp
12974 if test "$with_uuid" = bsd ; then
12975 # On BSD, the UUID functions are in libc
12976 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12977 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12978 UUID_LIBS=""
12979 else
12980 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12983 elif test "$with_uuid" = e2fs ; then
12984 # On macOS, the UUID functions are in libc
12985 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12986 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12987 UUID_LIBS=""
12988 else
12989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12990 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12991 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12992 $as_echo_n "(cached) " >&6
12993 else
12994 ac_check_lib_save_LIBS=$LIBS
12995 LIBS="-luuid $LIBS"
12996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12997 /* end confdefs.h. */
12999 /* Override any GCC internal prototype to avoid an error.
13000 Use char because int might match the return type of a GCC
13001 builtin and then its argument prototype would still apply. */
13002 #ifdef __cplusplus
13003 extern "C"
13004 #endif
13005 char uuid_generate ();
13007 main ()
13009 return uuid_generate ();
13011 return 0;
13013 _ACEOF
13014 if ac_fn_c_try_link "$LINENO"; then :
13015 ac_cv_lib_uuid_uuid_generate=yes
13016 else
13017 ac_cv_lib_uuid_uuid_generate=no
13019 rm -f core conftest.err conftest.$ac_objext \
13020 conftest$ac_exeext conftest.$ac_ext
13021 LIBS=$ac_check_lib_save_LIBS
13023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13024 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13025 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13026 UUID_LIBS="-luuid"
13027 else
13028 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13033 elif test "$with_uuid" = ossp ; then
13034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13035 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13036 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13037 $as_echo_n "(cached) " >&6
13038 else
13039 ac_check_lib_save_LIBS=$LIBS
13040 LIBS="-lossp-uuid $LIBS"
13041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13042 /* end confdefs.h. */
13044 /* Override any GCC internal prototype to avoid an error.
13045 Use char because int might match the return type of a GCC
13046 builtin and then its argument prototype would still apply. */
13047 #ifdef __cplusplus
13048 extern "C"
13049 #endif
13050 char uuid_export ();
13052 main ()
13054 return uuid_export ();
13056 return 0;
13058 _ACEOF
13059 if ac_fn_c_try_link "$LINENO"; then :
13060 ac_cv_lib_ossp_uuid_uuid_export=yes
13061 else
13062 ac_cv_lib_ossp_uuid_uuid_export=no
13064 rm -f core conftest.err conftest.$ac_objext \
13065 conftest$ac_exeext conftest.$ac_ext
13066 LIBS=$ac_check_lib_save_LIBS
13068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13069 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13070 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13071 UUID_LIBS="-lossp-uuid"
13072 else
13073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13074 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13075 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13076 $as_echo_n "(cached) " >&6
13077 else
13078 ac_check_lib_save_LIBS=$LIBS
13079 LIBS="-luuid $LIBS"
13080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13081 /* end confdefs.h. */
13083 /* Override any GCC internal prototype to avoid an error.
13084 Use char because int might match the return type of a GCC
13085 builtin and then its argument prototype would still apply. */
13086 #ifdef __cplusplus
13087 extern "C"
13088 #endif
13089 char uuid_export ();
13091 main ()
13093 return uuid_export ();
13095 return 0;
13097 _ACEOF
13098 if ac_fn_c_try_link "$LINENO"; then :
13099 ac_cv_lib_uuid_uuid_export=yes
13100 else
13101 ac_cv_lib_uuid_uuid_export=no
13103 rm -f core conftest.err conftest.$ac_objext \
13104 conftest$ac_exeext conftest.$ac_ext
13105 LIBS=$ac_check_lib_save_LIBS
13107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13108 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13109 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13110 UUID_LIBS="-luuid"
13111 else
13112 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13122 ## Header files
13125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13126 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13127 if ${ac_cv_header_stdbool_h+:} false; then :
13128 $as_echo_n "(cached) " >&6
13129 else
13130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13131 /* end confdefs.h. */
13133 #include <stdbool.h>
13134 #ifndef bool
13135 "error: bool is not defined"
13136 #endif
13137 #ifndef false
13138 "error: false is not defined"
13139 #endif
13140 #if false
13141 "error: false is not 0"
13142 #endif
13143 #ifndef true
13144 "error: true is not defined"
13145 #endif
13146 #if true != 1
13147 "error: true is not 1"
13148 #endif
13149 #ifndef __bool_true_false_are_defined
13150 "error: __bool_true_false_are_defined is not defined"
13151 #endif
13153 struct s { _Bool s: 1; _Bool t; } s;
13155 char a[true == 1 ? 1 : -1];
13156 char b[false == 0 ? 1 : -1];
13157 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13158 char d[(bool) 0.5 == true ? 1 : -1];
13159 /* See body of main program for 'e'. */
13160 char f[(_Bool) 0.0 == false ? 1 : -1];
13161 char g[true];
13162 char h[sizeof (_Bool)];
13163 char i[sizeof s.t];
13164 enum { j = false, k = true, l = false * true, m = true * 256 };
13165 /* The following fails for
13166 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13167 _Bool n[m];
13168 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13169 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13170 /* Catch a bug in an HP-UX C compiler. See
13171 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13172 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13174 _Bool q = true;
13175 _Bool *pq = &q;
13178 main ()
13181 bool e = &s;
13182 *pq |= q;
13183 *pq |= ! q;
13184 /* Refer to every declared value, to avoid compiler optimizations. */
13185 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13186 + !m + !n + !o + !p + !q + !pq);
13189 return 0;
13191 _ACEOF
13192 if ac_fn_c_try_compile "$LINENO"; then :
13193 ac_cv_header_stdbool_h=yes
13194 else
13195 ac_cv_header_stdbool_h=no
13197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13200 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13201 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13202 if test "x$ac_cv_type__Bool" = xyes; then :
13204 cat >>confdefs.h <<_ACEOF
13205 #define HAVE__BOOL 1
13206 _ACEOF
13212 if test $ac_cv_header_stdbool_h = yes; then
13214 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13219 for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.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 xlocale.h
13220 do :
13221 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13222 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13223 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13224 cat >>confdefs.h <<_ACEOF
13225 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13226 _ACEOF
13230 done
13233 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13234 for ac_header in readline/readline.h
13235 do :
13236 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13237 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13238 cat >>confdefs.h <<_ACEOF
13239 #define HAVE_READLINE_READLINE_H 1
13240 _ACEOF
13242 else
13243 for ac_header in readline.h
13244 do :
13245 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13246 if test "x$ac_cv_header_readline_h" = xyes; then :
13247 cat >>confdefs.h <<_ACEOF
13248 #define HAVE_READLINE_H 1
13249 _ACEOF
13251 else
13252 as_fn_error $? "readline header not found
13253 If you have readline already installed, see config.log for details on the
13254 failure. It is possible the compiler isn't looking in the proper directory.
13255 Use --without-readline to disable readline support." "$LINENO" 5
13258 done
13262 done
13264 for ac_header in readline/history.h
13265 do :
13266 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13267 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13268 cat >>confdefs.h <<_ACEOF
13269 #define HAVE_READLINE_HISTORY_H 1
13270 _ACEOF
13272 else
13273 for ac_header in history.h
13274 do :
13275 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13276 if test "x$ac_cv_header_history_h" = xyes; then :
13277 cat >>confdefs.h <<_ACEOF
13278 #define HAVE_HISTORY_H 1
13279 _ACEOF
13281 else
13282 as_fn_error $? "history header not found
13283 If you have readline already installed, see config.log for details on the
13284 failure. It is possible the compiler isn't looking in the proper directory.
13285 Use --without-readline to disable readline support." "$LINENO" 5
13288 done
13292 done
13296 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13297 # Some installations of libedit usurp /usr/include/readline/, which seems
13298 # bad practice, since in combined installations readline will have its headers
13299 # there. We might have to resort to AC_EGREP checks to make sure we found
13300 # the proper header...
13301 for ac_header in editline/readline.h
13302 do :
13303 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13304 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13305 cat >>confdefs.h <<_ACEOF
13306 #define HAVE_EDITLINE_READLINE_H 1
13307 _ACEOF
13309 else
13310 for ac_header in readline.h
13311 do :
13312 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13313 if test "x$ac_cv_header_readline_h" = xyes; then :
13314 cat >>confdefs.h <<_ACEOF
13315 #define HAVE_READLINE_H 1
13316 _ACEOF
13318 else
13319 for ac_header in readline/readline.h
13320 do :
13321 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13322 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13323 cat >>confdefs.h <<_ACEOF
13324 #define HAVE_READLINE_READLINE_H 1
13325 _ACEOF
13327 else
13328 as_fn_error $? "readline header not found
13329 If you have libedit already installed, see config.log for details on the
13330 failure. It is possible the compiler isn't looking in the proper directory.
13331 Use --without-readline to disable libedit support." "$LINENO" 5
13334 done
13338 done
13342 done
13344 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13345 # not be there at all. Hence, don't complain if not found. We must check
13346 # though, since in yet other versions it is an independent header.
13347 for ac_header in editline/history.h
13348 do :
13349 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13350 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13351 cat >>confdefs.h <<_ACEOF
13352 #define HAVE_EDITLINE_HISTORY_H 1
13353 _ACEOF
13355 else
13356 for ac_header in history.h
13357 do :
13358 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13359 if test "x$ac_cv_header_history_h" = xyes; then :
13360 cat >>confdefs.h <<_ACEOF
13361 #define HAVE_HISTORY_H 1
13362 _ACEOF
13364 else
13365 for ac_header in readline/history.h
13366 do :
13367 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13368 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13369 cat >>confdefs.h <<_ACEOF
13370 #define HAVE_READLINE_HISTORY_H 1
13371 _ACEOF
13375 done
13379 done
13383 done
13387 if test "$with_zlib" = yes; then
13388 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13389 if test "x$ac_cv_header_zlib_h" = xyes; then :
13391 else
13392 as_fn_error $? "zlib header not found
13393 If you have zlib already installed, see config.log for details on the
13394 failure. It is possible the compiler isn't looking in the proper directory.
13395 Use --without-zlib to disable zlib support." "$LINENO" 5
13401 if test -z "$LZ4"; then
13402 for ac_prog in lz4
13404 # Extract the first word of "$ac_prog", so it can be a program name with args.
13405 set dummy $ac_prog; ac_word=$2
13406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13407 $as_echo_n "checking for $ac_word... " >&6; }
13408 if ${ac_cv_path_LZ4+:} false; then :
13409 $as_echo_n "(cached) " >&6
13410 else
13411 case $LZ4 in
13412 [\\/]* | ?:[\\/]*)
13413 ac_cv_path_LZ4="$LZ4" # Let the user override the test with a path.
13416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13417 for as_dir in $PATH
13419 IFS=$as_save_IFS
13420 test -z "$as_dir" && as_dir=.
13421 for ac_exec_ext in '' $ac_executable_extensions; do
13422 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13423 ac_cv_path_LZ4="$as_dir/$ac_word$ac_exec_ext"
13424 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13425 break 2
13427 done
13428 done
13429 IFS=$as_save_IFS
13432 esac
13434 LZ4=$ac_cv_path_LZ4
13435 if test -n "$LZ4"; then
13436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13437 $as_echo "$LZ4" >&6; }
13438 else
13439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13440 $as_echo "no" >&6; }
13444 test -n "$LZ4" && break
13445 done
13447 else
13448 # Report the value of LZ4 in configure's output in all cases.
13449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4" >&5
13450 $as_echo_n "checking for LZ4... " >&6; }
13451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13452 $as_echo "$LZ4" >&6; }
13455 if test "$with_lz4" = yes; then
13456 ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
13457 if test "x$ac_cv_header_lz4_h" = xyes; then :
13459 else
13460 as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
13466 if test -z "$ZSTD"; then
13467 for ac_prog in zstd
13469 # Extract the first word of "$ac_prog", so it can be a program name with args.
13470 set dummy $ac_prog; ac_word=$2
13471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13472 $as_echo_n "checking for $ac_word... " >&6; }
13473 if ${ac_cv_path_ZSTD+:} false; then :
13474 $as_echo_n "(cached) " >&6
13475 else
13476 case $ZSTD in
13477 [\\/]* | ?:[\\/]*)
13478 ac_cv_path_ZSTD="$ZSTD" # Let the user override the test with a path.
13481 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13482 for as_dir in $PATH
13484 IFS=$as_save_IFS
13485 test -z "$as_dir" && as_dir=.
13486 for ac_exec_ext in '' $ac_executable_extensions; do
13487 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13488 ac_cv_path_ZSTD="$as_dir/$ac_word$ac_exec_ext"
13489 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13490 break 2
13492 done
13493 done
13494 IFS=$as_save_IFS
13497 esac
13499 ZSTD=$ac_cv_path_ZSTD
13500 if test -n "$ZSTD"; then
13501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13502 $as_echo "$ZSTD" >&6; }
13503 else
13504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13505 $as_echo "no" >&6; }
13509 test -n "$ZSTD" && break
13510 done
13512 else
13513 # Report the value of ZSTD in configure's output in all cases.
13514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD" >&5
13515 $as_echo_n "checking for ZSTD... " >&6; }
13516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13517 $as_echo "$ZSTD" >&6; }
13520 if test "$with_zstd" = yes; then
13521 ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default"
13522 if test "x$ac_cv_header_zstd_h" = xyes; then :
13524 else
13525 as_fn_error $? "zstd.h header file is required for ZSTD" "$LINENO" 5
13531 if test "$with_gssapi" = yes ; then
13532 for ac_header in gssapi/gssapi.h
13533 do :
13534 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13535 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13536 cat >>confdefs.h <<_ACEOF
13537 #define HAVE_GSSAPI_GSSAPI_H 1
13538 _ACEOF
13540 else
13541 for ac_header in gssapi.h
13542 do :
13543 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13544 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13545 cat >>confdefs.h <<_ACEOF
13546 #define HAVE_GSSAPI_H 1
13547 _ACEOF
13549 else
13550 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13553 done
13557 done
13559 for ac_header in gssapi/gssapi_ext.h
13560 do :
13561 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi_ext.h" "ac_cv_header_gssapi_gssapi_ext_h" "$ac_includes_default"
13562 if test "x$ac_cv_header_gssapi_gssapi_ext_h" = xyes; then :
13563 cat >>confdefs.h <<_ACEOF
13564 #define HAVE_GSSAPI_GSSAPI_EXT_H 1
13565 _ACEOF
13567 else
13568 for ac_header in gssapi_ext.h
13569 do :
13570 ac_fn_c_check_header_mongrel "$LINENO" "gssapi_ext.h" "ac_cv_header_gssapi_ext_h" "$ac_includes_default"
13571 if test "x$ac_cv_header_gssapi_ext_h" = xyes; then :
13572 cat >>confdefs.h <<_ACEOF
13573 #define HAVE_GSSAPI_EXT_H 1
13574 _ACEOF
13576 else
13577 as_fn_error $? "gssapi_ext.h header file is required for GSSAPI" "$LINENO" 5
13580 done
13584 done
13588 if test -z "$OPENSSL"; then
13589 for ac_prog in openssl
13591 # Extract the first word of "$ac_prog", so it can be a program name with args.
13592 set dummy $ac_prog; ac_word=$2
13593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13594 $as_echo_n "checking for $ac_word... " >&6; }
13595 if ${ac_cv_path_OPENSSL+:} false; then :
13596 $as_echo_n "(cached) " >&6
13597 else
13598 case $OPENSSL in
13599 [\\/]* | ?:[\\/]*)
13600 ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a path.
13603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13604 for as_dir in $PATH
13606 IFS=$as_save_IFS
13607 test -z "$as_dir" && as_dir=.
13608 for ac_exec_ext in '' $ac_executable_extensions; do
13609 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13610 ac_cv_path_OPENSSL="$as_dir/$ac_word$ac_exec_ext"
13611 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13612 break 2
13614 done
13615 done
13616 IFS=$as_save_IFS
13619 esac
13621 OPENSSL=$ac_cv_path_OPENSSL
13622 if test -n "$OPENSSL"; then
13623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
13624 $as_echo "$OPENSSL" >&6; }
13625 else
13626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13627 $as_echo "no" >&6; }
13631 test -n "$OPENSSL" && break
13632 done
13634 else
13635 # Report the value of OPENSSL in configure's output in all cases.
13636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
13637 $as_echo_n "checking for OPENSSL... " >&6; }
13638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
13639 $as_echo "$OPENSSL" >&6; }
13642 pgac_openssl_version="$($OPENSSL version 2> /dev/null || echo openssl not found)"
13643 { $as_echo "$as_me:${as_lineno-$LINENO}: using openssl: $pgac_openssl_version" >&5
13644 $as_echo "$as_me: using openssl: $pgac_openssl_version" >&6;}
13645 if test "$with_ssl" = openssl ; then
13646 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13647 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13649 else
13650 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13654 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13655 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13657 else
13658 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13664 if test "$with_pam" = yes ; then
13665 for ac_header in security/pam_appl.h
13666 do :
13667 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13668 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13669 cat >>confdefs.h <<_ACEOF
13670 #define HAVE_SECURITY_PAM_APPL_H 1
13671 _ACEOF
13673 else
13674 for ac_header in pam/pam_appl.h
13675 do :
13676 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13677 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13678 cat >>confdefs.h <<_ACEOF
13679 #define HAVE_PAM_PAM_APPL_H 1
13680 _ACEOF
13682 else
13683 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13686 done
13690 done
13694 if test "$with_bsd_auth" = yes ; then
13695 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13696 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13698 else
13699 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13705 if test "$with_systemd" = yes ; then
13706 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13707 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13709 else
13710 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13716 if test "$with_libxml" = yes ; then
13717 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13718 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13720 else
13721 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13727 if test "$with_libxslt" = yes ; then
13728 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13729 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13731 else
13732 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13738 if test "$with_ldap" = yes ; then
13739 if test "$PORTNAME" != "win32"; then
13740 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13741 if test "x$ac_cv_header_ldap_h" = xyes; then :
13743 else
13744 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13749 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13750 if ${pgac_cv_ldap_safe+:} false; then :
13751 $as_echo_n "(cached) " >&6
13752 else
13753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13754 /* end confdefs.h. */
13755 #include <ldap.h>
13756 #if !defined(LDAP_VENDOR_VERSION) || \
13757 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13758 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13759 choke me
13760 #endif
13762 main ()
13766 return 0;
13768 _ACEOF
13769 if ac_fn_c_try_compile "$LINENO"; then :
13770 pgac_cv_ldap_safe=yes
13771 else
13772 pgac_cv_ldap_safe=no
13774 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13777 $as_echo "$pgac_cv_ldap_safe" >&6; }
13779 if test "$pgac_cv_ldap_safe" != yes; then
13780 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13781 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13782 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13783 *** also uses LDAP will crash on exit." >&5
13784 $as_echo "$as_me: WARNING:
13785 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13786 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13787 *** also uses LDAP will crash on exit." >&2;}
13789 else
13790 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13791 #include <windows.h>
13794 if test "x$ac_cv_header_winldap_h" = xyes; then :
13796 else
13797 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13804 if test "$with_bonjour" = yes ; then
13805 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13806 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13808 else
13809 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13815 # for contrib/uuid-ossp
13816 if test "$with_uuid" = bsd ; then
13817 for ac_header in uuid.h
13818 do :
13819 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13820 if test "x$ac_cv_header_uuid_h" = xyes; then :
13821 cat >>confdefs.h <<_ACEOF
13822 #define HAVE_UUID_H 1
13823 _ACEOF
13824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13825 /* end confdefs.h. */
13826 #include <uuid.h>
13828 _ACEOF
13829 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13830 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13832 else
13833 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13835 rm -f conftest*
13837 else
13838 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13841 done
13843 elif test "$with_uuid" = e2fs ; then
13844 for ac_header in uuid/uuid.h
13845 do :
13846 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13847 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13848 cat >>confdefs.h <<_ACEOF
13849 #define HAVE_UUID_UUID_H 1
13850 _ACEOF
13851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13852 /* end confdefs.h. */
13853 #include <uuid/uuid.h>
13855 _ACEOF
13856 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13857 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13859 else
13860 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13862 rm -f conftest*
13864 else
13865 for ac_header in uuid.h
13866 do :
13867 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13868 if test "x$ac_cv_header_uuid_h" = xyes; then :
13869 cat >>confdefs.h <<_ACEOF
13870 #define HAVE_UUID_H 1
13871 _ACEOF
13872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13873 /* end confdefs.h. */
13874 #include <uuid.h>
13876 _ACEOF
13877 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13878 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13880 else
13881 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13883 rm -f conftest*
13885 else
13886 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13889 done
13893 done
13895 elif test "$with_uuid" = ossp ; then
13896 for ac_header in ossp/uuid.h
13897 do :
13898 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13899 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13900 cat >>confdefs.h <<_ACEOF
13901 #define HAVE_OSSP_UUID_H 1
13902 _ACEOF
13903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13904 /* end confdefs.h. */
13905 #include <ossp/uuid.h>
13907 _ACEOF
13908 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13909 $EGREP "uuid_export" >/dev/null 2>&1; then :
13911 else
13912 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13914 rm -f conftest*
13916 else
13917 for ac_header in uuid.h
13918 do :
13919 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13920 if test "x$ac_cv_header_uuid_h" = xyes; then :
13921 cat >>confdefs.h <<_ACEOF
13922 #define HAVE_UUID_H 1
13923 _ACEOF
13924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13925 /* end confdefs.h. */
13926 #include <uuid.h>
13928 _ACEOF
13929 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13930 $EGREP "uuid_export" >/dev/null 2>&1; then :
13932 else
13933 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13935 rm -f conftest*
13937 else
13938 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13941 done
13945 done
13949 if test "$PORTNAME" = "win32" ; then
13950 for ac_header in crtdefs.h
13951 do :
13952 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13953 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13954 cat >>confdefs.h <<_ACEOF
13955 #define HAVE_CRTDEFS_H 1
13956 _ACEOF
13960 done
13965 ## Types, structures, compiler characteristics
13968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13969 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13970 if ${ac_cv_c_bigendian+:} false; then :
13971 $as_echo_n "(cached) " >&6
13972 else
13973 ac_cv_c_bigendian=unknown
13974 # See if we're dealing with a universal compiler.
13975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13976 /* end confdefs.h. */
13977 #ifndef __APPLE_CC__
13978 not a universal capable compiler
13979 #endif
13980 typedef int dummy;
13982 _ACEOF
13983 if ac_fn_c_try_compile "$LINENO"; then :
13985 # Check for potential -arch flags. It is not universal unless
13986 # there are at least two -arch flags with different values.
13987 ac_arch=
13988 ac_prev=
13989 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13990 if test -n "$ac_prev"; then
13991 case $ac_word in
13992 i?86 | x86_64 | ppc | ppc64)
13993 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13994 ac_arch=$ac_word
13995 else
13996 ac_cv_c_bigendian=universal
13997 break
14000 esac
14001 ac_prev=
14002 elif test "x$ac_word" = "x-arch"; then
14003 ac_prev=arch
14005 done
14007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14008 if test $ac_cv_c_bigendian = unknown; then
14009 # See if sys/param.h defines the BYTE_ORDER macro.
14010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14011 /* end confdefs.h. */
14012 #include <sys/types.h>
14013 #include <sys/param.h>
14016 main ()
14018 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14019 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14020 && LITTLE_ENDIAN)
14021 bogus endian macros
14022 #endif
14025 return 0;
14027 _ACEOF
14028 if ac_fn_c_try_compile "$LINENO"; then :
14029 # It does; now see whether it defined to BIG_ENDIAN or not.
14030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14031 /* end confdefs.h. */
14032 #include <sys/types.h>
14033 #include <sys/param.h>
14036 main ()
14038 #if BYTE_ORDER != BIG_ENDIAN
14039 not big endian
14040 #endif
14043 return 0;
14045 _ACEOF
14046 if ac_fn_c_try_compile "$LINENO"; then :
14047 ac_cv_c_bigendian=yes
14048 else
14049 ac_cv_c_bigendian=no
14051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14053 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14055 if test $ac_cv_c_bigendian = unknown; then
14056 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14058 /* end confdefs.h. */
14059 #include <limits.h>
14062 main ()
14064 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14065 bogus endian macros
14066 #endif
14069 return 0;
14071 _ACEOF
14072 if ac_fn_c_try_compile "$LINENO"; then :
14073 # It does; now see whether it defined to _BIG_ENDIAN or not.
14074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14075 /* end confdefs.h. */
14076 #include <limits.h>
14079 main ()
14081 #ifndef _BIG_ENDIAN
14082 not big endian
14083 #endif
14086 return 0;
14088 _ACEOF
14089 if ac_fn_c_try_compile "$LINENO"; then :
14090 ac_cv_c_bigendian=yes
14091 else
14092 ac_cv_c_bigendian=no
14094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14098 if test $ac_cv_c_bigendian = unknown; then
14099 # Compile a test program.
14100 if test "$cross_compiling" = yes; then :
14101 # Try to guess by grepping values from an object file.
14102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14103 /* end confdefs.h. */
14104 short int ascii_mm[] =
14105 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14106 short int ascii_ii[] =
14107 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14108 int use_ascii (int i) {
14109 return ascii_mm[i] + ascii_ii[i];
14111 short int ebcdic_ii[] =
14112 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14113 short int ebcdic_mm[] =
14114 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14115 int use_ebcdic (int i) {
14116 return ebcdic_mm[i] + ebcdic_ii[i];
14118 extern int foo;
14121 main ()
14123 return use_ascii (foo) == use_ebcdic (foo);
14125 return 0;
14127 _ACEOF
14128 if ac_fn_c_try_compile "$LINENO"; then :
14129 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14130 ac_cv_c_bigendian=yes
14132 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14133 if test "$ac_cv_c_bigendian" = unknown; then
14134 ac_cv_c_bigendian=no
14135 else
14136 # finding both strings is unlikely to happen, but who knows?
14137 ac_cv_c_bigendian=unknown
14141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14142 else
14143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14144 /* end confdefs.h. */
14145 $ac_includes_default
14147 main ()
14150 /* Are we little or big endian? From Harbison&Steele. */
14151 union
14153 long int l;
14154 char c[sizeof (long int)];
14155 } u;
14156 u.l = 1;
14157 return u.c[sizeof (long int) - 1] == 1;
14160 return 0;
14162 _ACEOF
14163 if ac_fn_c_try_run "$LINENO"; then :
14164 ac_cv_c_bigendian=no
14165 else
14166 ac_cv_c_bigendian=yes
14168 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14169 conftest.$ac_objext conftest.beam conftest.$ac_ext
14174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14175 $as_echo "$ac_cv_c_bigendian" >&6; }
14176 case $ac_cv_c_bigendian in #(
14177 yes)
14178 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14179 ;; #(
14181 ;; #(
14182 universal)
14184 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14186 ;; #(
14188 as_fn_error $? "unknown endianness
14189 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14190 esac
14192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14193 $as_echo_n "checking for inline... " >&6; }
14194 if ${ac_cv_c_inline+:} false; then :
14195 $as_echo_n "(cached) " >&6
14196 else
14197 ac_cv_c_inline=no
14198 for ac_kw in inline __inline__ __inline; do
14199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14200 /* end confdefs.h. */
14201 #ifndef __cplusplus
14202 typedef int foo_t;
14203 static $ac_kw foo_t static_foo () {return 0; }
14204 $ac_kw foo_t foo () {return 0; }
14205 #endif
14207 _ACEOF
14208 if ac_fn_c_try_compile "$LINENO"; then :
14209 ac_cv_c_inline=$ac_kw
14211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14212 test "$ac_cv_c_inline" != no && break
14213 done
14216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14217 $as_echo "$ac_cv_c_inline" >&6; }
14219 case $ac_cv_c_inline in
14220 inline | yes) ;;
14222 case $ac_cv_c_inline in
14223 no) ac_val=;;
14224 *) ac_val=$ac_cv_c_inline;;
14225 esac
14226 cat >>confdefs.h <<_ACEOF
14227 #ifndef __cplusplus
14228 #define inline $ac_val
14229 #endif
14230 _ACEOF
14232 esac
14234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14235 $as_echo_n "checking for printf format archetype... " >&6; }
14236 if ${pgac_cv_printf_archetype+:} false; then :
14237 $as_echo_n "(cached) " >&6
14238 else
14239 pgac_cv_printf_archetype=gnu_printf
14240 ac_save_c_werror_flag=$ac_c_werror_flag
14241 ac_c_werror_flag=yes
14242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14243 /* end confdefs.h. */
14244 extern void pgac_write(int ignore, const char *fmt,...)
14245 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14247 main ()
14249 pgac_write(0, "error %s: %m", "foo");
14251 return 0;
14253 _ACEOF
14254 if ac_fn_c_try_compile "$LINENO"; then :
14255 ac_archetype_ok=yes
14256 else
14257 ac_archetype_ok=no
14259 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14260 ac_c_werror_flag=$ac_save_c_werror_flag
14262 if [ "$ac_archetype_ok" = no ]; then
14263 pgac_cv_printf_archetype=__syslog__
14264 ac_save_c_werror_flag=$ac_c_werror_flag
14265 ac_c_werror_flag=yes
14266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14267 /* end confdefs.h. */
14268 extern void pgac_write(int ignore, const char *fmt,...)
14269 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14271 main ()
14273 pgac_write(0, "error %s: %m", "foo");
14275 return 0;
14277 _ACEOF
14278 if ac_fn_c_try_compile "$LINENO"; then :
14279 ac_archetype_ok=yes
14280 else
14281 ac_archetype_ok=no
14283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14284 ac_c_werror_flag=$ac_save_c_werror_flag
14286 if [ "$ac_archetype_ok" = no ]; then
14287 pgac_cv_printf_archetype=printf
14291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14292 $as_echo "$pgac_cv_printf_archetype" >&6; }
14294 cat >>confdefs.h <<_ACEOF
14295 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14296 _ACEOF
14299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14300 $as_echo_n "checking for _Static_assert... " >&6; }
14301 if ${pgac_cv__static_assert+:} false; then :
14302 $as_echo_n "(cached) " >&6
14303 else
14304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14305 /* end confdefs.h. */
14308 main ()
14310 ({ _Static_assert(1, "foo"); })
14312 return 0;
14314 _ACEOF
14315 if ac_fn_c_try_link "$LINENO"; then :
14316 pgac_cv__static_assert=yes
14317 else
14318 pgac_cv__static_assert=no
14320 rm -f core conftest.err conftest.$ac_objext \
14321 conftest$ac_exeext conftest.$ac_ext
14323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14324 $as_echo "$pgac_cv__static_assert" >&6; }
14325 if test x"$pgac_cv__static_assert" = xyes ; then
14327 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14331 $as_echo_n "checking for typeof... " >&6; }
14332 if ${pgac_cv_c_typeof+:} false; then :
14333 $as_echo_n "(cached) " >&6
14334 else
14335 pgac_cv_c_typeof=no
14336 for pgac_kw in typeof __typeof__ decltype; do
14337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14338 /* end confdefs.h. */
14341 main ()
14343 int x = 0;
14344 $pgac_kw(x) y;
14345 y = x;
14346 return y;
14348 return 0;
14350 _ACEOF
14351 if ac_fn_c_try_compile "$LINENO"; then :
14352 pgac_cv_c_typeof=$pgac_kw
14354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14355 test "$pgac_cv_c_typeof" != no && break
14356 done
14358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14359 $as_echo "$pgac_cv_c_typeof" >&6; }
14360 if test "$pgac_cv_c_typeof" != no; then
14362 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14364 if test "$pgac_cv_c_typeof" != typeof; then
14366 cat >>confdefs.h <<_ACEOF
14367 #define typeof $pgac_cv_c_typeof
14368 _ACEOF
14372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14373 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14374 if ${pgac_cv__types_compatible+:} false; then :
14375 $as_echo_n "(cached) " >&6
14376 else
14377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14378 /* end confdefs.h. */
14381 main ()
14383 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14385 return 0;
14387 _ACEOF
14388 if ac_fn_c_try_compile "$LINENO"; then :
14389 pgac_cv__types_compatible=yes
14390 else
14391 pgac_cv__types_compatible=no
14393 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14396 $as_echo "$pgac_cv__types_compatible" >&6; }
14397 if test x"$pgac_cv__types_compatible" = xyes ; then
14399 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14403 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14404 if ${pgac_cv__builtin_constant_p+:} false; then :
14405 $as_echo_n "(cached) " >&6
14406 else
14407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14408 /* end confdefs.h. */
14409 static int x;
14410 static int y[__builtin_constant_p(x) ? x : 1];
14411 static int z[__builtin_constant_p("string literal") ? 1 : x];
14414 _ACEOF
14415 if ac_fn_c_try_compile "$LINENO"; then :
14416 pgac_cv__builtin_constant_p=yes
14417 else
14418 pgac_cv__builtin_constant_p=no
14420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14423 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14424 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14426 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14430 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14431 if ${pgac_cv__builtin_unreachable+:} false; then :
14432 $as_echo_n "(cached) " >&6
14433 else
14434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14435 /* end confdefs.h. */
14438 main ()
14440 __builtin_unreachable();
14442 return 0;
14444 _ACEOF
14445 if ac_fn_c_try_link "$LINENO"; then :
14446 pgac_cv__builtin_unreachable=yes
14447 else
14448 pgac_cv__builtin_unreachable=no
14450 rm -f core conftest.err conftest.$ac_objext \
14451 conftest$ac_exeext conftest.$ac_ext
14453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14454 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14455 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14457 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14461 $as_echo_n "checking for computed goto support... " >&6; }
14462 if ${pgac_cv_computed_goto+:} false; then :
14463 $as_echo_n "(cached) " >&6
14464 else
14465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14466 /* end confdefs.h. */
14469 main ()
14471 void *labeladdrs[] = {&&my_label};
14472 goto *labeladdrs[0];
14473 my_label:
14474 return 1;
14477 return 0;
14479 _ACEOF
14480 if ac_fn_c_try_compile "$LINENO"; then :
14481 pgac_cv_computed_goto=yes
14482 else
14483 pgac_cv_computed_goto=no
14485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14488 $as_echo "$pgac_cv_computed_goto" >&6; }
14489 if test x"$pgac_cv_computed_goto" = xyes ; then
14491 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14494 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14495 #include <time.h>
14498 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14500 cat >>confdefs.h <<_ACEOF
14501 #define HAVE_STRUCT_TM_TM_ZONE 1
14502 _ACEOF
14508 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14509 #include <sys/ipc.h>
14510 #include <sys/sem.h>
14513 if test "x$ac_cv_type_union_semun" = xyes; then :
14515 cat >>confdefs.h <<_ACEOF
14516 #define HAVE_UNION_SEMUN 1
14517 _ACEOF
14522 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/socket.h>
14524 if test "x$ac_cv_type_socklen_t" = xyes; then :
14526 cat >>confdefs.h <<_ACEOF
14527 #define HAVE_SOCKLEN_T 1
14528 _ACEOF
14533 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14534 #include <sys/socket.h>
14537 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14539 cat >>confdefs.h <<_ACEOF
14540 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14541 _ACEOF
14547 # MSVC doesn't cope well with defining restrict to __restrict, the
14548 # spelling it understands, because it conflicts with
14549 # __declspec(restrict). Therefore we define pg_restrict to the
14550 # appropriate definition, which presumably won't conflict.
14551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14552 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14553 if ${ac_cv_c_restrict+:} false; then :
14554 $as_echo_n "(cached) " >&6
14555 else
14556 ac_cv_c_restrict=no
14557 # The order here caters to the fact that C++ does not require restrict.
14558 for ac_kw in __restrict __restrict__ _Restrict restrict; do
14559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14560 /* end confdefs.h. */
14561 typedef int * int_ptr;
14562 int foo (int_ptr $ac_kw ip) {
14563 return ip[0];
14566 main ()
14568 int s[1];
14569 int * $ac_kw t = s;
14570 t[0] = 0;
14571 return foo(t)
14573 return 0;
14575 _ACEOF
14576 if ac_fn_c_try_compile "$LINENO"; then :
14577 ac_cv_c_restrict=$ac_kw
14579 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14580 test "$ac_cv_c_restrict" != no && break
14581 done
14584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14585 $as_echo "$ac_cv_c_restrict" >&6; }
14587 case $ac_cv_c_restrict in
14588 restrict) ;;
14589 no) $as_echo "#define restrict /**/" >>confdefs.h
14591 *) cat >>confdefs.h <<_ACEOF
14592 #define restrict $ac_cv_c_restrict
14593 _ACEOF
14595 esac
14597 if test "$ac_cv_c_restrict" = "no"; then
14598 pg_restrict=""
14599 else
14600 pg_restrict="$ac_cv_c_restrict"
14603 cat >>confdefs.h <<_ACEOF
14604 #define pg_restrict $pg_restrict
14605 _ACEOF
14608 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14609 #include <getopt.h>
14610 #endif
14612 if test "x$ac_cv_type_struct_option" = xyes; then :
14614 cat >>confdefs.h <<_ACEOF
14615 #define HAVE_STRUCT_OPTION 1
14616 _ACEOF
14622 case $host_cpu in
14623 x86_64)
14624 # On x86_64, check if we can compile a popcntq instruction
14625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
14626 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
14627 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
14628 $as_echo_n "(cached) " >&6
14629 else
14630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14631 /* end confdefs.h. */
14634 main ()
14636 long long x = 1; long long r;
14637 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
14639 return 0;
14641 _ACEOF
14642 if ac_fn_c_try_compile "$LINENO"; then :
14643 pgac_cv_have_x86_64_popcntq=yes
14644 else
14645 pgac_cv_have_x86_64_popcntq=no
14647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
14650 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
14651 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
14653 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
14657 ppc*|powerpc*)
14658 # On PPC, check if compiler accepts "i"(x) when __builtin_constant_p(x).
14659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
14660 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
14661 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
14662 $as_echo_n "(cached) " >&6
14663 else
14664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14665 /* end confdefs.h. */
14666 static inline int
14667 addi(int ra, int si)
14669 int res = 0;
14670 if (__builtin_constant_p(si))
14671 __asm__ __volatile__(
14672 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
14673 return res;
14675 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
14677 main ()
14681 return 0;
14683 _ACEOF
14684 if ac_fn_c_try_compile "$LINENO"; then :
14685 pgac_cv_have_i_constraint__builtin_constant_p=yes
14686 else
14687 pgac_cv_have_i_constraint__builtin_constant_p=no
14689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
14692 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
14693 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
14695 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
14699 esac
14701 # Check largefile support. You might think this is a system service not a
14702 # compiler characteristic, but you'd be wrong. We must check this before
14703 # probing existence of related functions such as fseeko, since the largefile
14704 # defines can affect what is generated for that.
14705 if test "$PORTNAME" != "win32"; then
14706 # Check whether --enable-largefile was given.
14707 if test "${enable_largefile+set}" = set; then :
14708 enableval=$enable_largefile;
14711 if test "$enable_largefile" != no; then
14713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14714 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14715 if ${ac_cv_sys_largefile_CC+:} false; then :
14716 $as_echo_n "(cached) " >&6
14717 else
14718 ac_cv_sys_largefile_CC=no
14719 if test "$GCC" != yes; then
14720 ac_save_CC=$CC
14721 while :; do
14722 # IRIX 6.2 and later do not support large files by default,
14723 # so use the C compiler's -n32 option if that helps.
14724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14725 /* end confdefs.h. */
14726 #include <sys/types.h>
14727 /* Check that off_t can represent 2**63 - 1 correctly.
14728 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14729 since some C++ compilers masquerading as C compilers
14730 incorrectly reject 9223372036854775807. */
14731 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14732 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14733 && LARGE_OFF_T % 2147483647 == 1)
14734 ? 1 : -1];
14736 main ()
14740 return 0;
14742 _ACEOF
14743 if ac_fn_c_try_compile "$LINENO"; then :
14744 break
14746 rm -f core conftest.err conftest.$ac_objext
14747 CC="$CC -n32"
14748 if ac_fn_c_try_compile "$LINENO"; then :
14749 ac_cv_sys_largefile_CC=' -n32'; break
14751 rm -f core conftest.err conftest.$ac_objext
14752 break
14753 done
14754 CC=$ac_save_CC
14755 rm -f conftest.$ac_ext
14758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14759 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14760 if test "$ac_cv_sys_largefile_CC" != no; then
14761 CC=$CC$ac_cv_sys_largefile_CC
14764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14765 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14766 if ${ac_cv_sys_file_offset_bits+:} false; then :
14767 $as_echo_n "(cached) " >&6
14768 else
14769 while :; do
14770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14771 /* end confdefs.h. */
14772 #include <sys/types.h>
14773 /* Check that off_t can represent 2**63 - 1 correctly.
14774 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14775 since some C++ compilers masquerading as C compilers
14776 incorrectly reject 9223372036854775807. */
14777 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14778 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14779 && LARGE_OFF_T % 2147483647 == 1)
14780 ? 1 : -1];
14782 main ()
14786 return 0;
14788 _ACEOF
14789 if ac_fn_c_try_compile "$LINENO"; then :
14790 ac_cv_sys_file_offset_bits=no; break
14792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14794 /* end confdefs.h. */
14795 #define _FILE_OFFSET_BITS 64
14796 #include <sys/types.h>
14797 /* Check that off_t can represent 2**63 - 1 correctly.
14798 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14799 since some C++ compilers masquerading as C compilers
14800 incorrectly reject 9223372036854775807. */
14801 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14802 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14803 && LARGE_OFF_T % 2147483647 == 1)
14804 ? 1 : -1];
14806 main ()
14810 return 0;
14812 _ACEOF
14813 if ac_fn_c_try_compile "$LINENO"; then :
14814 ac_cv_sys_file_offset_bits=64; break
14816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14817 ac_cv_sys_file_offset_bits=unknown
14818 break
14819 done
14821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14822 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14823 case $ac_cv_sys_file_offset_bits in #(
14824 no | unknown) ;;
14826 cat >>confdefs.h <<_ACEOF
14827 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14828 _ACEOF
14830 esac
14831 rm -rf conftest*
14832 if test $ac_cv_sys_file_offset_bits = unknown; then
14833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14834 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14835 if ${ac_cv_sys_large_files+:} false; then :
14836 $as_echo_n "(cached) " >&6
14837 else
14838 while :; do
14839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14840 /* end confdefs.h. */
14841 #include <sys/types.h>
14842 /* Check that off_t can represent 2**63 - 1 correctly.
14843 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14844 since some C++ compilers masquerading as C compilers
14845 incorrectly reject 9223372036854775807. */
14846 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14847 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14848 && LARGE_OFF_T % 2147483647 == 1)
14849 ? 1 : -1];
14851 main ()
14855 return 0;
14857 _ACEOF
14858 if ac_fn_c_try_compile "$LINENO"; then :
14859 ac_cv_sys_large_files=no; break
14861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14863 /* end confdefs.h. */
14864 #define _LARGE_FILES 1
14865 #include <sys/types.h>
14866 /* Check that off_t can represent 2**63 - 1 correctly.
14867 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14868 since some C++ compilers masquerading as C compilers
14869 incorrectly reject 9223372036854775807. */
14870 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14871 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14872 && LARGE_OFF_T % 2147483647 == 1)
14873 ? 1 : -1];
14875 main ()
14879 return 0;
14881 _ACEOF
14882 if ac_fn_c_try_compile "$LINENO"; then :
14883 ac_cv_sys_large_files=1; break
14885 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14886 ac_cv_sys_large_files=unknown
14887 break
14888 done
14890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14891 $as_echo "$ac_cv_sys_large_files" >&6; }
14892 case $ac_cv_sys_large_files in #(
14893 no | unknown) ;;
14895 cat >>confdefs.h <<_ACEOF
14896 #define _LARGE_FILES $ac_cv_sys_large_files
14897 _ACEOF
14899 esac
14900 rm -rf conftest*
14909 # The cast to long int works around a bug in the HP C Compiler
14910 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14911 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14912 # This bug is HP SR number 8606223364.
14913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14914 $as_echo_n "checking size of off_t... " >&6; }
14915 if ${ac_cv_sizeof_off_t+:} false; then :
14916 $as_echo_n "(cached) " >&6
14917 else
14918 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
14920 else
14921 if test "$ac_cv_type_off_t" = yes; then
14922 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14923 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14924 as_fn_error 77 "cannot compute sizeof (off_t)
14925 See \`config.log' for more details" "$LINENO" 5; }
14926 else
14927 ac_cv_sizeof_off_t=0
14932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14933 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14937 cat >>confdefs.h <<_ACEOF
14938 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14939 _ACEOF
14943 # If we don't have largefile support, can't handle segment size >= 2GB.
14944 if test "$ac_cv_sizeof_off_t" -lt 8; then
14945 if expr $RELSEG_SIZE '*' $blocksize '>=' 2 '*' 1024 '*' 1024; then
14946 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14950 # The cast to long int works around a bug in the HP C Compiler
14951 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14952 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14953 # This bug is HP SR number 8606223364.
14954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14955 $as_echo_n "checking size of bool... " >&6; }
14956 if ${ac_cv_sizeof_bool+:} false; then :
14957 $as_echo_n "(cached) " >&6
14958 else
14959 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
14960 #include <stdbool.h>
14961 #endif
14962 "; then :
14964 else
14965 if test "$ac_cv_type_bool" = yes; then
14966 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14967 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14968 as_fn_error 77 "cannot compute sizeof (bool)
14969 See \`config.log' for more details" "$LINENO" 5; }
14970 else
14971 ac_cv_sizeof_bool=0
14976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
14977 $as_echo "$ac_cv_sizeof_bool" >&6; }
14981 cat >>confdefs.h <<_ACEOF
14982 #define SIZEOF_BOOL $ac_cv_sizeof_bool
14983 _ACEOF
14987 if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
14989 $as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
14995 ## Functions, global variables
14998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
14999 $as_echo_n "checking for int timezone... " >&6; }
15000 if ${pgac_cv_var_int_timezone+:} false; then :
15001 $as_echo_n "(cached) " >&6
15002 else
15003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15004 /* end confdefs.h. */
15005 #include <time.h>
15006 int res;
15008 main ()
15010 #ifndef __CYGWIN__
15011 res = timezone / 60;
15012 #else
15013 res = _timezone / 60;
15014 #endif
15016 return 0;
15018 _ACEOF
15019 if ac_fn_c_try_link "$LINENO"; then :
15020 pgac_cv_var_int_timezone=yes
15021 else
15022 pgac_cv_var_int_timezone=no
15024 rm -f core conftest.err conftest.$ac_objext \
15025 conftest$ac_exeext conftest.$ac_ext
15027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15028 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15029 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15031 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15035 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15036 # symbols that that library has no business exposing to the world. Pending
15037 # acquisition of a clue by those developers, ignore libedit (including its
15038 # possible alias of libreadline) while checking for everything else.
15039 LIBS_including_readline="$LIBS"
15040 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15042 for ac_func in backtrace_symbols copyfile copy_file_range getifaddrs getpeerucred inet_pton kqueue mbstowcs_l memset_s posix_fallocate ppoll pthread_is_threaded_np setproctitle setproctitle_fast strchrnul strsignal syncfs sync_file_range uselocale wcstombs_l
15043 do :
15044 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15045 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15046 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15047 cat >>confdefs.h <<_ACEOF
15048 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15049 _ACEOF
15052 done
15055 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15057 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15058 if ${pgac_cv__builtin_bswap16+:} false; then :
15059 $as_echo_n "(cached) " >&6
15060 else
15061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15062 /* end confdefs.h. */
15065 call__builtin_bswap16(int x)
15067 return __builtin_bswap16(x);
15070 main ()
15074 return 0;
15076 _ACEOF
15077 if ac_fn_c_try_link "$LINENO"; then :
15078 pgac_cv__builtin_bswap16=yes
15079 else
15080 pgac_cv__builtin_bswap16=no
15082 rm -f core conftest.err conftest.$ac_objext \
15083 conftest$ac_exeext conftest.$ac_ext
15085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15086 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15087 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15089 cat >>confdefs.h <<_ACEOF
15090 #define HAVE__BUILTIN_BSWAP16 1
15091 _ACEOF
15094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15095 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15096 if ${pgac_cv__builtin_bswap32+:} false; then :
15097 $as_echo_n "(cached) " >&6
15098 else
15099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15100 /* end confdefs.h. */
15103 call__builtin_bswap32(int x)
15105 return __builtin_bswap32(x);
15108 main ()
15112 return 0;
15114 _ACEOF
15115 if ac_fn_c_try_link "$LINENO"; then :
15116 pgac_cv__builtin_bswap32=yes
15117 else
15118 pgac_cv__builtin_bswap32=no
15120 rm -f core conftest.err conftest.$ac_objext \
15121 conftest$ac_exeext conftest.$ac_ext
15123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15124 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15125 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15127 cat >>confdefs.h <<_ACEOF
15128 #define HAVE__BUILTIN_BSWAP32 1
15129 _ACEOF
15132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15133 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15134 if ${pgac_cv__builtin_bswap64+:} false; then :
15135 $as_echo_n "(cached) " >&6
15136 else
15137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15138 /* end confdefs.h. */
15141 call__builtin_bswap64(long int x)
15143 return __builtin_bswap64(x);
15146 main ()
15150 return 0;
15152 _ACEOF
15153 if ac_fn_c_try_link "$LINENO"; then :
15154 pgac_cv__builtin_bswap64=yes
15155 else
15156 pgac_cv__builtin_bswap64=no
15158 rm -f core conftest.err conftest.$ac_objext \
15159 conftest$ac_exeext conftest.$ac_ext
15161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15162 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15163 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15165 cat >>confdefs.h <<_ACEOF
15166 #define HAVE__BUILTIN_BSWAP64 1
15167 _ACEOF
15170 # We assume that we needn't test all widths of these explicitly:
15171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15172 $as_echo_n "checking for __builtin_clz... " >&6; }
15173 if ${pgac_cv__builtin_clz+:} false; then :
15174 $as_echo_n "(cached) " >&6
15175 else
15176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15177 /* end confdefs.h. */
15180 call__builtin_clz(unsigned int x)
15182 return __builtin_clz(x);
15185 main ()
15189 return 0;
15191 _ACEOF
15192 if ac_fn_c_try_link "$LINENO"; then :
15193 pgac_cv__builtin_clz=yes
15194 else
15195 pgac_cv__builtin_clz=no
15197 rm -f core conftest.err conftest.$ac_objext \
15198 conftest$ac_exeext conftest.$ac_ext
15200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15201 $as_echo "$pgac_cv__builtin_clz" >&6; }
15202 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15204 cat >>confdefs.h <<_ACEOF
15205 #define HAVE__BUILTIN_CLZ 1
15206 _ACEOF
15209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15210 $as_echo_n "checking for __builtin_ctz... " >&6; }
15211 if ${pgac_cv__builtin_ctz+:} false; then :
15212 $as_echo_n "(cached) " >&6
15213 else
15214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15215 /* end confdefs.h. */
15218 call__builtin_ctz(unsigned int x)
15220 return __builtin_ctz(x);
15223 main ()
15227 return 0;
15229 _ACEOF
15230 if ac_fn_c_try_link "$LINENO"; then :
15231 pgac_cv__builtin_ctz=yes
15232 else
15233 pgac_cv__builtin_ctz=no
15235 rm -f core conftest.err conftest.$ac_objext \
15236 conftest$ac_exeext conftest.$ac_ext
15238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15239 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15240 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15242 cat >>confdefs.h <<_ACEOF
15243 #define HAVE__BUILTIN_CTZ 1
15244 _ACEOF
15247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15248 $as_echo_n "checking for __builtin_popcount... " >&6; }
15249 if ${pgac_cv__builtin_popcount+:} false; then :
15250 $as_echo_n "(cached) " >&6
15251 else
15252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15253 /* end confdefs.h. */
15256 call__builtin_popcount(unsigned int x)
15258 return __builtin_popcount(x);
15261 main ()
15265 return 0;
15267 _ACEOF
15268 if ac_fn_c_try_link "$LINENO"; then :
15269 pgac_cv__builtin_popcount=yes
15270 else
15271 pgac_cv__builtin_popcount=no
15273 rm -f core conftest.err conftest.$ac_objext \
15274 conftest$ac_exeext conftest.$ac_ext
15276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15277 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15278 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15280 cat >>confdefs.h <<_ACEOF
15281 #define HAVE__BUILTIN_POPCOUNT 1
15282 _ACEOF
15285 # __builtin_frame_address may draw a diagnostic for non-constant argument,
15286 # so it needs a different test function.
15287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
15288 $as_echo_n "checking for __builtin_frame_address... " >&6; }
15289 if ${pgac_cv__builtin_frame_address+:} false; then :
15290 $as_echo_n "(cached) " >&6
15291 else
15292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15293 /* end confdefs.h. */
15295 void *
15296 call__builtin_frame_address(void)
15298 return __builtin_frame_address(0);
15301 main ()
15305 return 0;
15307 _ACEOF
15308 if ac_fn_c_try_link "$LINENO"; then :
15309 pgac_cv__builtin_frame_address=yes
15310 else
15311 pgac_cv__builtin_frame_address=no
15313 rm -f core conftest.err conftest.$ac_objext \
15314 conftest$ac_exeext conftest.$ac_ext
15316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5
15317 $as_echo "$pgac_cv__builtin_frame_address" >&6; }
15318 if test x"${pgac_cv__builtin_frame_address}" = xyes ; then
15320 cat >>confdefs.h <<_ACEOF
15321 #define HAVE__BUILTIN_FRAME_ADDRESS 1
15322 _ACEOF
15326 # We require 64-bit fseeko() to be available, but run this check anyway
15327 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
15328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15329 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15330 if ${ac_cv_sys_largefile_source+:} false; then :
15331 $as_echo_n "(cached) " >&6
15332 else
15333 while :; do
15334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15335 /* end confdefs.h. */
15336 #include <sys/types.h> /* for off_t */
15337 #include <stdio.h>
15339 main ()
15341 int (*fp) (FILE *, off_t, int) = fseeko;
15342 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15344 return 0;
15346 _ACEOF
15347 if ac_fn_c_try_link "$LINENO"; then :
15348 ac_cv_sys_largefile_source=no; break
15350 rm -f core conftest.err conftest.$ac_objext \
15351 conftest$ac_exeext conftest.$ac_ext
15352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15353 /* end confdefs.h. */
15354 #define _LARGEFILE_SOURCE 1
15355 #include <sys/types.h> /* for off_t */
15356 #include <stdio.h>
15358 main ()
15360 int (*fp) (FILE *, off_t, int) = fseeko;
15361 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15363 return 0;
15365 _ACEOF
15366 if ac_fn_c_try_link "$LINENO"; then :
15367 ac_cv_sys_largefile_source=1; break
15369 rm -f core conftest.err conftest.$ac_objext \
15370 conftest$ac_exeext conftest.$ac_ext
15371 ac_cv_sys_largefile_source=unknown
15372 break
15373 done
15375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15376 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15377 case $ac_cv_sys_largefile_source in #(
15378 no | unknown) ;;
15380 cat >>confdefs.h <<_ACEOF
15381 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15382 _ACEOF
15384 esac
15385 rm -rf conftest*
15387 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15388 # in glibc 2.1.3, but that breaks too many other things.
15389 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15390 if test $ac_cv_sys_largefile_source != unknown; then
15392 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15397 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15398 # by calling it, 2009-04-02
15399 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15400 # The Clang compiler raises a warning for an undeclared identifier that matches
15401 # a compiler builtin function. All extant Clang versions are affected, as of
15402 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
15403 # C and Objective C languages, but Clang does report an error under C++ and
15404 # Objective C++.
15406 # Passing -fno-builtin to the compiler would suppress this problem. That
15407 # strategy would have the advantage of being insensitive to stray warnings, but
15408 # it would make tests less realistic.
15409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15410 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15411 if ${ac_cv_c_decl_report+:} false; then :
15412 $as_echo_n "(cached) " >&6
15413 else
15414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15415 /* end confdefs.h. */
15418 main ()
15420 (void) strchr;
15422 return 0;
15424 _ACEOF
15425 if ac_fn_c_try_compile "$LINENO"; then :
15426 if test -s conftest.err; then :
15427 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15428 # valid AC_CHECK_DECL input. No library function is consistently available
15429 # on freestanding implementations, so test against a dummy declaration.
15430 # Include always-available headers on the off chance that they somehow
15431 # elicit warnings.
15432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15433 /* end confdefs.h. */
15434 #include <float.h>
15435 #include <limits.h>
15436 #include <stdarg.h>
15437 #include <stddef.h>
15438 extern void ac_decl (int, char *);
15440 main ()
15442 #ifdef __cplusplus
15443 (void) ac_decl ((int) 0, (char *) 0);
15444 (void) ac_decl;
15445 #else
15446 (void) ac_decl;
15447 #endif
15450 return 0;
15452 _ACEOF
15453 if ac_fn_c_try_compile "$LINENO"; then :
15454 if test -s conftest.err; then :
15455 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15456 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15457 as_fn_error $? "cannot detect from compiler exit status or warnings
15458 See \`config.log' for more details" "$LINENO" 5; }
15459 else
15460 ac_cv_c_decl_report=warning
15462 else
15463 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15464 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15465 as_fn_error $? "cannot compile a simple declaration test
15466 See \`config.log' for more details" "$LINENO" 5; }
15468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15469 else
15470 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15471 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15472 as_fn_error $? "compiler does not report undeclared identifiers
15473 See \`config.log' for more details" "$LINENO" 5; }
15475 else
15476 ac_cv_c_decl_report=error
15478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15481 $as_echo "$ac_cv_c_decl_report" >&6; }
15483 case $ac_cv_c_decl_report in
15484 warning) ac_c_decl_warn_flag=yes ;;
15485 *) ac_c_decl_warn_flag= ;;
15486 esac
15488 if test "$PORTNAME" != "solaris"; then :
15490 for ac_func in posix_fadvise
15491 do :
15492 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15493 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15494 cat >>confdefs.h <<_ACEOF
15495 #define HAVE_POSIX_FADVISE 1
15496 _ACEOF
15499 done
15501 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15503 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15504 ac_have_decl=1
15505 else
15506 ac_have_decl=0
15509 cat >>confdefs.h <<_ACEOF
15510 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15511 _ACEOF
15514 fi # fi
15516 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15518 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15519 ac_have_decl=1
15520 else
15521 ac_have_decl=0
15524 cat >>confdefs.h <<_ACEOF
15525 #define HAVE_DECL_FDATASYNC $ac_have_decl
15526 _ACEOF
15528 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15529 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15530 ac_have_decl=1
15531 else
15532 ac_have_decl=0
15535 cat >>confdefs.h <<_ACEOF
15536 #define HAVE_DECL_STRLCAT $ac_have_decl
15537 _ACEOF
15538 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15539 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15540 ac_have_decl=1
15541 else
15542 ac_have_decl=0
15545 cat >>confdefs.h <<_ACEOF
15546 #define HAVE_DECL_STRLCPY $ac_have_decl
15547 _ACEOF
15548 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15549 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15550 ac_have_decl=1
15551 else
15552 ac_have_decl=0
15555 cat >>confdefs.h <<_ACEOF
15556 #define HAVE_DECL_STRNLEN $ac_have_decl
15557 _ACEOF
15558 ac_fn_c_check_decl "$LINENO" "strsep" "ac_cv_have_decl_strsep" "$ac_includes_default"
15559 if test "x$ac_cv_have_decl_strsep" = xyes; then :
15560 ac_have_decl=1
15561 else
15562 ac_have_decl=0
15565 cat >>confdefs.h <<_ACEOF
15566 #define HAVE_DECL_STRSEP $ac_have_decl
15567 _ACEOF
15570 # We can't use AC_CHECK_FUNCS to detect these functions, because it
15571 # won't handle deployment target restrictions on macOS
15572 ac_fn_c_check_decl "$LINENO" "preadv" "ac_cv_have_decl_preadv" "#include <sys/uio.h>
15574 if test "x$ac_cv_have_decl_preadv" = xyes; then :
15575 ac_have_decl=1
15576 else
15577 ac_have_decl=0
15580 cat >>confdefs.h <<_ACEOF
15581 #define HAVE_DECL_PREADV $ac_have_decl
15582 _ACEOF
15584 ac_fn_c_check_decl "$LINENO" "pwritev" "ac_cv_have_decl_pwritev" "#include <sys/uio.h>
15586 if test "x$ac_cv_have_decl_pwritev" = xyes; then :
15587 ac_have_decl=1
15588 else
15589 ac_have_decl=0
15592 cat >>confdefs.h <<_ACEOF
15593 #define HAVE_DECL_PWRITEV $ac_have_decl
15594 _ACEOF
15597 # This is probably only present on macOS, but may as well check always
15598 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15600 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15601 ac_have_decl=1
15602 else
15603 ac_have_decl=0
15606 cat >>confdefs.h <<_ACEOF
15607 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15608 _ACEOF
15611 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
15612 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
15613 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
15615 else
15616 case " $LIBOBJS " in
15617 *" explicit_bzero.$ac_objext "* ) ;;
15618 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
15620 esac
15624 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15625 if test "x$ac_cv_func_getopt" = xyes; then :
15626 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15628 else
15629 case " $LIBOBJS " in
15630 *" getopt.$ac_objext "* ) ;;
15631 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15633 esac
15637 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15638 if test "x$ac_cv_func_getpeereid" = xyes; then :
15639 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15641 else
15642 case " $LIBOBJS " in
15643 *" getpeereid.$ac_objext "* ) ;;
15644 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15646 esac
15650 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15651 if test "x$ac_cv_func_inet_aton" = xyes; then :
15652 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15654 else
15655 case " $LIBOBJS " in
15656 *" inet_aton.$ac_objext "* ) ;;
15657 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15659 esac
15663 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15664 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15665 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15667 else
15668 case " $LIBOBJS " in
15669 *" mkdtemp.$ac_objext "* ) ;;
15670 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15672 esac
15676 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15677 if test "x$ac_cv_func_strlcat" = xyes; then :
15678 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15680 else
15681 case " $LIBOBJS " in
15682 *" strlcat.$ac_objext "* ) ;;
15683 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15685 esac
15689 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15690 if test "x$ac_cv_func_strlcpy" = xyes; then :
15691 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15693 else
15694 case " $LIBOBJS " in
15695 *" strlcpy.$ac_objext "* ) ;;
15696 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15698 esac
15702 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15703 if test "x$ac_cv_func_strnlen" = xyes; then :
15704 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15706 else
15707 case " $LIBOBJS " in
15708 *" strnlen.$ac_objext "* ) ;;
15709 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15711 esac
15715 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
15716 if test "x$ac_cv_func_strsep" = xyes; then :
15717 $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
15719 else
15720 case " $LIBOBJS " in
15721 *" strsep.$ac_objext "* ) ;;
15722 *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
15724 esac
15730 ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
15731 if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
15732 $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
15734 else
15735 case " $LIBOBJS " in
15736 *" pthread_barrier_wait.$ac_objext "* ) ;;
15737 *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
15739 esac
15745 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
15746 # Cygwin and (apparently, based on test results) Mingw both
15747 # have a broken strtof(), so substitute its implementation.
15748 # That's not a perfect fix, since it doesn't avoid double-rounding,
15749 # but we have no better options.
15750 case " $LIBOBJS " in
15751 *" strtof.$ac_objext "* ) ;;
15752 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
15754 esac
15756 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
15757 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
15760 # Similarly, use system's getopt_long() only if system provides struct option.
15761 if test x"$ac_cv_type_struct_option" = xyes ; then
15762 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15763 if test "x$ac_cv_func_getopt_long" = xyes; then :
15764 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15766 else
15767 case " $LIBOBJS " in
15768 *" getopt_long.$ac_objext "* ) ;;
15769 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15771 esac
15776 else
15777 case " $LIBOBJS " in
15778 *" getopt_long.$ac_objext "* ) ;;
15779 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15781 esac
15785 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
15786 # (i.e., allow '-' as a flag character), so use our version on those platforms.
15787 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
15788 case " $LIBOBJS " in
15789 *" getopt.$ac_objext "* ) ;;
15790 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15792 esac
15796 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15797 # so always use our version on Windows.
15798 if test "$PORTNAME" = "win32"; then
15799 case " $LIBOBJS " in
15800 *" getopt.$ac_objext "* ) ;;
15801 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15803 esac
15805 case " $LIBOBJS " in
15806 *" getopt_long.$ac_objext "* ) ;;
15807 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15809 esac
15813 # Win32 (really MinGW) support
15814 if test "$PORTNAME" = "win32"; then
15815 for ac_func in _configthreadlocale
15816 do :
15817 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
15818 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
15819 cat >>confdefs.h <<_ACEOF
15820 #define HAVE__CONFIGTHREADLOCALE 1
15821 _ACEOF
15824 done
15826 case " $LIBOBJS " in
15827 *" dirmod.$ac_objext "* ) ;;
15828 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15830 esac
15832 case " $LIBOBJS " in
15833 *" kill.$ac_objext "* ) ;;
15834 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
15836 esac
15838 case " $LIBOBJS " in
15839 *" open.$ac_objext "* ) ;;
15840 *) LIBOBJS="$LIBOBJS open.$ac_objext"
15842 esac
15844 case " $LIBOBJS " in
15845 *" system.$ac_objext "* ) ;;
15846 *) LIBOBJS="$LIBOBJS system.$ac_objext"
15848 esac
15850 case " $LIBOBJS " in
15851 *" win32common.$ac_objext "* ) ;;
15852 *) LIBOBJS="$LIBOBJS win32common.$ac_objext"
15854 esac
15856 case " $LIBOBJS " in
15857 *" win32dlopen.$ac_objext "* ) ;;
15858 *) LIBOBJS="$LIBOBJS win32dlopen.$ac_objext"
15860 esac
15862 case " $LIBOBJS " in
15863 *" win32env.$ac_objext "* ) ;;
15864 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
15866 esac
15868 case " $LIBOBJS " in
15869 *" win32error.$ac_objext "* ) ;;
15870 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
15872 esac
15874 case " $LIBOBJS " in
15875 *" win32fdatasync.$ac_objext "* ) ;;
15876 *) LIBOBJS="$LIBOBJS win32fdatasync.$ac_objext"
15878 esac
15880 case " $LIBOBJS " in
15881 *" win32gai_strerror.$ac_objext "* ) ;;
15882 *) LIBOBJS="$LIBOBJS win32gai_strerror.$ac_objext"
15884 esac
15886 case " $LIBOBJS " in
15887 *" win32getrusage.$ac_objext "* ) ;;
15888 *) LIBOBJS="$LIBOBJS win32getrusage.$ac_objext"
15890 esac
15892 case " $LIBOBJS " in
15893 *" win32link.$ac_objext "* ) ;;
15894 *) LIBOBJS="$LIBOBJS win32link.$ac_objext"
15896 esac
15898 case " $LIBOBJS " in
15899 *" win32ntdll.$ac_objext "* ) ;;
15900 *) LIBOBJS="$LIBOBJS win32ntdll.$ac_objext"
15902 esac
15904 case " $LIBOBJS " in
15905 *" win32pread.$ac_objext "* ) ;;
15906 *) LIBOBJS="$LIBOBJS win32pread.$ac_objext"
15908 esac
15910 case " $LIBOBJS " in
15911 *" win32pwrite.$ac_objext "* ) ;;
15912 *) LIBOBJS="$LIBOBJS win32pwrite.$ac_objext"
15914 esac
15916 case " $LIBOBJS " in
15917 *" win32security.$ac_objext "* ) ;;
15918 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
15920 esac
15922 case " $LIBOBJS " in
15923 *" win32setlocale.$ac_objext "* ) ;;
15924 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
15926 esac
15928 case " $LIBOBJS " in
15929 *" win32stat.$ac_objext "* ) ;;
15930 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
15932 esac
15935 # Cygwin needs only a bit of that
15936 if test "$PORTNAME" = "cygwin"; then
15937 case " $LIBOBJS " in
15938 *" dirmod.$ac_objext "* ) ;;
15939 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15941 esac
15945 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
15946 if test "x$ac_cv_func_syslog" = xyes; then :
15947 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
15948 if test "x$ac_cv_header_syslog_h" = xyes; then :
15950 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
15958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
15959 $as_echo_n "checking for opterr... " >&6; }
15960 if ${pgac_cv_var_int_opterr+:} false; then :
15961 $as_echo_n "(cached) " >&6
15962 else
15963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15964 /* end confdefs.h. */
15965 #include <unistd.h>
15967 main ()
15969 extern int opterr; opterr = 1;
15971 return 0;
15973 _ACEOF
15974 if ac_fn_c_try_link "$LINENO"; then :
15975 pgac_cv_var_int_opterr=yes
15976 else
15977 pgac_cv_var_int_opterr=no
15979 rm -f core conftest.err conftest.$ac_objext \
15980 conftest$ac_exeext conftest.$ac_ext
15982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
15983 $as_echo "$pgac_cv_var_int_opterr" >&6; }
15984 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
15986 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
15990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
15991 $as_echo_n "checking for optreset... " >&6; }
15992 if ${pgac_cv_var_int_optreset+:} false; then :
15993 $as_echo_n "(cached) " >&6
15994 else
15995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15996 /* end confdefs.h. */
15997 #include <unistd.h>
15999 main ()
16001 extern int optreset; optreset = 1;
16003 return 0;
16005 _ACEOF
16006 if ac_fn_c_try_link "$LINENO"; then :
16007 pgac_cv_var_int_optreset=yes
16008 else
16009 pgac_cv_var_int_optreset=no
16011 rm -f core conftest.err conftest.$ac_objext \
16012 conftest$ac_exeext conftest.$ac_ext
16014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16015 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16016 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16018 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16022 if test "$with_icu" = yes; then
16023 ac_save_CPPFLAGS=$CPPFLAGS
16024 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16026 # Verify we have ICU's header files
16027 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16028 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16030 else
16031 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16036 CPPFLAGS=$ac_save_CPPFLAGS
16039 if test "$with_llvm" = yes; then
16041 # Check which functionality is present
16042 SAVE_CPPFLAGS="$CPPFLAGS"
16043 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16044 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16046 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16047 ac_have_decl=1
16048 else
16049 ac_have_decl=0
16052 cat >>confdefs.h <<_ACEOF
16053 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16054 _ACEOF
16055 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16057 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16058 ac_have_decl=1
16059 else
16060 ac_have_decl=0
16063 cat >>confdefs.h <<_ACEOF
16064 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16065 _ACEOF
16067 CPPFLAGS="$SAVE_CPPFLAGS"
16071 # Lastly, restore full LIBS list and check for readline/libedit symbols
16072 LIBS="$LIBS_including_readline"
16074 if test "$with_readline" = yes; then
16075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
16076 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
16077 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
16078 $as_echo_n "(cached) " >&6
16079 else
16080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16081 /* end confdefs.h. */
16082 #include <stdio.h>
16083 #if defined(HAVE_READLINE_READLINE_H)
16084 #include <readline/readline.h>
16085 #elif defined(HAVE_EDITLINE_READLINE_H)
16086 #include <editline/readline.h>
16087 #elif defined(HAVE_READLINE_H)
16088 #include <readline.h>
16089 #endif
16092 main ()
16094 rl_completion_suppress_quote = 1;
16096 return 0;
16098 _ACEOF
16099 if ac_fn_c_try_link "$LINENO"; then :
16100 pgac_cv_var_rl_completion_suppress_quote=yes
16101 else
16102 pgac_cv_var_rl_completion_suppress_quote=no
16104 rm -f core conftest.err conftest.$ac_objext \
16105 conftest$ac_exeext conftest.$ac_ext
16107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
16108 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
16109 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
16111 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
16114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
16115 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
16116 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
16117 $as_echo_n "(cached) " >&6
16118 else
16119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16120 /* end confdefs.h. */
16121 #include <stdio.h>
16122 #if defined(HAVE_READLINE_READLINE_H)
16123 #include <readline/readline.h>
16124 #elif defined(HAVE_EDITLINE_READLINE_H)
16125 #include <editline/readline.h>
16126 #elif defined(HAVE_READLINE_H)
16127 #include <readline.h>
16128 #endif
16131 main ()
16133 rl_filename_quote_characters = "x";
16135 return 0;
16137 _ACEOF
16138 if ac_fn_c_try_link "$LINENO"; then :
16139 pgac_cv_var_rl_filename_quote_characters=yes
16140 else
16141 pgac_cv_var_rl_filename_quote_characters=no
16143 rm -f core conftest.err conftest.$ac_objext \
16144 conftest$ac_exeext conftest.$ac_ext
16146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
16147 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
16148 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
16150 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
16153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
16154 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
16155 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
16156 $as_echo_n "(cached) " >&6
16157 else
16158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16159 /* end confdefs.h. */
16160 #include <stdio.h>
16161 #if defined(HAVE_READLINE_READLINE_H)
16162 #include <readline/readline.h>
16163 #elif defined(HAVE_EDITLINE_READLINE_H)
16164 #include <editline/readline.h>
16165 #elif defined(HAVE_READLINE_H)
16166 #include <readline.h>
16167 #endif
16170 main ()
16172 rl_filename_quoting_function = 0;
16174 return 0;
16176 _ACEOF
16177 if ac_fn_c_try_link "$LINENO"; then :
16178 pgac_cv_var_rl_filename_quoting_function=yes
16179 else
16180 pgac_cv_var_rl_filename_quoting_function=no
16182 rm -f core conftest.err conftest.$ac_objext \
16183 conftest$ac_exeext conftest.$ac_ext
16185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
16186 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
16187 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
16189 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
16193 for ac_func in append_history history_truncate_file rl_completion_matches rl_filename_completion_function rl_reset_screen_size rl_variable_bind
16194 do :
16195 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16196 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16197 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16198 cat >>confdefs.h <<_ACEOF
16199 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16200 _ACEOF
16203 done
16208 # This test makes sure that run tests work at all. Sometimes a shared
16209 # library is found by the linker, but the runtime linker can't find it.
16210 # This check should come after all modifications of compiler or linker
16211 # variables, and before any other run tests.
16212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16213 $as_echo_n "checking test program... " >&6; }
16214 if test "$cross_compiling" = yes; then :
16215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16216 $as_echo "cross-compiling" >&6; }
16217 else
16218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16219 /* end confdefs.h. */
16220 int main() { return 0; }
16221 _ACEOF
16222 if ac_fn_c_try_run "$LINENO"; then :
16223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16224 $as_echo "ok" >&6; }
16225 else
16226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16227 $as_echo "failed" >&6; }
16228 as_fn_error $? "
16229 Could not execute a simple test program. This may be a problem
16230 related to locating shared libraries. Check the file 'config.log'
16231 for the exact reason." "$LINENO" 5
16233 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16234 conftest.$ac_objext conftest.beam conftest.$ac_ext
16238 # --------------------
16239 # Run tests below here
16240 # --------------------
16243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16244 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16245 if ${pgac_cv_type_long_int_64+:} false; then :
16246 $as_echo_n "(cached) " >&6
16247 else
16248 if test "$cross_compiling" = yes; then :
16249 # If cross-compiling, check the size reported by the compiler and
16250 # trust that the arithmetic works.
16251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16252 /* end confdefs.h. */
16255 main ()
16257 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16258 test_array [0] = 0;
16259 return test_array [0];
16262 return 0;
16264 _ACEOF
16265 if ac_fn_c_try_compile "$LINENO"; then :
16266 pgac_cv_type_long_int_64=yes
16267 else
16268 pgac_cv_type_long_int_64=no
16270 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16271 else
16272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16273 /* end confdefs.h. */
16274 typedef long int ac_int64;
16277 * These are globals to discourage the compiler from folding all the
16278 * arithmetic tests down to compile-time constants.
16280 ac_int64 a = 20000001;
16281 ac_int64 b = 40000005;
16283 int does_int64_work()
16285 ac_int64 c,d;
16287 if (sizeof(ac_int64) != 8)
16288 return 0; /* definitely not the right size */
16290 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16291 c = a * b;
16292 d = (c + b) / b;
16293 if (d != a+1)
16294 return 0;
16295 return 1;
16299 main() {
16300 return (! does_int64_work());
16302 _ACEOF
16303 if ac_fn_c_try_run "$LINENO"; then :
16304 pgac_cv_type_long_int_64=yes
16305 else
16306 pgac_cv_type_long_int_64=no
16308 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16309 conftest.$ac_objext conftest.beam conftest.$ac_ext
16313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16314 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16316 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16317 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16319 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16324 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16325 pg_int64_type="long int"
16326 else
16327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16328 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16329 if ${pgac_cv_type_long_long_int_64+:} false; then :
16330 $as_echo_n "(cached) " >&6
16331 else
16332 if test "$cross_compiling" = yes; then :
16333 # If cross-compiling, check the size reported by the compiler and
16334 # trust that the arithmetic works.
16335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16336 /* end confdefs.h. */
16339 main ()
16341 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16342 test_array [0] = 0;
16343 return test_array [0];
16346 return 0;
16348 _ACEOF
16349 if ac_fn_c_try_compile "$LINENO"; then :
16350 pgac_cv_type_long_long_int_64=yes
16351 else
16352 pgac_cv_type_long_long_int_64=no
16354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16355 else
16356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16357 /* end confdefs.h. */
16358 typedef long long int ac_int64;
16361 * These are globals to discourage the compiler from folding all the
16362 * arithmetic tests down to compile-time constants.
16364 ac_int64 a = 20000001;
16365 ac_int64 b = 40000005;
16367 int does_int64_work()
16369 ac_int64 c,d;
16371 if (sizeof(ac_int64) != 8)
16372 return 0; /* definitely not the right size */
16374 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16375 c = a * b;
16376 d = (c + b) / b;
16377 if (d != a+1)
16378 return 0;
16379 return 1;
16383 main() {
16384 return (! does_int64_work());
16386 _ACEOF
16387 if ac_fn_c_try_run "$LINENO"; then :
16388 pgac_cv_type_long_long_int_64=yes
16389 else
16390 pgac_cv_type_long_long_int_64=no
16392 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16393 conftest.$ac_objext conftest.beam conftest.$ac_ext
16397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16398 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16400 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16401 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16403 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16407 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16408 pg_int64_type="long long int"
16409 else
16410 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16415 cat >>confdefs.h <<_ACEOF
16416 #define PG_INT64_TYPE $pg_int64_type
16417 _ACEOF
16420 # Select the printf length modifier that goes with that, too.
16421 if test x"$pg_int64_type" = x"long long int" ; then
16422 INT64_MODIFIER='"ll"'
16423 else
16424 INT64_MODIFIER='"l"'
16428 cat >>confdefs.h <<_ACEOF
16429 #define INT64_MODIFIER $INT64_MODIFIER
16430 _ACEOF
16433 # has to be down here, rather than with the other builtins, because
16434 # the test uses PG_INT64_TYPE.
16435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16436 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16437 if ${pgac_cv__builtin_op_overflow+:} false; then :
16438 $as_echo_n "(cached) " >&6
16439 else
16440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16441 /* end confdefs.h. */
16443 PG_INT64_TYPE a = 1;
16444 PG_INT64_TYPE b = 1;
16445 PG_INT64_TYPE result;
16446 int oflo;
16449 main ()
16451 oflo = __builtin_mul_overflow(a, b, &result);
16453 return 0;
16455 _ACEOF
16456 if ac_fn_c_try_link "$LINENO"; then :
16457 pgac_cv__builtin_op_overflow=yes
16458 else
16459 pgac_cv__builtin_op_overflow=no
16461 rm -f core conftest.err conftest.$ac_objext \
16462 conftest$ac_exeext conftest.$ac_ext
16464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16465 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16466 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16468 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16472 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16473 # The cast to long int works around a bug in the HP C Compiler
16474 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16475 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16476 # This bug is HP SR number 8606223364.
16477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16478 $as_echo_n "checking size of void *... " >&6; }
16479 if ${ac_cv_sizeof_void_p+:} false; then :
16480 $as_echo_n "(cached) " >&6
16481 else
16482 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
16484 else
16485 if test "$ac_cv_type_void_p" = yes; then
16486 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16487 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16488 as_fn_error 77 "cannot compute sizeof (void *)
16489 See \`config.log' for more details" "$LINENO" 5; }
16490 else
16491 ac_cv_sizeof_void_p=0
16496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16497 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16501 cat >>confdefs.h <<_ACEOF
16502 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16503 _ACEOF
16506 # The cast to long int works around a bug in the HP C Compiler
16507 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16508 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16509 # This bug is HP SR number 8606223364.
16510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16511 $as_echo_n "checking size of size_t... " >&6; }
16512 if ${ac_cv_sizeof_size_t+:} false; then :
16513 $as_echo_n "(cached) " >&6
16514 else
16515 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
16517 else
16518 if test "$ac_cv_type_size_t" = yes; then
16519 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16520 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16521 as_fn_error 77 "cannot compute sizeof (size_t)
16522 See \`config.log' for more details" "$LINENO" 5; }
16523 else
16524 ac_cv_sizeof_size_t=0
16529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16530 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16534 cat >>confdefs.h <<_ACEOF
16535 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16536 _ACEOF
16539 # The cast to long int works around a bug in the HP C Compiler
16540 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16541 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16542 # This bug is HP SR number 8606223364.
16543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16544 $as_echo_n "checking size of long... " >&6; }
16545 if ${ac_cv_sizeof_long+:} false; then :
16546 $as_echo_n "(cached) " >&6
16547 else
16548 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
16550 else
16551 if test "$ac_cv_type_long" = yes; then
16552 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16553 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16554 as_fn_error 77 "cannot compute sizeof (long)
16555 See \`config.log' for more details" "$LINENO" 5; }
16556 else
16557 ac_cv_sizeof_long=0
16562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16563 $as_echo "$ac_cv_sizeof_long" >&6; }
16567 cat >>confdefs.h <<_ACEOF
16568 #define SIZEOF_LONG $ac_cv_sizeof_long
16569 _ACEOF
16573 # Determine memory alignment requirements for the basic C data types.
16575 # The cast to long int works around a bug in the HP C Compiler,
16576 # see AC_CHECK_SIZEOF for more information.
16577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16578 $as_echo_n "checking alignment of short... " >&6; }
16579 if ${ac_cv_alignof_short+:} false; then :
16580 $as_echo_n "(cached) " >&6
16581 else
16582 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
16583 #ifndef offsetof
16584 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16585 #endif
16586 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16588 else
16589 if test "$ac_cv_type_short" = yes; then
16590 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16591 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16592 as_fn_error 77 "cannot compute alignment of short
16593 See \`config.log' for more details" "$LINENO" 5; }
16594 else
16595 ac_cv_alignof_short=0
16600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16601 $as_echo "$ac_cv_alignof_short" >&6; }
16605 cat >>confdefs.h <<_ACEOF
16606 #define ALIGNOF_SHORT $ac_cv_alignof_short
16607 _ACEOF
16610 # The cast to long int works around a bug in the HP C Compiler,
16611 # see AC_CHECK_SIZEOF for more information.
16612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16613 $as_echo_n "checking alignment of int... " >&6; }
16614 if ${ac_cv_alignof_int+:} false; then :
16615 $as_echo_n "(cached) " >&6
16616 else
16617 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
16618 #ifndef offsetof
16619 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16620 #endif
16621 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16623 else
16624 if test "$ac_cv_type_int" = yes; then
16625 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16626 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16627 as_fn_error 77 "cannot compute alignment of int
16628 See \`config.log' for more details" "$LINENO" 5; }
16629 else
16630 ac_cv_alignof_int=0
16635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16636 $as_echo "$ac_cv_alignof_int" >&6; }
16640 cat >>confdefs.h <<_ACEOF
16641 #define ALIGNOF_INT $ac_cv_alignof_int
16642 _ACEOF
16645 # The cast to long int works around a bug in the HP C Compiler,
16646 # see AC_CHECK_SIZEOF for more information.
16647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16648 $as_echo_n "checking alignment of long... " >&6; }
16649 if ${ac_cv_alignof_long+:} false; then :
16650 $as_echo_n "(cached) " >&6
16651 else
16652 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
16653 #ifndef offsetof
16654 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16655 #endif
16656 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16658 else
16659 if test "$ac_cv_type_long" = yes; then
16660 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16661 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16662 as_fn_error 77 "cannot compute alignment of long
16663 See \`config.log' for more details" "$LINENO" 5; }
16664 else
16665 ac_cv_alignof_long=0
16670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16671 $as_echo "$ac_cv_alignof_long" >&6; }
16675 cat >>confdefs.h <<_ACEOF
16676 #define ALIGNOF_LONG $ac_cv_alignof_long
16677 _ACEOF
16680 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16681 # The cast to long int works around a bug in the HP C Compiler,
16682 # see AC_CHECK_SIZEOF for more information.
16683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16684 $as_echo_n "checking alignment of long long int... " >&6; }
16685 if ${ac_cv_alignof_long_long_int+:} false; then :
16686 $as_echo_n "(cached) " >&6
16687 else
16688 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
16689 #ifndef offsetof
16690 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16691 #endif
16692 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16694 else
16695 if test "$ac_cv_type_long_long_int" = yes; then
16696 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16697 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16698 as_fn_error 77 "cannot compute alignment of long long int
16699 See \`config.log' for more details" "$LINENO" 5; }
16700 else
16701 ac_cv_alignof_long_long_int=0
16706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16707 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
16711 cat >>confdefs.h <<_ACEOF
16712 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16713 _ACEOF
16717 # The cast to long int works around a bug in the HP C Compiler,
16718 # see AC_CHECK_SIZEOF for more information.
16719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16720 $as_echo_n "checking alignment of double... " >&6; }
16721 if ${ac_cv_alignof_double+:} false; then :
16722 $as_echo_n "(cached) " >&6
16723 else
16724 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
16725 #ifndef offsetof
16726 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16727 #endif
16728 typedef struct { char x; double y; } ac__type_alignof_;"; then :
16730 else
16731 if test "$ac_cv_type_double" = yes; then
16732 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16733 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16734 as_fn_error 77 "cannot compute alignment of double
16735 See \`config.log' for more details" "$LINENO" 5; }
16736 else
16737 ac_cv_alignof_double=0
16742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
16743 $as_echo "$ac_cv_alignof_double" >&6; }
16747 cat >>confdefs.h <<_ACEOF
16748 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
16749 _ACEOF
16753 # Compute maximum alignment of any basic type.
16755 # We require 'double' to have the strictest alignment among the basic types,
16756 # because otherwise the C ABI might impose 8-byte alignment on some of the
16757 # other C types that correspond to TYPALIGN_DOUBLE SQL types. That could
16758 # cause a mismatch between the tuple layout and the C struct layout of a
16759 # catalog tuple. We used to carefully order catalog columns such that any
16760 # fixed-width, attalign=4 columns were at offsets divisible by 8 regardless
16761 # of MAXIMUM_ALIGNOF to avoid that, but we no longer support any platforms
16762 # where TYPALIGN_DOUBLE != MAXIMUM_ALIGNOF.
16764 # We assume without checking that long's alignment is at least as strong as
16765 # char, short, or int. Note that we intentionally do not consider any types
16766 # wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8 would be too
16767 # much of a penalty for disk and memory space.
16769 MAX_ALIGNOF=$ac_cv_alignof_double
16771 if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
16772 as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5
16774 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $ac_cv_alignof_long_long_int -gt $MAX_ALIGNOF ; then
16775 as_fn_error $? "alignment of 'long long int' is greater than the alignment of 'double'" "$LINENO" 5
16778 cat >>confdefs.h <<_ACEOF
16779 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
16780 _ACEOF
16784 # Some compilers offer a 128-bit integer scalar type.
16785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
16786 $as_echo_n "checking for __int128... " >&6; }
16787 if ${pgac_cv__128bit_int+:} false; then :
16788 $as_echo_n "(cached) " >&6
16789 else
16790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16791 /* end confdefs.h. */
16794 * We don't actually run this test, just link it to verify that any support
16795 * functions needed for __int128 are present.
16797 * These are globals to discourage the compiler from folding all the
16798 * arithmetic tests down to compile-time constants. We do not have
16799 * convenient support for 128bit literals at this point...
16801 __int128 a = 48828125;
16802 __int128 b = 97656250;
16805 main ()
16808 __int128 c,d;
16809 a = (a << 12) + 1; /* 200000000001 */
16810 b = (b << 12) + 5; /* 400000000005 */
16811 /* try the most relevant arithmetic ops */
16812 c = a * b;
16813 d = (c + b) / b;
16814 /* must use the results, else compiler may optimize arithmetic away */
16815 if (d != a+1)
16816 return 1;
16819 return 0;
16821 _ACEOF
16822 if ac_fn_c_try_link "$LINENO"; then :
16823 pgac_cv__128bit_int=yes
16824 else
16825 pgac_cv__128bit_int=no
16827 rm -f core conftest.err conftest.$ac_objext \
16828 conftest$ac_exeext conftest.$ac_ext
16830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
16831 $as_echo "$pgac_cv__128bit_int" >&6; }
16832 if test x"$pgac_cv__128bit_int" = xyes ; then
16833 # Use of non-default alignment with __int128 tickles bugs in some compilers.
16834 # If not cross-compiling, we can test for bugs and disable use of __int128
16835 # with buggy compilers. If cross-compiling, hope for the best.
16836 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
16837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
16838 $as_echo_n "checking for __int128 alignment bug... " >&6; }
16839 if ${pgac_cv__128bit_int_bug+:} false; then :
16840 $as_echo_n "(cached) " >&6
16841 else
16842 if test "$cross_compiling" = yes; then :
16843 pgac_cv__128bit_int_bug="assuming ok"
16844 else
16845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16846 /* end confdefs.h. */
16848 /* This must match the corresponding code in c.h: */
16849 #if defined(__GNUC__) || defined(__SUNPRO_C)
16850 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
16851 #elif defined(_MSC_VER)
16852 #define pg_attribute_aligned(a) __declspec(align(a))
16853 #endif
16854 typedef __int128 int128a
16855 #if defined(pg_attribute_aligned)
16856 pg_attribute_aligned(8)
16857 #endif
16859 int128a holder;
16860 void pass_by_val(void *buffer, int128a par) { holder = par; }
16863 main ()
16866 long int i64 = 97656225L << 12;
16867 int128a q;
16868 pass_by_val(main, (int128a) i64);
16869 q = (int128a) i64;
16870 if (q != holder)
16871 return 1;
16874 return 0;
16876 _ACEOF
16877 if ac_fn_c_try_run "$LINENO"; then :
16878 pgac_cv__128bit_int_bug=ok
16879 else
16880 pgac_cv__128bit_int_bug=broken
16882 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16883 conftest.$ac_objext conftest.beam conftest.$ac_ext
16887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
16888 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
16889 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
16891 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
16893 # The cast to long int works around a bug in the HP C Compiler,
16894 # see AC_CHECK_SIZEOF for more information.
16895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
16896 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
16897 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
16898 $as_echo_n "(cached) " >&6
16899 else
16900 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
16901 #ifndef offsetof
16902 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16903 #endif
16904 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
16906 else
16907 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
16908 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16909 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16910 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
16911 See \`config.log' for more details" "$LINENO" 5; }
16912 else
16913 ac_cv_alignof_PG_INT128_TYPE=0
16918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
16919 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
16923 cat >>confdefs.h <<_ACEOF
16924 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
16925 _ACEOF
16931 # Check for various atomic operations now that we have checked how to declare
16932 # 64bit integers.
16933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
16934 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
16935 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
16936 $as_echo_n "(cached) " >&6
16937 else
16938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16939 /* end confdefs.h. */
16942 main ()
16944 char lock = 0;
16945 __sync_lock_test_and_set(&lock, 1);
16946 __sync_lock_release(&lock);
16948 return 0;
16950 _ACEOF
16951 if ac_fn_c_try_link "$LINENO"; then :
16952 pgac_cv_gcc_sync_char_tas="yes"
16953 else
16954 pgac_cv_gcc_sync_char_tas="no"
16956 rm -f core conftest.err conftest.$ac_objext \
16957 conftest$ac_exeext conftest.$ac_ext
16959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
16960 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
16961 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
16963 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
16966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
16967 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
16968 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
16969 $as_echo_n "(cached) " >&6
16970 else
16971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16972 /* end confdefs.h. */
16975 main ()
16977 int lock = 0;
16978 __sync_lock_test_and_set(&lock, 1);
16979 __sync_lock_release(&lock);
16981 return 0;
16983 _ACEOF
16984 if ac_fn_c_try_link "$LINENO"; then :
16985 pgac_cv_gcc_sync_int32_tas="yes"
16986 else
16987 pgac_cv_gcc_sync_int32_tas="no"
16989 rm -f core conftest.err conftest.$ac_objext \
16990 conftest$ac_exeext conftest.$ac_ext
16992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
16993 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
16994 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
16996 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
16999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17000 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17001 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17002 $as_echo_n "(cached) " >&6
17003 else
17004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17005 /* end confdefs.h. */
17008 main ()
17010 int val = 0;
17011 __sync_val_compare_and_swap(&val, 0, 37);
17013 return 0;
17015 _ACEOF
17016 if ac_fn_c_try_link "$LINENO"; then :
17017 pgac_cv_gcc_sync_int32_cas="yes"
17018 else
17019 pgac_cv_gcc_sync_int32_cas="no"
17021 rm -f core conftest.err conftest.$ac_objext \
17022 conftest$ac_exeext conftest.$ac_ext
17024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17025 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17026 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17028 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17032 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17033 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17034 $as_echo_n "(cached) " >&6
17035 else
17036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17037 /* end confdefs.h. */
17040 main ()
17042 PG_INT64_TYPE lock = 0;
17043 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17045 return 0;
17047 _ACEOF
17048 if ac_fn_c_try_link "$LINENO"; then :
17049 pgac_cv_gcc_sync_int64_cas="yes"
17050 else
17051 pgac_cv_gcc_sync_int64_cas="no"
17053 rm -f core conftest.err conftest.$ac_objext \
17054 conftest$ac_exeext conftest.$ac_ext
17056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17057 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17058 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17060 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17064 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17065 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17066 $as_echo_n "(cached) " >&6
17067 else
17068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17069 /* end confdefs.h. */
17072 main ()
17074 int val = 0;
17075 int expect = 0;
17076 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17078 return 0;
17080 _ACEOF
17081 if ac_fn_c_try_link "$LINENO"; then :
17082 pgac_cv_gcc_atomic_int32_cas="yes"
17083 else
17084 pgac_cv_gcc_atomic_int32_cas="no"
17086 rm -f core conftest.err conftest.$ac_objext \
17087 conftest$ac_exeext conftest.$ac_ext
17089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17090 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17091 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17093 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17097 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17098 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17099 $as_echo_n "(cached) " >&6
17100 else
17101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17102 /* end confdefs.h. */
17105 main ()
17107 PG_INT64_TYPE val = 0;
17108 PG_INT64_TYPE expect = 0;
17109 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17111 return 0;
17113 _ACEOF
17114 if ac_fn_c_try_link "$LINENO"; then :
17115 pgac_cv_gcc_atomic_int64_cas="yes"
17116 else
17117 pgac_cv_gcc_atomic_int64_cas="no"
17119 rm -f core conftest.err conftest.$ac_objext \
17120 conftest$ac_exeext conftest.$ac_ext
17122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17123 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17124 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17126 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17131 # Check for x86 cpuid instruction
17132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17133 $as_echo_n "checking for __get_cpuid... " >&6; }
17134 if ${pgac_cv__get_cpuid+:} false; then :
17135 $as_echo_n "(cached) " >&6
17136 else
17137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17138 /* end confdefs.h. */
17139 #include <cpuid.h>
17141 main ()
17143 unsigned int exx[4] = {0, 0, 0, 0};
17144 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17147 return 0;
17149 _ACEOF
17150 if ac_fn_c_try_link "$LINENO"; then :
17151 pgac_cv__get_cpuid="yes"
17152 else
17153 pgac_cv__get_cpuid="no"
17155 rm -f core conftest.err conftest.$ac_objext \
17156 conftest$ac_exeext conftest.$ac_ext
17158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17159 $as_echo "$pgac_cv__get_cpuid" >&6; }
17160 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17162 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid_count" >&5
17167 $as_echo_n "checking for __get_cpuid_count... " >&6; }
17168 if ${pgac_cv__get_cpuid_count+:} false; then :
17169 $as_echo_n "(cached) " >&6
17170 else
17171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17172 /* end confdefs.h. */
17173 #include <cpuid.h>
17175 main ()
17177 unsigned int exx[4] = {0, 0, 0, 0};
17178 __get_cpuid_count(7, 0, &exx[0], &exx[1], &exx[2], &exx[3]);
17181 return 0;
17183 _ACEOF
17184 if ac_fn_c_try_link "$LINENO"; then :
17185 pgac_cv__get_cpuid_count="yes"
17186 else
17187 pgac_cv__get_cpuid_count="no"
17189 rm -f core conftest.err conftest.$ac_objext \
17190 conftest$ac_exeext conftest.$ac_ext
17192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid_count" >&5
17193 $as_echo "$pgac_cv__get_cpuid_count" >&6; }
17194 if test x"$pgac_cv__get_cpuid_count" = x"yes"; then
17196 $as_echo "#define HAVE__GET_CPUID_COUNT 1" >>confdefs.h
17200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17201 $as_echo_n "checking for __cpuid... " >&6; }
17202 if ${pgac_cv__cpuid+:} false; then :
17203 $as_echo_n "(cached) " >&6
17204 else
17205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17206 /* end confdefs.h. */
17207 #include <intrin.h>
17209 main ()
17211 unsigned int exx[4] = {0, 0, 0, 0};
17212 __get_cpuid(exx[0], 1);
17215 return 0;
17217 _ACEOF
17218 if ac_fn_c_try_link "$LINENO"; then :
17219 pgac_cv__cpuid="yes"
17220 else
17221 pgac_cv__cpuid="no"
17223 rm -f core conftest.err conftest.$ac_objext \
17224 conftest$ac_exeext conftest.$ac_ext
17226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17227 $as_echo "$pgac_cv__cpuid" >&6; }
17228 if test x"$pgac_cv__cpuid" = x"yes"; then
17230 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuidex" >&5
17235 $as_echo_n "checking for __cpuidex... " >&6; }
17236 if ${pgac_cv__cpuidex+:} false; then :
17237 $as_echo_n "(cached) " >&6
17238 else
17239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17240 /* end confdefs.h. */
17241 #include <intrin.h>
17243 main ()
17245 unsigned int exx[4] = {0, 0, 0, 0};
17246 __get_cpuidex(exx[0], 7, 0);
17249 return 0;
17251 _ACEOF
17252 if ac_fn_c_try_link "$LINENO"; then :
17253 pgac_cv__cpuidex="yes"
17254 else
17255 pgac_cv__cpuidex="no"
17257 rm -f core conftest.err conftest.$ac_objext \
17258 conftest$ac_exeext conftest.$ac_ext
17260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuidex" >&5
17261 $as_echo "$pgac_cv__cpuidex" >&6; }
17262 if test x"$pgac_cv__cpuidex" = x"yes"; then
17264 $as_echo "#define HAVE__CPUIDEX 1" >>confdefs.h
17268 # Check for XSAVE intrinsics
17270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xgetbv" >&5
17271 $as_echo_n "checking for _xgetbv... " >&6; }
17272 if ${pgac_cv_xsave_intrinsics+:} false; then :
17273 $as_echo_n "(cached) " >&6
17274 else
17275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17276 /* end confdefs.h. */
17277 #include <immintrin.h>
17278 #if defined(__has_attribute) && __has_attribute (target)
17279 __attribute__((target("xsave")))
17280 #endif
17281 static int xsave_test(void)
17283 return _xgetbv(0) & 0xe0;
17286 main ()
17288 return xsave_test();
17290 return 0;
17292 _ACEOF
17293 if ac_fn_c_try_link "$LINENO"; then :
17294 pgac_cv_xsave_intrinsics=yes
17295 else
17296 pgac_cv_xsave_intrinsics=no
17298 rm -f core conftest.err conftest.$ac_objext \
17299 conftest$ac_exeext conftest.$ac_ext
17301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_xsave_intrinsics" >&5
17302 $as_echo "$pgac_cv_xsave_intrinsics" >&6; }
17303 if test x"$pgac_cv_xsave_intrinsics" = x"yes"; then
17304 pgac_xsave_intrinsics=yes
17307 if test x"$pgac_xsave_intrinsics" = x"yes"; then
17309 $as_echo "#define HAVE_XSAVE_INTRINSICS 1" >>confdefs.h
17313 # Check for AVX-512 popcount intrinsics
17315 if test x"$host_cpu" = x"x86_64"; then
17316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm512_popcnt_epi64" >&5
17317 $as_echo_n "checking for _mm512_popcnt_epi64... " >&6; }
17318 if ${pgac_cv_avx512_popcnt_intrinsics+:} false; then :
17319 $as_echo_n "(cached) " >&6
17320 else
17321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17322 /* end confdefs.h. */
17323 #include <immintrin.h>
17324 #if defined(__has_attribute) && __has_attribute (target)
17325 __attribute__((target("avx512vpopcntdq,avx512bw")))
17326 #endif
17327 static int popcount_test(void)
17329 const char buf[sizeof(__m512i)];
17330 PG_INT64_TYPE popcnt = 0;
17331 __m512i accum = _mm512_setzero_si512();
17332 const __m512i val = _mm512_maskz_loadu_epi8((__mmask64) 0xf0f0f0f0f0f0f0f0, (const __m512i *) buf);
17333 const __m512i cnt = _mm512_popcnt_epi64(val);
17334 accum = _mm512_add_epi64(accum, cnt);
17335 popcnt = _mm512_reduce_add_epi64(accum);
17336 return (int) popcnt;
17339 main ()
17341 return popcount_test();
17343 return 0;
17345 _ACEOF
17346 if ac_fn_c_try_link "$LINENO"; then :
17347 pgac_cv_avx512_popcnt_intrinsics=yes
17348 else
17349 pgac_cv_avx512_popcnt_intrinsics=no
17351 rm -f core conftest.err conftest.$ac_objext \
17352 conftest$ac_exeext conftest.$ac_ext
17354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_avx512_popcnt_intrinsics" >&5
17355 $as_echo "$pgac_cv_avx512_popcnt_intrinsics" >&6; }
17356 if test x"$pgac_cv_avx512_popcnt_intrinsics" = x"yes"; then
17357 pgac_avx512_popcnt_intrinsics=yes
17360 if test x"$pgac_avx512_popcnt_intrinsics" = x"yes"; then
17362 $as_echo "#define USE_AVX512_POPCNT_WITH_RUNTIME_CHECK 1" >>confdefs.h
17367 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17369 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17370 # with the default compiler flags. If not, check if adding the -msse4.2
17371 # flag helps. CFLAGS_CRC is set to -msse4.2 if that's required.
17372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17373 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17374 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17375 $as_echo_n "(cached) " >&6
17376 else
17377 pgac_save_CFLAGS=$CFLAGS
17378 CFLAGS="$pgac_save_CFLAGS "
17379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17380 /* end confdefs.h. */
17381 #include <nmmintrin.h>
17383 main ()
17385 unsigned int crc = 0;
17386 crc = _mm_crc32_u8(crc, 0);
17387 crc = _mm_crc32_u32(crc, 0);
17388 /* return computed value, to prevent the above being optimized away */
17389 return crc == 0;
17391 return 0;
17393 _ACEOF
17394 if ac_fn_c_try_link "$LINENO"; then :
17395 pgac_cv_sse42_crc32_intrinsics_=yes
17396 else
17397 pgac_cv_sse42_crc32_intrinsics_=no
17399 rm -f core conftest.err conftest.$ac_objext \
17400 conftest$ac_exeext conftest.$ac_ext
17401 CFLAGS="$pgac_save_CFLAGS"
17403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17404 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17405 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17406 CFLAGS_CRC=""
17407 pgac_sse42_crc32_intrinsics=yes
17410 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17412 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17413 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17414 $as_echo_n "(cached) " >&6
17415 else
17416 pgac_save_CFLAGS=$CFLAGS
17417 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17419 /* end confdefs.h. */
17420 #include <nmmintrin.h>
17422 main ()
17424 unsigned int crc = 0;
17425 crc = _mm_crc32_u8(crc, 0);
17426 crc = _mm_crc32_u32(crc, 0);
17427 /* return computed value, to prevent the above being optimized away */
17428 return crc == 0;
17430 return 0;
17432 _ACEOF
17433 if ac_fn_c_try_link "$LINENO"; then :
17434 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17435 else
17436 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17438 rm -f core conftest.err conftest.$ac_objext \
17439 conftest$ac_exeext conftest.$ac_ext
17440 CFLAGS="$pgac_save_CFLAGS"
17442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17443 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17444 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17445 CFLAGS_CRC="-msse4.2"
17446 pgac_sse42_crc32_intrinsics=yes
17451 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17452 # define __SSE4_2__ in that case.
17453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17454 /* end confdefs.h. */
17457 main ()
17460 #ifndef __SSE4_2__
17461 #error __SSE4_2__ not defined
17462 #endif
17465 return 0;
17467 _ACEOF
17468 if ac_fn_c_try_compile "$LINENO"; then :
17469 SSE4_2_TARGETED=1
17471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17473 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17475 # First check if __crc32c* intrinsics can be used with the default compiler
17476 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17477 # CFLAGS_CRC is set if the extra flag is required.
17478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17479 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17480 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17481 $as_echo_n "(cached) " >&6
17482 else
17483 pgac_save_CFLAGS=$CFLAGS
17484 CFLAGS="$pgac_save_CFLAGS "
17485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17486 /* end confdefs.h. */
17487 #include <arm_acle.h>
17489 main ()
17491 unsigned int crc = 0;
17492 crc = __crc32cb(crc, 0);
17493 crc = __crc32ch(crc, 0);
17494 crc = __crc32cw(crc, 0);
17495 crc = __crc32cd(crc, 0);
17496 /* return computed value, to prevent the above being optimized away */
17497 return crc == 0;
17499 return 0;
17501 _ACEOF
17502 if ac_fn_c_try_link "$LINENO"; then :
17503 pgac_cv_armv8_crc32c_intrinsics_=yes
17504 else
17505 pgac_cv_armv8_crc32c_intrinsics_=no
17507 rm -f core conftest.err conftest.$ac_objext \
17508 conftest$ac_exeext conftest.$ac_ext
17509 CFLAGS="$pgac_save_CFLAGS"
17511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17512 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17513 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17514 CFLAGS_CRC=""
17515 pgac_armv8_crc32c_intrinsics=yes
17518 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17520 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17521 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17522 $as_echo_n "(cached) " >&6
17523 else
17524 pgac_save_CFLAGS=$CFLAGS
17525 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17527 /* end confdefs.h. */
17528 #include <arm_acle.h>
17530 main ()
17532 unsigned int crc = 0;
17533 crc = __crc32cb(crc, 0);
17534 crc = __crc32ch(crc, 0);
17535 crc = __crc32cw(crc, 0);
17536 crc = __crc32cd(crc, 0);
17537 /* return computed value, to prevent the above being optimized away */
17538 return crc == 0;
17540 return 0;
17542 _ACEOF
17543 if ac_fn_c_try_link "$LINENO"; then :
17544 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17545 else
17546 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17548 rm -f core conftest.err conftest.$ac_objext \
17549 conftest$ac_exeext conftest.$ac_ext
17550 CFLAGS="$pgac_save_CFLAGS"
17552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17553 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17554 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17555 CFLAGS_CRC="-march=armv8-a+crc"
17556 pgac_armv8_crc32c_intrinsics=yes
17561 # Check for LoongArch CRC intrinsics to do CRC calculations.
17563 # Check if __builtin_loongarch_crcc_* intrinsics can be used
17564 # with the default compiler flags.
17565 { $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
17566 $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; }
17567 if ${pgac_cv_loongarch_crc32c_intrinsics+:} false; then :
17568 $as_echo_n "(cached) " >&6
17569 else
17570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17571 /* end confdefs.h. */
17574 main ()
17576 unsigned int crc = 0;
17577 crc = __builtin_loongarch_crcc_w_b_w(0, crc);
17578 crc = __builtin_loongarch_crcc_w_h_w(0, crc);
17579 crc = __builtin_loongarch_crcc_w_w_w(0, crc);
17580 crc = __builtin_loongarch_crcc_w_d_w(0, crc);
17581 /* return computed value, to prevent the above being optimized away */
17582 return crc == 0;
17584 return 0;
17586 _ACEOF
17587 if ac_fn_c_try_link "$LINENO"; then :
17588 pgac_cv_loongarch_crc32c_intrinsics=yes
17589 else
17590 pgac_cv_loongarch_crc32c_intrinsics=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_loongarch_crc32c_intrinsics" >&5
17596 $as_echo "$pgac_cv_loongarch_crc32c_intrinsics" >&6; }
17597 if test x"$pgac_cv_loongarch_crc32c_intrinsics" = x"yes"; then
17598 pgac_loongarch_crc32c_intrinsics=yes
17604 # Select CRC-32C implementation.
17606 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17607 # use the special CRC instructions for calculating CRC-32C. If we're not
17608 # targeting such a processor, but we can nevertheless produce code that uses
17609 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17610 # implementations and select which one to use at runtime, depending on whether
17611 # SSE 4.2 is supported by the processor we're running on.
17613 # Similarly, if we are targeting an ARM processor that has the CRC
17614 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17615 # we're not targeting such a processor, but can nevertheless produce code that
17616 # uses the CRC instructions, compile both, and select at runtime.
17618 # You can skip the runtime check by setting the appropriate USE_*_CRC32 flag to 1
17619 # in the template or configure command line.
17621 # If we are targeting a LoongArch processor, CRC instructions are
17622 # always available (at least on 64 bit), so no runtime check is needed.
17623 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
17624 # Use Intel SSE 4.2 if available.
17625 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17626 USE_SSE42_CRC32C=1
17627 else
17628 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17629 # the runtime check.
17630 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
17631 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17632 else
17633 # Use ARM CRC Extension if available.
17634 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_CRC" = x""; then
17635 USE_ARMV8_CRC32C=1
17636 else
17637 # ARM CRC Extension, with runtime check?
17638 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17639 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17640 else
17641 # LoongArch CRCC instructions.
17642 if test x"$pgac_loongarch_crc32c_intrinsics" = x"yes"; then
17643 USE_LOONGARCH_CRC32C=1
17644 else
17645 # fall back to slicing-by-8 algorithm, which doesn't require any
17646 # special CPU support.
17647 USE_SLICING_BY_8_CRC32C=1
17655 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17657 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17658 if test x"$USE_SSE42_CRC32C" = x"1"; then
17660 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17662 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17664 $as_echo "SSE 4.2" >&6; }
17665 else
17666 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17668 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17670 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17672 $as_echo "SSE 4.2 with runtime check" >&6; }
17673 else
17674 if test x"$USE_ARMV8_CRC32C" = x"1"; then
17676 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17678 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17680 $as_echo "ARMv8 CRC instructions" >&6; }
17681 else
17682 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17684 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17686 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17688 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17689 else
17690 if test x"$USE_LOONGARCH_CRC32C" = x"1"; then
17692 $as_echo "#define USE_LOONGARCH_CRC32C 1" >>confdefs.h
17694 PG_CRC32C_OBJS="pg_crc32c_loongarch.o"
17695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: LoongArch CRCC instructions" >&5
17696 $as_echo "LoongArch CRCC instructions" >&6; }
17697 else
17699 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17701 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17703 $as_echo "slicing-by-8" >&6; }
17712 # Select semaphore implementation type.
17713 if test "$PORTNAME" != "win32"; then
17714 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17715 # Need sem_open for this
17716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17717 $as_echo_n "checking for library containing sem_open... " >&6; }
17718 if ${ac_cv_search_sem_open+:} false; then :
17719 $as_echo_n "(cached) " >&6
17720 else
17721 ac_func_search_save_LIBS=$LIBS
17722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17723 /* end confdefs.h. */
17725 /* Override any GCC internal prototype to avoid an error.
17726 Use char because int might match the return type of a GCC
17727 builtin and then its argument prototype would still apply. */
17728 #ifdef __cplusplus
17729 extern "C"
17730 #endif
17731 char sem_open ();
17733 main ()
17735 return sem_open ();
17737 return 0;
17739 _ACEOF
17740 for ac_lib in '' rt pthread; do
17741 if test -z "$ac_lib"; then
17742 ac_res="none required"
17743 else
17744 ac_res=-l$ac_lib
17745 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17747 if ac_fn_c_try_link "$LINENO"; then :
17748 ac_cv_search_sem_open=$ac_res
17750 rm -f core conftest.err conftest.$ac_objext \
17751 conftest$ac_exeext
17752 if ${ac_cv_search_sem_open+:} false; then :
17753 break
17755 done
17756 if ${ac_cv_search_sem_open+:} false; then :
17758 else
17759 ac_cv_search_sem_open=no
17761 rm conftest.$ac_ext
17762 LIBS=$ac_func_search_save_LIBS
17764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17765 $as_echo "$ac_cv_search_sem_open" >&6; }
17766 ac_res=$ac_cv_search_sem_open
17767 if test "$ac_res" != no; then :
17768 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17769 USE_NAMED_POSIX_SEMAPHORES=1
17773 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17774 # Need sem_init for this
17775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17776 $as_echo_n "checking for library containing sem_init... " >&6; }
17777 if ${ac_cv_search_sem_init+:} false; then :
17778 $as_echo_n "(cached) " >&6
17779 else
17780 ac_func_search_save_LIBS=$LIBS
17781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17782 /* end confdefs.h. */
17784 /* Override any GCC internal prototype to avoid an error.
17785 Use char because int might match the return type of a GCC
17786 builtin and then its argument prototype would still apply. */
17787 #ifdef __cplusplus
17788 extern "C"
17789 #endif
17790 char sem_init ();
17792 main ()
17794 return sem_init ();
17796 return 0;
17798 _ACEOF
17799 for ac_lib in '' rt pthread; do
17800 if test -z "$ac_lib"; then
17801 ac_res="none required"
17802 else
17803 ac_res=-l$ac_lib
17804 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17806 if ac_fn_c_try_link "$LINENO"; then :
17807 ac_cv_search_sem_init=$ac_res
17809 rm -f core conftest.err conftest.$ac_objext \
17810 conftest$ac_exeext
17811 if ${ac_cv_search_sem_init+:} false; then :
17812 break
17814 done
17815 if ${ac_cv_search_sem_init+:} false; then :
17817 else
17818 ac_cv_search_sem_init=no
17820 rm conftest.$ac_ext
17821 LIBS=$ac_func_search_save_LIBS
17823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17824 $as_echo "$ac_cv_search_sem_init" >&6; }
17825 ac_res=$ac_cv_search_sem_init
17826 if test "$ac_res" != no; then :
17827 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17828 USE_UNNAMED_POSIX_SEMAPHORES=1
17832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17833 $as_echo_n "checking which semaphore API to use... " >&6; }
17834 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17836 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17838 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17839 sematype="named POSIX"
17840 else
17841 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17843 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17845 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17846 sematype="unnamed POSIX"
17847 else
17849 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17851 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17852 sematype="System V"
17855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17856 $as_echo "$sematype" >&6; }
17857 else
17859 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17861 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
17865 # Select shared-memory implementation type.
17866 if test "$PORTNAME" != "win32"; then
17868 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
17870 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17871 else
17873 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
17875 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
17878 # Select random number source. If a TLS library is used then it will be the
17879 # first choice, else the native platform sources (Windows API or /dev/urandom)
17880 # will be used.
17881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
17882 $as_echo_n "checking which random number source to use... " >&6; }
17883 if test x"$with_ssl" = x"openssl" ; then
17884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
17885 $as_echo "OpenSSL" >&6; }
17886 elif test x"$PORTNAME" = x"win32" ; then
17887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
17888 $as_echo "Windows native" >&6; }
17889 elif test x"$cross_compiling" = x"yes"; then
17890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming /dev/urandom" >&5
17891 $as_echo "assuming /dev/urandom" >&6; }
17892 else
17893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
17894 $as_echo "/dev/urandom" >&6; }
17895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
17896 $as_echo_n "checking for /dev/urandom... " >&6; }
17897 if ${ac_cv_file__dev_urandom+:} false; then :
17898 $as_echo_n "(cached) " >&6
17899 else
17900 test "$cross_compiling" = yes &&
17901 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17902 if test -r "/dev/urandom"; then
17903 ac_cv_file__dev_urandom=yes
17904 else
17905 ac_cv_file__dev_urandom=no
17908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
17909 $as_echo "$ac_cv_file__dev_urandom" >&6; }
17910 if test "x$ac_cv_file__dev_urandom" = xyes; then :
17915 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
17916 as_fn_error $? "
17917 no source of strong random numbers was found
17918 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
17922 # If not set in template file, set bytes to use libc memset()
17923 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
17924 MEMSET_LOOP_LIMIT=1024
17927 cat >>confdefs.h <<_ACEOF
17928 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
17929 _ACEOF
17933 if test "$enable_nls" = yes ; then
17935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
17936 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
17937 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17938 $as_echo_n "(cached) " >&6
17939 else
17940 ac_func_search_save_LIBS=$LIBS
17941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17942 /* end confdefs.h. */
17944 /* Override any GCC internal prototype to avoid an error.
17945 Use char because int might match the return type of a GCC
17946 builtin and then its argument prototype would still apply. */
17947 #ifdef __cplusplus
17948 extern "C"
17949 #endif
17950 char bind_textdomain_codeset ();
17952 main ()
17954 return bind_textdomain_codeset ();
17956 return 0;
17958 _ACEOF
17959 for ac_lib in '' intl; do
17960 if test -z "$ac_lib"; then
17961 ac_res="none required"
17962 else
17963 ac_res=-l$ac_lib
17964 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17966 if ac_fn_c_try_link "$LINENO"; then :
17967 ac_cv_search_bind_textdomain_codeset=$ac_res
17969 rm -f core conftest.err conftest.$ac_objext \
17970 conftest$ac_exeext
17971 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17972 break
17974 done
17975 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17977 else
17978 ac_cv_search_bind_textdomain_codeset=no
17980 rm conftest.$ac_ext
17981 LIBS=$ac_func_search_save_LIBS
17983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
17984 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
17985 ac_res=$ac_cv_search_bind_textdomain_codeset
17986 if test "$ac_res" != no; then :
17987 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17989 else
17990 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
17993 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
17994 if test "x$ac_cv_header_libintl_h" = xyes; then :
17996 else
17997 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18001 if test -z "$MSGFMT"; then
18002 for ac_prog in msgfmt
18004 # Extract the first word of "$ac_prog", so it can be a program name with args.
18005 set dummy $ac_prog; ac_word=$2
18006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18007 $as_echo_n "checking for $ac_word... " >&6; }
18008 if ${ac_cv_path_MSGFMT+:} false; then :
18009 $as_echo_n "(cached) " >&6
18010 else
18011 case $MSGFMT in
18012 [\\/]* | ?:[\\/]*)
18013 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18016 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18017 for as_dir in $PATH
18019 IFS=$as_save_IFS
18020 test -z "$as_dir" && as_dir=.
18021 for ac_exec_ext in '' $ac_executable_extensions; do
18022 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18023 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18024 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18025 break 2
18027 done
18028 done
18029 IFS=$as_save_IFS
18032 esac
18034 MSGFMT=$ac_cv_path_MSGFMT
18035 if test -n "$MSGFMT"; then
18036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18037 $as_echo "$MSGFMT" >&6; }
18038 else
18039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18040 $as_echo "no" >&6; }
18044 test -n "$MSGFMT" && break
18045 done
18047 else
18048 # Report the value of MSGFMT in configure's output in all cases.
18049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18050 $as_echo_n "checking for MSGFMT... " >&6; }
18051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18052 $as_echo "$MSGFMT" >&6; }
18055 if test -z "$MSGFMT"; then
18056 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18059 $as_echo_n "checking for msgfmt flags... " >&6; }
18060 if ${pgac_cv_msgfmt_flags+:} false; then :
18061 $as_echo_n "(cached) " >&6
18062 else
18063 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18064 pgac_cv_msgfmt_flags=-c
18067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18068 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18069 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18071 if test -z "$MSGMERGE"; then
18072 for ac_prog in msgmerge
18074 # Extract the first word of "$ac_prog", so it can be a program name with args.
18075 set dummy $ac_prog; ac_word=$2
18076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18077 $as_echo_n "checking for $ac_word... " >&6; }
18078 if ${ac_cv_path_MSGMERGE+:} false; then :
18079 $as_echo_n "(cached) " >&6
18080 else
18081 case $MSGMERGE in
18082 [\\/]* | ?:[\\/]*)
18083 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18086 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18087 for as_dir in $PATH
18089 IFS=$as_save_IFS
18090 test -z "$as_dir" && as_dir=.
18091 for ac_exec_ext in '' $ac_executable_extensions; do
18092 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18093 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18094 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18095 break 2
18097 done
18098 done
18099 IFS=$as_save_IFS
18102 esac
18104 MSGMERGE=$ac_cv_path_MSGMERGE
18105 if test -n "$MSGMERGE"; then
18106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18107 $as_echo "$MSGMERGE" >&6; }
18108 else
18109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18110 $as_echo "no" >&6; }
18114 test -n "$MSGMERGE" && break
18115 done
18117 else
18118 # Report the value of MSGMERGE in configure's output in all cases.
18119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18120 $as_echo_n "checking for MSGMERGE... " >&6; }
18121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18122 $as_echo "$MSGMERGE" >&6; }
18125 if test -z "$XGETTEXT"; then
18126 for ac_prog in xgettext
18128 # Extract the first word of "$ac_prog", so it can be a program name with args.
18129 set dummy $ac_prog; ac_word=$2
18130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18131 $as_echo_n "checking for $ac_word... " >&6; }
18132 if ${ac_cv_path_XGETTEXT+:} false; then :
18133 $as_echo_n "(cached) " >&6
18134 else
18135 case $XGETTEXT in
18136 [\\/]* | ?:[\\/]*)
18137 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18140 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18141 for as_dir in $PATH
18143 IFS=$as_save_IFS
18144 test -z "$as_dir" && as_dir=.
18145 for ac_exec_ext in '' $ac_executable_extensions; do
18146 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18147 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18148 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18149 break 2
18151 done
18152 done
18153 IFS=$as_save_IFS
18156 esac
18158 XGETTEXT=$ac_cv_path_XGETTEXT
18159 if test -n "$XGETTEXT"; then
18160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18161 $as_echo "$XGETTEXT" >&6; }
18162 else
18163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18164 $as_echo "no" >&6; }
18168 test -n "$XGETTEXT" && break
18169 done
18171 else
18172 # Report the value of XGETTEXT in configure's output in all cases.
18173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18174 $as_echo_n "checking for XGETTEXT... " >&6; }
18175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18176 $as_echo "$XGETTEXT" >&6; }
18182 # Check for Tcl configuration script tclConfig.sh
18183 if test "$with_tcl" = yes; then
18184 if test -z "$TCLSH"; then
18185 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18187 # Extract the first word of "$ac_prog", so it can be a program name with args.
18188 set dummy $ac_prog; ac_word=$2
18189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18190 $as_echo_n "checking for $ac_word... " >&6; }
18191 if ${ac_cv_path_TCLSH+:} false; then :
18192 $as_echo_n "(cached) " >&6
18193 else
18194 case $TCLSH in
18195 [\\/]* | ?:[\\/]*)
18196 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18199 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18200 for as_dir in $PATH
18202 IFS=$as_save_IFS
18203 test -z "$as_dir" && as_dir=.
18204 for ac_exec_ext in '' $ac_executable_extensions; do
18205 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18206 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18207 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18208 break 2
18210 done
18211 done
18212 IFS=$as_save_IFS
18215 esac
18217 TCLSH=$ac_cv_path_TCLSH
18218 if test -n "$TCLSH"; then
18219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18220 $as_echo "$TCLSH" >&6; }
18221 else
18222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18223 $as_echo "no" >&6; }
18227 test -n "$TCLSH" && break
18228 done
18230 else
18231 # Report the value of TCLSH in configure's output in all cases.
18232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18233 $as_echo_n "checking for TCLSH... " >&6; }
18234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18235 $as_echo "$TCLSH" >&6; }
18238 if test x"$TCLSH" = x""; then
18239 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18243 $as_echo_n "checking for tclConfig.sh... " >&6; }
18244 # Let user override test
18245 if test -z "$TCL_CONFIG_SH"; then
18246 pgac_test_dirs="$with_tclconfig"
18248 set X $pgac_test_dirs; shift
18249 if test $# -eq 0; then
18250 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18251 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18252 # On newer macOS, $auto_path frequently doesn't include the place
18253 # where tclConfig.sh actually lives. Append that to the end, so as not
18254 # to break cases where a non-default Tcl installation is being used.
18255 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18256 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18258 set X $pgac_test_dirs; shift
18261 for pgac_dir do
18262 if test -r "$pgac_dir/tclConfig.sh"; then
18263 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18264 break
18266 done
18269 if test -z "$TCL_CONFIG_SH"; then
18270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18271 $as_echo "no" >&6; }
18272 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18273 else
18274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18275 $as_echo "$TCL_CONFIG_SH" >&6; }
18280 . "$TCL_CONFIG_SH"
18281 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18282 eval TCL_LIBS=\"$TCL_LIBS\"
18283 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18284 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18286 if test "$TCL_SHARED_BUILD" != 1; then
18287 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18288 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18290 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18291 ac_save_CPPFLAGS=$CPPFLAGS
18292 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18293 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18294 if test "x$ac_cv_header_tcl_h" = xyes; then :
18296 else
18297 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18301 CPPFLAGS=$ac_save_CPPFLAGS
18304 # check for <perl.h>
18305 if test "$with_perl" = yes; then
18306 ac_save_CPPFLAGS=$CPPFLAGS
18307 CPPFLAGS="$CPPFLAGS $perl_includespec"
18308 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18310 if test "x$ac_cv_header_perl_h" = xyes; then :
18312 else
18313 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18317 # While we're at it, check that we can link to libperl.
18318 # On most platforms, if perl.h is there then libperl.so will be too, but at
18319 # this writing Debian packages them separately. There is no known reason to
18320 # waste cycles on separate probes for the Tcl or Python libraries, though.
18321 # On some Red Hat platforms, the link attempt can fail if we don't use
18322 # CFLAGS_SL while building the test program.
18323 ac_save_CFLAGS=$CFLAGS
18324 CFLAGS="$CFLAGS $CFLAGS_SL"
18325 pgac_save_LIBS=$LIBS
18326 LIBS="$perl_embed_ldflags"
18327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18328 $as_echo_n "checking for libperl... " >&6; }
18329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18330 /* end confdefs.h. */
18332 #include <EXTERN.h>
18333 #include <perl.h>
18336 main ()
18338 perl_alloc();
18340 return 0;
18342 _ACEOF
18343 if ac_fn_c_try_link "$LINENO"; then :
18344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18345 $as_echo "yes" >&6; }
18346 else
18347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18348 $as_echo "no" >&6; }
18349 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18351 rm -f core conftest.err conftest.$ac_objext \
18352 conftest$ac_exeext conftest.$ac_ext
18353 LIBS=$pgac_save_LIBS
18354 CFLAGS=$ac_save_CFLAGS
18355 CPPFLAGS=$ac_save_CPPFLAGS
18358 # check for <Python.h>
18359 if test "$with_python" = yes; then
18360 ac_save_CPPFLAGS=$CPPFLAGS
18361 CPPFLAGS="$python_includespec $CPPFLAGS"
18362 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18363 if test "x$ac_cv_header_Python_h" = xyes; then :
18365 else
18366 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18370 CPPFLAGS=$ac_save_CPPFLAGS
18374 # Check for documentation-building tools
18376 if test -z "$XMLLINT"; then
18377 for ac_prog in xmllint
18379 # Extract the first word of "$ac_prog", so it can be a program name with args.
18380 set dummy $ac_prog; ac_word=$2
18381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18382 $as_echo_n "checking for $ac_word... " >&6; }
18383 if ${ac_cv_path_XMLLINT+:} false; then :
18384 $as_echo_n "(cached) " >&6
18385 else
18386 case $XMLLINT in
18387 [\\/]* | ?:[\\/]*)
18388 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18392 for as_dir in $PATH
18394 IFS=$as_save_IFS
18395 test -z "$as_dir" && as_dir=.
18396 for ac_exec_ext in '' $ac_executable_extensions; do
18397 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18398 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18399 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18400 break 2
18402 done
18403 done
18404 IFS=$as_save_IFS
18407 esac
18409 XMLLINT=$ac_cv_path_XMLLINT
18410 if test -n "$XMLLINT"; then
18411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18412 $as_echo "$XMLLINT" >&6; }
18413 else
18414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18415 $as_echo "no" >&6; }
18419 test -n "$XMLLINT" && break
18420 done
18422 else
18423 # Report the value of XMLLINT in configure's output in all cases.
18424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18425 $as_echo_n "checking for XMLLINT... " >&6; }
18426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18427 $as_echo "$XMLLINT" >&6; }
18430 if test -z "$XSLTPROC"; then
18431 for ac_prog in xsltproc
18433 # Extract the first word of "$ac_prog", so it can be a program name with args.
18434 set dummy $ac_prog; ac_word=$2
18435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18436 $as_echo_n "checking for $ac_word... " >&6; }
18437 if ${ac_cv_path_XSLTPROC+:} false; then :
18438 $as_echo_n "(cached) " >&6
18439 else
18440 case $XSLTPROC in
18441 [\\/]* | ?:[\\/]*)
18442 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18446 for as_dir in $PATH
18448 IFS=$as_save_IFS
18449 test -z "$as_dir" && as_dir=.
18450 for ac_exec_ext in '' $ac_executable_extensions; do
18451 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18452 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18454 break 2
18456 done
18457 done
18458 IFS=$as_save_IFS
18461 esac
18463 XSLTPROC=$ac_cv_path_XSLTPROC
18464 if test -n "$XSLTPROC"; then
18465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18466 $as_echo "$XSLTPROC" >&6; }
18467 else
18468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18469 $as_echo "no" >&6; }
18473 test -n "$XSLTPROC" && break
18474 done
18476 else
18477 # Report the value of XSLTPROC in configure's output in all cases.
18478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18479 $as_echo_n "checking for XSLTPROC... " >&6; }
18480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18481 $as_echo "$XSLTPROC" >&6; }
18484 if test -z "$FOP"; then
18485 for ac_prog in fop
18487 # Extract the first word of "$ac_prog", so it can be a program name with args.
18488 set dummy $ac_prog; ac_word=$2
18489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18490 $as_echo_n "checking for $ac_word... " >&6; }
18491 if ${ac_cv_path_FOP+:} false; then :
18492 $as_echo_n "(cached) " >&6
18493 else
18494 case $FOP in
18495 [\\/]* | ?:[\\/]*)
18496 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18499 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18500 for as_dir in $PATH
18502 IFS=$as_save_IFS
18503 test -z "$as_dir" && as_dir=.
18504 for ac_exec_ext in '' $ac_executable_extensions; do
18505 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18506 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18507 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18508 break 2
18510 done
18511 done
18512 IFS=$as_save_IFS
18515 esac
18517 FOP=$ac_cv_path_FOP
18518 if test -n "$FOP"; then
18519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18520 $as_echo "$FOP" >&6; }
18521 else
18522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18523 $as_echo "no" >&6; }
18527 test -n "$FOP" && break
18528 done
18530 else
18531 # Report the value of FOP in configure's output in all cases.
18532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18533 $as_echo_n "checking for FOP... " >&6; }
18534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18535 $as_echo "$FOP" >&6; }
18538 if test -z "$DBTOEPUB"; then
18539 for ac_prog in dbtoepub
18541 # Extract the first word of "$ac_prog", so it can be a program name with args.
18542 set dummy $ac_prog; ac_word=$2
18543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18544 $as_echo_n "checking for $ac_word... " >&6; }
18545 if ${ac_cv_path_DBTOEPUB+:} false; then :
18546 $as_echo_n "(cached) " >&6
18547 else
18548 case $DBTOEPUB in
18549 [\\/]* | ?:[\\/]*)
18550 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18553 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18554 for as_dir in $PATH
18556 IFS=$as_save_IFS
18557 test -z "$as_dir" && as_dir=.
18558 for ac_exec_ext in '' $ac_executable_extensions; do
18559 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18560 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18561 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18562 break 2
18564 done
18565 done
18566 IFS=$as_save_IFS
18569 esac
18571 DBTOEPUB=$ac_cv_path_DBTOEPUB
18572 if test -n "$DBTOEPUB"; then
18573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18574 $as_echo "$DBTOEPUB" >&6; }
18575 else
18576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18577 $as_echo "no" >&6; }
18581 test -n "$DBTOEPUB" && break
18582 done
18584 else
18585 # Report the value of DBTOEPUB in configure's output in all cases.
18586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18587 $as_echo_n "checking for DBTOEPUB... " >&6; }
18588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18589 $as_echo "$DBTOEPUB" >&6; }
18594 # Check for test tools
18596 if test "$enable_tap_tests" = yes; then
18597 # Make sure we know where prove is.
18598 if test -z "$PROVE"; then
18599 for ac_prog in prove
18601 # Extract the first word of "$ac_prog", so it can be a program name with args.
18602 set dummy $ac_prog; ac_word=$2
18603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18604 $as_echo_n "checking for $ac_word... " >&6; }
18605 if ${ac_cv_path_PROVE+:} false; then :
18606 $as_echo_n "(cached) " >&6
18607 else
18608 case $PROVE in
18609 [\\/]* | ?:[\\/]*)
18610 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18614 for as_dir in $PATH
18616 IFS=$as_save_IFS
18617 test -z "$as_dir" && as_dir=.
18618 for ac_exec_ext in '' $ac_executable_extensions; do
18619 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18620 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18621 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18622 break 2
18624 done
18625 done
18626 IFS=$as_save_IFS
18629 esac
18631 PROVE=$ac_cv_path_PROVE
18632 if test -n "$PROVE"; then
18633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18634 $as_echo "$PROVE" >&6; }
18635 else
18636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18637 $as_echo "no" >&6; }
18641 test -n "$PROVE" && break
18642 done
18644 else
18645 # Report the value of PROVE in configure's output in all cases.
18646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18647 $as_echo_n "checking for PROVE... " >&6; }
18648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18649 $as_echo "$PROVE" >&6; }
18652 if test -z "$PROVE"; then
18653 as_fn_error $? "prove not found" "$LINENO" 5
18655 # Check for necessary Perl modules. You might think we should use
18656 # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
18657 # installation than perl, eg on MSys, so we have to check using prove.
18658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
18659 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
18660 __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__
18661 modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
18662 if test $? -eq 0; then
18663 # log the module version details, but don't show them interactively
18664 echo "$modulestderr" >&5
18665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18666 $as_echo "yes" >&6; }
18667 else
18668 # on failure, though, show the results to the user
18669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modulestderr" >&5
18670 $as_echo "$modulestderr" >&6; }
18671 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18675 # If compiler will take -Wl,--as-needed (or various platform-specific
18676 # spellings thereof) then add that to LDFLAGS. This is much easier than
18677 # trying to filter LIBS to the minimum for each executable.
18678 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18679 # libreadline; therefore we postpone testing it until we know what library
18680 # dependencies readline has. The test code will try to link with $LIBS.
18681 if test "$with_readline" = yes; then
18682 link_test_func=readline
18683 else
18684 link_test_func=exit
18687 if test "$PORTNAME" = "darwin"; then
18688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS" >&5
18689 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS... " >&6; }
18690 if ${pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs+:} false; then :
18691 $as_echo_n "(cached) " >&6
18692 else
18693 pgac_save_LDFLAGS=$LDFLAGS
18694 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
18695 if test "$cross_compiling" = yes; then :
18696 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs="assuming no"
18697 else
18698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18699 /* end confdefs.h. */
18700 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18702 main ()
18706 return 0;
18708 _ACEOF
18709 if ac_fn_c_try_run "$LINENO"; then :
18710 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=yes
18711 else
18712 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=no
18714 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18715 conftest.$ac_objext conftest.beam conftest.$ac_ext
18718 LDFLAGS="$pgac_save_LDFLAGS"
18720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&5
18721 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&6; }
18722 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" = x"yes"; then
18723 LDFLAGS="${LDFLAGS} -Wl,-dead_strip_dylibs"
18727 elif test "$PORTNAME" = "openbsd"; then
18728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS" >&5
18729 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS... " >&6; }
18730 if ${pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic+:} false; then :
18731 $as_echo_n "(cached) " >&6
18732 else
18733 pgac_save_LDFLAGS=$LDFLAGS
18734 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
18735 if test "$cross_compiling" = yes; then :
18736 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic="assuming no"
18737 else
18738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18739 /* end confdefs.h. */
18740 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18742 main ()
18746 return 0;
18748 _ACEOF
18749 if ac_fn_c_try_run "$LINENO"; then :
18750 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=yes
18751 else
18752 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=no
18754 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18755 conftest.$ac_objext conftest.beam conftest.$ac_ext
18758 LDFLAGS="$pgac_save_LDFLAGS"
18760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&5
18761 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&6; }
18762 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" = x"yes"; then
18763 LDFLAGS="${LDFLAGS} -Wl,-Bdynamic"
18767 else
18768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed, for LDFLAGS" >&5
18769 $as_echo_n "checking whether $CC supports -Wl,--as-needed, for LDFLAGS... " >&6; }
18770 if ${pgac_cv_prog_cc_LDFLAGS__Wl___as_needed+:} false; then :
18771 $as_echo_n "(cached) " >&6
18772 else
18773 pgac_save_LDFLAGS=$LDFLAGS
18774 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
18775 if test "$cross_compiling" = yes; then :
18776 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed="assuming no"
18777 else
18778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18779 /* end confdefs.h. */
18780 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18782 main ()
18786 return 0;
18788 _ACEOF
18789 if ac_fn_c_try_run "$LINENO"; then :
18790 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=yes
18791 else
18792 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=no
18794 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18795 conftest.$ac_objext conftest.beam conftest.$ac_ext
18798 LDFLAGS="$pgac_save_LDFLAGS"
18800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&5
18801 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&6; }
18802 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" = x"yes"; then
18803 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
18809 # For linkers that understand --export-dynamic, add that to the LDFLAGS_EX_BE
18810 # (backend specific ldflags). One some platforms this will always fail (e.g.,
18811 # windows), but on others it depends on the choice of linker (e.g., solaris).
18812 # macOS uses -export_dynamic instead. (On macOS, the option is only
18813 # needed when also using -flto, but we add it anyway since it's
18814 # harmless.)
18815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE" >&5
18816 $as_echo_n "checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE... " >&6; }
18817 if ${pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic+:} false; then :
18818 $as_echo_n "(cached) " >&6
18819 else
18820 pgac_save_LDFLAGS=$LDFLAGS
18821 LDFLAGS="$pgac_save_LDFLAGS -Wl,--export-dynamic"
18822 if test "$cross_compiling" = yes; then :
18823 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic="assuming no"
18824 else
18825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18826 /* end confdefs.h. */
18827 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18829 main ()
18833 return 0;
18835 _ACEOF
18836 if ac_fn_c_try_run "$LINENO"; then :
18837 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=yes
18838 else
18839 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=no
18841 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18842 conftest.$ac_objext conftest.beam conftest.$ac_ext
18845 LDFLAGS="$pgac_save_LDFLAGS"
18847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&5
18848 $as_echo "$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&6; }
18849 if test x"$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" = x"yes"; then
18850 LDFLAGS_EX_BE="${LDFLAGS_EX_BE} -Wl,--export-dynamic"
18853 if test x"$LDFLAGS_EX_BE" = x""; then
18854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-export_dynamic, for LDFLAGS_EX_BE" >&5
18855 $as_echo_n "checking whether $CC supports -Wl,-export_dynamic, for LDFLAGS_EX_BE... " >&6; }
18856 if ${pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic+:} false; then :
18857 $as_echo_n "(cached) " >&6
18858 else
18859 pgac_save_LDFLAGS=$LDFLAGS
18860 LDFLAGS="$pgac_save_LDFLAGS -Wl,-export_dynamic"
18861 if test "$cross_compiling" = yes; then :
18862 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic="assuming no"
18863 else
18864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18865 /* end confdefs.h. */
18866 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18868 main ()
18872 return 0;
18874 _ACEOF
18875 if ac_fn_c_try_run "$LINENO"; then :
18876 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic=yes
18877 else
18878 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic=no
18880 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18881 conftest.$ac_objext conftest.beam conftest.$ac_ext
18884 LDFLAGS="$pgac_save_LDFLAGS"
18886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic" >&5
18887 $as_echo "$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic" >&6; }
18888 if test x"$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic" = x"yes"; then
18889 LDFLAGS_EX_BE="${LDFLAGS_EX_BE} -Wl,-export_dynamic"
18895 # Create compiler version string
18896 if test x"$GCC" = x"yes" ; then
18897 cc_string=`${CC} --version | sed q`
18898 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
18899 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
18900 cc_string=`${CC} -V 2>&1 | sed q`
18901 else
18902 cc_string=$CC
18906 cat >>confdefs.h <<_ACEOF
18907 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
18908 _ACEOF
18911 # Supply a numeric version string for use by 3rd party add-ons
18912 # awk -F is a regex on some platforms, and not on others, so make "." a tab
18913 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
18914 $AWK '{printf "%d%04d", $1, $2}'`"
18916 cat >>confdefs.h <<_ACEOF
18917 #define PG_VERSION_NUM $PG_VERSION_NUM
18918 _ACEOF
18922 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
18923 # literally, so that it's possible to override it at build time using
18924 # a command like "make ... PG_SYSROOT=path". This has to be done after
18925 # we've finished all configure checks that depend on CPPFLAGS.
18926 # The same for LDFLAGS, too.
18927 if test x"$PG_SYSROOT" != x; then
18928 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
18929 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
18934 # Begin output steps
18936 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
18937 $as_echo "$as_me: using compiler=$cc_string" >&6;}
18938 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
18939 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
18940 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
18941 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
18942 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
18943 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
18944 # Currently only used when LLVM is used
18945 if test "$with_llvm" = yes ; then
18946 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
18947 $as_echo "$as_me: using CXX=$CXX" >&6;}
18948 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
18949 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
18950 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
18951 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
18952 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
18953 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
18954 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
18955 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
18958 # prepare build tree if outside source tree
18959 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
18960 # Note 2: /bin/pwd might be better than shell's built-in at getting
18961 # a symlink-free name.
18962 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
18963 vpath_build=no
18964 else
18965 vpath_build=yes
18966 if test "$no_create" != yes; then
18967 $as_echo_n "preparing build tree... " >&6
18968 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
18969 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
18970 || as_fn_error $? "failed" "$LINENO" 5
18971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
18972 $as_echo "done" >&6; }
18978 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
18981 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}"
18984 if test "$PORTNAME" = "win32"; then
18985 ac_config_commands="$ac_config_commands check_win32_symlinks"
18989 ac_config_headers="$ac_config_headers src/include/pg_config.h"
18992 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
18995 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
18998 cat >confcache <<\_ACEOF
18999 # This file is a shell script that caches the results of configure
19000 # tests run on this system so they can be shared between configure
19001 # scripts and configure runs, see configure's option --config-cache.
19002 # It is not useful on other systems. If it contains results you don't
19003 # want to keep, you may remove or edit it.
19005 # config.status only pays attention to the cache file if you give it
19006 # the --recheck option to rerun configure.
19008 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19009 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19010 # following values.
19012 _ACEOF
19014 # The following way of writing the cache mishandles newlines in values,
19015 # but we know of no workaround that is simple, portable, and efficient.
19016 # So, we kill variables containing newlines.
19017 # Ultrix sh set writes to stderr and can't be redirected directly,
19018 # and sets the high bit in the cache file unless we assign to the vars.
19020 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19021 eval ac_val=\$$ac_var
19022 case $ac_val in #(
19023 *${as_nl}*)
19024 case $ac_var in #(
19025 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19026 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19027 esac
19028 case $ac_var in #(
19029 _ | IFS | as_nl) ;; #(
19030 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19031 *) { eval $ac_var=; unset $ac_var;} ;;
19032 esac ;;
19033 esac
19034 done
19036 (set) 2>&1 |
19037 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19038 *${as_nl}ac_space=\ *)
19039 # `set' does not quote correctly, so add quotes: double-quote
19040 # substitution turns \\\\ into \\, and sed turns \\ into \.
19041 sed -n \
19042 "s/'/'\\\\''/g;
19043 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19044 ;; #(
19046 # `set' quotes correctly as required by POSIX, so do not add quotes.
19047 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19049 esac |
19050 sort
19052 sed '
19053 /^ac_cv_env_/b end
19054 t clear
19055 :clear
19056 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19057 t end
19058 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19059 :end' >>confcache
19060 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19061 if test -w "$cache_file"; then
19062 if test "x$cache_file" != "x/dev/null"; then
19063 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19064 $as_echo "$as_me: updating cache $cache_file" >&6;}
19065 if test ! -f "$cache_file" || test -h "$cache_file"; then
19066 cat confcache >"$cache_file"
19067 else
19068 case $cache_file in #(
19069 */* | ?:*)
19070 mv -f confcache "$cache_file"$$ &&
19071 mv -f "$cache_file"$$ "$cache_file" ;; #(
19073 mv -f confcache "$cache_file" ;;
19074 esac
19077 else
19078 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19079 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19082 rm -f confcache
19084 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19085 # Let make expand exec_prefix.
19086 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19088 DEFS=-DHAVE_CONFIG_H
19090 ac_libobjs=
19091 ac_ltlibobjs=
19093 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19094 # 1. Remove the extension, and $U if already installed.
19095 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19096 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19097 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19098 # will be set to the directory where LIBOBJS objects are built.
19099 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19100 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19101 done
19102 LIBOBJS=$ac_libobjs
19104 LTLIBOBJS=$ac_ltlibobjs
19109 : "${CONFIG_STATUS=./config.status}"
19110 ac_write_fail=0
19111 ac_clean_files_save=$ac_clean_files
19112 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19113 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19114 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19115 as_write_fail=0
19116 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19117 #! $SHELL
19118 # Generated by $as_me.
19119 # Run this file to recreate the current configuration.
19120 # Compiler output produced by configure, useful for debugging
19121 # configure, is in config.log if it exists.
19123 debug=false
19124 ac_cs_recheck=false
19125 ac_cs_silent=false
19127 SHELL=\${CONFIG_SHELL-$SHELL}
19128 export SHELL
19129 _ASEOF
19130 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19131 ## -------------------- ##
19132 ## M4sh Initialization. ##
19133 ## -------------------- ##
19135 # Be more Bourne compatible
19136 DUALCASE=1; export DUALCASE # for MKS sh
19137 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19138 emulate sh
19139 NULLCMD=:
19140 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19141 # is contrary to our usage. Disable this feature.
19142 alias -g '${1+"$@"}'='"$@"'
19143 setopt NO_GLOB_SUBST
19144 else
19145 case `(set -o) 2>/dev/null` in #(
19146 *posix*) :
19147 set -o posix ;; #(
19148 *) :
19150 esac
19154 as_nl='
19156 export as_nl
19157 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19158 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19159 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19160 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19161 # Prefer a ksh shell builtin over an external printf program on Solaris,
19162 # but without wasting forks for bash or zsh.
19163 if test -z "$BASH_VERSION$ZSH_VERSION" \
19164 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19165 as_echo='print -r --'
19166 as_echo_n='print -rn --'
19167 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19168 as_echo='printf %s\n'
19169 as_echo_n='printf %s'
19170 else
19171 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19172 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19173 as_echo_n='/usr/ucb/echo -n'
19174 else
19175 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19176 as_echo_n_body='eval
19177 arg=$1;
19178 case $arg in #(
19179 *"$as_nl"*)
19180 expr "X$arg" : "X\\(.*\\)$as_nl";
19181 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19182 esac;
19183 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19185 export as_echo_n_body
19186 as_echo_n='sh -c $as_echo_n_body as_echo'
19188 export as_echo_body
19189 as_echo='sh -c $as_echo_body as_echo'
19192 # The user is always right.
19193 if test "${PATH_SEPARATOR+set}" != set; then
19194 PATH_SEPARATOR=:
19195 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19196 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19197 PATH_SEPARATOR=';'
19202 # IFS
19203 # We need space, tab and new line, in precisely that order. Quoting is
19204 # there to prevent editors from complaining about space-tab.
19205 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19206 # splitting by setting IFS to empty value.)
19207 IFS=" "" $as_nl"
19209 # Find who we are. Look in the path if we contain no directory separator.
19210 as_myself=
19211 case $0 in #((
19212 *[\\/]* ) as_myself=$0 ;;
19213 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19214 for as_dir in $PATH
19216 IFS=$as_save_IFS
19217 test -z "$as_dir" && as_dir=.
19218 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19219 done
19220 IFS=$as_save_IFS
19223 esac
19224 # We did not find ourselves, most probably we were run as `sh COMMAND'
19225 # in which case we are not to be found in the path.
19226 if test "x$as_myself" = x; then
19227 as_myself=$0
19229 if test ! -f "$as_myself"; then
19230 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19231 exit 1
19234 # Unset variables that we do not need and which cause bugs (e.g. in
19235 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19236 # suppresses any "Segmentation fault" message there. '((' could
19237 # trigger a bug in pdksh 5.2.14.
19238 for as_var in BASH_ENV ENV MAIL MAILPATH
19239 do eval test x\${$as_var+set} = xset \
19240 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19241 done
19242 PS1='$ '
19243 PS2='> '
19244 PS4='+ '
19246 # NLS nuisances.
19247 LC_ALL=C
19248 export LC_ALL
19249 LANGUAGE=C
19250 export LANGUAGE
19252 # CDPATH.
19253 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19256 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19257 # ----------------------------------------
19258 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19259 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19260 # script with STATUS, using 1 if that was 0.
19261 as_fn_error ()
19263 as_status=$1; test $as_status -eq 0 && as_status=1
19264 if test "$4"; then
19265 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19266 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19268 $as_echo "$as_me: error: $2" >&2
19269 as_fn_exit $as_status
19270 } # as_fn_error
19273 # as_fn_set_status STATUS
19274 # -----------------------
19275 # Set $? to STATUS, without forking.
19276 as_fn_set_status ()
19278 return $1
19279 } # as_fn_set_status
19281 # as_fn_exit STATUS
19282 # -----------------
19283 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19284 as_fn_exit ()
19286 set +e
19287 as_fn_set_status $1
19288 exit $1
19289 } # as_fn_exit
19291 # as_fn_unset VAR
19292 # ---------------
19293 # Portably unset VAR.
19294 as_fn_unset ()
19296 { eval $1=; unset $1;}
19298 as_unset=as_fn_unset
19299 # as_fn_append VAR VALUE
19300 # ----------------------
19301 # Append the text in VALUE to the end of the definition contained in VAR. Take
19302 # advantage of any shell optimizations that allow amortized linear growth over
19303 # repeated appends, instead of the typical quadratic growth present in naive
19304 # implementations.
19305 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19306 eval 'as_fn_append ()
19308 eval $1+=\$2
19310 else
19311 as_fn_append ()
19313 eval $1=\$$1\$2
19315 fi # as_fn_append
19317 # as_fn_arith ARG...
19318 # ------------------
19319 # Perform arithmetic evaluation on the ARGs, and store the result in the
19320 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19321 # must be portable across $(()) and expr.
19322 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19323 eval 'as_fn_arith ()
19325 as_val=$(( $* ))
19327 else
19328 as_fn_arith ()
19330 as_val=`expr "$@" || test $? -eq 1`
19332 fi # as_fn_arith
19335 if expr a : '\(a\)' >/dev/null 2>&1 &&
19336 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19337 as_expr=expr
19338 else
19339 as_expr=false
19342 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19343 as_basename=basename
19344 else
19345 as_basename=false
19348 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19349 as_dirname=dirname
19350 else
19351 as_dirname=false
19354 as_me=`$as_basename -- "$0" ||
19355 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19356 X"$0" : 'X\(//\)$' \| \
19357 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19358 $as_echo X/"$0" |
19359 sed '/^.*\/\([^/][^/]*\)\/*$/{
19360 s//\1/
19363 /^X\/\(\/\/\)$/{
19364 s//\1/
19367 /^X\/\(\/\).*/{
19368 s//\1/
19371 s/.*/./; q'`
19373 # Avoid depending upon Character Ranges.
19374 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19375 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19376 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19377 as_cr_digits='0123456789'
19378 as_cr_alnum=$as_cr_Letters$as_cr_digits
19380 ECHO_C= ECHO_N= ECHO_T=
19381 case `echo -n x` in #(((((
19382 -n*)
19383 case `echo 'xy\c'` in
19384 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19385 xy) ECHO_C='\c';;
19386 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19387 ECHO_T=' ';;
19388 esac;;
19390 ECHO_N='-n';;
19391 esac
19393 rm -f conf$$ conf$$.exe conf$$.file
19394 if test -d conf$$.dir; then
19395 rm -f conf$$.dir/conf$$.file
19396 else
19397 rm -f conf$$.dir
19398 mkdir conf$$.dir 2>/dev/null
19400 if (echo >conf$$.file) 2>/dev/null; then
19401 if ln -s conf$$.file conf$$ 2>/dev/null; then
19402 as_ln_s='ln -s'
19403 # ... but there are two gotchas:
19404 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19405 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19406 # In both cases, we have to default to `cp -pR'.
19407 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19408 as_ln_s='cp -pR'
19409 elif ln conf$$.file conf$$ 2>/dev/null; then
19410 as_ln_s=ln
19411 else
19412 as_ln_s='cp -pR'
19414 else
19415 as_ln_s='cp -pR'
19417 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19418 rmdir conf$$.dir 2>/dev/null
19421 # as_fn_mkdir_p
19422 # -------------
19423 # Create "$as_dir" as a directory, including parents if necessary.
19424 as_fn_mkdir_p ()
19427 case $as_dir in #(
19428 -*) as_dir=./$as_dir;;
19429 esac
19430 test -d "$as_dir" || eval $as_mkdir_p || {
19431 as_dirs=
19432 while :; do
19433 case $as_dir in #(
19434 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19435 *) as_qdir=$as_dir;;
19436 esac
19437 as_dirs="'$as_qdir' $as_dirs"
19438 as_dir=`$as_dirname -- "$as_dir" ||
19439 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19440 X"$as_dir" : 'X\(//\)[^/]' \| \
19441 X"$as_dir" : 'X\(//\)$' \| \
19442 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19443 $as_echo X"$as_dir" |
19444 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19445 s//\1/
19448 /^X\(\/\/\)[^/].*/{
19449 s//\1/
19452 /^X\(\/\/\)$/{
19453 s//\1/
19456 /^X\(\/\).*/{
19457 s//\1/
19460 s/.*/./; q'`
19461 test -d "$as_dir" && break
19462 done
19463 test -z "$as_dirs" || eval "mkdir $as_dirs"
19464 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19467 } # as_fn_mkdir_p
19468 if mkdir -p . 2>/dev/null; then
19469 as_mkdir_p='mkdir -p "$as_dir"'
19470 else
19471 test -d ./-p && rmdir ./-p
19472 as_mkdir_p=false
19476 # as_fn_executable_p FILE
19477 # -----------------------
19478 # Test if FILE is an executable regular file.
19479 as_fn_executable_p ()
19481 test -f "$1" && test -x "$1"
19482 } # as_fn_executable_p
19483 as_test_x='test -x'
19484 as_executable_p=as_fn_executable_p
19486 # Sed expression to map a string onto a valid CPP name.
19487 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19489 # Sed expression to map a string onto a valid variable name.
19490 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19493 exec 6>&1
19494 ## ----------------------------------- ##
19495 ## Main body of $CONFIG_STATUS script. ##
19496 ## ----------------------------------- ##
19497 _ASEOF
19498 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19500 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19501 # Save the log message, to keep $0 and so on meaningful, and to
19502 # report actual input values of CONFIG_FILES etc. instead of their
19503 # values after options handling.
19504 ac_log="
19505 This file was extended by PostgreSQL $as_me 18devel, which was
19506 generated by GNU Autoconf 2.69. Invocation command line was
19508 CONFIG_FILES = $CONFIG_FILES
19509 CONFIG_HEADERS = $CONFIG_HEADERS
19510 CONFIG_LINKS = $CONFIG_LINKS
19511 CONFIG_COMMANDS = $CONFIG_COMMANDS
19512 $ $0 $@
19514 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19517 _ACEOF
19519 case $ac_config_files in *"
19520 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19521 esac
19523 case $ac_config_headers in *"
19524 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19525 esac
19528 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19529 # Files that config.status was made for.
19530 config_files="$ac_config_files"
19531 config_headers="$ac_config_headers"
19532 config_links="$ac_config_links"
19533 config_commands="$ac_config_commands"
19535 _ACEOF
19537 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19538 ac_cs_usage="\
19539 \`$as_me' instantiates files and other configuration actions
19540 from templates according to the current configuration. Unless the files
19541 and actions are specified as TAGs, all are instantiated by default.
19543 Usage: $0 [OPTION]... [TAG]...
19545 -h, --help print this help, then exit
19546 -V, --version print version number and configuration settings, then exit
19547 --config print configuration, then exit
19548 -q, --quiet, --silent
19549 do not print progress messages
19550 -d, --debug don't remove temporary files
19551 --recheck update $as_me by reconfiguring in the same conditions
19552 --file=FILE[:TEMPLATE]
19553 instantiate the configuration file FILE
19554 --header=FILE[:TEMPLATE]
19555 instantiate the configuration header FILE
19557 Configuration files:
19558 $config_files
19560 Configuration headers:
19561 $config_headers
19563 Configuration links:
19564 $config_links
19566 Configuration commands:
19567 $config_commands
19569 Report bugs to <pgsql-bugs@lists.postgresql.org>.
19570 PostgreSQL home page: <https://www.postgresql.org/>."
19572 _ACEOF
19573 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19574 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19575 ac_cs_version="\\
19576 PostgreSQL config.status 18devel
19577 configured by $0, generated by GNU Autoconf 2.69,
19578 with options \\"\$ac_cs_config\\"
19580 Copyright (C) 2012 Free Software Foundation, Inc.
19581 This config.status script is free software; the Free Software Foundation
19582 gives unlimited permission to copy, distribute and modify it."
19584 ac_pwd='$ac_pwd'
19585 srcdir='$srcdir'
19586 INSTALL='$INSTALL'
19587 MKDIR_P='$MKDIR_P'
19588 AWK='$AWK'
19589 test -n "\$AWK" || AWK=awk
19590 _ACEOF
19592 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19593 # The default lists apply if the user does not specify any file.
19594 ac_need_defaults=:
19595 while test $# != 0
19597 case $1 in
19598 --*=?*)
19599 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19600 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19601 ac_shift=:
19603 --*=)
19604 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19605 ac_optarg=
19606 ac_shift=:
19609 ac_option=$1
19610 ac_optarg=$2
19611 ac_shift=shift
19613 esac
19615 case $ac_option in
19616 # Handling of the options.
19617 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19618 ac_cs_recheck=: ;;
19619 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19620 $as_echo "$ac_cs_version"; exit ;;
19621 --config | --confi | --conf | --con | --co | --c )
19622 $as_echo "$ac_cs_config"; exit ;;
19623 --debug | --debu | --deb | --de | --d | -d )
19624 debug=: ;;
19625 --file | --fil | --fi | --f )
19626 $ac_shift
19627 case $ac_optarg in
19628 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19629 '') as_fn_error $? "missing file argument" ;;
19630 esac
19631 as_fn_append CONFIG_FILES " '$ac_optarg'"
19632 ac_need_defaults=false;;
19633 --header | --heade | --head | --hea )
19634 $ac_shift
19635 case $ac_optarg in
19636 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19637 esac
19638 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19639 ac_need_defaults=false;;
19640 --he | --h)
19641 # Conflict between --help and --header
19642 as_fn_error $? "ambiguous option: \`$1'
19643 Try \`$0 --help' for more information.";;
19644 --help | --hel | -h )
19645 $as_echo "$ac_cs_usage"; exit ;;
19646 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19647 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19648 ac_cs_silent=: ;;
19650 # This is an error.
19651 -*) as_fn_error $? "unrecognized option: \`$1'
19652 Try \`$0 --help' for more information." ;;
19654 *) as_fn_append ac_config_targets " $1"
19655 ac_need_defaults=false ;;
19657 esac
19658 shift
19659 done
19661 ac_configure_extra_args=
19663 if $ac_cs_silent; then
19664 exec 6>/dev/null
19665 ac_configure_extra_args="$ac_configure_extra_args --silent"
19668 _ACEOF
19669 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19670 if \$ac_cs_recheck; then
19671 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19672 shift
19673 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19674 CONFIG_SHELL='$SHELL'
19675 export CONFIG_SHELL
19676 exec "\$@"
19679 _ACEOF
19680 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19681 exec 5>>config.log
19683 echo
19684 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19685 ## Running $as_me. ##
19686 _ASBOX
19687 $as_echo "$ac_log"
19688 } >&5
19690 _ACEOF
19691 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19692 _ACEOF
19694 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19696 # Handling of arguments.
19697 for ac_config_target in $ac_config_targets
19699 case $ac_config_target in
19700 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19701 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19702 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19703 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19704 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19705 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19706 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19707 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19708 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19709 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19710 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19712 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19713 esac
19714 done
19717 # If the user did not use the arguments to specify the items to instantiate,
19718 # then the envvar interface is used. Set only those that are not.
19719 # We use the long form for the default assignment because of an extremely
19720 # bizarre bug on SunOS 4.1.3.
19721 if $ac_need_defaults; then
19722 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19723 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19724 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19725 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19728 # Have a temporary directory for convenience. Make it in the build tree
19729 # simply because there is no reason against having it here, and in addition,
19730 # creating and moving files from /tmp can sometimes cause problems.
19731 # Hook for its removal unless debugging.
19732 # Note that there is a small window in which the directory will not be cleaned:
19733 # after its creation but before its name has been assigned to `$tmp'.
19734 $debug ||
19736 tmp= ac_tmp=
19737 trap 'exit_status=$?
19738 : "${ac_tmp:=$tmp}"
19739 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19741 trap 'as_fn_exit 1' 1 2 13 15
19743 # Create a (secure) tmp directory for tmp files.
19746 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19747 test -d "$tmp"
19748 } ||
19750 tmp=./conf$$-$RANDOM
19751 (umask 077 && mkdir "$tmp")
19752 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19753 ac_tmp=$tmp
19755 # Set up the scripts for CONFIG_FILES section.
19756 # No need to generate them if there are no CONFIG_FILES.
19757 # This happens for instance with `./config.status config.h'.
19758 if test -n "$CONFIG_FILES"; then
19761 ac_cr=`echo X | tr X '\015'`
19762 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19763 # But we know of no other shell where ac_cr would be empty at this
19764 # point, so we can use a bashism as a fallback.
19765 if test "x$ac_cr" = x; then
19766 eval ac_cr=\$\'\\r\'
19768 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19769 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19770 ac_cs_awk_cr='\\r'
19771 else
19772 ac_cs_awk_cr=$ac_cr
19775 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19776 _ACEOF
19780 echo "cat >conf$$subs.awk <<_ACEOF" &&
19781 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19782 echo "_ACEOF"
19783 } >conf$$subs.sh ||
19784 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19785 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19786 ac_delim='%!_!# '
19787 for ac_last_try in false false false false false :; do
19788 . ./conf$$subs.sh ||
19789 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19791 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19792 if test $ac_delim_n = $ac_delim_num; then
19793 break
19794 elif $ac_last_try; then
19795 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19796 else
19797 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19799 done
19800 rm -f conf$$subs.sh
19802 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19803 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19804 _ACEOF
19805 sed -n '
19807 s/^/S["/; s/!.*/"]=/
19810 s/^[^!]*!//
19811 :repl
19812 t repl
19813 s/'"$ac_delim"'$//
19814 t delim
19817 s/\(.\{148\}\)..*/\1/
19818 t more1
19819 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19822 b repl
19823 :more1
19824 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19827 s/.\{148\}//
19828 t nl
19829 :delim
19831 s/\(.\{148\}\)..*/\1/
19832 t more2
19833 s/["\\]/\\&/g; s/^/"/; s/$/"/
19836 :more2
19837 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19840 s/.\{148\}//
19841 t delim
19842 ' <conf$$subs.awk | sed '
19843 /^[^""]/{
19845 s/\n//
19847 ' >>$CONFIG_STATUS || ac_write_fail=1
19848 rm -f conf$$subs.awk
19849 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19850 _ACAWK
19851 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19852 for (key in S) S_is_set[key] = 1
19853 FS = "\a"
19857 line = $ 0
19858 nfields = split(line, field, "@")
19859 substed = 0
19860 len = length(field[1])
19861 for (i = 2; i < nfields; i++) {
19862 key = field[i]
19863 keylen = length(key)
19864 if (S_is_set[key]) {
19865 value = S[key]
19866 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19867 len += length(value) + length(field[++i])
19868 substed = 1
19869 } else
19870 len += 1 + keylen
19873 print line
19876 _ACAWK
19877 _ACEOF
19878 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19879 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19880 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19881 else
19883 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19884 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19885 _ACEOF
19887 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19888 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19889 # trailing colons and then remove the whole line if VPATH becomes empty
19890 # (actually we leave an empty line to preserve line numbers).
19891 if test "x$srcdir" = x.; then
19892 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
19894 s///
19895 s/^/:/
19896 s/[ ]*$/:/
19897 s/:\$(srcdir):/:/g
19898 s/:\${srcdir}:/:/g
19899 s/:@srcdir@:/:/g
19900 s/^:*//
19901 s/:*$//
19903 s/\(=[ ]*\).*/\1/
19905 s/\n//
19906 s/^[^=]*=[ ]*$//
19910 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19911 fi # test -n "$CONFIG_FILES"
19913 # Set up the scripts for CONFIG_HEADERS section.
19914 # No need to generate them if there are no CONFIG_HEADERS.
19915 # This happens for instance with `./config.status Makefile'.
19916 if test -n "$CONFIG_HEADERS"; then
19917 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19918 BEGIN {
19919 _ACEOF
19921 # Transform confdefs.h into an awk script `defines.awk', embedded as
19922 # here-document in config.status, that substitutes the proper values into
19923 # config.h.in to produce config.h.
19925 # Create a delimiter string that does not exist in confdefs.h, to ease
19926 # handling of long lines.
19927 ac_delim='%!_!# '
19928 for ac_last_try in false false :; do
19929 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19930 if test -z "$ac_tt"; then
19931 break
19932 elif $ac_last_try; then
19933 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
19934 else
19935 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19937 done
19939 # For the awk script, D is an array of macro values keyed by name,
19940 # likewise P contains macro parameters if any. Preserve backslash
19941 # newline sequences.
19943 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19944 sed -n '
19945 s/.\{148\}/&'"$ac_delim"'/g
19946 t rset
19947 :rset
19948 s/^[ ]*#[ ]*define[ ][ ]*/ /
19949 t def
19951 :def
19952 s/\\$//
19953 t bsnl
19954 s/["\\]/\\&/g
19955 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19956 D["\1"]=" \3"/p
19957 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
19959 :bsnl
19960 s/["\\]/\\&/g
19961 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19962 D["\1"]=" \3\\\\\\n"\\/p
19963 t cont
19964 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19965 t cont
19967 :cont
19969 s/.\{148\}/&'"$ac_delim"'/g
19970 t clear
19971 :clear
19972 s/\\$//
19973 t bsnlc
19974 s/["\\]/\\&/g; s/^/"/; s/$/"/p
19976 :bsnlc
19977 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
19978 b cont
19979 ' <confdefs.h | sed '
19980 s/'"$ac_delim"'/"\\\
19981 "/g' >>$CONFIG_STATUS || ac_write_fail=1
19983 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19984 for (key in D) D_is_set[key] = 1
19985 FS = "\a"
19987 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
19988 line = \$ 0
19989 split(line, arg, " ")
19990 if (arg[1] == "#") {
19991 defundef = arg[2]
19992 mac1 = arg[3]
19993 } else {
19994 defundef = substr(arg[1], 2)
19995 mac1 = arg[2]
19997 split(mac1, mac2, "(") #)
19998 macro = mac2[1]
19999 prefix = substr(line, 1, index(line, defundef) - 1)
20000 if (D_is_set[macro]) {
20001 # Preserve the white space surrounding the "#".
20002 print prefix "define", macro P[macro] D[macro]
20003 next
20004 } else {
20005 # Replace #undef with comments. This is necessary, for example,
20006 # in the case of _POSIX_SOURCE, which is predefined and required
20007 # on some systems where configure will not decide to define it.
20008 if (defundef == "undef") {
20009 print "/*", prefix defundef, macro, "*/"
20010 next
20014 { print }
20015 _ACAWK
20016 _ACEOF
20017 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20018 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20019 fi # test -n "$CONFIG_HEADERS"
20022 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20023 shift
20024 for ac_tag
20026 case $ac_tag in
20027 :[FHLC]) ac_mode=$ac_tag; continue;;
20028 esac
20029 case $ac_mode$ac_tag in
20030 :[FHL]*:*);;
20031 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20032 :[FH]-) ac_tag=-:-;;
20033 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20034 esac
20035 ac_save_IFS=$IFS
20036 IFS=:
20037 set x $ac_tag
20038 IFS=$ac_save_IFS
20039 shift
20040 ac_file=$1
20041 shift
20043 case $ac_mode in
20044 :L) ac_source=$1;;
20045 :[FH])
20046 ac_file_inputs=
20047 for ac_f
20049 case $ac_f in
20050 -) ac_f="$ac_tmp/stdin";;
20051 *) # Look for the file first in the build tree, then in the source tree
20052 # (if the path is not absolute). The absolute path cannot be DOS-style,
20053 # because $ac_f cannot contain `:'.
20054 test -f "$ac_f" ||
20055 case $ac_f in
20056 [\\/$]*) false;;
20057 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20058 esac ||
20059 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20060 esac
20061 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20062 as_fn_append ac_file_inputs " '$ac_f'"
20063 done
20065 # Let's still pretend it is `configure' which instantiates (i.e., don't
20066 # use $as_me), people would be surprised to read:
20067 # /* config.h. Generated by config.status. */
20068 configure_input='Generated from '`
20069 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20070 `' by configure.'
20071 if test x"$ac_file" != x-; then
20072 configure_input="$ac_file. $configure_input"
20073 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20074 $as_echo "$as_me: creating $ac_file" >&6;}
20076 # Neutralize special characters interpreted by sed in replacement strings.
20077 case $configure_input in #(
20078 *\&* | *\|* | *\\* )
20079 ac_sed_conf_input=`$as_echo "$configure_input" |
20080 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20081 *) ac_sed_conf_input=$configure_input;;
20082 esac
20084 case $ac_tag in
20085 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20086 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20087 esac
20089 esac
20091 ac_dir=`$as_dirname -- "$ac_file" ||
20092 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20093 X"$ac_file" : 'X\(//\)[^/]' \| \
20094 X"$ac_file" : 'X\(//\)$' \| \
20095 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20096 $as_echo X"$ac_file" |
20097 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20098 s//\1/
20101 /^X\(\/\/\)[^/].*/{
20102 s//\1/
20105 /^X\(\/\/\)$/{
20106 s//\1/
20109 /^X\(\/\).*/{
20110 s//\1/
20113 s/.*/./; q'`
20114 as_dir="$ac_dir"; as_fn_mkdir_p
20115 ac_builddir=.
20117 case "$ac_dir" in
20118 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20120 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20121 # A ".." for each directory in $ac_dir_suffix.
20122 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20123 case $ac_top_builddir_sub in
20124 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20125 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20126 esac ;;
20127 esac
20128 ac_abs_top_builddir=$ac_pwd
20129 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20130 # for backward compatibility:
20131 ac_top_builddir=$ac_top_build_prefix
20133 case $srcdir in
20134 .) # We are building in place.
20135 ac_srcdir=.
20136 ac_top_srcdir=$ac_top_builddir_sub
20137 ac_abs_top_srcdir=$ac_pwd ;;
20138 [\\/]* | ?:[\\/]* ) # Absolute name.
20139 ac_srcdir=$srcdir$ac_dir_suffix;
20140 ac_top_srcdir=$srcdir
20141 ac_abs_top_srcdir=$srcdir ;;
20142 *) # Relative name.
20143 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20144 ac_top_srcdir=$ac_top_build_prefix$srcdir
20145 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20146 esac
20147 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20150 case $ac_mode in
20153 # CONFIG_FILE
20156 case $INSTALL in
20157 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20158 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20159 esac
20160 ac_MKDIR_P=$MKDIR_P
20161 case $MKDIR_P in
20162 [\\/$]* | ?:[\\/]* ) ;;
20163 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20164 esac
20165 _ACEOF
20167 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20168 # If the template does not know about datarootdir, expand it.
20169 # FIXME: This hack should be removed a few years after 2.60.
20170 ac_datarootdir_hack=; ac_datarootdir_seen=
20171 ac_sed_dataroot='
20172 /datarootdir/ {
20176 /@datadir@/p
20177 /@docdir@/p
20178 /@infodir@/p
20179 /@localedir@/p
20180 /@mandir@/p'
20181 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20182 *datarootdir*) ac_datarootdir_seen=yes;;
20183 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20184 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20185 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20186 _ACEOF
20187 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20188 ac_datarootdir_hack='
20189 s&@datadir@&$datadir&g
20190 s&@docdir@&$docdir&g
20191 s&@infodir@&$infodir&g
20192 s&@localedir@&$localedir&g
20193 s&@mandir@&$mandir&g
20194 s&\\\${datarootdir}&$datarootdir&g' ;;
20195 esac
20196 _ACEOF
20198 # Neutralize VPATH when `$srcdir' = `.'.
20199 # Shell code in configure.ac might set extrasub.
20200 # FIXME: do we really want to maintain this feature?
20201 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20202 ac_sed_extra="$ac_vpsub
20203 $extrasub
20204 _ACEOF
20205 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20207 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20208 s|@configure_input@|$ac_sed_conf_input|;t t
20209 s&@top_builddir@&$ac_top_builddir_sub&;t t
20210 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20211 s&@srcdir@&$ac_srcdir&;t t
20212 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20213 s&@top_srcdir@&$ac_top_srcdir&;t t
20214 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20215 s&@builddir@&$ac_builddir&;t t
20216 s&@abs_builddir@&$ac_abs_builddir&;t t
20217 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20218 s&@INSTALL@&$ac_INSTALL&;t t
20219 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20220 $ac_datarootdir_hack
20222 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20223 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20225 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20226 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20227 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20228 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20229 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20230 which seems to be undefined. Please make sure it is defined" >&5
20231 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20232 which seems to be undefined. Please make sure it is defined" >&2;}
20234 rm -f "$ac_tmp/stdin"
20235 case $ac_file in
20236 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20237 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20238 esac \
20239 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20243 # CONFIG_HEADER
20245 if test x"$ac_file" != x-; then
20247 $as_echo "/* $configure_input */" \
20248 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20249 } >"$ac_tmp/config.h" \
20250 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20251 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20252 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20253 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20254 else
20255 rm -f "$ac_file"
20256 mv "$ac_tmp/config.h" "$ac_file" \
20257 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20259 else
20260 $as_echo "/* $configure_input */" \
20261 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20262 || as_fn_error $? "could not create -" "$LINENO" 5
20267 # CONFIG_LINK
20270 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20272 else
20273 # Prefer the file from the source tree if names are identical.
20274 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20275 ac_source=$srcdir/$ac_source
20278 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20279 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20281 if test ! -r "$ac_source"; then
20282 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20284 rm -f "$ac_file"
20286 # Try a relative symlink, then a hard link, then a copy.
20287 case $ac_source in
20288 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20289 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20290 esac
20291 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20292 ln "$ac_source" "$ac_file" 2>/dev/null ||
20293 cp -p "$ac_source" "$ac_file" ||
20294 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20297 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20298 $as_echo "$as_me: executing $ac_file commands" >&6;}
20300 esac
20303 case $ac_file$ac_mode in
20304 "check_win32_symlinks":C)
20305 # Links sometimes fail undetected on Mingw -
20306 # so here we detect it and warn the user
20307 for FILE in $CONFIG_LINKS
20309 # test -e works for symlinks in the MinGW console
20310 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20311 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20312 done
20314 "src/include/pg_config.h":H)
20315 # Update timestamp for pg_config.h (see Makefile.global)
20316 echo >src/include/stamp-h
20318 "src/include/pg_config_ext.h":H)
20319 # Update timestamp for pg_config_ext.h (see Makefile.global)
20320 echo >src/include/stamp-ext-h
20322 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20324 esac
20325 done # for ac_tag
20328 as_fn_exit 0
20329 _ACEOF
20330 ac_clean_files=$ac_clean_files_save
20332 test $ac_write_fail = 0 ||
20333 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20336 # configure is writing to config.log, and then calls config.status.
20337 # config.status does its own redirection, appending to config.log.
20338 # Unfortunately, on DOS this fails, as config.log is still kept open
20339 # by configure, so config.status won't be able to write to it; its
20340 # output is simply discarded. So we exec the FD to /dev/null,
20341 # effectively closing config.log, so it can be properly (re)opened and
20342 # appended to by config.status. When coming back to configure, we
20343 # need to make the FD available again.
20344 if test "$no_create" != yes; then
20345 ac_cs_success=:
20346 ac_config_status_args=
20347 test "$silent" = yes &&
20348 ac_config_status_args="$ac_config_status_args --quiet"
20349 exec 5>/dev/null
20350 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20351 exec 5>>config.log
20352 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20353 # would make configure fail if this is the last instruction.
20354 $ac_cs_success || as_fn_exit 1
20356 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20357 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20358 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20362 # Ensure that any meson build directories would reconfigure and see that
20363 # there's a conflicting in-tree build and can error out.
20364 if test "$vpath_build" = "no"; then
20365 touch meson.build