Fix obsolete nbtree page reuse FSM comment.
[pgsql.git] / configure
blob4b01b682b15e621ed75719988e4694faaea7d603
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 INCLUDES
726 autodepend
727 PKG_CONFIG_LIBDIR
728 PKG_CONFIG_PATH
729 PKG_CONFIG
730 DLSUFFIX
734 CFLAGS_SL
735 BITCODE_CXXFLAGS
736 BITCODE_CFLAGS
737 CXXFLAGS_SL_MODULE
738 CFLAGS_SL_MODULE
739 CFLAGS_VECTORIZE
740 CFLAGS_UNROLL_LOOPS
741 PERMIT_MISSING_VARIABLE_DECLARATIONS
742 PERMIT_DECLARATION_AFTER_STATEMENT
743 LLVM_BINPATH
744 LLVM_CXXFLAGS
745 LLVM_CFLAGS
746 LLVM_CPPFLAGS
747 LLVM_LIBS
748 CLANG
749 LLVM_CONFIG
751 with_llvm
752 SUN_STUDIO_CC
753 ac_ct_CXX
754 CXXFLAGS
756 OBJEXT
757 EXEEXT
758 ac_ct_CC
759 CPPFLAGS
760 LDFLAGS
761 CFLAGS
763 enable_injection_points
764 PG_TEST_EXTRA
765 enable_tap_tests
766 enable_dtrace
767 DTRACEFLAGS
768 DTRACE
769 enable_coverage
770 GENHTML
771 LCOV
772 GCOV
773 enable_debug
774 enable_rpath
775 default_port
776 WANTED_LANGUAGES
777 enable_nls
778 PORTNAME
779 host_os
780 host_vendor
781 host_cpu
782 host
783 build_os
784 build_vendor
785 build_cpu
786 build
787 PG_MAJORVERSION
788 target_alias
789 host_alias
790 build_alias
791 LIBS
792 ECHO_T
793 ECHO_N
794 ECHO_C
795 DEFS
796 mandir
797 localedir
798 libdir
799 psdir
800 pdfdir
801 dvidir
802 htmldir
803 infodir
804 docdir
805 oldincludedir
806 includedir
807 localstatedir
808 sharedstatedir
809 sysconfdir
810 datadir
811 datarootdir
812 libexecdir
813 sbindir
814 bindir
815 program_transform_name
816 prefix
817 exec_prefix
818 PACKAGE_URL
819 PACKAGE_BUGREPORT
820 PACKAGE_STRING
821 PACKAGE_VERSION
822 PACKAGE_TARNAME
823 PACKAGE_NAME
824 PATH_SEPARATOR
825 SHELL'
826 ac_subst_files=''
827 ac_user_opts='
828 enable_option_checking
829 with_extra_version
830 with_template
831 with_includes
832 with_libraries
833 with_libs
834 enable_integer_datetimes
835 enable_nls
836 with_pgport
837 enable_rpath
838 enable_debug
839 enable_profiling
840 enable_coverage
841 enable_dtrace
842 enable_tap_tests
843 enable_injection_points
844 with_blocksize
845 with_segsize
846 with_segsize_blocks
847 with_wal_blocksize
848 with_llvm
849 enable_depend
850 enable_cassert
851 with_icu
852 with_tcl
853 with_tclconfig
854 with_perl
855 with_python
856 with_gssapi
857 with_krb_srvnam
858 with_pam
859 with_bsd_auth
860 with_ldap
861 with_bonjour
862 with_selinux
863 with_systemd
864 with_readline
865 with_libedit_preferred
866 with_uuid
867 with_ossp_uuid
868 with_libxml
869 with_libxslt
870 with_system_tzdata
871 with_zlib
872 with_lz4
873 with_zstd
874 with_ssl
875 with_openssl
876 enable_largefile
878 ac_precious_vars='build_alias
879 host_alias
880 target_alias
881 PG_TEST_EXTRA
883 CFLAGS
884 LDFLAGS
885 LIBS
886 CPPFLAGS
888 CXXFLAGS
890 LLVM_CONFIG
891 CLANG
893 PKG_CONFIG
894 PKG_CONFIG_PATH
895 PKG_CONFIG_LIBDIR
896 ICU_CFLAGS
897 ICU_LIBS
898 XML2_CONFIG
899 XML2_CFLAGS
900 XML2_LIBS
901 LZ4_CFLAGS
902 LZ4_LIBS
903 ZSTD_CFLAGS
904 ZSTD_LIBS
905 LDFLAGS_EX
906 LDFLAGS_SL
907 PERL
908 PYTHON
909 MSGFMT
910 TCLSH'
913 # Initialize some variables set by options.
914 ac_init_help=
915 ac_init_version=false
916 ac_unrecognized_opts=
917 ac_unrecognized_sep=
918 # The variables have the same names as the options, with
919 # dashes changed to underlines.
920 cache_file=/dev/null
921 exec_prefix=NONE
922 no_create=
923 no_recursion=
924 prefix=NONE
925 program_prefix=NONE
926 program_suffix=NONE
927 program_transform_name=s,x,x,
928 silent=
929 site=
930 srcdir=
931 verbose=
932 x_includes=NONE
933 x_libraries=NONE
935 # Installation directory options.
936 # These are left unexpanded so users can "make install exec_prefix=/foo"
937 # and all the variables that are supposed to be based on exec_prefix
938 # by default will actually change.
939 # Use braces instead of parens because sh, perl, etc. also accept them.
940 # (The list follows the same order as the GNU Coding Standards.)
941 bindir='${exec_prefix}/bin'
942 sbindir='${exec_prefix}/sbin'
943 libexecdir='${exec_prefix}/libexec'
944 datarootdir='${prefix}/share'
945 datadir='${datarootdir}'
946 sysconfdir='${prefix}/etc'
947 sharedstatedir='${prefix}/com'
948 localstatedir='${prefix}/var'
949 includedir='${prefix}/include'
950 oldincludedir='/usr/include'
951 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
952 infodir='${datarootdir}/info'
953 htmldir='${docdir}'
954 dvidir='${docdir}'
955 pdfdir='${docdir}'
956 psdir='${docdir}'
957 libdir='${exec_prefix}/lib'
958 localedir='${datarootdir}/locale'
959 mandir='${datarootdir}/man'
961 ac_prev=
962 ac_dashdash=
963 for ac_option
965 # If the previous option needs an argument, assign it.
966 if test -n "$ac_prev"; then
967 eval $ac_prev=\$ac_option
968 ac_prev=
969 continue
972 case $ac_option in
973 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
974 *=) ac_optarg= ;;
975 *) ac_optarg=yes ;;
976 esac
978 # Accept the important Cygnus configure options, so we can diagnose typos.
980 case $ac_dashdash$ac_option in
982 ac_dashdash=yes ;;
984 -bindir | --bindir | --bindi | --bind | --bin | --bi)
985 ac_prev=bindir ;;
986 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
987 bindir=$ac_optarg ;;
989 -build | --build | --buil | --bui | --bu)
990 ac_prev=build_alias ;;
991 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
992 build_alias=$ac_optarg ;;
994 -cache-file | --cache-file | --cache-fil | --cache-fi \
995 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
996 ac_prev=cache_file ;;
997 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
998 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
999 cache_file=$ac_optarg ;;
1001 --config-cache | -C)
1002 cache_file=config.cache ;;
1004 -datadir | --datadir | --datadi | --datad)
1005 ac_prev=datadir ;;
1006 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1007 datadir=$ac_optarg ;;
1009 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1010 | --dataroo | --dataro | --datar)
1011 ac_prev=datarootdir ;;
1012 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1013 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1014 datarootdir=$ac_optarg ;;
1016 -disable-* | --disable-*)
1017 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1018 # Reject names that are not valid shell variable names.
1019 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1020 as_fn_error $? "invalid feature name: $ac_useropt"
1021 ac_useropt_orig=$ac_useropt
1022 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1023 case $ac_user_opts in
1025 "enable_$ac_useropt"
1026 "*) ;;
1027 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1028 ac_unrecognized_sep=', ';;
1029 esac
1030 eval enable_$ac_useropt=no ;;
1032 -docdir | --docdir | --docdi | --doc | --do)
1033 ac_prev=docdir ;;
1034 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1035 docdir=$ac_optarg ;;
1037 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1038 ac_prev=dvidir ;;
1039 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1040 dvidir=$ac_optarg ;;
1042 -enable-* | --enable-*)
1043 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1044 # Reject names that are not valid shell variable names.
1045 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1046 as_fn_error $? "invalid feature name: $ac_useropt"
1047 ac_useropt_orig=$ac_useropt
1048 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1049 case $ac_user_opts in
1051 "enable_$ac_useropt"
1052 "*) ;;
1053 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1054 ac_unrecognized_sep=', ';;
1055 esac
1056 eval enable_$ac_useropt=\$ac_optarg ;;
1058 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1059 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1060 | --exec | --exe | --ex)
1061 ac_prev=exec_prefix ;;
1062 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1063 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1064 | --exec=* | --exe=* | --ex=*)
1065 exec_prefix=$ac_optarg ;;
1067 -gas | --gas | --ga | --g)
1068 # Obsolete; use --with-gas.
1069 with_gas=yes ;;
1071 -help | --help | --hel | --he | -h)
1072 ac_init_help=long ;;
1073 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1074 ac_init_help=recursive ;;
1075 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1076 ac_init_help=short ;;
1078 -host | --host | --hos | --ho)
1079 ac_prev=host_alias ;;
1080 -host=* | --host=* | --hos=* | --ho=*)
1081 host_alias=$ac_optarg ;;
1083 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1084 ac_prev=htmldir ;;
1085 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1086 | --ht=*)
1087 htmldir=$ac_optarg ;;
1089 -includedir | --includedir | --includedi | --included | --include \
1090 | --includ | --inclu | --incl | --inc)
1091 ac_prev=includedir ;;
1092 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1093 | --includ=* | --inclu=* | --incl=* | --inc=*)
1094 includedir=$ac_optarg ;;
1096 -infodir | --infodir | --infodi | --infod | --info | --inf)
1097 ac_prev=infodir ;;
1098 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1099 infodir=$ac_optarg ;;
1101 -libdir | --libdir | --libdi | --libd)
1102 ac_prev=libdir ;;
1103 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1104 libdir=$ac_optarg ;;
1106 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1107 | --libexe | --libex | --libe)
1108 ac_prev=libexecdir ;;
1109 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1110 | --libexe=* | --libex=* | --libe=*)
1111 libexecdir=$ac_optarg ;;
1113 -localedir | --localedir | --localedi | --localed | --locale)
1114 ac_prev=localedir ;;
1115 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1116 localedir=$ac_optarg ;;
1118 -localstatedir | --localstatedir | --localstatedi | --localstated \
1119 | --localstate | --localstat | --localsta | --localst | --locals)
1120 ac_prev=localstatedir ;;
1121 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1122 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1123 localstatedir=$ac_optarg ;;
1125 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1126 ac_prev=mandir ;;
1127 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1128 mandir=$ac_optarg ;;
1130 -nfp | --nfp | --nf)
1131 # Obsolete; use --without-fp.
1132 with_fp=no ;;
1134 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1135 | --no-cr | --no-c | -n)
1136 no_create=yes ;;
1138 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1139 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1140 no_recursion=yes ;;
1142 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1143 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1144 | --oldin | --oldi | --old | --ol | --o)
1145 ac_prev=oldincludedir ;;
1146 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1147 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1148 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1149 oldincludedir=$ac_optarg ;;
1151 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1152 ac_prev=prefix ;;
1153 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1154 prefix=$ac_optarg ;;
1156 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1157 | --program-pre | --program-pr | --program-p)
1158 ac_prev=program_prefix ;;
1159 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1160 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1161 program_prefix=$ac_optarg ;;
1163 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1164 | --program-suf | --program-su | --program-s)
1165 ac_prev=program_suffix ;;
1166 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1167 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1168 program_suffix=$ac_optarg ;;
1170 -program-transform-name | --program-transform-name \
1171 | --program-transform-nam | --program-transform-na \
1172 | --program-transform-n | --program-transform- \
1173 | --program-transform | --program-transfor \
1174 | --program-transfo | --program-transf \
1175 | --program-trans | --program-tran \
1176 | --progr-tra | --program-tr | --program-t)
1177 ac_prev=program_transform_name ;;
1178 -program-transform-name=* | --program-transform-name=* \
1179 | --program-transform-nam=* | --program-transform-na=* \
1180 | --program-transform-n=* | --program-transform-=* \
1181 | --program-transform=* | --program-transfor=* \
1182 | --program-transfo=* | --program-transf=* \
1183 | --program-trans=* | --program-tran=* \
1184 | --progr-tra=* | --program-tr=* | --program-t=*)
1185 program_transform_name=$ac_optarg ;;
1187 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1188 ac_prev=pdfdir ;;
1189 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1190 pdfdir=$ac_optarg ;;
1192 -psdir | --psdir | --psdi | --psd | --ps)
1193 ac_prev=psdir ;;
1194 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1195 psdir=$ac_optarg ;;
1197 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1198 | -silent | --silent | --silen | --sile | --sil)
1199 silent=yes ;;
1201 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1202 ac_prev=sbindir ;;
1203 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1204 | --sbi=* | --sb=*)
1205 sbindir=$ac_optarg ;;
1207 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1208 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1209 | --sharedst | --shareds | --shared | --share | --shar \
1210 | --sha | --sh)
1211 ac_prev=sharedstatedir ;;
1212 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1213 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1214 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1215 | --sha=* | --sh=*)
1216 sharedstatedir=$ac_optarg ;;
1218 -site | --site | --sit)
1219 ac_prev=site ;;
1220 -site=* | --site=* | --sit=*)
1221 site=$ac_optarg ;;
1223 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1224 ac_prev=srcdir ;;
1225 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1226 srcdir=$ac_optarg ;;
1228 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1229 | --syscon | --sysco | --sysc | --sys | --sy)
1230 ac_prev=sysconfdir ;;
1231 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1232 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1233 sysconfdir=$ac_optarg ;;
1235 -target | --target | --targe | --targ | --tar | --ta | --t)
1236 ac_prev=target_alias ;;
1237 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1238 target_alias=$ac_optarg ;;
1240 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1241 verbose=yes ;;
1243 -version | --version | --versio | --versi | --vers | -V)
1244 ac_init_version=: ;;
1246 -with-* | --with-*)
1247 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1248 # Reject names that are not valid shell variable names.
1249 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1250 as_fn_error $? "invalid package name: $ac_useropt"
1251 ac_useropt_orig=$ac_useropt
1252 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1253 case $ac_user_opts in
1255 "with_$ac_useropt"
1256 "*) ;;
1257 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1258 ac_unrecognized_sep=', ';;
1259 esac
1260 eval with_$ac_useropt=\$ac_optarg ;;
1262 -without-* | --without-*)
1263 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1264 # Reject names that are not valid shell variable names.
1265 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1266 as_fn_error $? "invalid package name: $ac_useropt"
1267 ac_useropt_orig=$ac_useropt
1268 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1269 case $ac_user_opts in
1271 "with_$ac_useropt"
1272 "*) ;;
1273 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1274 ac_unrecognized_sep=', ';;
1275 esac
1276 eval with_$ac_useropt=no ;;
1278 --x)
1279 # Obsolete; use --with-x.
1280 with_x=yes ;;
1282 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1283 | --x-incl | --x-inc | --x-in | --x-i)
1284 ac_prev=x_includes ;;
1285 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1286 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1287 x_includes=$ac_optarg ;;
1289 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1290 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1291 ac_prev=x_libraries ;;
1292 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1293 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1294 x_libraries=$ac_optarg ;;
1296 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1297 Try \`$0 --help' for more information"
1300 *=*)
1301 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1302 # Reject names that are not valid shell variable names.
1303 case $ac_envvar in #(
1304 '' | [0-9]* | *[!_$as_cr_alnum]* )
1305 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1306 esac
1307 eval $ac_envvar=\$ac_optarg
1308 export $ac_envvar ;;
1311 # FIXME: should be removed in autoconf 3.0.
1312 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1313 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1314 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1315 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1318 esac
1319 done
1321 if test -n "$ac_prev"; then
1322 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1323 as_fn_error $? "missing argument to $ac_option"
1326 if test -n "$ac_unrecognized_opts"; then
1327 case $enable_option_checking in
1328 no) ;;
1329 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1330 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1331 esac
1334 # Check all directory arguments for consistency.
1335 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1336 datadir sysconfdir sharedstatedir localstatedir includedir \
1337 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1338 libdir localedir mandir
1340 eval ac_val=\$$ac_var
1341 # Remove trailing slashes.
1342 case $ac_val in
1343 */ )
1344 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1345 eval $ac_var=\$ac_val;;
1346 esac
1347 # Be sure to have absolute directory names.
1348 case $ac_val in
1349 [\\/$]* | ?:[\\/]* ) continue;;
1350 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1351 esac
1352 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1353 done
1355 # There might be people who depend on the old broken behavior: `$host'
1356 # used to hold the argument of --host etc.
1357 # FIXME: To remove some day.
1358 build=$build_alias
1359 host=$host_alias
1360 target=$target_alias
1362 # FIXME: To remove some day.
1363 if test "x$host_alias" != x; then
1364 if test "x$build_alias" = x; then
1365 cross_compiling=maybe
1366 elif test "x$build_alias" != "x$host_alias"; then
1367 cross_compiling=yes
1371 ac_tool_prefix=
1372 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1374 test "$silent" = yes && exec 6>/dev/null
1377 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1378 ac_ls_di=`ls -di .` &&
1379 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1380 as_fn_error $? "working directory cannot be determined"
1381 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1382 as_fn_error $? "pwd does not report name of working directory"
1385 # Find the source files, if location was not specified.
1386 if test -z "$srcdir"; then
1387 ac_srcdir_defaulted=yes
1388 # Try the directory containing this script, then the parent directory.
1389 ac_confdir=`$as_dirname -- "$as_myself" ||
1390 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1391 X"$as_myself" : 'X\(//\)[^/]' \| \
1392 X"$as_myself" : 'X\(//\)$' \| \
1393 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1394 $as_echo X"$as_myself" |
1395 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1396 s//\1/
1399 /^X\(\/\/\)[^/].*/{
1400 s//\1/
1403 /^X\(\/\/\)$/{
1404 s//\1/
1407 /^X\(\/\).*/{
1408 s//\1/
1411 s/.*/./; q'`
1412 srcdir=$ac_confdir
1413 if test ! -r "$srcdir/$ac_unique_file"; then
1414 srcdir=..
1416 else
1417 ac_srcdir_defaulted=no
1419 if test ! -r "$srcdir/$ac_unique_file"; then
1420 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1421 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1423 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1424 ac_abs_confdir=`(
1425 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1426 pwd)`
1427 # When building in place, set srcdir=.
1428 if test "$ac_abs_confdir" = "$ac_pwd"; then
1429 srcdir=.
1431 # Remove unnecessary trailing slashes from srcdir.
1432 # Double slashes in file names in object file debugging info
1433 # mess up M-x gdb in Emacs.
1434 case $srcdir in
1435 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1436 esac
1437 for ac_var in $ac_precious_vars; do
1438 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1439 eval ac_env_${ac_var}_value=\$${ac_var}
1440 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1441 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1442 done
1445 # Report the --help message.
1447 if test "$ac_init_help" = "long"; then
1448 # Omit some internal or obsolete options to make the list less imposing.
1449 # This message is too long to be a string in the A/UX 3.1 sh.
1450 cat <<_ACEOF
1451 \`configure' configures PostgreSQL 18devel to adapt to many kinds of systems.
1453 Usage: $0 [OPTION]... [VAR=VALUE]...
1455 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1456 VAR=VALUE. See below for descriptions of some of the useful variables.
1458 Defaults for the options are specified in brackets.
1460 Configuration:
1461 -h, --help display this help and exit
1462 --help=short display options specific to this package
1463 --help=recursive display the short help of all the included packages
1464 -V, --version display version information and exit
1465 -q, --quiet, --silent do not print \`checking ...' messages
1466 --cache-file=FILE cache test results in FILE [disabled]
1467 -C, --config-cache alias for \`--cache-file=config.cache'
1468 -n, --no-create do not create output files
1469 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1471 Installation directories:
1472 --prefix=PREFIX install architecture-independent files in PREFIX
1473 [$ac_default_prefix]
1474 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1475 [PREFIX]
1477 By default, \`make install' will install all the files in
1478 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1479 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1480 for instance \`--prefix=\$HOME'.
1482 For better control, use the options below.
1484 Fine tuning of the installation directories:
1485 --bindir=DIR user executables [EPREFIX/bin]
1486 --sbindir=DIR system admin executables [EPREFIX/sbin]
1487 --libexecdir=DIR program executables [EPREFIX/libexec]
1488 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1489 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1490 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1491 --libdir=DIR object code libraries [EPREFIX/lib]
1492 --includedir=DIR C header files [PREFIX/include]
1493 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1494 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1495 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1496 --infodir=DIR info documentation [DATAROOTDIR/info]
1497 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1498 --mandir=DIR man documentation [DATAROOTDIR/man]
1499 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1500 --htmldir=DIR html documentation [DOCDIR]
1501 --dvidir=DIR dvi documentation [DOCDIR]
1502 --pdfdir=DIR pdf documentation [DOCDIR]
1503 --psdir=DIR ps documentation [DOCDIR]
1504 _ACEOF
1506 cat <<\_ACEOF
1508 System types:
1509 --build=BUILD configure for building on BUILD [guessed]
1510 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1511 _ACEOF
1514 if test -n "$ac_init_help"; then
1515 case $ac_init_help in
1516 short | recursive ) echo "Configuration of PostgreSQL 18devel:";;
1517 esac
1518 cat <<\_ACEOF
1520 Optional Features:
1521 --disable-option-checking ignore unrecognized --enable/--with options
1522 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1523 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1524 --disable-integer-datetimes
1525 obsolete option, no longer supported
1526 --enable-nls[=LANGUAGES]
1527 enable Native Language Support
1528 --disable-rpath do not embed shared library search path in
1529 executables
1530 --enable-debug build with debugging symbols (-g)
1531 --enable-profiling build with profiling enabled
1532 --enable-coverage build with coverage testing instrumentation
1533 --enable-dtrace build with DTrace support
1534 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1535 --enable-injection-points
1536 enable injection points (for testing)
1537 --enable-depend turn on automatic dependency tracking
1538 --enable-cassert enable assertion checks (for debugging)
1539 --disable-largefile omit support for large files
1541 Optional Packages:
1542 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1543 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1544 --with-extra-version=STRING
1545 append STRING to version
1546 --with-template=NAME override operating system template
1547 --with-includes=DIRS look for additional header files in DIRS
1548 --with-libraries=DIRS look for additional libraries in DIRS
1549 --with-libs=DIRS alternative spelling of --with-libraries
1550 --with-pgport=PORTNUM set default port number [5432]
1551 --with-blocksize=BLOCKSIZE
1552 set table block size in kB [8]
1553 --with-segsize=SEGSIZE set table segment size in GB [1]
1554 --with-segsize-blocks=SEGSIZE_BLOCKS
1555 set table segment size in blocks [0]
1556 --with-wal-blocksize=BLOCKSIZE
1557 set WAL block size in kB [8]
1558 --with-llvm build with LLVM based JIT support
1559 --without-icu build without ICU support
1560 --with-tcl build Tcl modules (PL/Tcl)
1561 --with-tclconfig=DIR tclConfig.sh is in DIR
1562 --with-perl build Perl modules (PL/Perl)
1563 --with-python build Python modules (PL/Python)
1564 --with-gssapi build with GSSAPI support
1565 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1566 [postgres]
1567 --with-pam build with PAM support
1568 --with-bsd-auth build with BSD Authentication support
1569 --with-ldap build with LDAP support
1570 --with-bonjour build with Bonjour support
1571 --with-selinux build with SELinux support
1572 --with-systemd build with systemd support
1573 --without-readline do not use GNU Readline nor BSD Libedit for editing
1574 --with-libedit-preferred
1575 prefer BSD Libedit over GNU Readline
1576 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1577 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1578 --with-libxml build with XML support
1579 --with-libxslt use XSLT support when building contrib/xml2
1580 --with-system-tzdata=DIR
1581 use system time zone data in DIR
1582 --without-zlib do not use Zlib
1583 --with-lz4 build with LZ4 support
1584 --with-zstd build with ZSTD support
1585 --with-ssl=LIB use LIB for SSL/TLS support (openssl)
1586 --with-openssl obsolete spelling of --with-ssl=openssl
1588 Some influential environment variables:
1589 PG_TEST_EXTRA
1590 enable selected extra tests (overridden at runtime by
1591 PG_TEST_EXTRA environment variable)
1592 CC C compiler command
1593 CFLAGS C compiler flags
1594 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1595 nonstandard directory <lib dir>
1596 LIBS libraries to pass to the linker, e.g. -l<library>
1597 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1598 you have headers in a nonstandard directory <include dir>
1599 CXX C++ compiler command
1600 CXXFLAGS C++ compiler flags
1601 LLVM_CONFIG path to llvm-config command
1602 CLANG path to clang compiler to generate bitcode
1603 CPP C preprocessor
1604 PKG_CONFIG path to pkg-config utility
1605 PKG_CONFIG_PATH
1606 directories to add to pkg-config's search path
1607 PKG_CONFIG_LIBDIR
1608 path overriding pkg-config's built-in search path
1609 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1610 ICU_LIBS linker flags for ICU, overriding pkg-config
1611 XML2_CONFIG path to xml2-config utility
1612 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1613 XML2_LIBS linker flags for XML2, overriding pkg-config
1614 LZ4_CFLAGS C compiler flags for LZ4, overriding pkg-config
1615 LZ4_LIBS linker flags for LZ4, overriding pkg-config
1616 ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
1617 ZSTD_LIBS linker flags for ZSTD, overriding pkg-config
1618 LDFLAGS_EX extra linker flags for linking executables only
1619 LDFLAGS_SL extra linker flags for linking shared libraries only
1620 PERL Perl program
1621 PYTHON Python program
1622 MSGFMT msgfmt program for NLS
1623 TCLSH Tcl interpreter program (tclsh)
1625 Use these variables to override the choices made by `configure' or to help
1626 it to find libraries and programs with nonstandard names/locations.
1628 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1629 PostgreSQL home page: <https://www.postgresql.org/>.
1630 _ACEOF
1631 ac_status=$?
1634 if test "$ac_init_help" = "recursive"; then
1635 # If there are subdirs, report their specific --help.
1636 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1637 test -d "$ac_dir" ||
1638 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1639 continue
1640 ac_builddir=.
1642 case "$ac_dir" in
1643 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1645 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1646 # A ".." for each directory in $ac_dir_suffix.
1647 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1648 case $ac_top_builddir_sub in
1649 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1650 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1651 esac ;;
1652 esac
1653 ac_abs_top_builddir=$ac_pwd
1654 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1655 # for backward compatibility:
1656 ac_top_builddir=$ac_top_build_prefix
1658 case $srcdir in
1659 .) # We are building in place.
1660 ac_srcdir=.
1661 ac_top_srcdir=$ac_top_builddir_sub
1662 ac_abs_top_srcdir=$ac_pwd ;;
1663 [\\/]* | ?:[\\/]* ) # Absolute name.
1664 ac_srcdir=$srcdir$ac_dir_suffix;
1665 ac_top_srcdir=$srcdir
1666 ac_abs_top_srcdir=$srcdir ;;
1667 *) # Relative name.
1668 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1669 ac_top_srcdir=$ac_top_build_prefix$srcdir
1670 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1671 esac
1672 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1674 cd "$ac_dir" || { ac_status=$?; continue; }
1675 # Check for guested configure.
1676 if test -f "$ac_srcdir/configure.gnu"; then
1677 echo &&
1678 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1679 elif test -f "$ac_srcdir/configure"; then
1680 echo &&
1681 $SHELL "$ac_srcdir/configure" --help=recursive
1682 else
1683 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1684 fi || ac_status=$?
1685 cd "$ac_pwd" || { ac_status=$?; break; }
1686 done
1689 test -n "$ac_init_help" && exit $ac_status
1690 if $ac_init_version; then
1691 cat <<\_ACEOF
1692 PostgreSQL configure 18devel
1693 generated by GNU Autoconf 2.69
1695 Copyright (C) 2012 Free Software Foundation, Inc.
1696 This configure script is free software; the Free Software Foundation
1697 gives unlimited permission to copy, distribute and modify it.
1699 Copyright (c) 1996-2024, PostgreSQL Global Development Group
1700 _ACEOF
1701 exit
1704 ## ------------------------ ##
1705 ## Autoconf initialization. ##
1706 ## ------------------------ ##
1708 # ac_fn_c_try_compile LINENO
1709 # --------------------------
1710 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1711 ac_fn_c_try_compile ()
1713 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1714 rm -f conftest.$ac_objext
1715 if { { ac_try="$ac_compile"
1716 case "(($ac_try" in
1717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1718 *) ac_try_echo=$ac_try;;
1719 esac
1720 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1721 $as_echo "$ac_try_echo"; } >&5
1722 (eval "$ac_compile") 2>conftest.err
1723 ac_status=$?
1724 if test -s conftest.err; then
1725 grep -v '^ *+' conftest.err >conftest.er1
1726 cat conftest.er1 >&5
1727 mv -f conftest.er1 conftest.err
1729 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1730 test $ac_status = 0; } && {
1731 test -z "$ac_c_werror_flag" ||
1732 test ! -s conftest.err
1733 } && test -s conftest.$ac_objext; then :
1734 ac_retval=0
1735 else
1736 $as_echo "$as_me: failed program was:" >&5
1737 sed 's/^/| /' conftest.$ac_ext >&5
1739 ac_retval=1
1741 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1742 as_fn_set_status $ac_retval
1744 } # ac_fn_c_try_compile
1746 # ac_fn_cxx_try_compile LINENO
1747 # ----------------------------
1748 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1749 ac_fn_cxx_try_compile ()
1751 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1752 rm -f conftest.$ac_objext
1753 if { { ac_try="$ac_compile"
1754 case "(($ac_try" in
1755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1756 *) ac_try_echo=$ac_try;;
1757 esac
1758 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1759 $as_echo "$ac_try_echo"; } >&5
1760 (eval "$ac_compile") 2>conftest.err
1761 ac_status=$?
1762 if test -s conftest.err; then
1763 grep -v '^ *+' conftest.err >conftest.er1
1764 cat conftest.er1 >&5
1765 mv -f conftest.er1 conftest.err
1767 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1768 test $ac_status = 0; } && {
1769 test -z "$ac_cxx_werror_flag" ||
1770 test ! -s conftest.err
1771 } && test -s conftest.$ac_objext; then :
1772 ac_retval=0
1773 else
1774 $as_echo "$as_me: failed program was:" >&5
1775 sed 's/^/| /' conftest.$ac_ext >&5
1777 ac_retval=1
1779 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1780 as_fn_set_status $ac_retval
1782 } # ac_fn_cxx_try_compile
1784 # ac_fn_c_try_link LINENO
1785 # -----------------------
1786 # Try to link conftest.$ac_ext, and return whether this succeeded.
1787 ac_fn_c_try_link ()
1789 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1790 rm -f conftest.$ac_objext conftest$ac_exeext
1791 if { { ac_try="$ac_link"
1792 case "(($ac_try" in
1793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1794 *) ac_try_echo=$ac_try;;
1795 esac
1796 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1797 $as_echo "$ac_try_echo"; } >&5
1798 (eval "$ac_link") 2>conftest.err
1799 ac_status=$?
1800 if test -s conftest.err; then
1801 grep -v '^ *+' conftest.err >conftest.er1
1802 cat conftest.er1 >&5
1803 mv -f conftest.er1 conftest.err
1805 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1806 test $ac_status = 0; } && {
1807 test -z "$ac_c_werror_flag" ||
1808 test ! -s conftest.err
1809 } && test -s conftest$ac_exeext && {
1810 test "$cross_compiling" = yes ||
1811 test -x conftest$ac_exeext
1812 }; then :
1813 ac_retval=0
1814 else
1815 $as_echo "$as_me: failed program was:" >&5
1816 sed 's/^/| /' conftest.$ac_ext >&5
1818 ac_retval=1
1820 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1821 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1822 # interfere with the next link command; also delete a directory that is
1823 # left behind by Apple's compiler. We do this before executing the actions.
1824 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1825 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1826 as_fn_set_status $ac_retval
1828 } # ac_fn_c_try_link
1830 # ac_fn_c_try_cpp LINENO
1831 # ----------------------
1832 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1833 ac_fn_c_try_cpp ()
1835 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1836 if { { ac_try="$ac_cpp conftest.$ac_ext"
1837 case "(($ac_try" in
1838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1839 *) ac_try_echo=$ac_try;;
1840 esac
1841 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1842 $as_echo "$ac_try_echo"; } >&5
1843 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1844 ac_status=$?
1845 if test -s conftest.err; then
1846 grep -v '^ *+' conftest.err >conftest.er1
1847 cat conftest.er1 >&5
1848 mv -f conftest.er1 conftest.err
1850 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1851 test $ac_status = 0; } > conftest.i && {
1852 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1853 test ! -s conftest.err
1854 }; then :
1855 ac_retval=0
1856 else
1857 $as_echo "$as_me: failed program was:" >&5
1858 sed 's/^/| /' conftest.$ac_ext >&5
1860 ac_retval=1
1862 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1863 as_fn_set_status $ac_retval
1865 } # ac_fn_c_try_cpp
1867 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1868 # -------------------------------------------------------
1869 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1870 # the include files in INCLUDES and setting the cache variable VAR
1871 # accordingly.
1872 ac_fn_c_check_header_mongrel ()
1874 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1875 if eval \${$3+:} false; then :
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1877 $as_echo_n "checking for $2... " >&6; }
1878 if eval \${$3+:} false; then :
1879 $as_echo_n "(cached) " >&6
1881 eval ac_res=\$$3
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1883 $as_echo "$ac_res" >&6; }
1884 else
1885 # Is the header compilable?
1886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1887 $as_echo_n "checking $2 usability... " >&6; }
1888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1889 /* end confdefs.h. */
1891 #include <$2>
1892 _ACEOF
1893 if ac_fn_c_try_compile "$LINENO"; then :
1894 ac_header_compiler=yes
1895 else
1896 ac_header_compiler=no
1898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1900 $as_echo "$ac_header_compiler" >&6; }
1902 # Is the header present?
1903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1904 $as_echo_n "checking $2 presence... " >&6; }
1905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1906 /* end confdefs.h. */
1907 #include <$2>
1908 _ACEOF
1909 if ac_fn_c_try_cpp "$LINENO"; then :
1910 ac_header_preproc=yes
1911 else
1912 ac_header_preproc=no
1914 rm -f conftest.err conftest.i conftest.$ac_ext
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1916 $as_echo "$ac_header_preproc" >&6; }
1918 # So? What about this header?
1919 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1920 yes:no: )
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1922 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1924 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1926 no:yes:* )
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1928 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1930 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1932 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1934 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1936 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1937 ( $as_echo "## ---------------------------------------------- ##
1938 ## Report this to pgsql-bugs@lists.postgresql.org ##
1939 ## ---------------------------------------------- ##"
1940 ) | sed "s/^/$as_me: WARNING: /" >&2
1942 esac
1943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1944 $as_echo_n "checking for $2... " >&6; }
1945 if eval \${$3+:} false; then :
1946 $as_echo_n "(cached) " >&6
1947 else
1948 eval "$3=\$ac_header_compiler"
1950 eval ac_res=\$$3
1951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1952 $as_echo "$ac_res" >&6; }
1954 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1956 } # ac_fn_c_check_header_mongrel
1958 # ac_fn_c_try_run LINENO
1959 # ----------------------
1960 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1961 # that executables *can* be run.
1962 ac_fn_c_try_run ()
1964 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1965 if { { ac_try="$ac_link"
1966 case "(($ac_try" in
1967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1968 *) ac_try_echo=$ac_try;;
1969 esac
1970 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1971 $as_echo "$ac_try_echo"; } >&5
1972 (eval "$ac_link") 2>&5
1973 ac_status=$?
1974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1975 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1976 { { case "(($ac_try" in
1977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1978 *) ac_try_echo=$ac_try;;
1979 esac
1980 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1981 $as_echo "$ac_try_echo"; } >&5
1982 (eval "$ac_try") 2>&5
1983 ac_status=$?
1984 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1985 test $ac_status = 0; }; }; then :
1986 ac_retval=0
1987 else
1988 $as_echo "$as_me: program exited with status $ac_status" >&5
1989 $as_echo "$as_me: failed program was:" >&5
1990 sed 's/^/| /' conftest.$ac_ext >&5
1992 ac_retval=$ac_status
1994 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1995 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1996 as_fn_set_status $ac_retval
1998 } # ac_fn_c_try_run
2000 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2001 # -------------------------------------------------------
2002 # Tests whether HEADER exists and can be compiled using the include files in
2003 # INCLUDES, setting the cache variable VAR accordingly.
2004 ac_fn_c_check_header_compile ()
2006 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2008 $as_echo_n "checking for $2... " >&6; }
2009 if eval \${$3+:} false; then :
2010 $as_echo_n "(cached) " >&6
2011 else
2012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013 /* end confdefs.h. */
2015 #include <$2>
2016 _ACEOF
2017 if ac_fn_c_try_compile "$LINENO"; then :
2018 eval "$3=yes"
2019 else
2020 eval "$3=no"
2022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2024 eval ac_res=\$$3
2025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2026 $as_echo "$ac_res" >&6; }
2027 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2029 } # ac_fn_c_check_header_compile
2031 # ac_fn_c_check_func LINENO FUNC VAR
2032 # ----------------------------------
2033 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2034 ac_fn_c_check_func ()
2036 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2038 $as_echo_n "checking for $2... " >&6; }
2039 if eval \${$3+:} false; then :
2040 $as_echo_n "(cached) " >&6
2041 else
2042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043 /* end confdefs.h. */
2044 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2045 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2046 #define $2 innocuous_$2
2048 /* System header to define __stub macros and hopefully few prototypes,
2049 which can conflict with char $2 (); below.
2050 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2051 <limits.h> exists even on freestanding compilers. */
2053 #ifdef __STDC__
2054 # include <limits.h>
2055 #else
2056 # include <assert.h>
2057 #endif
2059 #undef $2
2061 /* Override any GCC internal prototype to avoid an error.
2062 Use char because int might match the return type of a GCC
2063 builtin and then its argument prototype would still apply. */
2064 #ifdef __cplusplus
2065 extern "C"
2066 #endif
2067 char $2 ();
2068 /* The GNU C library defines this for functions which it implements
2069 to always fail with ENOSYS. Some functions are actually named
2070 something starting with __ and the normal name is an alias. */
2071 #if defined __stub_$2 || defined __stub___$2
2072 choke me
2073 #endif
2076 main ()
2078 return $2 ();
2080 return 0;
2082 _ACEOF
2083 if ac_fn_c_try_link "$LINENO"; then :
2084 eval "$3=yes"
2085 else
2086 eval "$3=no"
2088 rm -f core conftest.err conftest.$ac_objext \
2089 conftest$ac_exeext conftest.$ac_ext
2091 eval ac_res=\$$3
2092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2093 $as_echo "$ac_res" >&6; }
2094 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2096 } # ac_fn_c_check_func
2098 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2099 # -------------------------------------------
2100 # Tests whether TYPE exists after having included INCLUDES, setting cache
2101 # variable VAR accordingly.
2102 ac_fn_c_check_type ()
2104 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2106 $as_echo_n "checking for $2... " >&6; }
2107 if eval \${$3+:} false; then :
2108 $as_echo_n "(cached) " >&6
2109 else
2110 eval "$3=no"
2111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2112 /* end confdefs.h. */
2115 main ()
2117 if (sizeof ($2))
2118 return 0;
2120 return 0;
2122 _ACEOF
2123 if ac_fn_c_try_compile "$LINENO"; then :
2124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125 /* end confdefs.h. */
2128 main ()
2130 if (sizeof (($2)))
2131 return 0;
2133 return 0;
2135 _ACEOF
2136 if ac_fn_c_try_compile "$LINENO"; then :
2138 else
2139 eval "$3=yes"
2141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145 eval ac_res=\$$3
2146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2147 $as_echo "$ac_res" >&6; }
2148 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2150 } # ac_fn_c_check_type
2152 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2153 # ----------------------------------------------------
2154 # Tries to find if the field MEMBER exists in type AGGR, after including
2155 # INCLUDES, setting cache variable VAR accordingly.
2156 ac_fn_c_check_member ()
2158 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2160 $as_echo_n "checking for $2.$3... " >&6; }
2161 if eval \${$4+:} false; then :
2162 $as_echo_n "(cached) " >&6
2163 else
2164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2165 /* end confdefs.h. */
2168 main ()
2170 static $2 ac_aggr;
2171 if (ac_aggr.$3)
2172 return 0;
2174 return 0;
2176 _ACEOF
2177 if ac_fn_c_try_compile "$LINENO"; then :
2178 eval "$4=yes"
2179 else
2180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181 /* end confdefs.h. */
2184 main ()
2186 static $2 ac_aggr;
2187 if (sizeof ac_aggr.$3)
2188 return 0;
2190 return 0;
2192 _ACEOF
2193 if ac_fn_c_try_compile "$LINENO"; then :
2194 eval "$4=yes"
2195 else
2196 eval "$4=no"
2198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2202 eval ac_res=\$$4
2203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2204 $as_echo "$ac_res" >&6; }
2205 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2207 } # ac_fn_c_check_member
2209 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2210 # --------------------------------------------
2211 # Tries to find the compile-time value of EXPR in a program that includes
2212 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2213 # computed
2214 ac_fn_c_compute_int ()
2216 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2217 if test "$cross_compiling" = yes; then
2218 # Depending upon the size, compute the lo and hi bounds.
2219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2220 /* end confdefs.h. */
2223 main ()
2225 static int test_array [1 - 2 * !(($2) >= 0)];
2226 test_array [0] = 0;
2227 return test_array [0];
2230 return 0;
2232 _ACEOF
2233 if ac_fn_c_try_compile "$LINENO"; then :
2234 ac_lo=0 ac_mid=0
2235 while :; do
2236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2237 /* end confdefs.h. */
2240 main ()
2242 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2243 test_array [0] = 0;
2244 return test_array [0];
2247 return 0;
2249 _ACEOF
2250 if ac_fn_c_try_compile "$LINENO"; then :
2251 ac_hi=$ac_mid; break
2252 else
2253 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2254 if test $ac_lo -le $ac_mid; then
2255 ac_lo= ac_hi=
2256 break
2258 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2261 done
2262 else
2263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2264 /* end confdefs.h. */
2267 main ()
2269 static int test_array [1 - 2 * !(($2) < 0)];
2270 test_array [0] = 0;
2271 return test_array [0];
2274 return 0;
2276 _ACEOF
2277 if ac_fn_c_try_compile "$LINENO"; then :
2278 ac_hi=-1 ac_mid=-1
2279 while :; do
2280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2281 /* end confdefs.h. */
2284 main ()
2286 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2287 test_array [0] = 0;
2288 return test_array [0];
2291 return 0;
2293 _ACEOF
2294 if ac_fn_c_try_compile "$LINENO"; then :
2295 ac_lo=$ac_mid; break
2296 else
2297 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2298 if test $ac_mid -le $ac_hi; then
2299 ac_lo= ac_hi=
2300 break
2302 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2305 done
2306 else
2307 ac_lo= ac_hi=
2309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2312 # Binary search between lo and hi bounds.
2313 while test "x$ac_lo" != "x$ac_hi"; do
2314 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316 /* end confdefs.h. */
2319 main ()
2321 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2322 test_array [0] = 0;
2323 return test_array [0];
2326 return 0;
2328 _ACEOF
2329 if ac_fn_c_try_compile "$LINENO"; then :
2330 ac_hi=$ac_mid
2331 else
2332 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2335 done
2336 case $ac_lo in #((
2337 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2338 '') ac_retval=1 ;;
2339 esac
2340 else
2341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2342 /* end confdefs.h. */
2344 static long int longval () { return $2; }
2345 static unsigned long int ulongval () { return $2; }
2346 #include <stdio.h>
2347 #include <stdlib.h>
2349 main ()
2352 FILE *f = fopen ("conftest.val", "w");
2353 if (! f)
2354 return 1;
2355 if (($2) < 0)
2357 long int i = longval ();
2358 if (i != ($2))
2359 return 1;
2360 fprintf (f, "%ld", i);
2362 else
2364 unsigned long int i = ulongval ();
2365 if (i != ($2))
2366 return 1;
2367 fprintf (f, "%lu", i);
2369 /* Do not output a trailing newline, as this causes \r\n confusion
2370 on some platforms. */
2371 return ferror (f) || fclose (f) != 0;
2374 return 0;
2376 _ACEOF
2377 if ac_fn_c_try_run "$LINENO"; then :
2378 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2379 else
2380 ac_retval=1
2382 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2383 conftest.$ac_objext conftest.beam conftest.$ac_ext
2384 rm -f conftest.val
2387 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2388 as_fn_set_status $ac_retval
2390 } # ac_fn_c_compute_int
2392 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2393 # ---------------------------------------------
2394 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2395 # accordingly.
2396 ac_fn_c_check_decl ()
2398 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2399 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2400 as_decl_name=`echo $2|sed 's/ *(.*//'`
2401 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2403 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2404 if eval \${$3+:} false; then :
2405 $as_echo_n "(cached) " >&6
2406 else
2407 ac_save_werror_flag=$ac_c_werror_flag
2408 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2410 /* end confdefs.h. */
2413 main ()
2415 #ifndef $as_decl_name
2416 #ifdef __cplusplus
2417 (void) $as_decl_use;
2418 #else
2419 (void) $as_decl_name;
2420 #endif
2421 #endif
2424 return 0;
2426 _ACEOF
2427 if ac_fn_c_try_compile "$LINENO"; then :
2428 eval "$3=yes"
2429 else
2430 eval "$3=no"
2432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2433 ac_c_werror_flag=$ac_save_werror_flag
2435 eval ac_res=\$$3
2436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2437 $as_echo "$ac_res" >&6; }
2438 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2440 } # ac_fn_c_check_decl
2441 cat >config.log <<_ACEOF
2442 This file contains any messages produced by compilers while
2443 running configure, to aid debugging if configure makes a mistake.
2445 It was created by PostgreSQL $as_me 18devel, which was
2446 generated by GNU Autoconf 2.69. Invocation command line was
2448 $ $0 $@
2450 _ACEOF
2451 exec 5>>config.log
2453 cat <<_ASUNAME
2454 ## --------- ##
2455 ## Platform. ##
2456 ## --------- ##
2458 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2459 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2460 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2461 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2462 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2464 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2465 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2467 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2468 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2469 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2470 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2471 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2472 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2473 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2475 _ASUNAME
2477 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2478 for as_dir in $PATH
2480 IFS=$as_save_IFS
2481 test -z "$as_dir" && as_dir=.
2482 $as_echo "PATH: $as_dir"
2483 done
2484 IFS=$as_save_IFS
2486 } >&5
2488 cat >&5 <<_ACEOF
2491 ## ----------- ##
2492 ## Core tests. ##
2493 ## ----------- ##
2495 _ACEOF
2498 # Keep a trace of the command line.
2499 # Strip out --no-create and --no-recursion so they do not pile up.
2500 # Strip out --silent because we don't want to record it for future runs.
2501 # Also quote any args containing shell meta-characters.
2502 # Make two passes to allow for proper duplicate-argument suppression.
2503 ac_configure_args=
2504 ac_configure_args0=
2505 ac_configure_args1=
2506 ac_must_keep_next=false
2507 for ac_pass in 1 2
2509 for ac_arg
2511 case $ac_arg in
2512 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2513 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2514 | -silent | --silent | --silen | --sile | --sil)
2515 continue ;;
2516 *\'*)
2517 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2518 esac
2519 case $ac_pass in
2520 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2522 as_fn_append ac_configure_args1 " '$ac_arg'"
2523 if test $ac_must_keep_next = true; then
2524 ac_must_keep_next=false # Got value, back to normal.
2525 else
2526 case $ac_arg in
2527 *=* | --config-cache | -C | -disable-* | --disable-* \
2528 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2529 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2530 | -with-* | --with-* | -without-* | --without-* | --x)
2531 case "$ac_configure_args0 " in
2532 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2533 esac
2535 -* ) ac_must_keep_next=true ;;
2536 esac
2538 as_fn_append ac_configure_args " '$ac_arg'"
2540 esac
2541 done
2542 done
2543 { ac_configure_args0=; unset ac_configure_args0;}
2544 { ac_configure_args1=; unset ac_configure_args1;}
2546 # When interrupted or exit'd, cleanup temporary files, and complete
2547 # config.log. We remove comments because anyway the quotes in there
2548 # would cause problems or look ugly.
2549 # WARNING: Use '\'' to represent an apostrophe within the trap.
2550 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2551 trap 'exit_status=$?
2552 # Save into config.log some information that might help in debugging.
2554 echo
2556 $as_echo "## ---------------- ##
2557 ## Cache variables. ##
2558 ## ---------------- ##"
2559 echo
2560 # The following way of writing the cache mishandles newlines in values,
2562 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2563 eval ac_val=\$$ac_var
2564 case $ac_val in #(
2565 *${as_nl}*)
2566 case $ac_var in #(
2567 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2568 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2569 esac
2570 case $ac_var in #(
2571 _ | IFS | as_nl) ;; #(
2572 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2573 *) { eval $ac_var=; unset $ac_var;} ;;
2574 esac ;;
2575 esac
2576 done
2577 (set) 2>&1 |
2578 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2579 *${as_nl}ac_space=\ *)
2580 sed -n \
2581 "s/'\''/'\''\\\\'\'''\''/g;
2582 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2583 ;; #(
2585 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2587 esac |
2588 sort
2590 echo
2592 $as_echo "## ----------------- ##
2593 ## Output variables. ##
2594 ## ----------------- ##"
2595 echo
2596 for ac_var in $ac_subst_vars
2598 eval ac_val=\$$ac_var
2599 case $ac_val in
2600 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2601 esac
2602 $as_echo "$ac_var='\''$ac_val'\''"
2603 done | sort
2604 echo
2606 if test -n "$ac_subst_files"; then
2607 $as_echo "## ------------------- ##
2608 ## File substitutions. ##
2609 ## ------------------- ##"
2610 echo
2611 for ac_var in $ac_subst_files
2613 eval ac_val=\$$ac_var
2614 case $ac_val in
2615 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2616 esac
2617 $as_echo "$ac_var='\''$ac_val'\''"
2618 done | sort
2619 echo
2622 if test -s confdefs.h; then
2623 $as_echo "## ----------- ##
2624 ## confdefs.h. ##
2625 ## ----------- ##"
2626 echo
2627 cat confdefs.h
2628 echo
2630 test "$ac_signal" != 0 &&
2631 $as_echo "$as_me: caught signal $ac_signal"
2632 $as_echo "$as_me: exit $exit_status"
2633 } >&5
2634 rm -f core *.core core.conftest.* &&
2635 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2636 exit $exit_status
2638 for ac_signal in 1 2 13 15; do
2639 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2640 done
2641 ac_signal=0
2643 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2644 rm -f -r conftest* confdefs.h
2646 $as_echo "/* confdefs.h */" > confdefs.h
2648 # Predefined preprocessor variables.
2650 cat >>confdefs.h <<_ACEOF
2651 #define PACKAGE_NAME "$PACKAGE_NAME"
2652 _ACEOF
2654 cat >>confdefs.h <<_ACEOF
2655 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2656 _ACEOF
2658 cat >>confdefs.h <<_ACEOF
2659 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2660 _ACEOF
2662 cat >>confdefs.h <<_ACEOF
2663 #define PACKAGE_STRING "$PACKAGE_STRING"
2664 _ACEOF
2666 cat >>confdefs.h <<_ACEOF
2667 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2668 _ACEOF
2670 cat >>confdefs.h <<_ACEOF
2671 #define PACKAGE_URL "$PACKAGE_URL"
2672 _ACEOF
2675 # Let the site file select an alternate cache file if it wants to.
2676 # Prefer an explicitly selected file to automatically selected ones.
2677 ac_site_file1=NONE
2678 ac_site_file2=NONE
2679 if test -n "$CONFIG_SITE"; then
2680 # We do not want a PATH search for config.site.
2681 case $CONFIG_SITE in #((
2682 -*) ac_site_file1=./$CONFIG_SITE;;
2683 */*) ac_site_file1=$CONFIG_SITE;;
2684 *) ac_site_file1=./$CONFIG_SITE;;
2685 esac
2686 elif test "x$prefix" != xNONE; then
2687 ac_site_file1=$prefix/share/config.site
2688 ac_site_file2=$prefix/etc/config.site
2689 else
2690 ac_site_file1=$ac_default_prefix/share/config.site
2691 ac_site_file2=$ac_default_prefix/etc/config.site
2693 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2695 test "x$ac_site_file" = xNONE && continue
2696 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2697 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2698 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2699 sed 's/^/| /' "$ac_site_file" >&5
2700 . "$ac_site_file" \
2701 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2702 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2703 as_fn_error $? "failed to load site script $ac_site_file
2704 See \`config.log' for more details" "$LINENO" 5; }
2706 done
2708 if test -r "$cache_file"; then
2709 # Some versions of bash will fail to source /dev/null (special files
2710 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2711 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2713 $as_echo "$as_me: loading cache $cache_file" >&6;}
2714 case $cache_file in
2715 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2716 *) . "./$cache_file";;
2717 esac
2719 else
2720 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2721 $as_echo "$as_me: creating cache $cache_file" >&6;}
2722 >$cache_file
2725 # Check that the precious variables saved in the cache have kept the same
2726 # value.
2727 ac_cache_corrupted=false
2728 for ac_var in $ac_precious_vars; do
2729 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2730 eval ac_new_set=\$ac_env_${ac_var}_set
2731 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2732 eval ac_new_val=\$ac_env_${ac_var}_value
2733 case $ac_old_set,$ac_new_set in
2734 set,)
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2736 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2737 ac_cache_corrupted=: ;;
2738 ,set)
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2740 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2741 ac_cache_corrupted=: ;;
2742 ,);;
2744 if test "x$ac_old_val" != "x$ac_new_val"; then
2745 # differences in whitespace do not lead to failure.
2746 ac_old_val_w=`echo x $ac_old_val`
2747 ac_new_val_w=`echo x $ac_new_val`
2748 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2750 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2751 ac_cache_corrupted=:
2752 else
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2754 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2755 eval $ac_var=\$ac_old_val
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2758 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2760 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2761 fi;;
2762 esac
2763 # Pass precious variables to config.status.
2764 if test "$ac_new_set" = set; then
2765 case $ac_new_val in
2766 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2767 *) ac_arg=$ac_var=$ac_new_val ;;
2768 esac
2769 case " $ac_configure_args " in
2770 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2771 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2772 esac
2774 done
2775 if $ac_cache_corrupted; then
2776 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2777 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2779 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2780 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2782 ## -------------------- ##
2783 ## Main body of script. ##
2784 ## -------------------- ##
2786 ac_ext=c
2787 ac_cpp='$CPP $CPPFLAGS'
2788 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2789 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2790 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2797 ac_aux_dir=
2798 for ac_dir in config "$srcdir"/config; do
2799 if test -f "$ac_dir/install-sh"; then
2800 ac_aux_dir=$ac_dir
2801 ac_install_sh="$ac_aux_dir/install-sh -c"
2802 break
2803 elif test -f "$ac_dir/install.sh"; then
2804 ac_aux_dir=$ac_dir
2805 ac_install_sh="$ac_aux_dir/install.sh -c"
2806 break
2807 elif test -f "$ac_dir/shtool"; then
2808 ac_aux_dir=$ac_dir
2809 ac_install_sh="$ac_aux_dir/shtool install -c"
2810 break
2812 done
2813 if test -z "$ac_aux_dir"; then
2814 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2817 # These three variables are undocumented and unsupported,
2818 # and are intended to be withdrawn in a future Autoconf release.
2819 # They can cause serious problems if a builder's source tree is in a directory
2820 # whose full name contains unusual characters.
2821 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2822 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2823 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2828 cat >>confdefs.h <<_ACEOF
2829 #define CONFIGURE_ARGS "$ac_configure_args"
2830 _ACEOF
2833 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2834 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2835 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2838 cat >>confdefs.h <<_ACEOF
2839 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2840 _ACEOF
2843 cat >>confdefs.h <<_ACEOF
2844 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2845 _ACEOF
2848 cat >>confdefs.h <<_ACEOF
2849 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2850 _ACEOF
2856 # Check whether --with-extra-version was given.
2857 if test "${with_extra_version+set}" = set; then :
2858 withval=$with_extra_version;
2859 case $withval in
2860 yes)
2861 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2864 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2867 PG_VERSION="$PACKAGE_VERSION$withval"
2869 esac
2871 else
2872 PG_VERSION="$PACKAGE_VERSION"
2877 cat >>confdefs.h <<_ACEOF
2878 #define PG_VERSION "$PG_VERSION"
2879 _ACEOF
2882 # Make sure we can run config.sub.
2883 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2884 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2887 $as_echo_n "checking build system type... " >&6; }
2888 if ${ac_cv_build+:} false; then :
2889 $as_echo_n "(cached) " >&6
2890 else
2891 ac_build_alias=$build_alias
2892 test "x$ac_build_alias" = x &&
2893 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2894 test "x$ac_build_alias" = x &&
2895 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2896 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2897 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2901 $as_echo "$ac_cv_build" >&6; }
2902 case $ac_cv_build in
2903 *-*-*) ;;
2904 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2905 esac
2906 build=$ac_cv_build
2907 ac_save_IFS=$IFS; IFS='-'
2908 set x $ac_cv_build
2909 shift
2910 build_cpu=$1
2911 build_vendor=$2
2912 shift; shift
2913 # Remember, the first character of IFS is used to create $*,
2914 # except with old shells:
2915 build_os=$*
2916 IFS=$ac_save_IFS
2917 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2921 $as_echo_n "checking host system type... " >&6; }
2922 if ${ac_cv_host+:} false; then :
2923 $as_echo_n "(cached) " >&6
2924 else
2925 if test "x$host_alias" = x; then
2926 ac_cv_host=$ac_cv_build
2927 else
2928 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2929 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2934 $as_echo "$ac_cv_host" >&6; }
2935 case $ac_cv_host in
2936 *-*-*) ;;
2937 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2938 esac
2939 host=$ac_cv_host
2940 ac_save_IFS=$IFS; IFS='-'
2941 set x $ac_cv_host
2942 shift
2943 host_cpu=$1
2944 host_vendor=$2
2945 shift; shift
2946 # Remember, the first character of IFS is used to create $*,
2947 # except with old shells:
2948 host_os=$*
2949 IFS=$ac_save_IFS
2950 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2954 template=
2955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2956 $as_echo_n "checking which template to use... " >&6; }
2961 # Check whether --with-template was given.
2962 if test "${with_template+set}" = set; then :
2963 withval=$with_template;
2964 case $withval in
2965 yes)
2966 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2969 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2973 case $withval in
2974 list) echo; ls "$srcdir/src/template"; exit;;
2975 *) if test -f "$srcdir/src/template/$with_template" ; then
2976 template=$withval
2977 else
2978 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2979 fi;;
2980 esac
2983 esac
2985 else
2987 # --with-template not given
2989 case $host_os in
2990 cygwin*|msys*) template=cygwin ;;
2991 darwin*) template=darwin ;;
2992 dragonfly*) template=netbsd ;;
2993 freebsd*) template=freebsd ;;
2994 linux*|gnu*|k*bsd*-gnu)
2995 template=linux ;;
2996 mingw*) template=win32 ;;
2997 netbsd*) template=netbsd ;;
2998 openbsd*) template=openbsd ;;
2999 solaris*) template=solaris ;;
3000 esac
3002 if test x"$template" = x"" ; then
3003 as_fn_error $? "
3004 *******************************************************************
3005 PostgreSQL has apparently not been ported to your platform yet.
3006 To try a manual configuration, look into the src/template directory
3007 for a similar platform and use the '--with-template=' option.
3009 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
3010 rectifying this. Include the above 'checking host system type...'
3011 line.
3012 *******************************************************************
3013 " "$LINENO" 5
3021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3022 $as_echo "$template" >&6; }
3024 PORTNAME=$template
3027 # Initialize default assumption that we do not need separate assembly code
3028 # for TAS (test-and-set). This can be overridden by the template file
3029 # when it's executed.
3030 need_tas=no
3031 tas_file=dummy.s
3033 # Default, works for most platforms, override in template file if needed
3034 DLSUFFIX=".so"
3039 ## Command line options
3043 # Add non-standard directories to the include path
3048 # Check whether --with-includes was given.
3049 if test "${with_includes+set}" = set; then :
3050 withval=$with_includes;
3051 case $withval in
3052 yes)
3053 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3056 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3061 esac
3069 # Add non-standard directories to the library search path
3074 # Check whether --with-libraries was given.
3075 if test "${with_libraries+set}" = set; then :
3076 withval=$with_libraries;
3077 case $withval in
3078 yes)
3079 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3082 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3085 LIBRARY_DIRS=$withval
3087 esac
3096 # Check whether --with-libs was given.
3097 if test "${with_libs+set}" = set; then :
3098 withval=$with_libs;
3099 case $withval in
3100 yes)
3101 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3104 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3107 LIBRARY_DIRS=$withval
3109 esac
3117 # 64-bit integer date/time storage is now the only option, but to avoid
3118 # unnecessary breakage of build scripts, continue to accept an explicit
3119 # "--enable-integer-datetimes" switch.
3123 # Check whether --enable-integer-datetimes was given.
3124 if test "${enable_integer_datetimes+set}" = set; then :
3125 enableval=$enable_integer_datetimes;
3126 case $enableval in
3127 yes)
3131 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3134 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3136 esac
3138 else
3139 enable_integer_datetimes=yes
3147 # NLS
3149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3150 $as_echo_n "checking whether NLS is wanted... " >&6; }
3153 # Check whether --enable-nls was given.
3154 if test "${enable_nls+set}" = set; then :
3155 enableval=$enable_nls;
3156 case $enableval in
3157 yes)
3164 enable_nls=yes
3165 WANTED_LANGUAGES=$enableval
3167 esac
3169 else
3170 enable_nls=no
3175 if test "$enable_nls" = yes; then
3177 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3182 $as_echo "$enable_nls" >&6; }
3187 # Default port number (--with-pgport), default 5432
3189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3190 $as_echo_n "checking for default port number... " >&6; }
3194 # Check whether --with-pgport was given.
3195 if test "${with_pgport+set}" = set; then :
3196 withval=$with_pgport;
3197 case $withval in
3198 yes)
3199 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3202 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3205 default_port=$withval
3207 esac
3209 else
3210 default_port=5432
3214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3215 $as_echo "$default_port" >&6; }
3216 # Need both of these because some places want an integer and some a string
3218 cat >>confdefs.h <<_ACEOF
3219 #define DEF_PGPORT ${default_port}
3220 _ACEOF
3223 cat >>confdefs.h <<_ACEOF
3224 #define DEF_PGPORT_STR "${default_port}"
3225 _ACEOF
3229 # It's worth validating port; you can get very confusing errors otherwise
3230 if test x"$default_port" = x""; then
3231 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3232 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3233 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3234 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3235 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3236 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3237 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3241 # '-rpath'-like feature can be disabled
3245 # Check whether --enable-rpath was given.
3246 if test "${enable_rpath+set}" = set; then :
3247 enableval=$enable_rpath;
3248 case $enableval in
3249 yes)
3256 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3258 esac
3260 else
3261 enable_rpath=yes
3269 # --enable-debug adds -g to compiler flags
3273 # Check whether --enable-debug was given.
3274 if test "${enable_debug+set}" = set; then :
3275 enableval=$enable_debug;
3276 case $enableval in
3277 yes)
3284 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3286 esac
3288 else
3289 enable_debug=no
3297 # --enable-profiling enables gcc profiling
3301 # Check whether --enable-profiling was given.
3302 if test "${enable_profiling+set}" = set; then :
3303 enableval=$enable_profiling;
3304 case $enableval in
3305 yes)
3312 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3314 esac
3316 else
3317 enable_profiling=no
3324 # --enable-coverage enables generation of code coverage metrics with gcov
3328 # Check whether --enable-coverage was given.
3329 if test "${enable_coverage+set}" = set; then :
3330 enableval=$enable_coverage;
3331 case $enableval in
3332 yes)
3333 if test -z "$GCOV"; then
3334 for ac_prog in gcov
3336 # Extract the first word of "$ac_prog", so it can be a program name with args.
3337 set dummy $ac_prog; ac_word=$2
3338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3339 $as_echo_n "checking for $ac_word... " >&6; }
3340 if ${ac_cv_path_GCOV+:} false; then :
3341 $as_echo_n "(cached) " >&6
3342 else
3343 case $GCOV in
3344 [\\/]* | ?:[\\/]*)
3345 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3348 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3349 for as_dir in $PATH
3351 IFS=$as_save_IFS
3352 test -z "$as_dir" && as_dir=.
3353 for ac_exec_ext in '' $ac_executable_extensions; do
3354 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3355 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3356 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3357 break 2
3359 done
3360 done
3361 IFS=$as_save_IFS
3364 esac
3366 GCOV=$ac_cv_path_GCOV
3367 if test -n "$GCOV"; then
3368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3369 $as_echo "$GCOV" >&6; }
3370 else
3371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3372 $as_echo "no" >&6; }
3376 test -n "$GCOV" && break
3377 done
3379 else
3380 # Report the value of GCOV in configure's output in all cases.
3381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3382 $as_echo_n "checking for GCOV... " >&6; }
3383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3384 $as_echo "$GCOV" >&6; }
3387 if test -z "$GCOV"; then
3388 as_fn_error $? "gcov not found" "$LINENO" 5
3390 if test -z "$LCOV"; then
3391 for ac_prog in lcov
3393 # Extract the first word of "$ac_prog", so it can be a program name with args.
3394 set dummy $ac_prog; ac_word=$2
3395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3396 $as_echo_n "checking for $ac_word... " >&6; }
3397 if ${ac_cv_path_LCOV+:} false; then :
3398 $as_echo_n "(cached) " >&6
3399 else
3400 case $LCOV in
3401 [\\/]* | ?:[\\/]*)
3402 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3406 for as_dir in $PATH
3408 IFS=$as_save_IFS
3409 test -z "$as_dir" && as_dir=.
3410 for ac_exec_ext in '' $ac_executable_extensions; do
3411 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3412 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3413 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3414 break 2
3416 done
3417 done
3418 IFS=$as_save_IFS
3421 esac
3423 LCOV=$ac_cv_path_LCOV
3424 if test -n "$LCOV"; then
3425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3426 $as_echo "$LCOV" >&6; }
3427 else
3428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3429 $as_echo "no" >&6; }
3433 test -n "$LCOV" && break
3434 done
3436 else
3437 # Report the value of LCOV in configure's output in all cases.
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3439 $as_echo_n "checking for LCOV... " >&6; }
3440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3441 $as_echo "$LCOV" >&6; }
3444 if test -z "$LCOV"; then
3445 as_fn_error $? "lcov not found" "$LINENO" 5
3447 if test -z "$GENHTML"; then
3448 for ac_prog in genhtml
3450 # Extract the first word of "$ac_prog", so it can be a program name with args.
3451 set dummy $ac_prog; ac_word=$2
3452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3453 $as_echo_n "checking for $ac_word... " >&6; }
3454 if ${ac_cv_path_GENHTML+:} false; then :
3455 $as_echo_n "(cached) " >&6
3456 else
3457 case $GENHTML in
3458 [\\/]* | ?:[\\/]*)
3459 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3463 for as_dir in $PATH
3465 IFS=$as_save_IFS
3466 test -z "$as_dir" && as_dir=.
3467 for ac_exec_ext in '' $ac_executable_extensions; do
3468 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3469 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3470 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3471 break 2
3473 done
3474 done
3475 IFS=$as_save_IFS
3478 esac
3480 GENHTML=$ac_cv_path_GENHTML
3481 if test -n "$GENHTML"; then
3482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3483 $as_echo "$GENHTML" >&6; }
3484 else
3485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3486 $as_echo "no" >&6; }
3490 test -n "$GENHTML" && break
3491 done
3493 else
3494 # Report the value of GENHTML in configure's output in all cases.
3495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3496 $as_echo_n "checking for GENHTML... " >&6; }
3497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3498 $as_echo "$GENHTML" >&6; }
3501 if test -z "$GENHTML"; then
3502 as_fn_error $? "genhtml not found" "$LINENO" 5
3509 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3511 esac
3513 else
3514 enable_coverage=no
3522 # DTrace
3526 # Check whether --enable-dtrace was given.
3527 if test "${enable_dtrace+set}" = set; then :
3528 enableval=$enable_dtrace;
3529 case $enableval in
3530 yes)
3531 if test -z "$DTRACE"; then
3532 for ac_prog in dtrace
3534 # Extract the first word of "$ac_prog", so it can be a program name with args.
3535 set dummy $ac_prog; ac_word=$2
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3537 $as_echo_n "checking for $ac_word... " >&6; }
3538 if ${ac_cv_path_DTRACE+:} false; then :
3539 $as_echo_n "(cached) " >&6
3540 else
3541 case $DTRACE in
3542 [\\/]* | ?:[\\/]*)
3543 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3546 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3547 for as_dir in $PATH
3549 IFS=$as_save_IFS
3550 test -z "$as_dir" && as_dir=.
3551 for ac_exec_ext in '' $ac_executable_extensions; do
3552 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3553 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3554 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3555 break 2
3557 done
3558 done
3559 IFS=$as_save_IFS
3562 esac
3564 DTRACE=$ac_cv_path_DTRACE
3565 if test -n "$DTRACE"; then
3566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3567 $as_echo "$DTRACE" >&6; }
3568 else
3569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3570 $as_echo "no" >&6; }
3574 test -n "$DTRACE" && break
3575 done
3577 else
3578 # Report the value of DTRACE in configure's output in all cases.
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3580 $as_echo_n "checking for DTRACE... " >&6; }
3581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3582 $as_echo "$DTRACE" >&6; }
3585 if test -z "$DTRACE"; then
3586 as_fn_error $? "dtrace not found" "$LINENO" 5
3594 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3596 esac
3598 else
3599 enable_dtrace=no
3607 # TAP tests
3611 # Check whether --enable-tap-tests was given.
3612 if test "${enable_tap_tests+set}" = set; then :
3613 enableval=$enable_tap_tests;
3614 case $enableval in
3615 yes)
3622 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3624 esac
3626 else
3627 enable_tap_tests=no
3636 # Injection points
3640 # Check whether --enable-injection-points was given.
3641 if test "${enable_injection_points+set}" = set; then :
3642 enableval=$enable_injection_points;
3643 case $enableval in
3644 yes)
3646 $as_echo "#define USE_INJECTION_POINTS 1" >>confdefs.h
3653 as_fn_error $? "no argument expected for --enable-injection-points option" "$LINENO" 5
3655 esac
3657 else
3658 enable_injection_points=no
3666 # Block size
3668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3669 $as_echo_n "checking for block size... " >&6; }
3673 # Check whether --with-blocksize was given.
3674 if test "${with_blocksize+set}" = set; then :
3675 withval=$with_blocksize;
3676 case $withval in
3677 yes)
3678 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3681 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3684 blocksize=$withval
3686 esac
3688 else
3689 blocksize=8
3693 case ${blocksize} in
3694 1) BLCKSZ=1024;;
3695 2) BLCKSZ=2048;;
3696 4) BLCKSZ=4096;;
3697 8) BLCKSZ=8192;;
3698 16) BLCKSZ=16384;;
3699 32) BLCKSZ=32768;;
3700 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3701 esac
3702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3703 $as_echo "${blocksize}kB" >&6; }
3706 cat >>confdefs.h <<_ACEOF
3707 #define BLCKSZ ${BLCKSZ}
3708 _ACEOF
3712 # Relation segment size
3717 # Check whether --with-segsize was given.
3718 if test "${with_segsize+set}" = set; then :
3719 withval=$with_segsize;
3720 case $withval in
3721 yes)
3722 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3725 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3728 segsize=$withval
3730 esac
3732 else
3733 segsize=1
3740 # Check whether --with-segsize-blocks was given.
3741 if test "${with_segsize_blocks+set}" = set; then :
3742 withval=$with_segsize_blocks;
3743 case $withval in
3744 yes)
3745 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3748 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3751 segsize_blocks=$withval
3753 esac
3755 else
3756 segsize_blocks=0
3761 # If --with-segsize-blocks is non-zero, it is used, --with-segsize
3762 # otherwise. segsize-blocks is only really useful for developers wanting to
3763 # test segment related code. Warn if both are used.
3764 if test $segsize_blocks -ne 0 -a $segsize -ne 1; then
3765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&5
3766 $as_echo "$as_me: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&2;}
3769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3770 $as_echo_n "checking for segment size... " >&6; }
3771 if test $segsize_blocks -eq 0; then
3772 # this expression is set up to avoid unnecessary integer overflow
3773 # blocksize is already guaranteed to be a factor of 1024
3774 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3775 test $? -eq 0 || exit 1
3776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3777 $as_echo "${segsize}GB" >&6; }
3778 else
3779 RELSEG_SIZE=$segsize_blocks
3780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${RELSEG_SIZE} blocks" >&5
3781 $as_echo "${RELSEG_SIZE} blocks" >&6; }
3785 cat >>confdefs.h <<_ACEOF
3786 #define RELSEG_SIZE ${RELSEG_SIZE}
3787 _ACEOF
3791 # WAL block size
3793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3794 $as_echo_n "checking for WAL block size... " >&6; }
3798 # Check whether --with-wal-blocksize was given.
3799 if test "${with_wal_blocksize+set}" = set; then :
3800 withval=$with_wal_blocksize;
3801 case $withval in
3802 yes)
3803 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3806 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3809 wal_blocksize=$withval
3811 esac
3813 else
3814 wal_blocksize=8
3818 case ${wal_blocksize} in
3819 1) XLOG_BLCKSZ=1024;;
3820 2) XLOG_BLCKSZ=2048;;
3821 4) XLOG_BLCKSZ=4096;;
3822 8) XLOG_BLCKSZ=8192;;
3823 16) XLOG_BLCKSZ=16384;;
3824 32) XLOG_BLCKSZ=32768;;
3825 64) XLOG_BLCKSZ=65536;;
3826 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3827 esac
3828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3829 $as_echo "${wal_blocksize}kB" >&6; }
3832 cat >>confdefs.h <<_ACEOF
3833 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3834 _ACEOF
3838 # C compiler
3841 # If you don't specify a list of compilers to test, the AC_PROG_CC and
3842 # AC_PROG_CXX macros test for a long list of unsupported compilers.
3843 pgac_cc_list="gcc cc"
3844 pgac_cxx_list="g++ c++"
3846 ac_ext=c
3847 ac_cpp='$CPP $CPPFLAGS'
3848 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3849 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3850 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3851 if test -n "$ac_tool_prefix"; then
3852 for ac_prog in $pgac_cc_list
3854 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3855 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3857 $as_echo_n "checking for $ac_word... " >&6; }
3858 if ${ac_cv_prog_CC+:} false; then :
3859 $as_echo_n "(cached) " >&6
3860 else
3861 if test -n "$CC"; then
3862 ac_cv_prog_CC="$CC" # Let the user override the test.
3863 else
3864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3865 for as_dir in $PATH
3867 IFS=$as_save_IFS
3868 test -z "$as_dir" && as_dir=.
3869 for ac_exec_ext in '' $ac_executable_extensions; do
3870 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3871 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3872 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3873 break 2
3875 done
3876 done
3877 IFS=$as_save_IFS
3881 CC=$ac_cv_prog_CC
3882 if test -n "$CC"; then
3883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3884 $as_echo "$CC" >&6; }
3885 else
3886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3887 $as_echo "no" >&6; }
3891 test -n "$CC" && break
3892 done
3894 if test -z "$CC"; then
3895 ac_ct_CC=$CC
3896 for ac_prog in $pgac_cc_list
3898 # Extract the first word of "$ac_prog", so it can be a program name with args.
3899 set dummy $ac_prog; ac_word=$2
3900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3901 $as_echo_n "checking for $ac_word... " >&6; }
3902 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3903 $as_echo_n "(cached) " >&6
3904 else
3905 if test -n "$ac_ct_CC"; then
3906 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3907 else
3908 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3909 for as_dir in $PATH
3911 IFS=$as_save_IFS
3912 test -z "$as_dir" && as_dir=.
3913 for ac_exec_ext in '' $ac_executable_extensions; do
3914 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3915 ac_cv_prog_ac_ct_CC="$ac_prog"
3916 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3917 break 2
3919 done
3920 done
3921 IFS=$as_save_IFS
3925 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3926 if test -n "$ac_ct_CC"; then
3927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3928 $as_echo "$ac_ct_CC" >&6; }
3929 else
3930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3931 $as_echo "no" >&6; }
3935 test -n "$ac_ct_CC" && break
3936 done
3938 if test "x$ac_ct_CC" = x; then
3939 CC=""
3940 else
3941 case $cross_compiling:$ac_tool_warned in
3942 yes:)
3943 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3944 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3945 ac_tool_warned=yes ;;
3946 esac
3947 CC=$ac_ct_CC
3952 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3953 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3954 as_fn_error $? "no acceptable C compiler found in \$PATH
3955 See \`config.log' for more details" "$LINENO" 5; }
3957 # Provide some information about the compiler.
3958 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3959 set X $ac_compile
3960 ac_compiler=$2
3961 for ac_option in --version -v -V -qversion; do
3962 { { ac_try="$ac_compiler $ac_option >&5"
3963 case "(($ac_try" in
3964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3965 *) ac_try_echo=$ac_try;;
3966 esac
3967 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3968 $as_echo "$ac_try_echo"; } >&5
3969 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3970 ac_status=$?
3971 if test -s conftest.err; then
3972 sed '10a\
3973 ... rest of stderr output deleted ...
3974 10q' conftest.err >conftest.er1
3975 cat conftest.er1 >&5
3977 rm -f conftest.er1 conftest.err
3978 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3979 test $ac_status = 0; }
3980 done
3982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3983 /* end confdefs.h. */
3986 main ()
3990 return 0;
3992 _ACEOF
3993 ac_clean_files_save=$ac_clean_files
3994 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3995 # Try to create an executable without -o first, disregard a.out.
3996 # It will help us diagnose broken compilers, and finding out an intuition
3997 # of exeext.
3998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3999 $as_echo_n "checking whether the C compiler works... " >&6; }
4000 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4002 # The possible output files:
4003 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4005 ac_rmfiles=
4006 for ac_file in $ac_files
4008 case $ac_file in
4009 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4010 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4011 esac
4012 done
4013 rm -f $ac_rmfiles
4015 if { { ac_try="$ac_link_default"
4016 case "(($ac_try" in
4017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4018 *) ac_try_echo=$ac_try;;
4019 esac
4020 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4021 $as_echo "$ac_try_echo"; } >&5
4022 (eval "$ac_link_default") 2>&5
4023 ac_status=$?
4024 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4025 test $ac_status = 0; }; then :
4026 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4027 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4028 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4029 # so that the user can short-circuit this test for compilers unknown to
4030 # Autoconf.
4031 for ac_file in $ac_files ''
4033 test -f "$ac_file" || continue
4034 case $ac_file in
4035 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4037 [ab].out )
4038 # We found the default executable, but exeext='' is most
4039 # certainly right.
4040 break;;
4041 *.* )
4042 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4043 then :; else
4044 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4046 # We set ac_cv_exeext here because the later test for it is not
4047 # safe: cross compilers may not add the suffix if given an `-o'
4048 # argument, so we may need to know it at that point already.
4049 # Even if this section looks crufty: it has the advantage of
4050 # actually working.
4051 break;;
4053 break;;
4054 esac
4055 done
4056 test "$ac_cv_exeext" = no && ac_cv_exeext=
4058 else
4059 ac_file=''
4061 if test -z "$ac_file"; then :
4062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4063 $as_echo "no" >&6; }
4064 $as_echo "$as_me: failed program was:" >&5
4065 sed 's/^/| /' conftest.$ac_ext >&5
4067 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4068 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4069 as_fn_error 77 "C compiler cannot create executables
4070 See \`config.log' for more details" "$LINENO" 5; }
4071 else
4072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4073 $as_echo "yes" >&6; }
4075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4076 $as_echo_n "checking for C compiler default output file name... " >&6; }
4077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4078 $as_echo "$ac_file" >&6; }
4079 ac_exeext=$ac_cv_exeext
4081 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4082 ac_clean_files=$ac_clean_files_save
4083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4084 $as_echo_n "checking for suffix of executables... " >&6; }
4085 if { { ac_try="$ac_link"
4086 case "(($ac_try" in
4087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4088 *) ac_try_echo=$ac_try;;
4089 esac
4090 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4091 $as_echo "$ac_try_echo"; } >&5
4092 (eval "$ac_link") 2>&5
4093 ac_status=$?
4094 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4095 test $ac_status = 0; }; then :
4096 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4097 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4098 # work properly (i.e., refer to `conftest.exe'), while it won't with
4099 # `rm'.
4100 for ac_file in conftest.exe conftest conftest.*; do
4101 test -f "$ac_file" || continue
4102 case $ac_file in
4103 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4104 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4105 break;;
4106 * ) break;;
4107 esac
4108 done
4109 else
4110 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4111 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4112 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4113 See \`config.log' for more details" "$LINENO" 5; }
4115 rm -f conftest conftest$ac_cv_exeext
4116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4117 $as_echo "$ac_cv_exeext" >&6; }
4119 rm -f conftest.$ac_ext
4120 EXEEXT=$ac_cv_exeext
4121 ac_exeext=$EXEEXT
4122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4123 /* end confdefs.h. */
4124 #include <stdio.h>
4126 main ()
4128 FILE *f = fopen ("conftest.out", "w");
4129 return ferror (f) || fclose (f) != 0;
4132 return 0;
4134 _ACEOF
4135 ac_clean_files="$ac_clean_files conftest.out"
4136 # Check that the compiler produces executables we can run. If not, either
4137 # the compiler is broken, or we cross compile.
4138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4139 $as_echo_n "checking whether we are cross compiling... " >&6; }
4140 if test "$cross_compiling" != yes; then
4141 { { ac_try="$ac_link"
4142 case "(($ac_try" in
4143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4144 *) ac_try_echo=$ac_try;;
4145 esac
4146 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4147 $as_echo "$ac_try_echo"; } >&5
4148 (eval "$ac_link") 2>&5
4149 ac_status=$?
4150 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4151 test $ac_status = 0; }
4152 if { ac_try='./conftest$ac_cv_exeext'
4153 { { case "(($ac_try" in
4154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4155 *) ac_try_echo=$ac_try;;
4156 esac
4157 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4158 $as_echo "$ac_try_echo"; } >&5
4159 (eval "$ac_try") 2>&5
4160 ac_status=$?
4161 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4162 test $ac_status = 0; }; }; then
4163 cross_compiling=no
4164 else
4165 if test "$cross_compiling" = maybe; then
4166 cross_compiling=yes
4167 else
4168 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4169 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4170 as_fn_error $? "cannot run C compiled programs.
4171 If you meant to cross compile, use \`--host'.
4172 See \`config.log' for more details" "$LINENO" 5; }
4176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4177 $as_echo "$cross_compiling" >&6; }
4179 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4180 ac_clean_files=$ac_clean_files_save
4181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4182 $as_echo_n "checking for suffix of object files... " >&6; }
4183 if ${ac_cv_objext+:} false; then :
4184 $as_echo_n "(cached) " >&6
4185 else
4186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4187 /* end confdefs.h. */
4190 main ()
4194 return 0;
4196 _ACEOF
4197 rm -f conftest.o conftest.obj
4198 if { { ac_try="$ac_compile"
4199 case "(($ac_try" in
4200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4201 *) ac_try_echo=$ac_try;;
4202 esac
4203 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4204 $as_echo "$ac_try_echo"; } >&5
4205 (eval "$ac_compile") 2>&5
4206 ac_status=$?
4207 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4208 test $ac_status = 0; }; then :
4209 for ac_file in conftest.o conftest.obj conftest.*; do
4210 test -f "$ac_file" || continue;
4211 case $ac_file in
4212 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4213 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4214 break;;
4215 esac
4216 done
4217 else
4218 $as_echo "$as_me: failed program was:" >&5
4219 sed 's/^/| /' conftest.$ac_ext >&5
4221 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4222 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4223 as_fn_error $? "cannot compute suffix of object files: cannot compile
4224 See \`config.log' for more details" "$LINENO" 5; }
4226 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4229 $as_echo "$ac_cv_objext" >&6; }
4230 OBJEXT=$ac_cv_objext
4231 ac_objext=$OBJEXT
4232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4233 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4234 if ${ac_cv_c_compiler_gnu+:} false; then :
4235 $as_echo_n "(cached) " >&6
4236 else
4237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4238 /* end confdefs.h. */
4241 main ()
4243 #ifndef __GNUC__
4244 choke me
4245 #endif
4248 return 0;
4250 _ACEOF
4251 if ac_fn_c_try_compile "$LINENO"; then :
4252 ac_compiler_gnu=yes
4253 else
4254 ac_compiler_gnu=no
4256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4257 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4261 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4262 if test $ac_compiler_gnu = yes; then
4263 GCC=yes
4264 else
4265 GCC=
4267 ac_test_CFLAGS=${CFLAGS+set}
4268 ac_save_CFLAGS=$CFLAGS
4269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4270 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4271 if ${ac_cv_prog_cc_g+:} false; then :
4272 $as_echo_n "(cached) " >&6
4273 else
4274 ac_save_c_werror_flag=$ac_c_werror_flag
4275 ac_c_werror_flag=yes
4276 ac_cv_prog_cc_g=no
4277 CFLAGS="-g"
4278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4279 /* end confdefs.h. */
4282 main ()
4286 return 0;
4288 _ACEOF
4289 if ac_fn_c_try_compile "$LINENO"; then :
4290 ac_cv_prog_cc_g=yes
4291 else
4292 CFLAGS=""
4293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4294 /* end confdefs.h. */
4297 main ()
4301 return 0;
4303 _ACEOF
4304 if ac_fn_c_try_compile "$LINENO"; then :
4306 else
4307 ac_c_werror_flag=$ac_save_c_werror_flag
4308 CFLAGS="-g"
4309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4310 /* end confdefs.h. */
4313 main ()
4317 return 0;
4319 _ACEOF
4320 if ac_fn_c_try_compile "$LINENO"; then :
4321 ac_cv_prog_cc_g=yes
4323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4327 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4328 ac_c_werror_flag=$ac_save_c_werror_flag
4330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4331 $as_echo "$ac_cv_prog_cc_g" >&6; }
4332 if test "$ac_test_CFLAGS" = set; then
4333 CFLAGS=$ac_save_CFLAGS
4334 elif test $ac_cv_prog_cc_g = yes; then
4335 if test "$GCC" = yes; then
4336 CFLAGS="-g -O2"
4337 else
4338 CFLAGS="-g"
4340 else
4341 if test "$GCC" = yes; then
4342 CFLAGS="-O2"
4343 else
4344 CFLAGS=
4347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4348 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4349 if ${ac_cv_prog_cc_c89+:} false; then :
4350 $as_echo_n "(cached) " >&6
4351 else
4352 ac_cv_prog_cc_c89=no
4353 ac_save_CC=$CC
4354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4355 /* end confdefs.h. */
4356 #include <stdarg.h>
4357 #include <stdio.h>
4358 struct stat;
4359 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4360 struct buf { int x; };
4361 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4362 static char *e (p, i)
4363 char **p;
4364 int i;
4366 return p[i];
4368 static char *f (char * (*g) (char **, int), char **p, ...)
4370 char *s;
4371 va_list v;
4372 va_start (v,p);
4373 s = g (p, va_arg (v,int));
4374 va_end (v);
4375 return s;
4378 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4379 function prototypes and stuff, but not '\xHH' hex character constants.
4380 These don't provoke an error unfortunately, instead are silently treated
4381 as 'x'. The following induces an error, until -std is added to get
4382 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4383 array size at least. It's necessary to write '\x00'==0 to get something
4384 that's true only with -std. */
4385 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4387 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4388 inside strings and character constants. */
4389 #define FOO(x) 'x'
4390 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4392 int test (int i, double x);
4393 struct s1 {int (*f) (int a);};
4394 struct s2 {int (*f) (double a);};
4395 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4396 int argc;
4397 char **argv;
4399 main ()
4401 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4403 return 0;
4405 _ACEOF
4406 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4407 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4409 CC="$ac_save_CC $ac_arg"
4410 if ac_fn_c_try_compile "$LINENO"; then :
4411 ac_cv_prog_cc_c89=$ac_arg
4413 rm -f core conftest.err conftest.$ac_objext
4414 test "x$ac_cv_prog_cc_c89" != "xno" && break
4415 done
4416 rm -f conftest.$ac_ext
4417 CC=$ac_save_CC
4420 # AC_CACHE_VAL
4421 case "x$ac_cv_prog_cc_c89" in
4423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4424 $as_echo "none needed" >&6; } ;;
4425 xno)
4426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4427 $as_echo "unsupported" >&6; } ;;
4429 CC="$CC $ac_cv_prog_cc_c89"
4430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4431 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4432 esac
4433 if test "x$ac_cv_prog_cc_c89" != xno; then :
4437 ac_ext=c
4438 ac_cpp='$CPP $CPPFLAGS'
4439 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4440 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4441 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4444 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4445 if ${ac_cv_prog_cc_c99+:} false; then :
4446 $as_echo_n "(cached) " >&6
4447 else
4448 ac_cv_prog_cc_c99=no
4449 ac_save_CC=$CC
4450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4451 /* end confdefs.h. */
4452 #include <stdarg.h>
4453 #include <stdbool.h>
4454 #include <stdlib.h>
4455 #include <wchar.h>
4456 #include <stdio.h>
4458 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4459 #define debug(...) fprintf (stderr, __VA_ARGS__)
4460 #define showlist(...) puts (#__VA_ARGS__)
4461 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4462 static void
4463 test_varargs_macros (void)
4465 int x = 1234;
4466 int y = 5678;
4467 debug ("Flag");
4468 debug ("X = %d\n", x);
4469 showlist (The first, second, and third items.);
4470 report (x>y, "x is %d but y is %d", x, y);
4473 // Check long long types.
4474 #define BIG64 18446744073709551615ull
4475 #define BIG32 4294967295ul
4476 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4477 #if !BIG_OK
4478 your preprocessor is broken;
4479 #endif
4480 #if BIG_OK
4481 #else
4482 your preprocessor is broken;
4483 #endif
4484 static long long int bignum = -9223372036854775807LL;
4485 static unsigned long long int ubignum = BIG64;
4487 struct incomplete_array
4489 int datasize;
4490 double data[];
4493 struct named_init {
4494 int number;
4495 const wchar_t *name;
4496 double average;
4499 typedef const char *ccp;
4501 static inline int
4502 test_restrict (ccp restrict text)
4504 // See if C++-style comments work.
4505 // Iterate through items via the restricted pointer.
4506 // Also check for declarations in for loops.
4507 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4508 continue;
4509 return 0;
4512 // Check varargs and va_copy.
4513 static void
4514 test_varargs (const char *format, ...)
4516 va_list args;
4517 va_start (args, format);
4518 va_list args_copy;
4519 va_copy (args_copy, args);
4521 const char *str;
4522 int number;
4523 float fnumber;
4525 while (*format)
4527 switch (*format++)
4529 case 's': // string
4530 str = va_arg (args_copy, const char *);
4531 break;
4532 case 'd': // int
4533 number = va_arg (args_copy, int);
4534 break;
4535 case 'f': // float
4536 fnumber = va_arg (args_copy, double);
4537 break;
4538 default:
4539 break;
4542 va_end (args_copy);
4543 va_end (args);
4547 main ()
4550 // Check bool.
4551 _Bool success = false;
4553 // Check restrict.
4554 if (test_restrict ("String literal") == 0)
4555 success = true;
4556 char *restrict newvar = "Another string";
4558 // Check varargs.
4559 test_varargs ("s, d' f .", "string", 65, 34.234);
4560 test_varargs_macros ();
4562 // Check flexible array members.
4563 struct incomplete_array *ia =
4564 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4565 ia->datasize = 10;
4566 for (int i = 0; i < ia->datasize; ++i)
4567 ia->data[i] = i * 1.234;
4569 // Check named initializers.
4570 struct named_init ni = {
4571 .number = 34,
4572 .name = L"Test wide string",
4573 .average = 543.34343,
4576 ni.number = 58;
4578 int dynamic_array[ni.number];
4579 dynamic_array[ni.number - 1] = 543;
4581 // work around unused variable warnings
4582 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4583 || dynamic_array[ni.number - 1] != 543);
4586 return 0;
4588 _ACEOF
4589 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4591 CC="$ac_save_CC $ac_arg"
4592 if ac_fn_c_try_compile "$LINENO"; then :
4593 ac_cv_prog_cc_c99=$ac_arg
4595 rm -f core conftest.err conftest.$ac_objext
4596 test "x$ac_cv_prog_cc_c99" != "xno" && break
4597 done
4598 rm -f conftest.$ac_ext
4599 CC=$ac_save_CC
4602 # AC_CACHE_VAL
4603 case "x$ac_cv_prog_cc_c99" in
4605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4606 $as_echo "none needed" >&6; } ;;
4607 xno)
4608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4609 $as_echo "unsupported" >&6; } ;;
4611 CC="$CC $ac_cv_prog_cc_c99"
4612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4613 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4614 esac
4615 if test "x$ac_cv_prog_cc_c99" != xno; then :
4621 # Error out if the compiler does not support C99, as the codebase
4622 # relies on that.
4623 if test "$ac_cv_prog_cc_c99" = no; then
4624 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4627 ac_ext=cpp
4628 ac_cpp='$CXXCPP $CPPFLAGS'
4629 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4630 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4631 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4632 if test -z "$CXX"; then
4633 if test -n "$CCC"; then
4634 CXX=$CCC
4635 else
4636 if test -n "$ac_tool_prefix"; then
4637 for ac_prog in $pgac_cxx_list
4639 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4640 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4642 $as_echo_n "checking for $ac_word... " >&6; }
4643 if ${ac_cv_prog_CXX+:} false; then :
4644 $as_echo_n "(cached) " >&6
4645 else
4646 if test -n "$CXX"; then
4647 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4648 else
4649 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4650 for as_dir in $PATH
4652 IFS=$as_save_IFS
4653 test -z "$as_dir" && as_dir=.
4654 for ac_exec_ext in '' $ac_executable_extensions; do
4655 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4656 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4658 break 2
4660 done
4661 done
4662 IFS=$as_save_IFS
4666 CXX=$ac_cv_prog_CXX
4667 if test -n "$CXX"; then
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4669 $as_echo "$CXX" >&6; }
4670 else
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4672 $as_echo "no" >&6; }
4676 test -n "$CXX" && break
4677 done
4679 if test -z "$CXX"; then
4680 ac_ct_CXX=$CXX
4681 for ac_prog in $pgac_cxx_list
4683 # Extract the first word of "$ac_prog", so it can be a program name with args.
4684 set dummy $ac_prog; ac_word=$2
4685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4686 $as_echo_n "checking for $ac_word... " >&6; }
4687 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4688 $as_echo_n "(cached) " >&6
4689 else
4690 if test -n "$ac_ct_CXX"; then
4691 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4692 else
4693 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4694 for as_dir in $PATH
4696 IFS=$as_save_IFS
4697 test -z "$as_dir" && as_dir=.
4698 for ac_exec_ext in '' $ac_executable_extensions; do
4699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4700 ac_cv_prog_ac_ct_CXX="$ac_prog"
4701 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4702 break 2
4704 done
4705 done
4706 IFS=$as_save_IFS
4710 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4711 if test -n "$ac_ct_CXX"; then
4712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4713 $as_echo "$ac_ct_CXX" >&6; }
4714 else
4715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4716 $as_echo "no" >&6; }
4720 test -n "$ac_ct_CXX" && break
4721 done
4723 if test "x$ac_ct_CXX" = x; then
4724 CXX="g++"
4725 else
4726 case $cross_compiling:$ac_tool_warned in
4727 yes:)
4728 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4729 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4730 ac_tool_warned=yes ;;
4731 esac
4732 CXX=$ac_ct_CXX
4738 # Provide some information about the compiler.
4739 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4740 set X $ac_compile
4741 ac_compiler=$2
4742 for ac_option in --version -v -V -qversion; do
4743 { { ac_try="$ac_compiler $ac_option >&5"
4744 case "(($ac_try" in
4745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4746 *) ac_try_echo=$ac_try;;
4747 esac
4748 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4749 $as_echo "$ac_try_echo"; } >&5
4750 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4751 ac_status=$?
4752 if test -s conftest.err; then
4753 sed '10a\
4754 ... rest of stderr output deleted ...
4755 10q' conftest.err >conftest.er1
4756 cat conftest.er1 >&5
4758 rm -f conftest.er1 conftest.err
4759 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4760 test $ac_status = 0; }
4761 done
4763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4764 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4765 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4766 $as_echo_n "(cached) " >&6
4767 else
4768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4769 /* end confdefs.h. */
4772 main ()
4774 #ifndef __GNUC__
4775 choke me
4776 #endif
4779 return 0;
4781 _ACEOF
4782 if ac_fn_cxx_try_compile "$LINENO"; then :
4783 ac_compiler_gnu=yes
4784 else
4785 ac_compiler_gnu=no
4787 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4788 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4792 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4793 if test $ac_compiler_gnu = yes; then
4794 GXX=yes
4795 else
4796 GXX=
4798 ac_test_CXXFLAGS=${CXXFLAGS+set}
4799 ac_save_CXXFLAGS=$CXXFLAGS
4800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4801 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4802 if ${ac_cv_prog_cxx_g+:} false; then :
4803 $as_echo_n "(cached) " >&6
4804 else
4805 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4806 ac_cxx_werror_flag=yes
4807 ac_cv_prog_cxx_g=no
4808 CXXFLAGS="-g"
4809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4810 /* end confdefs.h. */
4813 main ()
4817 return 0;
4819 _ACEOF
4820 if ac_fn_cxx_try_compile "$LINENO"; then :
4821 ac_cv_prog_cxx_g=yes
4822 else
4823 CXXFLAGS=""
4824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4825 /* end confdefs.h. */
4828 main ()
4832 return 0;
4834 _ACEOF
4835 if ac_fn_cxx_try_compile "$LINENO"; then :
4837 else
4838 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4839 CXXFLAGS="-g"
4840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4841 /* end confdefs.h. */
4844 main ()
4848 return 0;
4850 _ACEOF
4851 if ac_fn_cxx_try_compile "$LINENO"; then :
4852 ac_cv_prog_cxx_g=yes
4854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4859 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4862 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4863 if test "$ac_test_CXXFLAGS" = set; then
4864 CXXFLAGS=$ac_save_CXXFLAGS
4865 elif test $ac_cv_prog_cxx_g = yes; then
4866 if test "$GXX" = yes; then
4867 CXXFLAGS="-g -O2"
4868 else
4869 CXXFLAGS="-g"
4871 else
4872 if test "$GXX" = yes; then
4873 CXXFLAGS="-O2"
4874 else
4875 CXXFLAGS=
4878 ac_ext=c
4879 ac_cpp='$CPP $CPPFLAGS'
4880 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4881 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4882 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4885 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4886 # but has idiosyncrasies of its own. We assume icc will define
4887 # __INTEL_COMPILER regardless of CFLAGS.
4889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4890 /* end confdefs.h. */
4893 main ()
4895 #ifndef __INTEL_COMPILER
4896 choke me
4897 #endif
4899 return 0;
4901 _ACEOF
4902 if ac_fn_c_try_compile "$LINENO"; then :
4903 ICC=yes
4904 else
4905 ICC=no
4907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4909 # Check if it's Sun Studio compiler. We assume that
4910 # __SUNPRO_C will be defined for Sun Studio compilers
4911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4912 /* end confdefs.h. */
4915 main ()
4917 #ifndef __SUNPRO_C
4918 choke me
4919 #endif
4921 return 0;
4923 _ACEOF
4924 if ac_fn_c_try_compile "$LINENO"; then :
4925 SUN_STUDIO_CC=yes
4926 else
4927 SUN_STUDIO_CC=no
4929 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4935 # LLVM
4937 # Checked early because subsequent tests depend on it.
4941 # Check whether --with-llvm was given.
4942 if test "${with_llvm+set}" = set; then :
4943 withval=$with_llvm;
4944 case $withval in
4945 yes)
4947 $as_echo "#define USE_LLVM 1" >>confdefs.h
4954 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4956 esac
4958 else
4959 with_llvm=no
4965 for ac_prog in gawk mawk nawk awk
4967 # Extract the first word of "$ac_prog", so it can be a program name with args.
4968 set dummy $ac_prog; ac_word=$2
4969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4970 $as_echo_n "checking for $ac_word... " >&6; }
4971 if ${ac_cv_prog_AWK+:} false; then :
4972 $as_echo_n "(cached) " >&6
4973 else
4974 if test -n "$AWK"; then
4975 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4976 else
4977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4978 for as_dir in $PATH
4980 IFS=$as_save_IFS
4981 test -z "$as_dir" && as_dir=.
4982 for ac_exec_ext in '' $ac_executable_extensions; do
4983 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4984 ac_cv_prog_AWK="$ac_prog"
4985 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4986 break 2
4988 done
4989 done
4990 IFS=$as_save_IFS
4994 AWK=$ac_cv_prog_AWK
4995 if test -n "$AWK"; then
4996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4997 $as_echo "$AWK" >&6; }
4998 else
4999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5000 $as_echo "no" >&6; }
5004 test -n "$AWK" && break
5005 done
5007 if test "$with_llvm" = yes; then :
5013 if test -z "$LLVM_CONFIG"; then
5014 for ac_prog in llvm-config
5016 # Extract the first word of "$ac_prog", so it can be a program name with args.
5017 set dummy $ac_prog; ac_word=$2
5018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5019 $as_echo_n "checking for $ac_word... " >&6; }
5020 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5021 $as_echo_n "(cached) " >&6
5022 else
5023 case $LLVM_CONFIG in
5024 [\\/]* | ?:[\\/]*)
5025 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5029 for as_dir in $PATH
5031 IFS=$as_save_IFS
5032 test -z "$as_dir" && as_dir=.
5033 for ac_exec_ext in '' $ac_executable_extensions; do
5034 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5035 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5037 break 2
5039 done
5040 done
5041 IFS=$as_save_IFS
5044 esac
5046 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5047 if test -n "$LLVM_CONFIG"; then
5048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5049 $as_echo "$LLVM_CONFIG" >&6; }
5050 else
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5052 $as_echo "no" >&6; }
5056 test -n "$LLVM_CONFIG" && break
5057 done
5059 else
5060 # Report the value of LLVM_CONFIG in configure's output in all cases.
5061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5062 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5064 $as_echo "$LLVM_CONFIG" >&6; }
5068 # no point continuing if llvm wasn't found
5069 if test -z "$LLVM_CONFIG"; then
5070 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5072 # check if detected $LLVM_CONFIG is executable
5073 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5074 if test "x$pgac_llvm_version" = "xno"; then
5075 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5077 # and whether the version is supported
5078 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 14) exit 1; else exit 0;}';then
5079 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 14 is required" "$LINENO" 5
5081 { $as_echo "$as_me:${as_lineno-$LINENO}: using llvm $pgac_llvm_version" >&5
5082 $as_echo "$as_me: using llvm $pgac_llvm_version" >&6;}
5084 # need clang to create some bitcode files
5086 if test -z "$CLANG"; then
5087 for ac_prog in clang
5089 # Extract the first word of "$ac_prog", so it can be a program name with args.
5090 set dummy $ac_prog; ac_word=$2
5091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5092 $as_echo_n "checking for $ac_word... " >&6; }
5093 if ${ac_cv_path_CLANG+:} false; then :
5094 $as_echo_n "(cached) " >&6
5095 else
5096 case $CLANG in
5097 [\\/]* | ?:[\\/]*)
5098 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5101 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5102 for as_dir in $PATH
5104 IFS=$as_save_IFS
5105 test -z "$as_dir" && as_dir=.
5106 for ac_exec_ext in '' $ac_executable_extensions; do
5107 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5108 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5109 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5110 break 2
5112 done
5113 done
5114 IFS=$as_save_IFS
5117 esac
5119 CLANG=$ac_cv_path_CLANG
5120 if test -n "$CLANG"; then
5121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5122 $as_echo "$CLANG" >&6; }
5123 else
5124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5125 $as_echo "no" >&6; }
5129 test -n "$CLANG" && break
5130 done
5132 else
5133 # Report the value of CLANG in configure's output in all cases.
5134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5135 $as_echo_n "checking for CLANG... " >&6; }
5136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5137 $as_echo "$CLANG" >&6; }
5140 if test -z "$CLANG"; then
5141 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5143 # make sure clang is executable
5144 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5145 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5147 # Could check clang version, but it doesn't seem that
5148 # important. Systems with a new enough LLVM version are usually
5149 # going to have a decent clang version too. It's also not entirely
5150 # clear what the minimum version is.
5152 # Collect compiler flags necessary to build the LLVM dependent
5153 # shared library.
5154 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5155 case $pgac_option in
5156 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5157 esac
5158 done
5160 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5161 case $pgac_option in
5162 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5163 esac
5164 done
5166 # ABI influencing options, standard influencing options
5167 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5168 case $pgac_option in
5169 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5170 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5171 esac
5172 done
5174 # Look for components we're interested in, collect necessary
5175 # libs. As some components are optional, we can't just list all of
5176 # them as it'd raise an error.
5177 pgac_components='';
5178 for pgac_component in `$LLVM_CONFIG --components`; do
5179 case $pgac_component in
5180 engine) pgac_components="$pgac_components $pgac_component";;
5181 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5182 orcjit) pgac_components="$pgac_components $pgac_component";;
5183 passes) pgac_components="$pgac_components $pgac_component";;
5184 native) pgac_components="$pgac_components $pgac_component";;
5185 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5186 esac
5187 done;
5189 # And then get the libraries that need to be linked in for the
5190 # selected components. They're large libraries, we only want to
5191 # link them into the LLVM using shared library.
5192 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5193 case $pgac_option in
5194 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5195 esac
5196 done
5198 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5208 fi # fi
5211 unset CFLAGS
5212 unset CXXFLAGS
5215 # Read the template
5217 . "$srcdir/src/template/$template" || exit
5219 # C[XX]FLAGS are selected so:
5220 # If the user specifies something in the environment, that is used.
5221 # else: If the template file set something, that is used.
5222 # else: If coverage was enabled, don't set anything.
5223 # else: If the compiler is GCC, then we use -O2.
5224 # else: If the compiler is something else, then we use -O, unless debugging.
5226 if test "$ac_env_CFLAGS_set" = set; then
5227 CFLAGS=$ac_env_CFLAGS_value
5228 elif test "${CFLAGS+set}" = set; then
5229 : # (keep what template set)
5230 elif test "$enable_coverage" = yes; then
5231 : # no optimization by default
5232 elif test "$GCC" = yes; then
5233 CFLAGS="-O2"
5234 else
5235 # if the user selected debug mode, don't use -O
5236 if test "$enable_debug" != yes; then
5237 CFLAGS="-O"
5241 if test "$ac_env_CXXFLAGS_set" = set; then
5242 CXXFLAGS=$ac_env_CXXFLAGS_value
5243 elif test "${CXXFLAGS+set}" = set; then
5244 : # (keep what template set)
5245 elif test "$enable_coverage" = yes; then
5246 : # no optimization by default
5247 elif test "$GCC" = yes; then
5248 CXXFLAGS="-O2"
5249 else
5250 # if the user selected debug mode, don't use -O
5251 if test "$enable_debug" != yes; then
5252 CXXFLAGS="-O"
5256 # When generating bitcode (for inlining) we always want to use -O2
5257 # even when --enable-debug is specified. The bitcode is not going to
5258 # be used for line-by-line debugging, and JIT inlining doesn't work
5259 # without at least -O1 (otherwise clang will emit 'noinline'
5260 # attributes everywhere), which is bad for testing. Still allow the
5261 # environment to override if done explicitly.
5262 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5263 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5264 else
5265 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5267 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5268 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5269 else
5270 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5273 # C[XX]FLAGS we determined above will be added back at the end
5274 user_CFLAGS=$CFLAGS
5275 CFLAGS=""
5276 user_CXXFLAGS=$CXXFLAGS
5277 CXXFLAGS=""
5278 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5279 BITCODE_CFLAGS=""
5280 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5281 BITCODE_CXXFLAGS=""
5283 # set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5284 if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5285 CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5287 if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5288 CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5291 # Some versions of GCC support some additional useful warning flags.
5292 # Check whether they are supported, and add them to CFLAGS if so.
5293 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5294 # but has its own. Also check other compiler-specific flags here.
5296 if test "$GCC" = yes -a "$ICC" = no; then
5297 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5298 CXXFLAGS="-Wall -Wpointer-arith"
5299 # These work in some but not all gcc versions
5300 save_CFLAGS=$CFLAGS
5302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5303 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5304 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5305 $as_echo_n "(cached) " >&6
5306 else
5307 pgac_save_CFLAGS=$CFLAGS
5308 pgac_save_CC=$CC
5309 CC=${CC}
5310 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5311 ac_save_c_werror_flag=$ac_c_werror_flag
5312 ac_c_werror_flag=yes
5313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5314 /* end confdefs.h. */
5317 main ()
5321 return 0;
5323 _ACEOF
5324 if ac_fn_c_try_compile "$LINENO"; then :
5325 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5326 else
5327 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5330 ac_c_werror_flag=$ac_save_c_werror_flag
5331 CFLAGS="$pgac_save_CFLAGS"
5332 CC="$pgac_save_CC"
5334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5335 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5336 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5337 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5341 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5342 # disable it, so AC_SUBST the negative form.
5343 PERMIT_DECLARATION_AFTER_STATEMENT=
5344 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5345 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5348 # Really don't want VLAs to be used in our dialect of C
5350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5351 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5352 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5353 $as_echo_n "(cached) " >&6
5354 else
5355 pgac_save_CFLAGS=$CFLAGS
5356 pgac_save_CC=$CC
5357 CC=${CC}
5358 CFLAGS="${CFLAGS} -Werror=vla"
5359 ac_save_c_werror_flag=$ac_c_werror_flag
5360 ac_c_werror_flag=yes
5361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5362 /* end confdefs.h. */
5365 main ()
5369 return 0;
5371 _ACEOF
5372 if ac_fn_c_try_compile "$LINENO"; then :
5373 pgac_cv_prog_CC_cflags__Werror_vla=yes
5374 else
5375 pgac_cv_prog_CC_cflags__Werror_vla=no
5377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5378 ac_c_werror_flag=$ac_save_c_werror_flag
5379 CFLAGS="$pgac_save_CFLAGS"
5380 CC="$pgac_save_CC"
5382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5383 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5384 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5385 CFLAGS="${CFLAGS} -Werror=vla"
5389 # On macOS, complain about usage of symbols newer than the deployment target
5391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS" >&5
5392 $as_echo_n "checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS... " >&6; }
5393 if ${pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new+:} false; then :
5394 $as_echo_n "(cached) " >&6
5395 else
5396 pgac_save_CFLAGS=$CFLAGS
5397 pgac_save_CC=$CC
5398 CC=${CC}
5399 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5400 ac_save_c_werror_flag=$ac_c_werror_flag
5401 ac_c_werror_flag=yes
5402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5403 /* end confdefs.h. */
5406 main ()
5410 return 0;
5412 _ACEOF
5413 if ac_fn_c_try_compile "$LINENO"; then :
5414 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=yes
5415 else
5416 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=no
5418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5419 ac_c_werror_flag=$ac_save_c_werror_flag
5420 CFLAGS="$pgac_save_CFLAGS"
5421 CC="$pgac_save_CC"
5423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&5
5424 $as_echo "$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&6; }
5425 if test x"$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" = x"yes"; then
5426 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS" >&5
5431 $as_echo_n "checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS... " >&6; }
5432 if ${pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new+:} false; then :
5433 $as_echo_n "(cached) " >&6
5434 else
5435 pgac_save_CXXFLAGS=$CXXFLAGS
5436 pgac_save_CXX=$CXX
5437 CXX=${CXX}
5438 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5439 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5440 ac_cxx_werror_flag=yes
5441 ac_ext=cpp
5442 ac_cpp='$CXXCPP $CPPFLAGS'
5443 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5444 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5445 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5448 /* end confdefs.h. */
5451 main ()
5455 return 0;
5457 _ACEOF
5458 if ac_fn_cxx_try_compile "$LINENO"; then :
5459 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=yes
5460 else
5461 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=no
5463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5464 ac_ext=c
5465 ac_cpp='$CPP $CPPFLAGS'
5466 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5467 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5468 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5470 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5471 CXXFLAGS="$pgac_save_CXXFLAGS"
5472 CXX="$pgac_save_CXX"
5474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&5
5475 $as_echo "$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&6; }
5476 if test x"$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" = x"yes"; then
5477 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5481 # -Wvla is not applicable for C++
5483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5484 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5485 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5486 $as_echo_n "(cached) " >&6
5487 else
5488 pgac_save_CFLAGS=$CFLAGS
5489 pgac_save_CC=$CC
5490 CC=${CC}
5491 CFLAGS="${CFLAGS} -Wendif-labels"
5492 ac_save_c_werror_flag=$ac_c_werror_flag
5493 ac_c_werror_flag=yes
5494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5495 /* end confdefs.h. */
5498 main ()
5502 return 0;
5504 _ACEOF
5505 if ac_fn_c_try_compile "$LINENO"; then :
5506 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5507 else
5508 pgac_cv_prog_CC_cflags__Wendif_labels=no
5510 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5511 ac_c_werror_flag=$ac_save_c_werror_flag
5512 CFLAGS="$pgac_save_CFLAGS"
5513 CC="$pgac_save_CC"
5515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5516 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5517 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5518 CFLAGS="${CFLAGS} -Wendif-labels"
5522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5523 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5524 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5525 $as_echo_n "(cached) " >&6
5526 else
5527 pgac_save_CXXFLAGS=$CXXFLAGS
5528 pgac_save_CXX=$CXX
5529 CXX=${CXX}
5530 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5531 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5532 ac_cxx_werror_flag=yes
5533 ac_ext=cpp
5534 ac_cpp='$CXXCPP $CPPFLAGS'
5535 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5536 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5537 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5540 /* end confdefs.h. */
5543 main ()
5547 return 0;
5549 _ACEOF
5550 if ac_fn_cxx_try_compile "$LINENO"; then :
5551 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5552 else
5553 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5556 ac_ext=c
5557 ac_cpp='$CPP $CPPFLAGS'
5558 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5559 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5560 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5562 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5563 CXXFLAGS="$pgac_save_CXXFLAGS"
5564 CXX="$pgac_save_CXX"
5566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5567 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5568 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5569 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5575 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5576 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5577 $as_echo_n "(cached) " >&6
5578 else
5579 pgac_save_CFLAGS=$CFLAGS
5580 pgac_save_CC=$CC
5581 CC=${CC}
5582 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5583 ac_save_c_werror_flag=$ac_c_werror_flag
5584 ac_c_werror_flag=yes
5585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5586 /* end confdefs.h. */
5589 main ()
5593 return 0;
5595 _ACEOF
5596 if ac_fn_c_try_compile "$LINENO"; then :
5597 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5598 else
5599 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5602 ac_c_werror_flag=$ac_save_c_werror_flag
5603 CFLAGS="$pgac_save_CFLAGS"
5604 CC="$pgac_save_CC"
5606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5607 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5608 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5609 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5614 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5615 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5616 $as_echo_n "(cached) " >&6
5617 else
5618 pgac_save_CXXFLAGS=$CXXFLAGS
5619 pgac_save_CXX=$CXX
5620 CXX=${CXX}
5621 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5622 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5623 ac_cxx_werror_flag=yes
5624 ac_ext=cpp
5625 ac_cpp='$CXXCPP $CPPFLAGS'
5626 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5627 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5628 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5631 /* end confdefs.h. */
5634 main ()
5638 return 0;
5640 _ACEOF
5641 if ac_fn_cxx_try_compile "$LINENO"; then :
5642 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5643 else
5644 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5646 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5647 ac_ext=c
5648 ac_cpp='$CPP $CPPFLAGS'
5649 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5650 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5651 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5653 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5654 CXXFLAGS="$pgac_save_CXXFLAGS"
5655 CXX="$pgac_save_CXX"
5657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5658 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5659 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5660 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5666 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5667 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5668 $as_echo_n "(cached) " >&6
5669 else
5670 pgac_save_CFLAGS=$CFLAGS
5671 pgac_save_CC=$CC
5672 CC=${CC}
5673 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5674 ac_save_c_werror_flag=$ac_c_werror_flag
5675 ac_c_werror_flag=yes
5676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5677 /* end confdefs.h. */
5680 main ()
5684 return 0;
5686 _ACEOF
5687 if ac_fn_c_try_compile "$LINENO"; then :
5688 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5689 else
5690 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5692 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5693 ac_c_werror_flag=$ac_save_c_werror_flag
5694 CFLAGS="$pgac_save_CFLAGS"
5695 CC="$pgac_save_CC"
5697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5698 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5699 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5700 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5705 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5706 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5707 $as_echo_n "(cached) " >&6
5708 else
5709 pgac_save_CXXFLAGS=$CXXFLAGS
5710 pgac_save_CXX=$CXX
5711 CXX=${CXX}
5712 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5713 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5714 ac_cxx_werror_flag=yes
5715 ac_ext=cpp
5716 ac_cpp='$CXXCPP $CPPFLAGS'
5717 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5718 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5719 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5722 /* end confdefs.h. */
5725 main ()
5729 return 0;
5731 _ACEOF
5732 if ac_fn_cxx_try_compile "$LINENO"; then :
5733 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5734 else
5735 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5738 ac_ext=c
5739 ac_cpp='$CPP $CPPFLAGS'
5740 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5741 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5742 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5744 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5745 CXXFLAGS="$pgac_save_CXXFLAGS"
5746 CXX="$pgac_save_CXX"
5748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5749 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5750 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5751 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5757 $as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5758 if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5759 $as_echo_n "(cached) " >&6
5760 else
5761 pgac_save_CFLAGS=$CFLAGS
5762 pgac_save_CC=$CC
5763 CC=${CC}
5764 CFLAGS="${CFLAGS} -Wcast-function-type"
5765 ac_save_c_werror_flag=$ac_c_werror_flag
5766 ac_c_werror_flag=yes
5767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5768 /* end confdefs.h. */
5771 main ()
5775 return 0;
5777 _ACEOF
5778 if ac_fn_c_try_compile "$LINENO"; then :
5779 pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5780 else
5781 pgac_cv_prog_CC_cflags__Wcast_function_type=no
5783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5784 ac_c_werror_flag=$ac_save_c_werror_flag
5785 CFLAGS="$pgac_save_CFLAGS"
5786 CC="$pgac_save_CC"
5788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5789 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5790 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5791 CFLAGS="${CFLAGS} -Wcast-function-type"
5795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5796 $as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5797 if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5798 $as_echo_n "(cached) " >&6
5799 else
5800 pgac_save_CXXFLAGS=$CXXFLAGS
5801 pgac_save_CXX=$CXX
5802 CXX=${CXX}
5803 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5804 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5805 ac_cxx_werror_flag=yes
5806 ac_ext=cpp
5807 ac_cpp='$CXXCPP $CPPFLAGS'
5808 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5809 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5810 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5813 /* end confdefs.h. */
5816 main ()
5820 return 0;
5822 _ACEOF
5823 if ac_fn_cxx_try_compile "$LINENO"; then :
5824 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5825 else
5826 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5829 ac_ext=c
5830 ac_cpp='$CPP $CPPFLAGS'
5831 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5832 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5833 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5835 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5836 CXXFLAGS="$pgac_save_CXXFLAGS"
5837 CXX="$pgac_save_CXX"
5839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5840 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5841 if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5842 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS" >&5
5848 $as_echo_n "checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS... " >&6; }
5849 if ${pgac_cv_prog_CC_cflags__Wshadow_compatible_local+:} false; then :
5850 $as_echo_n "(cached) " >&6
5851 else
5852 pgac_save_CFLAGS=$CFLAGS
5853 pgac_save_CC=$CC
5854 CC=${CC}
5855 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5856 ac_save_c_werror_flag=$ac_c_werror_flag
5857 ac_c_werror_flag=yes
5858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5859 /* end confdefs.h. */
5862 main ()
5866 return 0;
5868 _ACEOF
5869 if ac_fn_c_try_compile "$LINENO"; then :
5870 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=yes
5871 else
5872 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=no
5874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5875 ac_c_werror_flag=$ac_save_c_werror_flag
5876 CFLAGS="$pgac_save_CFLAGS"
5877 CC="$pgac_save_CC"
5879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&5
5880 $as_echo "$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&6; }
5881 if test x"$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" = x"yes"; then
5882 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS" >&5
5887 $as_echo_n "checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS... " >&6; }
5888 if ${pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local+:} false; then :
5889 $as_echo_n "(cached) " >&6
5890 else
5891 pgac_save_CXXFLAGS=$CXXFLAGS
5892 pgac_save_CXX=$CXX
5893 CXX=${CXX}
5894 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5895 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5896 ac_cxx_werror_flag=yes
5897 ac_ext=cpp
5898 ac_cpp='$CXXCPP $CPPFLAGS'
5899 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5900 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5901 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5904 /* end confdefs.h. */
5907 main ()
5911 return 0;
5913 _ACEOF
5914 if ac_fn_cxx_try_compile "$LINENO"; then :
5915 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=yes
5916 else
5917 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=no
5919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5920 ac_ext=c
5921 ac_cpp='$CPP $CPPFLAGS'
5922 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5923 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5924 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5926 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5927 CXXFLAGS="$pgac_save_CXXFLAGS"
5928 CXX="$pgac_save_CXX"
5930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&5
5931 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&6; }
5932 if test x"$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" = x"yes"; then
5933 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5937 # This was included in -Wall/-Wformat in older GCC versions
5939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5940 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5941 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5942 $as_echo_n "(cached) " >&6
5943 else
5944 pgac_save_CFLAGS=$CFLAGS
5945 pgac_save_CC=$CC
5946 CC=${CC}
5947 CFLAGS="${CFLAGS} -Wformat-security"
5948 ac_save_c_werror_flag=$ac_c_werror_flag
5949 ac_c_werror_flag=yes
5950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5951 /* end confdefs.h. */
5954 main ()
5958 return 0;
5960 _ACEOF
5961 if ac_fn_c_try_compile "$LINENO"; then :
5962 pgac_cv_prog_CC_cflags__Wformat_security=yes
5963 else
5964 pgac_cv_prog_CC_cflags__Wformat_security=no
5966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5967 ac_c_werror_flag=$ac_save_c_werror_flag
5968 CFLAGS="$pgac_save_CFLAGS"
5969 CC="$pgac_save_CC"
5971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5972 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5973 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5974 CFLAGS="${CFLAGS} -Wformat-security"
5978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5979 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5980 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5981 $as_echo_n "(cached) " >&6
5982 else
5983 pgac_save_CXXFLAGS=$CXXFLAGS
5984 pgac_save_CXX=$CXX
5985 CXX=${CXX}
5986 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5987 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5988 ac_cxx_werror_flag=yes
5989 ac_ext=cpp
5990 ac_cpp='$CXXCPP $CPPFLAGS'
5991 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5992 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5993 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5996 /* end confdefs.h. */
5999 main ()
6003 return 0;
6005 _ACEOF
6006 if ac_fn_cxx_try_compile "$LINENO"; then :
6007 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
6008 else
6009 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
6011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6012 ac_ext=c
6013 ac_cpp='$CPP $CPPFLAGS'
6014 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6015 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6016 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6018 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6019 CXXFLAGS="$pgac_save_CXXFLAGS"
6020 CXX="$pgac_save_CXX"
6022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
6023 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
6024 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
6025 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6029 # gcc 14+, clang for a while
6030 # (Supported in C++ by clang but not gcc. For consistency, omit in C++.)
6031 save_CFLAGS=$CFLAGS
6033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-variable-declarations, for CFLAGS" >&5
6034 $as_echo_n "checking whether ${CC} supports -Wmissing-variable-declarations, for CFLAGS... " >&6; }
6035 if ${pgac_cv_prog_CC_cflags__Wmissing_variable_declarations+:} false; then :
6036 $as_echo_n "(cached) " >&6
6037 else
6038 pgac_save_CFLAGS=$CFLAGS
6039 pgac_save_CC=$CC
6040 CC=${CC}
6041 CFLAGS="${CFLAGS} -Wmissing-variable-declarations"
6042 ac_save_c_werror_flag=$ac_c_werror_flag
6043 ac_c_werror_flag=yes
6044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6045 /* end confdefs.h. */
6048 main ()
6052 return 0;
6054 _ACEOF
6055 if ac_fn_c_try_compile "$LINENO"; then :
6056 pgac_cv_prog_CC_cflags__Wmissing_variable_declarations=yes
6057 else
6058 pgac_cv_prog_CC_cflags__Wmissing_variable_declarations=no
6060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6061 ac_c_werror_flag=$ac_save_c_werror_flag
6062 CFLAGS="$pgac_save_CFLAGS"
6063 CC="$pgac_save_CC"
6065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_variable_declarations" >&5
6066 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_variable_declarations" >&6; }
6067 if test x"$pgac_cv_prog_CC_cflags__Wmissing_variable_declarations" = x"yes"; then
6068 CFLAGS="${CFLAGS} -Wmissing-variable-declarations"
6072 PERMIT_MISSING_VARIABLE_DECLARATIONS=
6073 if test x"$save_CFLAGS" != x"$CFLAGS"; then
6074 PERMIT_MISSING_VARIABLE_DECLARATIONS=-Wno-missing-variable-declarations
6077 # Disable strict-aliasing rules; needed for gcc 3.3+
6079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6080 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6081 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6082 $as_echo_n "(cached) " >&6
6083 else
6084 pgac_save_CFLAGS=$CFLAGS
6085 pgac_save_CC=$CC
6086 CC=${CC}
6087 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6088 ac_save_c_werror_flag=$ac_c_werror_flag
6089 ac_c_werror_flag=yes
6090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6091 /* end confdefs.h. */
6094 main ()
6098 return 0;
6100 _ACEOF
6101 if ac_fn_c_try_compile "$LINENO"; then :
6102 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6103 else
6104 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6107 ac_c_werror_flag=$ac_save_c_werror_flag
6108 CFLAGS="$pgac_save_CFLAGS"
6109 CC="$pgac_save_CC"
6111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6112 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6113 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6114 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6119 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6120 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6121 $as_echo_n "(cached) " >&6
6122 else
6123 pgac_save_CXXFLAGS=$CXXFLAGS
6124 pgac_save_CXX=$CXX
6125 CXX=${CXX}
6126 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6127 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6128 ac_cxx_werror_flag=yes
6129 ac_ext=cpp
6130 ac_cpp='$CXXCPP $CPPFLAGS'
6131 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6132 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6133 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6136 /* end confdefs.h. */
6139 main ()
6143 return 0;
6145 _ACEOF
6146 if ac_fn_cxx_try_compile "$LINENO"; then :
6147 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6148 else
6149 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6152 ac_ext=c
6153 ac_cpp='$CPP $CPPFLAGS'
6154 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6155 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6156 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6158 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6159 CXXFLAGS="$pgac_save_CXXFLAGS"
6160 CXX="$pgac_save_CXX"
6162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6163 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6164 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6165 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6169 # Disable optimizations that assume no overflow; needed for gcc 4.3+
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
6172 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
6173 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
6174 $as_echo_n "(cached) " >&6
6175 else
6176 pgac_save_CFLAGS=$CFLAGS
6177 pgac_save_CC=$CC
6178 CC=${CC}
6179 CFLAGS="${CFLAGS} -fwrapv"
6180 ac_save_c_werror_flag=$ac_c_werror_flag
6181 ac_c_werror_flag=yes
6182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6183 /* end confdefs.h. */
6186 main ()
6190 return 0;
6192 _ACEOF
6193 if ac_fn_c_try_compile "$LINENO"; then :
6194 pgac_cv_prog_CC_cflags__fwrapv=yes
6195 else
6196 pgac_cv_prog_CC_cflags__fwrapv=no
6198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6199 ac_c_werror_flag=$ac_save_c_werror_flag
6200 CFLAGS="$pgac_save_CFLAGS"
6201 CC="$pgac_save_CC"
6203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
6204 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
6205 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
6206 CFLAGS="${CFLAGS} -fwrapv"
6210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
6211 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
6212 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
6213 $as_echo_n "(cached) " >&6
6214 else
6215 pgac_save_CXXFLAGS=$CXXFLAGS
6216 pgac_save_CXX=$CXX
6217 CXX=${CXX}
6218 CXXFLAGS="${CXXFLAGS} -fwrapv"
6219 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6220 ac_cxx_werror_flag=yes
6221 ac_ext=cpp
6222 ac_cpp='$CXXCPP $CPPFLAGS'
6223 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6224 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6225 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6228 /* end confdefs.h. */
6231 main ()
6235 return 0;
6237 _ACEOF
6238 if ac_fn_cxx_try_compile "$LINENO"; then :
6239 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6240 else
6241 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6244 ac_ext=c
6245 ac_cpp='$CPP $CPPFLAGS'
6246 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6247 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6248 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6250 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6251 CXXFLAGS="$pgac_save_CXXFLAGS"
6252 CXX="$pgac_save_CXX"
6254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6255 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6256 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6257 CXXFLAGS="${CXXFLAGS} -fwrapv"
6261 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6264 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6265 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6266 $as_echo_n "(cached) " >&6
6267 else
6268 pgac_save_CFLAGS=$CFLAGS
6269 pgac_save_CC=$CC
6270 CC=${CC}
6271 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6272 ac_save_c_werror_flag=$ac_c_werror_flag
6273 ac_c_werror_flag=yes
6274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6275 /* end confdefs.h. */
6278 main ()
6282 return 0;
6284 _ACEOF
6285 if ac_fn_c_try_compile "$LINENO"; then :
6286 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6287 else
6288 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6290 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6291 ac_c_werror_flag=$ac_save_c_werror_flag
6292 CFLAGS="$pgac_save_CFLAGS"
6293 CC="$pgac_save_CC"
6295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6296 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6297 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6298 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6303 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6304 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6305 $as_echo_n "(cached) " >&6
6306 else
6307 pgac_save_CXXFLAGS=$CXXFLAGS
6308 pgac_save_CXX=$CXX
6309 CXX=${CXX}
6310 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6311 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6312 ac_cxx_werror_flag=yes
6313 ac_ext=cpp
6314 ac_cpp='$CXXCPP $CPPFLAGS'
6315 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6316 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6317 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6320 /* end confdefs.h. */
6323 main ()
6327 return 0;
6329 _ACEOF
6330 if ac_fn_cxx_try_compile "$LINENO"; then :
6331 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6332 else
6333 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6336 ac_ext=c
6337 ac_cpp='$CPP $CPPFLAGS'
6338 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6339 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6340 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6342 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6343 CXXFLAGS="$pgac_save_CXXFLAGS"
6344 CXX="$pgac_save_CXX"
6346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6347 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6348 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6349 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6353 # Optimization flags for specific files that benefit from loop unrolling
6354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6355 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6356 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6357 $as_echo_n "(cached) " >&6
6358 else
6359 pgac_save_CFLAGS=$CFLAGS
6360 pgac_save_CC=$CC
6361 CC=${CC}
6362 CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6363 ac_save_c_werror_flag=$ac_c_werror_flag
6364 ac_c_werror_flag=yes
6365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6366 /* end confdefs.h. */
6369 main ()
6373 return 0;
6375 _ACEOF
6376 if ac_fn_c_try_compile "$LINENO"; then :
6377 pgac_cv_prog_CC_cflags__funroll_loops=yes
6378 else
6379 pgac_cv_prog_CC_cflags__funroll_loops=no
6381 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6382 ac_c_werror_flag=$ac_save_c_werror_flag
6383 CFLAGS="$pgac_save_CFLAGS"
6384 CC="$pgac_save_CC"
6386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6387 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6388 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6389 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6393 # Optimization flags for specific files that benefit from vectorization
6394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6395 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6396 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6397 $as_echo_n "(cached) " >&6
6398 else
6399 pgac_save_CFLAGS=$CFLAGS
6400 pgac_save_CC=$CC
6401 CC=${CC}
6402 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6403 ac_save_c_werror_flag=$ac_c_werror_flag
6404 ac_c_werror_flag=yes
6405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6406 /* end confdefs.h. */
6409 main ()
6413 return 0;
6415 _ACEOF
6416 if ac_fn_c_try_compile "$LINENO"; then :
6417 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6418 else
6419 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6422 ac_c_werror_flag=$ac_save_c_werror_flag
6423 CFLAGS="$pgac_save_CFLAGS"
6424 CC="$pgac_save_CC"
6426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6427 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6428 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6429 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6434 # The following tests want to suppress various unhelpful warnings by adding
6435 # -Wno-foo switches. But gcc won't complain about unrecognized -Wno-foo
6436 # switches, so we have to test for the positive form and if that works,
6437 # add the negative form. Note that tests of this form typically need to
6438 # be duplicated in the BITCODE_CFLAGS setup stanza below.
6440 # Suppress clang's unhelpful unused-command-line-argument warnings.
6441 NOT_THE_CFLAGS=""
6442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6443 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6444 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6445 $as_echo_n "(cached) " >&6
6446 else
6447 pgac_save_CFLAGS=$CFLAGS
6448 pgac_save_CC=$CC
6449 CC=${CC}
6450 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6451 ac_save_c_werror_flag=$ac_c_werror_flag
6452 ac_c_werror_flag=yes
6453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6454 /* end confdefs.h. */
6457 main ()
6461 return 0;
6463 _ACEOF
6464 if ac_fn_c_try_compile "$LINENO"; then :
6465 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6466 else
6467 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6470 ac_c_werror_flag=$ac_save_c_werror_flag
6471 CFLAGS="$pgac_save_CFLAGS"
6472 CC="$pgac_save_CC"
6474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6475 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6476 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6477 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6481 if test -n "$NOT_THE_CFLAGS"; then
6482 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6484 # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
6485 # of warnings when building plperl because of usages in the Perl headers.
6486 NOT_THE_CFLAGS=""
6487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
6488 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
6489 if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then :
6490 $as_echo_n "(cached) " >&6
6491 else
6492 pgac_save_CFLAGS=$CFLAGS
6493 pgac_save_CC=$CC
6494 CC=${CC}
6495 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6496 ac_save_c_werror_flag=$ac_c_werror_flag
6497 ac_c_werror_flag=yes
6498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6499 /* end confdefs.h. */
6502 main ()
6506 return 0;
6508 _ACEOF
6509 if ac_fn_c_try_compile "$LINENO"; then :
6510 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes
6511 else
6512 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no
6514 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6515 ac_c_werror_flag=$ac_save_c_werror_flag
6516 CFLAGS="$pgac_save_CFLAGS"
6517 CC="$pgac_save_CC"
6519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5
6520 $as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; }
6521 if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then
6522 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6526 if test -n "$NOT_THE_CFLAGS"; then
6527 CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
6529 # Similarly disable useless truncation warnings from gcc 8+
6530 NOT_THE_CFLAGS=""
6531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6532 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6533 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6534 $as_echo_n "(cached) " >&6
6535 else
6536 pgac_save_CFLAGS=$CFLAGS
6537 pgac_save_CC=$CC
6538 CC=${CC}
6539 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6540 ac_save_c_werror_flag=$ac_c_werror_flag
6541 ac_c_werror_flag=yes
6542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6543 /* end confdefs.h. */
6546 main ()
6550 return 0;
6552 _ACEOF
6553 if ac_fn_c_try_compile "$LINENO"; then :
6554 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6555 else
6556 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6559 ac_c_werror_flag=$ac_save_c_werror_flag
6560 CFLAGS="$pgac_save_CFLAGS"
6561 CC="$pgac_save_CC"
6563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6564 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6565 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6566 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6570 if test -n "$NOT_THE_CFLAGS"; then
6571 CFLAGS="$CFLAGS -Wno-format-truncation"
6573 NOT_THE_CFLAGS=""
6574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6575 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6576 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6577 $as_echo_n "(cached) " >&6
6578 else
6579 pgac_save_CFLAGS=$CFLAGS
6580 pgac_save_CC=$CC
6581 CC=${CC}
6582 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6583 ac_save_c_werror_flag=$ac_c_werror_flag
6584 ac_c_werror_flag=yes
6585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6586 /* end confdefs.h. */
6589 main ()
6593 return 0;
6595 _ACEOF
6596 if ac_fn_c_try_compile "$LINENO"; then :
6597 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6598 else
6599 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6602 ac_c_werror_flag=$ac_save_c_werror_flag
6603 CFLAGS="$pgac_save_CFLAGS"
6604 CC="$pgac_save_CC"
6606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6607 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6608 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6609 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6613 if test -n "$NOT_THE_CFLAGS"; then
6614 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6616 # Suppress clang 16's strict warnings about function casts
6617 NOT_THE_CFLAGS=""
6618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS" >&5
6619 $as_echo_n "checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS... " >&6; }
6620 if ${pgac_cv_prog_CC_cflags__Wcast_function_type_strict+:} false; then :
6621 $as_echo_n "(cached) " >&6
6622 else
6623 pgac_save_CFLAGS=$CFLAGS
6624 pgac_save_CC=$CC
6625 CC=${CC}
6626 CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6627 ac_save_c_werror_flag=$ac_c_werror_flag
6628 ac_c_werror_flag=yes
6629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6630 /* end confdefs.h. */
6633 main ()
6637 return 0;
6639 _ACEOF
6640 if ac_fn_c_try_compile "$LINENO"; then :
6641 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=yes
6642 else
6643 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=no
6645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6646 ac_c_werror_flag=$ac_save_c_werror_flag
6647 CFLAGS="$pgac_save_CFLAGS"
6648 CC="$pgac_save_CC"
6650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&5
6651 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&6; }
6652 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" = x"yes"; then
6653 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6657 if test -n "$NOT_THE_CFLAGS"; then
6658 CFLAGS="$CFLAGS -Wno-cast-function-type-strict"
6660 elif test "$ICC" = yes; then
6661 # Intel's compiler has a bug/misoptimization in checking for
6662 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6665 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6666 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6667 $as_echo_n "(cached) " >&6
6668 else
6669 pgac_save_CFLAGS=$CFLAGS
6670 pgac_save_CC=$CC
6671 CC=${CC}
6672 CFLAGS="${CFLAGS} -mp1"
6673 ac_save_c_werror_flag=$ac_c_werror_flag
6674 ac_c_werror_flag=yes
6675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6676 /* end confdefs.h. */
6679 main ()
6683 return 0;
6685 _ACEOF
6686 if ac_fn_c_try_compile "$LINENO"; then :
6687 pgac_cv_prog_CC_cflags__mp1=yes
6688 else
6689 pgac_cv_prog_CC_cflags__mp1=no
6691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6692 ac_c_werror_flag=$ac_save_c_werror_flag
6693 CFLAGS="$pgac_save_CFLAGS"
6694 CC="$pgac_save_CC"
6696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6697 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6698 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6699 CFLAGS="${CFLAGS} -mp1"
6703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6704 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6705 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6706 $as_echo_n "(cached) " >&6
6707 else
6708 pgac_save_CXXFLAGS=$CXXFLAGS
6709 pgac_save_CXX=$CXX
6710 CXX=${CXX}
6711 CXXFLAGS="${CXXFLAGS} -mp1"
6712 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6713 ac_cxx_werror_flag=yes
6714 ac_ext=cpp
6715 ac_cpp='$CXXCPP $CPPFLAGS'
6716 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6717 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6718 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6721 /* end confdefs.h. */
6724 main ()
6728 return 0;
6730 _ACEOF
6731 if ac_fn_cxx_try_compile "$LINENO"; then :
6732 pgac_cv_prog_CXX_cxxflags__mp1=yes
6733 else
6734 pgac_cv_prog_CXX_cxxflags__mp1=no
6736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6737 ac_ext=c
6738 ac_cpp='$CPP $CPPFLAGS'
6739 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6740 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6741 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6743 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6744 CXXFLAGS="$pgac_save_CXXFLAGS"
6745 CXX="$pgac_save_CXX"
6747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6748 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6749 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6750 CXXFLAGS="${CXXFLAGS} -mp1"
6754 # Make sure strict aliasing is off (though this is said to be the default)
6756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6757 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6758 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6759 $as_echo_n "(cached) " >&6
6760 else
6761 pgac_save_CFLAGS=$CFLAGS
6762 pgac_save_CC=$CC
6763 CC=${CC}
6764 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6765 ac_save_c_werror_flag=$ac_c_werror_flag
6766 ac_c_werror_flag=yes
6767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6768 /* end confdefs.h. */
6771 main ()
6775 return 0;
6777 _ACEOF
6778 if ac_fn_c_try_compile "$LINENO"; then :
6779 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6780 else
6781 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6784 ac_c_werror_flag=$ac_save_c_werror_flag
6785 CFLAGS="$pgac_save_CFLAGS"
6786 CC="$pgac_save_CC"
6788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6789 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6790 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6791 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6796 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6797 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6798 $as_echo_n "(cached) " >&6
6799 else
6800 pgac_save_CXXFLAGS=$CXXFLAGS
6801 pgac_save_CXX=$CXX
6802 CXX=${CXX}
6803 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6804 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6805 ac_cxx_werror_flag=yes
6806 ac_ext=cpp
6807 ac_cpp='$CXXCPP $CPPFLAGS'
6808 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6809 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6810 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6813 /* end confdefs.h. */
6816 main ()
6820 return 0;
6822 _ACEOF
6823 if ac_fn_cxx_try_compile "$LINENO"; then :
6824 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6825 else
6826 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6829 ac_ext=c
6830 ac_cpp='$CPP $CPPFLAGS'
6831 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6832 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6833 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6835 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6836 CXXFLAGS="$pgac_save_CXXFLAGS"
6837 CXX="$pgac_save_CXX"
6839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6840 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6841 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6842 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6848 # If the compiler knows how to hide symbols, add the switch needed for that to
6849 # CFLAGS_SL_MODULE and define HAVE_VISIBILITY_ATTRIBUTE.
6851 # This is done separately from the above because -fvisibility is supported by
6852 # quite a few different compilers, making the required repetition bothersome.
6854 # We might need to add a separate test to check if
6855 # __attribute__((visibility("hidden"))) is supported, if we encounter a
6856 # compiler that supports one of the supported variants of -fvisibility=hidden
6857 # but uses a different syntax to mark a symbol as exported.
6858 if test "$GCC" = yes -o "$SUN_STUDIO_CC" = yes ; then
6859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE" >&5
6860 $as_echo_n "checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
6861 if ${pgac_cv_prog_CC_cflags__fvisibility_hidden+:} false; then :
6862 $as_echo_n "(cached) " >&6
6863 else
6864 pgac_save_CFLAGS=$CFLAGS
6865 pgac_save_CC=$CC
6866 CC=${CC}
6867 CFLAGS="${CFLAGS_SL_MODULE} -fvisibility=hidden"
6868 ac_save_c_werror_flag=$ac_c_werror_flag
6869 ac_c_werror_flag=yes
6870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6871 /* end confdefs.h. */
6874 main ()
6878 return 0;
6880 _ACEOF
6881 if ac_fn_c_try_compile "$LINENO"; then :
6882 pgac_cv_prog_CC_cflags__fvisibility_hidden=yes
6883 else
6884 pgac_cv_prog_CC_cflags__fvisibility_hidden=no
6886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6887 ac_c_werror_flag=$ac_save_c_werror_flag
6888 CFLAGS="$pgac_save_CFLAGS"
6889 CC="$pgac_save_CC"
6891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fvisibility_hidden" >&5
6892 $as_echo "$pgac_cv_prog_CC_cflags__fvisibility_hidden" >&6; }
6893 if test x"$pgac_cv_prog_CC_cflags__fvisibility_hidden" = x"yes"; then
6894 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -fvisibility=hidden"
6898 # For C++ we additionally want -fvisibility-inlines-hidden
6899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
6900 $as_echo_n "checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
6901 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_hidden+:} false; then :
6902 $as_echo_n "(cached) " >&6
6903 else
6904 pgac_save_CXXFLAGS=$CXXFLAGS
6905 pgac_save_CXX=$CXX
6906 CXX=${CXX}
6907 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
6908 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6909 ac_cxx_werror_flag=yes
6910 ac_ext=cpp
6911 ac_cpp='$CXXCPP $CPPFLAGS'
6912 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6913 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6914 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6917 /* end confdefs.h. */
6920 main ()
6924 return 0;
6926 _ACEOF
6927 if ac_fn_cxx_try_compile "$LINENO"; then :
6928 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=yes
6929 else
6930 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=no
6932 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6933 ac_ext=c
6934 ac_cpp='$CPP $CPPFLAGS'
6935 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6936 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6937 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6939 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6940 CXXFLAGS="$pgac_save_CXXFLAGS"
6941 CXX="$pgac_save_CXX"
6943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&5
6944 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&6; }
6945 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" = x"yes"; then
6946 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
6949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE" >&5
6950 $as_echo_n "checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE... " >&6; }
6951 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden+:} false; then :
6952 $as_echo_n "(cached) " >&6
6953 else
6954 pgac_save_CXXFLAGS=$CXXFLAGS
6955 pgac_save_CXX=$CXX
6956 CXX=${CXX}
6957 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
6958 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6959 ac_cxx_werror_flag=yes
6960 ac_ext=cpp
6961 ac_cpp='$CXXCPP $CPPFLAGS'
6962 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6963 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6964 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6967 /* end confdefs.h. */
6970 main ()
6974 return 0;
6976 _ACEOF
6977 if ac_fn_cxx_try_compile "$LINENO"; then :
6978 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=yes
6979 else
6980 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=no
6982 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6983 ac_ext=c
6984 ac_cpp='$CPP $CPPFLAGS'
6985 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6986 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6987 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6989 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6990 CXXFLAGS="$pgac_save_CXXFLAGS"
6991 CXX="$pgac_save_CXX"
6993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&5
6994 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&6; }
6995 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" = x"yes"; then
6996 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
6999 have_visibility_attribute=$pgac_cv_prog_CC_cflags__fvisibility_hidden
7002 if test "$have_visibility_attribute" = "yes"; then
7004 $as_echo "#define HAVE_VISIBILITY_ATTRIBUTE 1" >>confdefs.h
7013 # Determine flags used to emit bitcode for JIT inlining.
7014 # 1. We must duplicate any behaviour-changing compiler flags used above,
7015 # to keep compatibility with the compiler used for normal Postgres code.
7016 # 2. We don't bother to duplicate extra-warnings switches --- seeing a
7017 # warning in the main build is enough.
7018 # 3. But we must duplicate -Wno-warning flags, else we'll see those anyway.
7019 if test "$with_llvm" = yes ; then
7020 CLANGXX="$CLANG -xc++"
7022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
7023 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
7024 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
7025 $as_echo_n "(cached) " >&6
7026 else
7027 pgac_save_CFLAGS=$CFLAGS
7028 pgac_save_CC=$CC
7029 CC=${CLANG}
7030 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7031 ac_save_c_werror_flag=$ac_c_werror_flag
7032 ac_c_werror_flag=yes
7033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7034 /* end confdefs.h. */
7037 main ()
7041 return 0;
7043 _ACEOF
7044 if ac_fn_c_try_compile "$LINENO"; then :
7045 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
7046 else
7047 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
7049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7050 ac_c_werror_flag=$ac_save_c_werror_flag
7051 CFLAGS="$pgac_save_CFLAGS"
7052 CC="$pgac_save_CC"
7054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
7055 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
7056 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
7057 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
7061 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
7062 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
7063 $as_echo_n "(cached) " >&6
7064 else
7065 pgac_save_CXXFLAGS=$CXXFLAGS
7066 pgac_save_CXX=$CXX
7067 CXX=${CLANGXX}
7068 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7069 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7070 ac_cxx_werror_flag=yes
7071 ac_ext=cpp
7072 ac_cpp='$CXXCPP $CPPFLAGS'
7073 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7074 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7075 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7078 /* end confdefs.h. */
7081 main ()
7085 return 0;
7087 _ACEOF
7088 if ac_fn_cxx_try_compile "$LINENO"; then :
7089 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
7090 else
7091 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
7093 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7094 ac_ext=c
7095 ac_cpp='$CPP $CPPFLAGS'
7096 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7097 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7098 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7100 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7101 CXXFLAGS="$pgac_save_CXXFLAGS"
7102 CXX="$pgac_save_CXX"
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
7105 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
7106 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
7107 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
7111 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
7112 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
7113 $as_echo_n "(cached) " >&6
7114 else
7115 pgac_save_CFLAGS=$CFLAGS
7116 pgac_save_CC=$CC
7117 CC=${CLANG}
7118 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7119 ac_save_c_werror_flag=$ac_c_werror_flag
7120 ac_c_werror_flag=yes
7121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7122 /* end confdefs.h. */
7125 main ()
7129 return 0;
7131 _ACEOF
7132 if ac_fn_c_try_compile "$LINENO"; then :
7133 pgac_cv_prog_CLANG_cflags__fwrapv=yes
7134 else
7135 pgac_cv_prog_CLANG_cflags__fwrapv=no
7137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7138 ac_c_werror_flag=$ac_save_c_werror_flag
7139 CFLAGS="$pgac_save_CFLAGS"
7140 CC="$pgac_save_CC"
7142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
7143 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
7144 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
7145 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
7149 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
7150 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
7151 $as_echo_n "(cached) " >&6
7152 else
7153 pgac_save_CXXFLAGS=$CXXFLAGS
7154 pgac_save_CXX=$CXX
7155 CXX=${CLANGXX}
7156 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7157 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7158 ac_cxx_werror_flag=yes
7159 ac_ext=cpp
7160 ac_cpp='$CXXCPP $CPPFLAGS'
7161 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7162 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7163 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7166 /* end confdefs.h. */
7169 main ()
7173 return 0;
7175 _ACEOF
7176 if ac_fn_cxx_try_compile "$LINENO"; then :
7177 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
7178 else
7179 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
7181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7182 ac_ext=c
7183 ac_cpp='$CPP $CPPFLAGS'
7184 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7185 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7186 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7188 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7189 CXXFLAGS="$pgac_save_CXXFLAGS"
7190 CXX="$pgac_save_CXX"
7192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
7193 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
7194 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
7195 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
7199 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
7200 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
7201 $as_echo_n "(cached) " >&6
7202 else
7203 pgac_save_CFLAGS=$CFLAGS
7204 pgac_save_CC=$CC
7205 CC=${CLANG}
7206 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7207 ac_save_c_werror_flag=$ac_c_werror_flag
7208 ac_c_werror_flag=yes
7209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7210 /* end confdefs.h. */
7213 main ()
7217 return 0;
7219 _ACEOF
7220 if ac_fn_c_try_compile "$LINENO"; then :
7221 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7222 else
7223 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7226 ac_c_werror_flag=$ac_save_c_werror_flag
7227 CFLAGS="$pgac_save_CFLAGS"
7228 CC="$pgac_save_CC"
7230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7231 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7232 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7233 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7237 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7238 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7239 $as_echo_n "(cached) " >&6
7240 else
7241 pgac_save_CXXFLAGS=$CXXFLAGS
7242 pgac_save_CXX=$CXX
7243 CXX=${CLANGXX}
7244 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7245 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7246 ac_cxx_werror_flag=yes
7247 ac_ext=cpp
7248 ac_cpp='$CXXCPP $CPPFLAGS'
7249 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7250 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7251 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7254 /* end confdefs.h. */
7257 main ()
7261 return 0;
7263 _ACEOF
7264 if ac_fn_cxx_try_compile "$LINENO"; then :
7265 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7266 else
7267 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7270 ac_ext=c
7271 ac_cpp='$CPP $CPPFLAGS'
7272 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7273 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7274 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7276 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7277 CXXFLAGS="$pgac_save_CXXFLAGS"
7278 CXX="$pgac_save_CXX"
7280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7281 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7282 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7283 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7287 NOT_THE_CFLAGS=""
7288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
7289 $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
7290 if ${pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument+:} false; then :
7291 $as_echo_n "(cached) " >&6
7292 else
7293 pgac_save_CFLAGS=$CFLAGS
7294 pgac_save_CC=$CC
7295 CC=${CLANG}
7296 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7297 ac_save_c_werror_flag=$ac_c_werror_flag
7298 ac_c_werror_flag=yes
7299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7300 /* end confdefs.h. */
7303 main ()
7307 return 0;
7309 _ACEOF
7310 if ac_fn_c_try_compile "$LINENO"; then :
7311 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=yes
7312 else
7313 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=no
7315 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7316 ac_c_werror_flag=$ac_save_c_werror_flag
7317 CFLAGS="$pgac_save_CFLAGS"
7318 CC="$pgac_save_CC"
7320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&5
7321 $as_echo "$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&6; }
7322 if test x"$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" = x"yes"; then
7323 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7326 if test -n "$NOT_THE_CFLAGS"; then
7327 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-unused-command-line-argument"
7329 NOT_THE_CFLAGS=""
7330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
7331 $as_echo_n "checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
7332 if ${pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro+:} false; then :
7333 $as_echo_n "(cached) " >&6
7334 else
7335 pgac_save_CFLAGS=$CFLAGS
7336 pgac_save_CC=$CC
7337 CC=${CLANG}
7338 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7339 ac_save_c_werror_flag=$ac_c_werror_flag
7340 ac_c_werror_flag=yes
7341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7342 /* end confdefs.h. */
7345 main ()
7349 return 0;
7351 _ACEOF
7352 if ac_fn_c_try_compile "$LINENO"; then :
7353 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=yes
7354 else
7355 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=no
7357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7358 ac_c_werror_flag=$ac_save_c_werror_flag
7359 CFLAGS="$pgac_save_CFLAGS"
7360 CC="$pgac_save_CC"
7362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&5
7363 $as_echo "$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&6; }
7364 if test x"$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" = x"yes"; then
7365 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7368 if test -n "$NOT_THE_CFLAGS"; then
7369 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
7371 NOT_THE_CFLAGS=""
7372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
7373 $as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
7374 if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :
7375 $as_echo_n "(cached) " >&6
7376 else
7377 pgac_save_CFLAGS=$CFLAGS
7378 pgac_save_CC=$CC
7379 CC=${CLANG}
7380 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7381 ac_save_c_werror_flag=$ac_c_werror_flag
7382 ac_c_werror_flag=yes
7383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7384 /* end confdefs.h. */
7387 main ()
7391 return 0;
7393 _ACEOF
7394 if ac_fn_c_try_compile "$LINENO"; then :
7395 pgac_cv_prog_CLANG_cflags__Wformat_truncation=yes
7396 else
7397 pgac_cv_prog_CLANG_cflags__Wformat_truncation=no
7399 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7400 ac_c_werror_flag=$ac_save_c_werror_flag
7401 CFLAGS="$pgac_save_CFLAGS"
7402 CC="$pgac_save_CC"
7404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&5
7405 $as_echo "$pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&6; }
7406 if test x"$pgac_cv_prog_CLANG_cflags__Wformat_truncation" = x"yes"; then
7407 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7410 if test -n "$NOT_THE_CFLAGS"; then
7411 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"
7413 NOT_THE_CFLAGS=""
7414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
7415 $as_echo_n "checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
7416 if ${pgac_cv_prog_CLANG_cflags__Wstringop_truncation+:} false; then :
7417 $as_echo_n "(cached) " >&6
7418 else
7419 pgac_save_CFLAGS=$CFLAGS
7420 pgac_save_CC=$CC
7421 CC=${CLANG}
7422 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7423 ac_save_c_werror_flag=$ac_c_werror_flag
7424 ac_c_werror_flag=yes
7425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7426 /* end confdefs.h. */
7429 main ()
7433 return 0;
7435 _ACEOF
7436 if ac_fn_c_try_compile "$LINENO"; then :
7437 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=yes
7438 else
7439 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=no
7441 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7442 ac_c_werror_flag=$ac_save_c_werror_flag
7443 CFLAGS="$pgac_save_CFLAGS"
7444 CC="$pgac_save_CC"
7446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&5
7447 $as_echo "$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&6; }
7448 if test x"$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" = x"yes"; then
7449 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7452 if test -n "$NOT_THE_CFLAGS"; then
7453 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-stringop-truncation"
7457 # supply -g if --enable-debug
7458 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7459 CFLAGS="$CFLAGS -g"
7462 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7463 CXXFLAGS="$CXXFLAGS -g"
7466 # enable code coverage if --enable-coverage
7467 if test "$enable_coverage" = yes; then
7468 if test "$GCC" = yes; then
7469 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7470 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7471 else
7472 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7476 # enable profiling if --enable-profiling
7477 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7478 if test "$GCC" = yes; then
7480 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7482 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7483 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7484 else
7485 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7489 # On Solaris, we need this #define to get POSIX-conforming versions
7490 # of many interfaces (sigwait, getpwuid_r, ...).
7491 if test "$PORTNAME" = "solaris"; then
7492 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
7495 # We already have this in Makefile.win32, but configure needs it too
7496 if test "$PORTNAME" = "win32"; then
7497 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7500 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7501 # user-specified flags (if any) at the end. This lets users override
7502 # the automatic additions.
7503 CFLAGS="$CFLAGS $user_CFLAGS"
7504 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7505 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7506 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7511 # The template file must set up CFLAGS_SL; we don't support user override
7514 # Check if the compiler still works with the final flag settings
7515 # (note, we're not checking that for CXX, which is optional)
7516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7517 $as_echo_n "checking whether the C compiler still works... " >&6; }
7518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7519 /* end confdefs.h. */
7522 main ()
7524 return 0;
7526 return 0;
7528 _ACEOF
7529 if ac_fn_c_try_link "$LINENO"; then :
7530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7531 $as_echo "yes" >&6; }
7532 else
7533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7534 $as_echo "no" >&6; }
7535 as_fn_error $? "cannot proceed" "$LINENO" 5
7537 rm -f core conftest.err conftest.$ac_objext \
7538 conftest$ac_exeext conftest.$ac_ext
7540 # Defend against gcc -ffast-math
7541 if test "$GCC" = yes; then
7542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7543 /* end confdefs.h. */
7546 main ()
7548 #ifdef __FAST_MATH__
7549 choke me
7550 #endif
7552 return 0;
7554 _ACEOF
7555 if ac_fn_c_try_compile "$LINENO"; then :
7557 else
7558 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7560 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7563 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7564 # versions of clang do not understand -fexcess-precision=standard, the use of
7565 # x87 floating point operations leads to problems like isinf possibly returning
7566 # false for a value that is infinite when converted from the 80bit register to
7567 # the 8byte memory representation.
7569 # Only perform the test if the compiler doesn't understand
7570 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7571 # automatically.
7572 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7574 /* end confdefs.h. */
7577 main ()
7580 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7581 choke me
7582 #endif
7585 return 0;
7587 _ACEOF
7588 if ac_fn_c_try_compile "$LINENO"; then :
7590 else
7591 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7593 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7596 ac_ext=c
7597 ac_cpp='$CPP $CPPFLAGS'
7598 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7599 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7600 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7602 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7603 # On Suns, sometimes $CPP names a directory.
7604 if test -n "$CPP" && test -d "$CPP"; then
7605 CPP=
7607 if test -z "$CPP"; then
7608 if ${ac_cv_prog_CPP+:} false; then :
7609 $as_echo_n "(cached) " >&6
7610 else
7611 # Double quotes because CPP needs to be expanded
7612 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7614 ac_preproc_ok=false
7615 for ac_c_preproc_warn_flag in '' yes
7617 # Use a header file that comes with gcc, so configuring glibc
7618 # with a fresh cross-compiler works.
7619 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7620 # <limits.h> exists even on freestanding compilers.
7621 # On the NeXT, cc -E runs the code through the compiler's parser,
7622 # not just through cpp. "Syntax error" is here to catch this case.
7623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7624 /* end confdefs.h. */
7625 #ifdef __STDC__
7626 # include <limits.h>
7627 #else
7628 # include <assert.h>
7629 #endif
7630 Syntax error
7631 _ACEOF
7632 if ac_fn_c_try_cpp "$LINENO"; then :
7634 else
7635 # Broken: fails on valid input.
7636 continue
7638 rm -f conftest.err conftest.i conftest.$ac_ext
7640 # OK, works on sane cases. Now check whether nonexistent headers
7641 # can be detected and how.
7642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7643 /* end confdefs.h. */
7644 #include <ac_nonexistent.h>
7645 _ACEOF
7646 if ac_fn_c_try_cpp "$LINENO"; then :
7647 # Broken: success on invalid input.
7648 continue
7649 else
7650 # Passes both tests.
7651 ac_preproc_ok=:
7652 break
7654 rm -f conftest.err conftest.i conftest.$ac_ext
7656 done
7657 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7658 rm -f conftest.i conftest.err conftest.$ac_ext
7659 if $ac_preproc_ok; then :
7660 break
7663 done
7664 ac_cv_prog_CPP=$CPP
7667 CPP=$ac_cv_prog_CPP
7668 else
7669 ac_cv_prog_CPP=$CPP
7671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7672 $as_echo "$CPP" >&6; }
7673 ac_preproc_ok=false
7674 for ac_c_preproc_warn_flag in '' yes
7676 # Use a header file that comes with gcc, so configuring glibc
7677 # with a fresh cross-compiler works.
7678 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7679 # <limits.h> exists even on freestanding compilers.
7680 # On the NeXT, cc -E runs the code through the compiler's parser,
7681 # not just through cpp. "Syntax error" is here to catch this case.
7682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7683 /* end confdefs.h. */
7684 #ifdef __STDC__
7685 # include <limits.h>
7686 #else
7687 # include <assert.h>
7688 #endif
7689 Syntax error
7690 _ACEOF
7691 if ac_fn_c_try_cpp "$LINENO"; then :
7693 else
7694 # Broken: fails on valid input.
7695 continue
7697 rm -f conftest.err conftest.i conftest.$ac_ext
7699 # OK, works on sane cases. Now check whether nonexistent headers
7700 # can be detected and how.
7701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7702 /* end confdefs.h. */
7703 #include <ac_nonexistent.h>
7704 _ACEOF
7705 if ac_fn_c_try_cpp "$LINENO"; then :
7706 # Broken: success on invalid input.
7707 continue
7708 else
7709 # Passes both tests.
7710 ac_preproc_ok=:
7711 break
7713 rm -f conftest.err conftest.i conftest.$ac_ext
7715 done
7716 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7717 rm -f conftest.i conftest.err conftest.$ac_ext
7718 if $ac_preproc_ok; then :
7720 else
7721 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7722 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7723 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7724 See \`config.log' for more details" "$LINENO" 5; }
7727 ac_ext=c
7728 ac_cpp='$CPP $CPPFLAGS'
7729 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7730 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7731 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7737 # Set up TAS assembly code if needed; the template file has now had its
7738 # chance to request this.
7740 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7743 if test "$need_tas" = yes ; then
7744 TAS=tas.o
7745 else
7746 TAS=""
7751 cat >>confdefs.h <<_ACEOF
7752 #define DLSUFFIX "$DLSUFFIX"
7753 _ACEOF
7757 # Set up pkg_config in case we need it below
7766 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7767 if test -n "$ac_tool_prefix"; then
7768 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7769 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7771 $as_echo_n "checking for $ac_word... " >&6; }
7772 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7773 $as_echo_n "(cached) " >&6
7774 else
7775 case $PKG_CONFIG in
7776 [\\/]* | ?:[\\/]*)
7777 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7781 for as_dir in $PATH
7783 IFS=$as_save_IFS
7784 test -z "$as_dir" && as_dir=.
7785 for ac_exec_ext in '' $ac_executable_extensions; do
7786 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7787 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7788 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7789 break 2
7791 done
7792 done
7793 IFS=$as_save_IFS
7796 esac
7798 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7799 if test -n "$PKG_CONFIG"; then
7800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7801 $as_echo "$PKG_CONFIG" >&6; }
7802 else
7803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7804 $as_echo "no" >&6; }
7809 if test -z "$ac_cv_path_PKG_CONFIG"; then
7810 ac_pt_PKG_CONFIG=$PKG_CONFIG
7811 # Extract the first word of "pkg-config", so it can be a program name with args.
7812 set dummy pkg-config; ac_word=$2
7813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7814 $as_echo_n "checking for $ac_word... " >&6; }
7815 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7816 $as_echo_n "(cached) " >&6
7817 else
7818 case $ac_pt_PKG_CONFIG in
7819 [\\/]* | ?:[\\/]*)
7820 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7823 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7824 for as_dir in $PATH
7826 IFS=$as_save_IFS
7827 test -z "$as_dir" && as_dir=.
7828 for ac_exec_ext in '' $ac_executable_extensions; do
7829 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7830 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7831 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7832 break 2
7834 done
7835 done
7836 IFS=$as_save_IFS
7839 esac
7841 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7842 if test -n "$ac_pt_PKG_CONFIG"; then
7843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7844 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7845 else
7846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7847 $as_echo "no" >&6; }
7850 if test "x$ac_pt_PKG_CONFIG" = x; then
7851 PKG_CONFIG=""
7852 else
7853 case $cross_compiling:$ac_tool_warned in
7854 yes:)
7855 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7856 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7857 ac_tool_warned=yes ;;
7858 esac
7859 PKG_CONFIG=$ac_pt_PKG_CONFIG
7861 else
7862 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7866 if test -n "$PKG_CONFIG"; then
7867 _pkg_min_version=0.9.0
7868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7869 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7870 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7872 $as_echo "yes" >&6; }
7873 else
7874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7875 $as_echo "no" >&6; }
7876 PKG_CONFIG=""
7881 # Automatic dependency tracking
7885 # Check whether --enable-depend was given.
7886 if test "${enable_depend+set}" = set; then :
7887 enableval=$enable_depend;
7888 case $enableval in
7889 yes)
7890 autodepend=yes
7896 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7898 esac
7900 else
7901 enable_depend=no
7910 # Enable assert checks
7914 # Check whether --enable-cassert was given.
7915 if test "${enable_cassert+set}" = set; then :
7916 enableval=$enable_cassert;
7917 case $enableval in
7918 yes)
7920 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7927 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7929 esac
7931 else
7932 enable_cassert=no
7940 # Include directories
7942 ac_save_IFS=$IFS
7943 IFS="${IFS}${PATH_SEPARATOR}"
7944 # SRCH_INC comes from the template file
7945 for dir in $with_includes $SRCH_INC; do
7946 if test -d "$dir"; then
7947 INCLUDES="$INCLUDES -I$dir"
7948 else
7949 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7950 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7952 done
7953 IFS=$ac_save_IFS
7958 # Library directories
7960 ac_save_IFS=$IFS
7961 IFS="${IFS}${PATH_SEPARATOR}"
7962 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7963 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7964 if test -d "$dir"; then
7965 LIBDIRS="$LIBDIRS -L$dir"
7966 else
7967 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7968 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7970 done
7971 IFS=$ac_save_IFS
7974 # ICU
7976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7977 $as_echo_n "checking whether to build with ICU support... " >&6; }
7981 # Check whether --with-icu was given.
7982 if test "${with_icu+set}" = set; then :
7983 withval=$with_icu;
7984 case $withval in
7985 yes)
7987 $as_echo "#define USE_ICU 1" >>confdefs.h
7994 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7996 esac
7998 else
7999 with_icu=yes
8001 $as_echo "#define USE_ICU 1" >>confdefs.h
8006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
8007 $as_echo "$with_icu" >&6; }
8010 if test "$with_icu" = yes; then
8012 pkg_failed=no
8013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
8014 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
8016 if test -n "$ICU_CFLAGS"; then
8017 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
8018 elif test -n "$PKG_CONFIG"; then
8019 if test -n "$PKG_CONFIG" && \
8020 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8021 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8022 ac_status=$?
8023 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8024 test $ac_status = 0; }; then
8025 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
8026 test "x$?" != "x0" && pkg_failed=yes
8027 else
8028 pkg_failed=yes
8030 else
8031 pkg_failed=untried
8033 if test -n "$ICU_LIBS"; then
8034 pkg_cv_ICU_LIBS="$ICU_LIBS"
8035 elif test -n "$PKG_CONFIG"; then
8036 if test -n "$PKG_CONFIG" && \
8037 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8038 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8039 ac_status=$?
8040 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8041 test $ac_status = 0; }; then
8042 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
8043 test "x$?" != "x0" && pkg_failed=yes
8044 else
8045 pkg_failed=yes
8047 else
8048 pkg_failed=untried
8053 if test $pkg_failed = yes; then
8054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8055 $as_echo "no" >&6; }
8057 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8058 _pkg_short_errors_supported=yes
8059 else
8060 _pkg_short_errors_supported=no
8062 if test $_pkg_short_errors_supported = yes; then
8063 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8064 else
8065 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8067 # Put the nasty error message in config.log where it belongs
8068 echo "$ICU_PKG_ERRORS" >&5
8070 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
8072 $ICU_PKG_ERRORS
8074 Consider adjusting the PKG_CONFIG_PATH environment variable if you
8075 installed software in a non-standard prefix.
8077 Alternatively, you may set the environment variables ICU_CFLAGS
8078 and ICU_LIBS to avoid the need to call pkg-config.
8079 See the pkg-config man page for more details." "$LINENO" 5
8080 elif test $pkg_failed = untried; then
8081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8082 $as_echo "no" >&6; }
8083 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8084 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8085 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
8086 is in your PATH or set the PKG_CONFIG environment variable to the full
8087 path to pkg-config.
8089 Alternatively, you may set the environment variables ICU_CFLAGS
8090 and ICU_LIBS to avoid the need to call pkg-config.
8091 See the pkg-config man page for more details.
8093 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
8094 See \`config.log' for more details" "$LINENO" 5; }
8095 else
8096 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
8097 ICU_LIBS=$pkg_cv_ICU_LIBS
8098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8099 $as_echo "yes" >&6; }
8105 # Optionally build Tcl modules (PL/Tcl)
8107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
8108 $as_echo_n "checking whether to build with Tcl... " >&6; }
8112 # Check whether --with-tcl was given.
8113 if test "${with_tcl+set}" = set; then :
8114 withval=$with_tcl;
8115 case $withval in
8116 yes)
8123 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
8125 esac
8127 else
8128 with_tcl=no
8133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
8134 $as_echo "$with_tcl" >&6; }
8137 # We see if the path to the Tcl/Tk configuration scripts is specified.
8138 # This will override the use of tclsh to find the paths to search.
8143 # Check whether --with-tclconfig was given.
8144 if test "${with_tclconfig+set}" = set; then :
8145 withval=$with_tclconfig;
8146 case $withval in
8147 yes)
8148 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8151 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8156 esac
8163 # Optionally build Perl modules (PL/Perl)
8165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
8166 $as_echo_n "checking whether to build Perl modules... " >&6; }
8170 # Check whether --with-perl was given.
8171 if test "${with_perl+set}" = set; then :
8172 withval=$with_perl;
8173 case $withval in
8174 yes)
8181 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
8183 esac
8185 else
8186 with_perl=no
8191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
8192 $as_echo "$with_perl" >&6; }
8196 # Optionally build Python modules (PL/Python)
8198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
8199 $as_echo_n "checking whether to build Python modules... " >&6; }
8203 # Check whether --with-python was given.
8204 if test "${with_python+set}" = set; then :
8205 withval=$with_python;
8206 case $withval in
8207 yes)
8214 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
8216 esac
8218 else
8219 with_python=no
8224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8225 $as_echo "$with_python" >&6; }
8229 # GSSAPI
8231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
8232 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
8236 # Check whether --with-gssapi was given.
8237 if test "${with_gssapi+set}" = set; then :
8238 withval=$with_gssapi;
8239 case $withval in
8240 yes)
8243 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
8245 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
8252 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
8254 esac
8256 else
8257 with_gssapi=no
8262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8263 $as_echo "$with_gssapi" >&6; }
8271 # Kerberos configuration parameters
8276 # Check whether --with-krb-srvnam was given.
8277 if test "${with_krb_srvnam+set}" = set; then :
8278 withval=$with_krb_srvnam;
8279 case $withval in
8280 yes)
8281 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8284 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8289 esac
8291 else
8292 with_krb_srvnam="postgres"
8298 cat >>confdefs.h <<_ACEOF
8299 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8300 _ACEOF
8305 # PAM
8307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8308 $as_echo_n "checking whether to build with PAM support... " >&6; }
8312 # Check whether --with-pam was given.
8313 if test "${with_pam+set}" = set; then :
8314 withval=$with_pam;
8315 case $withval in
8316 yes)
8318 $as_echo "#define USE_PAM 1" >>confdefs.h
8325 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8327 esac
8329 else
8330 with_pam=no
8335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8336 $as_echo "$with_pam" >&6; }
8340 # BSD AUTH
8342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8343 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8347 # Check whether --with-bsd-auth was given.
8348 if test "${with_bsd_auth+set}" = set; then :
8349 withval=$with_bsd_auth;
8350 case $withval in
8351 yes)
8353 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8360 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8362 esac
8364 else
8365 with_bsd_auth=no
8370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8371 $as_echo "$with_bsd_auth" >&6; }
8375 # LDAP
8377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8378 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8382 # Check whether --with-ldap was given.
8383 if test "${with_ldap+set}" = set; then :
8384 withval=$with_ldap;
8385 case $withval in
8386 yes)
8388 $as_echo "#define USE_LDAP 1" >>confdefs.h
8395 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8397 esac
8399 else
8400 with_ldap=no
8405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8406 $as_echo "$with_ldap" >&6; }
8411 # Bonjour
8413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8414 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8418 # Check whether --with-bonjour was given.
8419 if test "${with_bonjour+set}" = set; then :
8420 withval=$with_bonjour;
8421 case $withval in
8422 yes)
8424 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8431 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8433 esac
8435 else
8436 with_bonjour=no
8441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8442 $as_echo "$with_bonjour" >&6; }
8446 # SELinux
8448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8449 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8453 # Check whether --with-selinux was given.
8454 if test "${with_selinux+set}" = set; then :
8455 withval=$with_selinux;
8456 case $withval in
8457 yes)
8464 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8466 esac
8468 else
8469 with_selinux=no
8475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8476 $as_echo "$with_selinux" >&6; }
8479 # Systemd
8481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8482 $as_echo_n "checking whether to build with systemd support... " >&6; }
8486 # Check whether --with-systemd was given.
8487 if test "${with_systemd+set}" = set; then :
8488 withval=$with_systemd;
8489 case $withval in
8490 yes)
8492 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8499 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8501 esac
8503 else
8504 with_systemd=no
8510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8511 $as_echo "$with_systemd" >&6; }
8514 # Readline
8519 # Check whether --with-readline was given.
8520 if test "${with_readline+set}" = set; then :
8521 withval=$with_readline;
8522 case $withval in
8523 yes)
8530 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8532 esac
8534 else
8535 with_readline=yes
8540 # readline on MinGW has problems with backslashes in psql and other bugs.
8541 # This is particularly a problem with non-US code pages.
8542 # Therefore disable its use until we understand the cause. 2004-07-20
8543 if test "$PORTNAME" = "win32"; then
8544 if test "$with_readline" = yes; then
8545 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8546 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8547 with_readline=no
8554 # Prefer libedit
8559 # Check whether --with-libedit-preferred was given.
8560 if test "${with_libedit_preferred+set}" = set; then :
8561 withval=$with_libedit_preferred;
8562 case $withval in
8563 yes)
8570 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8572 esac
8574 else
8575 with_libedit_preferred=no
8583 # UUID library
8585 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8586 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8587 # UUID library. More than one of these might be present on a given platform,
8588 # so we make the user say which one she wants.
8593 # Check whether --with-uuid was given.
8594 if test "${with_uuid+set}" = set; then :
8595 withval=$with_uuid;
8596 case $withval in
8597 yes)
8598 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8601 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8606 esac
8611 if test x"$with_uuid" = x"" ; then
8612 with_uuid=no
8617 # Check whether --with-ossp-uuid was given.
8618 if test "${with_ossp_uuid+set}" = set; then :
8619 withval=$with_ossp_uuid;
8620 case $withval in
8621 yes)
8628 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8630 esac
8632 else
8633 with_ossp_uuid=no
8638 if test "$with_ossp_uuid" = yes ; then
8639 with_uuid=ossp
8642 if test "$with_uuid" != no ; then
8643 if test "$with_uuid" = bsd ; then
8645 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8647 elif test "$with_uuid" = e2fs ; then
8649 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8651 elif test "$with_uuid" = ossp ; then
8653 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8655 else
8656 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8663 # XML
8665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
8666 $as_echo_n "checking whether to build with XML support... " >&6; }
8670 # Check whether --with-libxml was given.
8671 if test "${with_libxml+set}" = set; then :
8672 withval=$with_libxml;
8673 case $withval in
8674 yes)
8676 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8683 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8685 esac
8687 else
8688 with_libxml=no
8693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
8694 $as_echo "$with_libxml" >&6; }
8697 if test "$with_libxml" = yes ; then
8698 # Check pkg-config, then xml2-config. But for backwards compatibility,
8699 # setting XML2_CONFIG overrides pkg-config.
8700 have_libxml2_pkg_config=no
8701 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
8703 pkg_failed=no
8704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
8705 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
8707 if test -n "$XML2_CFLAGS"; then
8708 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
8709 elif test -n "$PKG_CONFIG"; then
8710 if test -n "$PKG_CONFIG" && \
8711 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8712 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8713 ac_status=$?
8714 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8715 test $ac_status = 0; }; then
8716 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
8717 test "x$?" != "x0" && pkg_failed=yes
8718 else
8719 pkg_failed=yes
8721 else
8722 pkg_failed=untried
8724 if test -n "$XML2_LIBS"; then
8725 pkg_cv_XML2_LIBS="$XML2_LIBS"
8726 elif test -n "$PKG_CONFIG"; then
8727 if test -n "$PKG_CONFIG" && \
8728 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8729 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8730 ac_status=$?
8731 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8732 test $ac_status = 0; }; then
8733 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
8734 test "x$?" != "x0" && pkg_failed=yes
8735 else
8736 pkg_failed=yes
8738 else
8739 pkg_failed=untried
8744 if test $pkg_failed = yes; then
8745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8746 $as_echo "no" >&6; }
8748 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8749 _pkg_short_errors_supported=yes
8750 else
8751 _pkg_short_errors_supported=no
8753 if test $_pkg_short_errors_supported = yes; then
8754 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8755 else
8756 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8758 # Put the nasty error message in config.log where it belongs
8759 echo "$XML2_PKG_ERRORS" >&5
8761 # do nothing
8762 elif test $pkg_failed = untried; then
8763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8764 $as_echo "no" >&6; }
8765 # do nothing
8766 else
8767 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
8768 XML2_LIBS=$pkg_cv_XML2_LIBS
8769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8770 $as_echo "yes" >&6; }
8771 have_libxml2_pkg_config=yes
8774 if test "$have_libxml2_pkg_config" = no ; then
8775 if test -z "$XML2_CONFIG"; then
8776 for ac_prog in xml2-config
8778 # Extract the first word of "$ac_prog", so it can be a program name with args.
8779 set dummy $ac_prog; ac_word=$2
8780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8781 $as_echo_n "checking for $ac_word... " >&6; }
8782 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8783 $as_echo_n "(cached) " >&6
8784 else
8785 case $XML2_CONFIG in
8786 [\\/]* | ?:[\\/]*)
8787 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8790 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8791 for as_dir in $PATH
8793 IFS=$as_save_IFS
8794 test -z "$as_dir" && as_dir=.
8795 for ac_exec_ext in '' $ac_executable_extensions; do
8796 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8797 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8798 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8799 break 2
8801 done
8802 done
8803 IFS=$as_save_IFS
8806 esac
8808 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8809 if test -n "$XML2_CONFIG"; then
8810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8811 $as_echo "$XML2_CONFIG" >&6; }
8812 else
8813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8814 $as_echo "no" >&6; }
8818 test -n "$XML2_CONFIG" && break
8819 done
8821 else
8822 # Report the value of XML2_CONFIG in configure's output in all cases.
8823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8824 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8826 $as_echo "$XML2_CONFIG" >&6; }
8829 if test -n "$XML2_CONFIG"; then
8830 XML2_CFLAGS=`$XML2_CONFIG --cflags`
8831 XML2_LIBS=`$XML2_CONFIG --libs`
8834 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
8835 for pgac_option in $XML2_CFLAGS; do
8836 case $pgac_option in
8837 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8838 esac
8839 done
8840 for pgac_option in $XML2_LIBS; do
8841 case $pgac_option in
8842 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8843 esac
8844 done
8849 # XSLT
8854 # Check whether --with-libxslt was given.
8855 if test "${with_libxslt+set}" = set; then :
8856 withval=$with_libxslt;
8857 case $withval in
8858 yes)
8860 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8867 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8869 esac
8871 else
8872 with_libxslt=no
8882 # tzdata
8887 # Check whether --with-system-tzdata was given.
8888 if test "${with_system_tzdata+set}" = set; then :
8889 withval=$with_system_tzdata;
8890 case $withval in
8891 yes)
8892 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8895 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8900 esac
8908 # Zlib
8913 # Check whether --with-zlib was given.
8914 if test "${with_zlib+set}" = set; then :
8915 withval=$with_zlib;
8916 case $withval in
8917 yes)
8924 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8926 esac
8928 else
8929 with_zlib=yes
8937 # LZ4
8939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
8940 $as_echo_n "checking whether to build with LZ4 support... " >&6; }
8944 # Check whether --with-lz4 was given.
8945 if test "${with_lz4+set}" = set; then :
8946 withval=$with_lz4;
8947 case $withval in
8948 yes)
8950 $as_echo "#define USE_LZ4 1" >>confdefs.h
8957 as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
8959 esac
8961 else
8962 with_lz4=no
8967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
8968 $as_echo "$with_lz4" >&6; }
8971 if test "$with_lz4" = yes; then
8973 pkg_failed=no
8974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
8975 $as_echo_n "checking for liblz4... " >&6; }
8977 if test -n "$LZ4_CFLAGS"; then
8978 pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
8979 elif test -n "$PKG_CONFIG"; then
8980 if test -n "$PKG_CONFIG" && \
8981 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
8982 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
8983 ac_status=$?
8984 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8985 test $ac_status = 0; }; then
8986 pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
8987 test "x$?" != "x0" && pkg_failed=yes
8988 else
8989 pkg_failed=yes
8991 else
8992 pkg_failed=untried
8994 if test -n "$LZ4_LIBS"; then
8995 pkg_cv_LZ4_LIBS="$LZ4_LIBS"
8996 elif test -n "$PKG_CONFIG"; then
8997 if test -n "$PKG_CONFIG" && \
8998 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
8999 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9000 ac_status=$?
9001 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9002 test $ac_status = 0; }; then
9003 pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
9004 test "x$?" != "x0" && pkg_failed=yes
9005 else
9006 pkg_failed=yes
9008 else
9009 pkg_failed=untried
9014 if test $pkg_failed = yes; then
9015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9016 $as_echo "no" >&6; }
9018 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9019 _pkg_short_errors_supported=yes
9020 else
9021 _pkg_short_errors_supported=no
9023 if test $_pkg_short_errors_supported = yes; then
9024 LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
9025 else
9026 LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
9028 # Put the nasty error message in config.log where it belongs
9029 echo "$LZ4_PKG_ERRORS" >&5
9031 as_fn_error $? "Package requirements (liblz4) were not met:
9033 $LZ4_PKG_ERRORS
9035 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9036 installed software in a non-standard prefix.
9038 Alternatively, you may set the environment variables LZ4_CFLAGS
9039 and LZ4_LIBS to avoid the need to call pkg-config.
9040 See the pkg-config man page for more details." "$LINENO" 5
9041 elif test $pkg_failed = untried; then
9042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9043 $as_echo "no" >&6; }
9044 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9045 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9046 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9047 is in your PATH or set the PKG_CONFIG environment variable to the full
9048 path to pkg-config.
9050 Alternatively, you may set the environment variables LZ4_CFLAGS
9051 and LZ4_LIBS to avoid the need to call pkg-config.
9052 See the pkg-config man page for more details.
9054 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9055 See \`config.log' for more details" "$LINENO" 5; }
9056 else
9057 LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
9058 LZ4_LIBS=$pkg_cv_LZ4_LIBS
9059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9060 $as_echo "yes" >&6; }
9063 # We only care about -I, -D, and -L switches;
9064 # note that -llz4 will be added by AC_CHECK_LIB below.
9065 for pgac_option in $LZ4_CFLAGS; do
9066 case $pgac_option in
9067 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9068 esac
9069 done
9070 for pgac_option in $LZ4_LIBS; do
9071 case $pgac_option in
9072 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9073 esac
9074 done
9078 # ZSTD
9080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ZSTD support" >&5
9081 $as_echo_n "checking whether to build with ZSTD support... " >&6; }
9085 # Check whether --with-zstd was given.
9086 if test "${with_zstd+set}" = set; then :
9087 withval=$with_zstd;
9088 case $withval in
9089 yes)
9091 $as_echo "#define USE_ZSTD 1" >>confdefs.h
9098 as_fn_error $? "no argument expected for --with-zstd option" "$LINENO" 5
9100 esac
9102 else
9103 with_zstd=no
9108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_zstd" >&5
9109 $as_echo "$with_zstd" >&6; }
9112 if test "$with_zstd" = yes; then
9114 pkg_failed=no
9115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd >= 1.4.0" >&5
9116 $as_echo_n "checking for libzstd >= 1.4.0... " >&6; }
9118 if test -n "$ZSTD_CFLAGS"; then
9119 pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
9120 elif test -n "$PKG_CONFIG"; then
9121 if test -n "$PKG_CONFIG" && \
9122 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9123 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9124 ac_status=$?
9125 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9126 test $ac_status = 0; }; then
9127 pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd >= 1.4.0" 2>/dev/null`
9128 test "x$?" != "x0" && pkg_failed=yes
9129 else
9130 pkg_failed=yes
9132 else
9133 pkg_failed=untried
9135 if test -n "$ZSTD_LIBS"; then
9136 pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
9137 elif test -n "$PKG_CONFIG"; then
9138 if test -n "$PKG_CONFIG" && \
9139 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9140 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9141 ac_status=$?
9142 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9143 test $ac_status = 0; }; then
9144 pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd >= 1.4.0" 2>/dev/null`
9145 test "x$?" != "x0" && pkg_failed=yes
9146 else
9147 pkg_failed=yes
9149 else
9150 pkg_failed=untried
9155 if test $pkg_failed = yes; then
9156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9157 $as_echo "no" >&6; }
9159 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9160 _pkg_short_errors_supported=yes
9161 else
9162 _pkg_short_errors_supported=no
9164 if test $_pkg_short_errors_supported = yes; then
9165 ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9166 else
9167 ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9169 # Put the nasty error message in config.log where it belongs
9170 echo "$ZSTD_PKG_ERRORS" >&5
9172 as_fn_error $? "Package requirements (libzstd >= 1.4.0) were not met:
9174 $ZSTD_PKG_ERRORS
9176 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9177 installed software in a non-standard prefix.
9179 Alternatively, you may set the environment variables ZSTD_CFLAGS
9180 and ZSTD_LIBS to avoid the need to call pkg-config.
9181 See the pkg-config man page for more details." "$LINENO" 5
9182 elif test $pkg_failed = untried; then
9183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9184 $as_echo "no" >&6; }
9185 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9186 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9187 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9188 is in your PATH or set the PKG_CONFIG environment variable to the full
9189 path to pkg-config.
9191 Alternatively, you may set the environment variables ZSTD_CFLAGS
9192 and ZSTD_LIBS to avoid the need to call pkg-config.
9193 See the pkg-config man page for more details.
9195 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9196 See \`config.log' for more details" "$LINENO" 5; }
9197 else
9198 ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
9199 ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
9200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9201 $as_echo "yes" >&6; }
9204 # We only care about -I, -D, and -L switches;
9205 # note that -lzstd will be added by AC_CHECK_LIB below.
9206 for pgac_option in $ZSTD_CFLAGS; do
9207 case $pgac_option in
9208 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9209 esac
9210 done
9211 for pgac_option in $ZSTD_LIBS; do
9212 case $pgac_option in
9213 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9214 esac
9215 done
9218 # Assignments
9221 CPPFLAGS="$CPPFLAGS $INCLUDES"
9222 LDFLAGS="$LDFLAGS $LIBDIRS"
9228 if test -n "$ac_tool_prefix"; then
9229 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9230 set dummy ${ac_tool_prefix}strip; ac_word=$2
9231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9232 $as_echo_n "checking for $ac_word... " >&6; }
9233 if ${ac_cv_prog_STRIP+:} false; then :
9234 $as_echo_n "(cached) " >&6
9235 else
9236 if test -n "$STRIP"; then
9237 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9238 else
9239 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9240 for as_dir in $PATH
9242 IFS=$as_save_IFS
9243 test -z "$as_dir" && as_dir=.
9244 for ac_exec_ext in '' $ac_executable_extensions; do
9245 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9246 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9247 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9248 break 2
9250 done
9251 done
9252 IFS=$as_save_IFS
9256 STRIP=$ac_cv_prog_STRIP
9257 if test -n "$STRIP"; then
9258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9259 $as_echo "$STRIP" >&6; }
9260 else
9261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9262 $as_echo "no" >&6; }
9267 if test -z "$ac_cv_prog_STRIP"; then
9268 ac_ct_STRIP=$STRIP
9269 # Extract the first word of "strip", so it can be a program name with args.
9270 set dummy strip; ac_word=$2
9271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9272 $as_echo_n "checking for $ac_word... " >&6; }
9273 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9274 $as_echo_n "(cached) " >&6
9275 else
9276 if test -n "$ac_ct_STRIP"; then
9277 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9278 else
9279 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9280 for as_dir in $PATH
9282 IFS=$as_save_IFS
9283 test -z "$as_dir" && as_dir=.
9284 for ac_exec_ext in '' $ac_executable_extensions; do
9285 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9286 ac_cv_prog_ac_ct_STRIP="strip"
9287 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9288 break 2
9290 done
9291 done
9292 IFS=$as_save_IFS
9296 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9297 if test -n "$ac_ct_STRIP"; then
9298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9299 $as_echo "$ac_ct_STRIP" >&6; }
9300 else
9301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9302 $as_echo "no" >&6; }
9305 if test "x$ac_ct_STRIP" = x; then
9306 STRIP=":"
9307 else
9308 case $cross_compiling:$ac_tool_warned in
9309 yes:)
9310 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9311 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9312 ac_tool_warned=yes ;;
9313 esac
9314 STRIP=$ac_ct_STRIP
9316 else
9317 STRIP="$ac_cv_prog_STRIP"
9321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9322 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9323 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9324 STRIP_STATIC_LIB="$STRIP --strip-unneeded"
9325 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9327 $as_echo "yes" >&6; }
9328 else
9329 case $host_os in
9330 darwin*)
9331 STRIP="$STRIP -x"
9332 STRIP_STATIC_LIB=$STRIP
9333 STRIP_SHARED_LIB=$STRIP
9334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9335 $as_echo "yes" >&6; }
9338 STRIP_STATIC_LIB=:
9339 STRIP_SHARED_LIB=:
9340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9341 $as_echo "no" >&6; }
9343 esac
9348 if test -n "$ac_tool_prefix"; then
9349 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9350 set dummy ${ac_tool_prefix}ar; ac_word=$2
9351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9352 $as_echo_n "checking for $ac_word... " >&6; }
9353 if ${ac_cv_prog_AR+:} false; then :
9354 $as_echo_n "(cached) " >&6
9355 else
9356 if test -n "$AR"; then
9357 ac_cv_prog_AR="$AR" # Let the user override the test.
9358 else
9359 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9360 for as_dir in $PATH
9362 IFS=$as_save_IFS
9363 test -z "$as_dir" && as_dir=.
9364 for ac_exec_ext in '' $ac_executable_extensions; do
9365 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9366 ac_cv_prog_AR="${ac_tool_prefix}ar"
9367 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9368 break 2
9370 done
9371 done
9372 IFS=$as_save_IFS
9376 AR=$ac_cv_prog_AR
9377 if test -n "$AR"; then
9378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9379 $as_echo "$AR" >&6; }
9380 else
9381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9382 $as_echo "no" >&6; }
9387 if test -z "$ac_cv_prog_AR"; then
9388 ac_ct_AR=$AR
9389 # Extract the first word of "ar", so it can be a program name with args.
9390 set dummy ar; ac_word=$2
9391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9392 $as_echo_n "checking for $ac_word... " >&6; }
9393 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9394 $as_echo_n "(cached) " >&6
9395 else
9396 if test -n "$ac_ct_AR"; then
9397 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9398 else
9399 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9400 for as_dir in $PATH
9402 IFS=$as_save_IFS
9403 test -z "$as_dir" && as_dir=.
9404 for ac_exec_ext in '' $ac_executable_extensions; do
9405 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9406 ac_cv_prog_ac_ct_AR="ar"
9407 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9408 break 2
9410 done
9411 done
9412 IFS=$as_save_IFS
9416 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9417 if test -n "$ac_ct_AR"; then
9418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9419 $as_echo "$ac_ct_AR" >&6; }
9420 else
9421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9422 $as_echo "no" >&6; }
9425 if test "x$ac_ct_AR" = x; then
9426 AR="ar"
9427 else
9428 case $cross_compiling:$ac_tool_warned in
9429 yes:)
9430 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9431 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9432 ac_tool_warned=yes ;;
9433 esac
9434 AR=$ac_ct_AR
9436 else
9437 AR="$ac_cv_prog_AR"
9440 if test "$PORTNAME" = "win32"; then
9441 if test -n "$ac_tool_prefix"; then
9442 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9443 set dummy ${ac_tool_prefix}windres; ac_word=$2
9444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9445 $as_echo_n "checking for $ac_word... " >&6; }
9446 if ${ac_cv_prog_WINDRES+:} false; then :
9447 $as_echo_n "(cached) " >&6
9448 else
9449 if test -n "$WINDRES"; then
9450 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9451 else
9452 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9453 for as_dir in $PATH
9455 IFS=$as_save_IFS
9456 test -z "$as_dir" && as_dir=.
9457 for ac_exec_ext in '' $ac_executable_extensions; do
9458 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9459 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9460 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9461 break 2
9463 done
9464 done
9465 IFS=$as_save_IFS
9469 WINDRES=$ac_cv_prog_WINDRES
9470 if test -n "$WINDRES"; then
9471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9472 $as_echo "$WINDRES" >&6; }
9473 else
9474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9475 $as_echo "no" >&6; }
9480 if test -z "$ac_cv_prog_WINDRES"; then
9481 ac_ct_WINDRES=$WINDRES
9482 # Extract the first word of "windres", so it can be a program name with args.
9483 set dummy windres; ac_word=$2
9484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9485 $as_echo_n "checking for $ac_word... " >&6; }
9486 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9487 $as_echo_n "(cached) " >&6
9488 else
9489 if test -n "$ac_ct_WINDRES"; then
9490 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9491 else
9492 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9493 for as_dir in $PATH
9495 IFS=$as_save_IFS
9496 test -z "$as_dir" && as_dir=.
9497 for ac_exec_ext in '' $ac_executable_extensions; do
9498 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9499 ac_cv_prog_ac_ct_WINDRES="windres"
9500 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9501 break 2
9503 done
9504 done
9505 IFS=$as_save_IFS
9509 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9510 if test -n "$ac_ct_WINDRES"; then
9511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9512 $as_echo "$ac_ct_WINDRES" >&6; }
9513 else
9514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9515 $as_echo "no" >&6; }
9518 if test "x$ac_ct_WINDRES" = x; then
9519 WINDRES="windres"
9520 else
9521 case $cross_compiling:$ac_tool_warned in
9522 yes:)
9523 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9524 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9525 ac_tool_warned=yes ;;
9526 esac
9527 WINDRES=$ac_ct_WINDRES
9529 else
9530 WINDRES="$ac_cv_prog_WINDRES"
9535 # Find a good install program. We prefer a C program (faster),
9536 # so one script is as good as another. But avoid the broken or
9537 # incompatible versions:
9538 # SysV /etc/install, /usr/sbin/install
9539 # SunOS /usr/etc/install
9540 # IRIX /sbin/install
9541 # AIX /bin/install
9542 # AmigaOS /C/install, which installs bootblocks on floppy discs
9543 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9544 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9545 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9546 # OS/2's system install, which has a completely different semantic
9547 # ./install, which can be erroneously created by make from ./install.sh.
9548 # Reject install programs that cannot install multiple files.
9549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9550 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9551 if test -z "$INSTALL"; then
9552 if ${ac_cv_path_install+:} false; then :
9553 $as_echo_n "(cached) " >&6
9554 else
9555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9556 for as_dir in $PATH
9558 IFS=$as_save_IFS
9559 test -z "$as_dir" && as_dir=.
9560 # Account for people who put trailing slashes in PATH elements.
9561 case $as_dir/ in #((
9562 ./ | .// | /[cC]/* | \
9563 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9564 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9565 /usr/ucb/* ) ;;
9567 # OSF1 and SCO ODT 3.0 have their own names for install.
9568 # Don't use installbsd from OSF since it installs stuff as root
9569 # by default.
9570 for ac_prog in ginstall scoinst install; do
9571 for ac_exec_ext in '' $ac_executable_extensions; do
9572 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9573 if test $ac_prog = install &&
9574 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9575 # AIX install. It has an incompatible calling convention.
9577 elif test $ac_prog = install &&
9578 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9579 # program-specific install script used by HP pwplus--don't use.
9581 else
9582 rm -rf conftest.one conftest.two conftest.dir
9583 echo one > conftest.one
9584 echo two > conftest.two
9585 mkdir conftest.dir
9586 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9587 test -s conftest.one && test -s conftest.two &&
9588 test -s conftest.dir/conftest.one &&
9589 test -s conftest.dir/conftest.two
9590 then
9591 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9592 break 3
9596 done
9597 done
9599 esac
9601 done
9602 IFS=$as_save_IFS
9604 rm -rf conftest.one conftest.two conftest.dir
9607 if test "${ac_cv_path_install+set}" = set; then
9608 INSTALL=$ac_cv_path_install
9609 else
9610 # As a last resort, use the slow shell script. Don't cache a
9611 # value for INSTALL within a source directory, because that will
9612 # break other packages using the cache if that directory is
9613 # removed, or if the value is a relative name.
9614 INSTALL=$ac_install_sh
9617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9618 $as_echo "$INSTALL" >&6; }
9620 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9621 # It thinks the first close brace ends the variable substitution.
9622 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9624 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9626 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9628 # When Autoconf chooses install-sh as install program it tries to generate
9629 # a relative path to it in each makefile where it substitutes it. This clashes
9630 # with our Makefile.global concept. This workaround helps.
9631 case $INSTALL in
9632 *install-sh*) install_bin='';;
9633 *) install_bin=$INSTALL;;
9634 esac
9637 if test -z "$TAR"; then
9638 for ac_prog in tar
9640 # Extract the first word of "$ac_prog", so it can be a program name with args.
9641 set dummy $ac_prog; ac_word=$2
9642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9643 $as_echo_n "checking for $ac_word... " >&6; }
9644 if ${ac_cv_path_TAR+:} false; then :
9645 $as_echo_n "(cached) " >&6
9646 else
9647 case $TAR in
9648 [\\/]* | ?:[\\/]*)
9649 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9652 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9653 for as_dir in $PATH
9655 IFS=$as_save_IFS
9656 test -z "$as_dir" && as_dir=.
9657 for ac_exec_ext in '' $ac_executable_extensions; do
9658 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9659 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9660 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9661 break 2
9663 done
9664 done
9665 IFS=$as_save_IFS
9668 esac
9670 TAR=$ac_cv_path_TAR
9671 if test -n "$TAR"; then
9672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9673 $as_echo "$TAR" >&6; }
9674 else
9675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9676 $as_echo "no" >&6; }
9680 test -n "$TAR" && break
9681 done
9683 else
9684 # Report the value of TAR in configure's output in all cases.
9685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9686 $as_echo_n "checking for TAR... " >&6; }
9687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9688 $as_echo "$TAR" >&6; }
9691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9692 $as_echo_n "checking whether ln -s works... " >&6; }
9693 LN_S=$as_ln_s
9694 if test "$LN_S" = "ln -s"; then
9695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9696 $as_echo "yes" >&6; }
9697 else
9698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9699 $as_echo "no, using $LN_S" >&6; }
9702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9703 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9704 if test -z "$MKDIR_P"; then
9705 if ${ac_cv_path_mkdir+:} false; then :
9706 $as_echo_n "(cached) " >&6
9707 else
9708 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9709 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9711 IFS=$as_save_IFS
9712 test -z "$as_dir" && as_dir=.
9713 for ac_prog in mkdir gmkdir; do
9714 for ac_exec_ext in '' $ac_executable_extensions; do
9715 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9716 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9717 'mkdir (GNU coreutils) '* | \
9718 'mkdir (coreutils) '* | \
9719 'mkdir (fileutils) '4.1*)
9720 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9721 break 3;;
9722 esac
9723 done
9724 done
9725 done
9726 IFS=$as_save_IFS
9730 test -d ./--version && rmdir ./--version
9731 if test "${ac_cv_path_mkdir+set}" = set; then
9732 MKDIR_P="$ac_cv_path_mkdir -p"
9733 else
9734 # As a last resort, use the slow shell script. Don't cache a
9735 # value for MKDIR_P within a source directory, because that will
9736 # break other packages using the cache if that directory is
9737 # removed, or if the value is a relative name.
9738 MKDIR_P="$ac_install_sh -d"
9741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9742 $as_echo "$MKDIR_P" >&6; }
9744 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9745 # a relative path to it in each makefile where it substitutes it. This clashes
9746 # with our Makefile.global concept. This workaround helps.
9747 case $MKDIR_P in
9748 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9749 esac
9751 if test -z "$BISON"; then
9752 for ac_prog in bison
9754 # Extract the first word of "$ac_prog", so it can be a program name with args.
9755 set dummy $ac_prog; ac_word=$2
9756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9757 $as_echo_n "checking for $ac_word... " >&6; }
9758 if ${ac_cv_path_BISON+:} false; then :
9759 $as_echo_n "(cached) " >&6
9760 else
9761 case $BISON in
9762 [\\/]* | ?:[\\/]*)
9763 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9766 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9767 for as_dir in $PATH
9769 IFS=$as_save_IFS
9770 test -z "$as_dir" && as_dir=.
9771 for ac_exec_ext in '' $ac_executable_extensions; do
9772 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9773 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9774 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9775 break 2
9777 done
9778 done
9779 IFS=$as_save_IFS
9782 esac
9784 BISON=$ac_cv_path_BISON
9785 if test -n "$BISON"; then
9786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9787 $as_echo "$BISON" >&6; }
9788 else
9789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9790 $as_echo "no" >&6; }
9794 test -n "$BISON" && break
9795 done
9797 else
9798 # Report the value of BISON in configure's output in all cases.
9799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9800 $as_echo_n "checking for BISON... " >&6; }
9801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9802 $as_echo "$BISON" >&6; }
9806 if test "$BISON"; then
9807 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9808 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9809 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9810 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 2.3) exit 0; else exit 1;}'
9811 then
9812 as_fn_error $? "
9813 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9814 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." "$LINENO" 5
9816 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9817 # of the now preferred %name-prefix "base_yy", but the latter
9818 # doesn't work with Bison 2.3 or less. So for now we silence the
9819 # deprecation warnings.
9820 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9821 then
9822 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9826 if test -z "$BISON"; then
9827 as_fn_error $? "bison not found" "$LINENO" 5
9831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9832 $as_echo_n "checking for flex... " >&6; }
9833 if ${pgac_cv_path_flex+:} false; then :
9834 $as_echo_n "(cached) " >&6
9835 else
9836 # Let the user override the test
9837 if test -n "$FLEX"; then
9838 pgac_cv_path_flex=$FLEX
9839 else
9840 pgac_save_IFS=$IFS
9841 IFS=$PATH_SEPARATOR
9842 for pgac_dir in $PATH; do
9843 IFS=$pgac_save_IFS
9844 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9845 pgac_dir=`pwd`
9847 for pgac_prog in flex lex; do
9848 pgac_candidate="$pgac_dir/$pgac_prog"
9849 if test -f "$pgac_candidate" \
9850 && $pgac_candidate --version </dev/null >/dev/null 2>&1
9851 then
9852 echo '%%' > conftest.l
9853 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9854 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9855 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;}'
9856 then
9857 pgac_cv_path_flex=$pgac_candidate
9858 break 2
9859 else
9860 as_fn_error $? "
9861 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9862 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." "$LINENO" 5
9866 done
9867 done
9868 rm -f conftest.l lex.yy.c
9869 : ${pgac_cv_path_flex=no}
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9874 $as_echo "$pgac_cv_path_flex" >&6; }
9875 if test x"$pgac_cv_path_flex" = x"no"; then
9876 as_fn_error $? "flex not found" "$LINENO" 5
9877 else
9878 FLEX=$pgac_cv_path_flex
9879 pgac_flex_version=`$FLEX --version 2>/dev/null`
9880 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9881 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9888 if test -z "$PERL"; then
9889 for ac_prog in perl
9891 # Extract the first word of "$ac_prog", so it can be a program name with args.
9892 set dummy $ac_prog; ac_word=$2
9893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9894 $as_echo_n "checking for $ac_word... " >&6; }
9895 if ${ac_cv_path_PERL+:} false; then :
9896 $as_echo_n "(cached) " >&6
9897 else
9898 case $PERL in
9899 [\\/]* | ?:[\\/]*)
9900 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9903 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9904 for as_dir in $PATH
9906 IFS=$as_save_IFS
9907 test -z "$as_dir" && as_dir=.
9908 for ac_exec_ext in '' $ac_executable_extensions; do
9909 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9910 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9911 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9912 break 2
9914 done
9915 done
9916 IFS=$as_save_IFS
9919 esac
9921 PERL=$ac_cv_path_PERL
9922 if test -n "$PERL"; then
9923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9924 $as_echo "$PERL" >&6; }
9925 else
9926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9927 $as_echo "no" >&6; }
9931 test -n "$PERL" && break
9932 done
9934 else
9935 # Report the value of PERL in configure's output in all cases.
9936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9937 $as_echo_n "checking for PERL... " >&6; }
9938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9939 $as_echo "$PERL" >&6; }
9943 if test "$PERL"; then
9944 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'`
9945 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9946 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9947 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9948 $AWK '{ if ($1 == 5 && ($2 >= 14)) exit 1; else exit 0;}'
9949 then
9950 as_fn_error $? "
9951 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9952 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." "$LINENO" 5
9956 if test -z "$PERL"; then
9957 as_fn_error $? "Perl not found" "$LINENO" 5
9960 if test "$with_perl" = yes; then
9961 if test -z "$PERL"; then
9962 as_fn_error $? "Perl not found" "$LINENO" 5
9965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9966 $as_echo_n "checking for Perl archlibexp... " >&6; }
9967 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9968 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9970 $as_echo "$perl_archlibexp" >&6; }
9971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9972 $as_echo_n "checking for Perl privlibexp... " >&6; }
9973 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9974 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9976 $as_echo "$perl_privlibexp" >&6; }
9977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9978 $as_echo_n "checking for Perl useshrplib... " >&6; }
9979 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9980 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9982 $as_echo "$perl_useshrplib" >&6; }
9983 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9984 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9985 You might have to rebuild your Perl installation. Refer to the
9986 documentation for details. Use --without-perl to disable building
9987 PL/Perl." "$LINENO" 5
9989 # On most platforms, archlibexp is also where the Perl include files live ...
9990 perl_includespec="-I$perl_archlibexp/CORE"
9991 # ... but on newer macOS versions, we must use -iwithsysroot to look
9992 # under $PG_SYSROOT
9993 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
9994 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
9995 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
9999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
10000 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
10001 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10003 $as_echo "$perl_ccflags" >&6; }
10004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10005 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10006 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10008 $as_echo "$perl_embed_ccflags" >&6; }
10011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10012 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10013 if test "$PORTNAME" = "win32" ; then
10014 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10015 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10016 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10017 else
10018 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10019 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10020 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10023 else
10024 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10025 pgac_tmp2=`$PERL -MConfig -e 'print "$Config{ccdlflags} $Config{ldflags}"'`
10026 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%"`
10028 if test -z "$perl_embed_ldflags" ; then
10029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10030 $as_echo "no" >&6; }
10031 as_fn_error $? "could not determine flags for linking embedded Perl.
10032 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10033 installed." "$LINENO" 5
10034 else
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10036 $as_echo "$perl_embed_ldflags" >&6; }
10041 if test "$with_python" = yes; then
10042 if test -z "$PYTHON"; then
10043 for ac_prog in python3 python
10045 # Extract the first word of "$ac_prog", so it can be a program name with args.
10046 set dummy $ac_prog; ac_word=$2
10047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10048 $as_echo_n "checking for $ac_word... " >&6; }
10049 if ${ac_cv_path_PYTHON+:} false; then :
10050 $as_echo_n "(cached) " >&6
10051 else
10052 case $PYTHON in
10053 [\\/]* | ?:[\\/]*)
10054 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10057 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10058 for as_dir in $PATH
10060 IFS=$as_save_IFS
10061 test -z "$as_dir" && as_dir=.
10062 for ac_exec_ext in '' $ac_executable_extensions; do
10063 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10064 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10065 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10066 break 2
10068 done
10069 done
10070 IFS=$as_save_IFS
10073 esac
10075 PYTHON=$ac_cv_path_PYTHON
10076 if test -n "$PYTHON"; then
10077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10078 $as_echo "$PYTHON" >&6; }
10079 else
10080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10081 $as_echo "no" >&6; }
10085 test -n "$PYTHON" && break
10086 done
10088 else
10089 # Report the value of PYTHON in configure's output in all cases.
10090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10091 $as_echo_n "checking for PYTHON... " >&6; }
10092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10093 $as_echo "$PYTHON" >&6; }
10096 if test x"$PYTHON" = x""; then
10097 as_fn_error $? "Python not found" "$LINENO" 5
10101 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10102 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10103 $as_echo "$as_me: using python $python_fullversion" >&6;}
10104 # python_fullversion is typically n.n.n plus some trailing junk
10105 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10106 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10107 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10108 # Reject unsupported Python versions as soon as practical.
10109 if test "$python_majorversion" -lt 3; then
10110 as_fn_error $? "Python version $python_version is too old (version 3 or later is required)" "$LINENO" 5
10113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
10114 $as_echo_n "checking for Python sysconfig module... " >&6; }
10115 if "${PYTHON}" -c 'import sysconfig' 2>&5
10116 then
10117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10118 $as_echo "yes" >&6; }
10119 else
10120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10121 $as_echo "no" >&6; }
10122 as_fn_error $? "sysconfig module not found" "$LINENO" 5
10125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10126 $as_echo_n "checking Python configuration directory... " >&6; }
10127 python_configdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBPL'))))"`
10128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10129 $as_echo "$python_configdir" >&6; }
10131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directory" >&5
10132 $as_echo_n "checking Python include directory... " >&6; }
10133 python_includespec=`${PYTHON} -c "import sysconfig; print('-I' + sysconfig.get_config_var('INCLUDEPY'))"`
10134 if test "$PORTNAME" = win32 ; then
10135 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10138 $as_echo "$python_includespec" >&6; }
10142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10143 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10145 python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10146 python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
10148 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10149 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10150 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10151 then
10152 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10153 found_shlib=1
10154 else
10155 # Otherwise, guess the base name of the shlib.
10156 # LDVERSION was added in Python 3.2, before that use VERSION,
10157 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10158 python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
10159 if test x"${python_ldversion}" != x""; then
10160 ldlibrary="python${python_ldversion}"
10161 else
10162 python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
10163 if test x"${python_version_var}" != x""; then
10164 ldlibrary="python${python_version_var}"
10165 else
10166 ldlibrary="python${python_version}"
10169 # Search for a likely-looking file.
10170 found_shlib=0
10171 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10173 if test -e "$d/lib${ldlibrary}${DLSUFFIX}"; then
10174 python_libdir="$d"
10175 found_shlib=1
10176 break 2
10178 done
10179 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10180 # (".so.n.n") as well. However, check this only after failing to find
10181 # ".so" anywhere, because yet other platforms (Debian) put the .so
10182 # symlink in a different directory from the underlying versioned shlib.
10183 if test "$found_shlib" != 1; then
10184 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10186 for f in "$d/lib${ldlibrary}.so."* ; do
10187 if test -e "$f"; then
10188 python_libdir="$d"
10189 found_shlib=1
10190 break 2
10192 done
10193 done
10195 # As usual, Windows has its own ideas. Possible default library
10196 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10197 # and the "lib" prefix might not be there.
10198 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10199 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10201 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10202 if test -e "$f"; then
10203 python_libdir="$d"
10204 found_shlib=1
10205 break 2
10207 done
10208 done
10211 if test "$found_shlib" != 1; then
10212 as_fn_error $? "could not find shared library for Python
10213 You might have to rebuild your Python installation. Refer to the
10214 documentation for details. Use --without-python to disable building
10215 PL/Python." "$LINENO" 5
10217 python_libspec="-L${python_libdir} -l${ldlibrary}"
10219 python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10222 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10228 if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then
10229 if test -z "$ZIC"; then
10230 for ac_prog in zic
10232 # Extract the first word of "$ac_prog", so it can be a program name with args.
10233 set dummy $ac_prog; ac_word=$2
10234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10235 $as_echo_n "checking for $ac_word... " >&6; }
10236 if ${ac_cv_path_ZIC+:} false; then :
10237 $as_echo_n "(cached) " >&6
10238 else
10239 case $ZIC in
10240 [\\/]* | ?:[\\/]*)
10241 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10244 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10245 for as_dir in $PATH
10247 IFS=$as_save_IFS
10248 test -z "$as_dir" && as_dir=.
10249 for ac_exec_ext in '' $ac_executable_extensions; do
10250 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10251 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10252 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10253 break 2
10255 done
10256 done
10257 IFS=$as_save_IFS
10260 esac
10262 ZIC=$ac_cv_path_ZIC
10263 if test -n "$ZIC"; then
10264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10265 $as_echo "$ZIC" >&6; }
10266 else
10267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10268 $as_echo "no" >&6; }
10272 test -n "$ZIC" && break
10273 done
10275 else
10276 # Report the value of ZIC in configure's output in all cases.
10277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10278 $as_echo_n "checking for ZIC... " >&6; }
10279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10280 $as_echo "$ZIC" >&6; }
10283 if test -z "$ZIC"; then
10284 as_fn_error $? "
10285 When cross-compiling, either use the option --with-system-tzdata to use
10286 existing time-zone data, or set the environment variable ZIC to a zic
10287 program to use during the build." "$LINENO" 5
10292 # Pthreads
10294 # For each platform, we need to know about any special compile and link
10295 # libraries, and whether the normal C function names are thread-safe.
10296 # WIN32 doesn't need the pthread tests; it always uses threads
10298 # These tests are run before the library-tests, because linking with the
10299 # other libraries can pull in the pthread functions as a side-effect. We
10300 # want to use the -pthread or similar flags directly, and not rely on
10301 # the side-effects of linking with some other library.
10303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10304 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10305 if ${ac_cv_path_SED+:} false; then :
10306 $as_echo_n "(cached) " >&6
10307 else
10308 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10309 for ac_i in 1 2 3 4 5 6 7; do
10310 ac_script="$ac_script$as_nl$ac_script"
10311 done
10312 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10313 { ac_script=; unset ac_script;}
10314 if test -z "$SED"; then
10315 ac_path_SED_found=false
10316 # Loop through the user's path and test for each of PROGNAME-LIST
10317 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10318 for as_dir in $PATH
10320 IFS=$as_save_IFS
10321 test -z "$as_dir" && as_dir=.
10322 for ac_prog in sed gsed; do
10323 for ac_exec_ext in '' $ac_executable_extensions; do
10324 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10325 as_fn_executable_p "$ac_path_SED" || continue
10326 # Check for GNU ac_path_SED and select it if it is found.
10327 # Check for GNU $ac_path_SED
10328 case `"$ac_path_SED" --version 2>&1` in
10329 *GNU*)
10330 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10332 ac_count=0
10333 $as_echo_n 0123456789 >"conftest.in"
10334 while :
10336 cat "conftest.in" "conftest.in" >"conftest.tmp"
10337 mv "conftest.tmp" "conftest.in"
10338 cp "conftest.in" "conftest.nl"
10339 $as_echo '' >> "conftest.nl"
10340 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10341 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10342 as_fn_arith $ac_count + 1 && ac_count=$as_val
10343 if test $ac_count -gt ${ac_path_SED_max-0}; then
10344 # Best one so far, save it but keep looking for a better one
10345 ac_cv_path_SED="$ac_path_SED"
10346 ac_path_SED_max=$ac_count
10348 # 10*(2^10) chars as input seems more than enough
10349 test $ac_count -gt 10 && break
10350 done
10351 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10352 esac
10354 $ac_path_SED_found && break 3
10355 done
10356 done
10357 done
10358 IFS=$as_save_IFS
10359 if test -z "$ac_cv_path_SED"; then
10360 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10362 else
10363 ac_cv_path_SED=$SED
10367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10368 $as_echo "$ac_cv_path_SED" >&6; }
10369 SED="$ac_cv_path_SED"
10370 rm -f conftest.sed
10373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10374 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10375 if ${ac_cv_path_GREP+:} false; then :
10376 $as_echo_n "(cached) " >&6
10377 else
10378 if test -z "$GREP"; then
10379 ac_path_GREP_found=false
10380 # Loop through the user's path and test for each of PROGNAME-LIST
10381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10382 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10384 IFS=$as_save_IFS
10385 test -z "$as_dir" && as_dir=.
10386 for ac_prog in grep ggrep; do
10387 for ac_exec_ext in '' $ac_executable_extensions; do
10388 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10389 as_fn_executable_p "$ac_path_GREP" || continue
10390 # Check for GNU ac_path_GREP and select it if it is found.
10391 # Check for GNU $ac_path_GREP
10392 case `"$ac_path_GREP" --version 2>&1` in
10393 *GNU*)
10394 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10396 ac_count=0
10397 $as_echo_n 0123456789 >"conftest.in"
10398 while :
10400 cat "conftest.in" "conftest.in" >"conftest.tmp"
10401 mv "conftest.tmp" "conftest.in"
10402 cp "conftest.in" "conftest.nl"
10403 $as_echo 'GREP' >> "conftest.nl"
10404 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10405 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10406 as_fn_arith $ac_count + 1 && ac_count=$as_val
10407 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10408 # Best one so far, save it but keep looking for a better one
10409 ac_cv_path_GREP="$ac_path_GREP"
10410 ac_path_GREP_max=$ac_count
10412 # 10*(2^10) chars as input seems more than enough
10413 test $ac_count -gt 10 && break
10414 done
10415 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10416 esac
10418 $ac_path_GREP_found && break 3
10419 done
10420 done
10421 done
10422 IFS=$as_save_IFS
10423 if test -z "$ac_cv_path_GREP"; then
10424 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10426 else
10427 ac_cv_path_GREP=$GREP
10431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10432 $as_echo "$ac_cv_path_GREP" >&6; }
10433 GREP="$ac_cv_path_GREP"
10436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10437 $as_echo_n "checking for egrep... " >&6; }
10438 if ${ac_cv_path_EGREP+:} false; then :
10439 $as_echo_n "(cached) " >&6
10440 else
10441 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10442 then ac_cv_path_EGREP="$GREP -E"
10443 else
10444 if test -z "$EGREP"; then
10445 ac_path_EGREP_found=false
10446 # Loop through the user's path and test for each of PROGNAME-LIST
10447 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10448 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10450 IFS=$as_save_IFS
10451 test -z "$as_dir" && as_dir=.
10452 for ac_prog in egrep; do
10453 for ac_exec_ext in '' $ac_executable_extensions; do
10454 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10455 as_fn_executable_p "$ac_path_EGREP" || continue
10456 # Check for GNU ac_path_EGREP and select it if it is found.
10457 # Check for GNU $ac_path_EGREP
10458 case `"$ac_path_EGREP" --version 2>&1` in
10459 *GNU*)
10460 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10462 ac_count=0
10463 $as_echo_n 0123456789 >"conftest.in"
10464 while :
10466 cat "conftest.in" "conftest.in" >"conftest.tmp"
10467 mv "conftest.tmp" "conftest.in"
10468 cp "conftest.in" "conftest.nl"
10469 $as_echo 'EGREP' >> "conftest.nl"
10470 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10471 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10472 as_fn_arith $ac_count + 1 && ac_count=$as_val
10473 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10474 # Best one so far, save it but keep looking for a better one
10475 ac_cv_path_EGREP="$ac_path_EGREP"
10476 ac_path_EGREP_max=$ac_count
10478 # 10*(2^10) chars as input seems more than enough
10479 test $ac_count -gt 10 && break
10480 done
10481 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10482 esac
10484 $ac_path_EGREP_found && break 3
10485 done
10486 done
10487 done
10488 IFS=$as_save_IFS
10489 if test -z "$ac_cv_path_EGREP"; then
10490 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10492 else
10493 ac_cv_path_EGREP=$EGREP
10498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10499 $as_echo "$ac_cv_path_EGREP" >&6; }
10500 EGREP="$ac_cv_path_EGREP"
10503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10504 $as_echo_n "checking for ANSI C header files... " >&6; }
10505 if ${ac_cv_header_stdc+:} false; then :
10506 $as_echo_n "(cached) " >&6
10507 else
10508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10509 /* end confdefs.h. */
10510 #include <stdlib.h>
10511 #include <stdarg.h>
10512 #include <string.h>
10513 #include <float.h>
10516 main ()
10520 return 0;
10522 _ACEOF
10523 if ac_fn_c_try_compile "$LINENO"; then :
10524 ac_cv_header_stdc=yes
10525 else
10526 ac_cv_header_stdc=no
10528 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10530 if test $ac_cv_header_stdc = yes; then
10531 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10533 /* end confdefs.h. */
10534 #include <string.h>
10536 _ACEOF
10537 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10538 $EGREP "memchr" >/dev/null 2>&1; then :
10540 else
10541 ac_cv_header_stdc=no
10543 rm -f conftest*
10547 if test $ac_cv_header_stdc = yes; then
10548 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10550 /* end confdefs.h. */
10551 #include <stdlib.h>
10553 _ACEOF
10554 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10555 $EGREP "free" >/dev/null 2>&1; then :
10557 else
10558 ac_cv_header_stdc=no
10560 rm -f conftest*
10564 if test $ac_cv_header_stdc = yes; then
10565 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10566 if test "$cross_compiling" = yes; then :
10568 else
10569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10570 /* end confdefs.h. */
10571 #include <ctype.h>
10572 #include <stdlib.h>
10573 #if ((' ' & 0x0FF) == 0x020)
10574 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10575 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10576 #else
10577 # define ISLOWER(c) \
10578 (('a' <= (c) && (c) <= 'i') \
10579 || ('j' <= (c) && (c) <= 'r') \
10580 || ('s' <= (c) && (c) <= 'z'))
10581 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10582 #endif
10584 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10586 main ()
10588 int i;
10589 for (i = 0; i < 256; i++)
10590 if (XOR (islower (i), ISLOWER (i))
10591 || toupper (i) != TOUPPER (i))
10592 return 2;
10593 return 0;
10595 _ACEOF
10596 if ac_fn_c_try_run "$LINENO"; then :
10598 else
10599 ac_cv_header_stdc=no
10601 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10602 conftest.$ac_objext conftest.beam conftest.$ac_ext
10607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10608 $as_echo "$ac_cv_header_stdc" >&6; }
10609 if test $ac_cv_header_stdc = yes; then
10611 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10615 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10616 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10617 inttypes.h stdint.h unistd.h
10618 do :
10619 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10620 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10622 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10623 cat >>confdefs.h <<_ACEOF
10624 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10625 _ACEOF
10629 done
10632 if test "$PORTNAME" != "win32"; then :
10633 # then
10638 ac_ext=c
10639 ac_cpp='$CPP $CPPFLAGS'
10640 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10641 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10642 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10644 ax_pthread_ok=no
10646 # We used to check for pthread.h first, but this fails if pthread.h
10647 # requires special compiler flags (e.g. on Tru64 or Sequent).
10648 # It gets checked for in the link test anyway.
10650 # First of all, check if the user has set any of the PTHREAD_LIBS,
10651 # etcetera environment variables, and if threads linking works using
10652 # them:
10653 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10654 ax_pthread_save_CC="$CC"
10655 ax_pthread_save_CFLAGS="$CFLAGS"
10656 ax_pthread_save_LIBS="$LIBS"
10657 if test "x$PTHREAD_CC" != "x"; then :
10658 CC="$PTHREAD_CC"
10660 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10661 LIBS="$PTHREAD_LIBS $LIBS"
10662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10663 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10665 /* end confdefs.h. */
10667 /* Override any GCC internal prototype to avoid an error.
10668 Use char because int might match the return type of a GCC
10669 builtin and then its argument prototype would still apply. */
10670 #ifdef __cplusplus
10671 extern "C"
10672 #endif
10673 char pthread_join ();
10675 main ()
10677 return pthread_join ();
10679 return 0;
10681 _ACEOF
10682 if ac_fn_c_try_link "$LINENO"; then :
10683 ax_pthread_ok=yes
10685 rm -f core conftest.err conftest.$ac_objext \
10686 conftest$ac_exeext conftest.$ac_ext
10687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10688 $as_echo "$ax_pthread_ok" >&6; }
10689 if test "x$ax_pthread_ok" = "xno"; then
10690 PTHREAD_LIBS=""
10691 PTHREAD_CFLAGS=""
10693 CC="$ax_pthread_save_CC"
10694 CFLAGS="$ax_pthread_save_CFLAGS"
10695 LIBS="$ax_pthread_save_LIBS"
10698 # We must check for the threads library under a number of different
10699 # names; the ordering is very important because some systems
10700 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10701 # libraries is broken (non-POSIX).
10703 # Create a list of thread flags to try. Items starting with a "-" are
10704 # C compiler flags, and other items are library names, except for "none"
10705 # which indicates that we try without any flags at all, and "pthread-config"
10706 # which is a program returning the flags for the Pth emulation library.
10708 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10710 # The ordering *is* (sometimes) important. Some notes on the
10711 # individual items follow:
10713 # pthreads: AIX (must check this before -lpthread)
10714 # none: in case threads are in libc; should be tried before -Kthread and
10715 # other compiler flags to prevent continual compiler warnings
10716 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10717 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10718 # (Note: HP C rejects this with "bad form for `-t' option")
10719 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10720 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10721 # doesn't hurt to check since this sometimes defines pthreads and
10722 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
10723 # is present but should not be used directly; and before -mthreads,
10724 # because the compiler interprets this as "-mt" + "-hreads")
10725 # -mthreads: Mingw32/gcc, Lynx/gcc
10726 # pthread: Linux, etcetera
10727 # --thread-safe: KAI C++
10728 # pthread-config: use pthread-config program (for GNU Pth library)
10730 case $host_os in
10732 freebsd*)
10734 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10735 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10737 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10740 hpux*)
10742 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10743 # multi-threading and also sets -lpthread."
10745 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10748 openedition*)
10750 # IBM z/OS requires a feature-test macro to be defined in order to
10751 # enable POSIX threads at all, so give the user a hint if this is
10752 # not set. (We don't define these ourselves, as they can affect
10753 # other portions of the system API in unpredictable ways.)
10755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10756 /* end confdefs.h. */
10758 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10759 AX_PTHREAD_ZOS_MISSING
10760 # endif
10762 _ACEOF
10763 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10764 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10766 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10768 rm -f conftest*
10772 solaris*)
10774 # On Solaris (at least, for some versions), libc contains stubbed
10775 # (non-functional) versions of the pthreads routines, so link-based
10776 # tests will erroneously succeed. (N.B.: The stubs are missing
10777 # pthread_cleanup_push, or rather a function called by this macro,
10778 # so we could check for that, but who knows whether they'll stub
10779 # that too in a future libc.) So we'll check first for the
10780 # standard Solaris way of linking pthreads (-mt -lpthread).
10782 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10784 esac
10786 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10788 if test "x$GCC" = "xyes"; then :
10789 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10792 # The presence of a feature test macro requesting re-entrant function
10793 # definitions is, on some systems, a strong hint that pthreads support is
10794 # correctly enabled
10796 case $host_os in
10797 darwin* | hpux* | linux* | osf* | solaris*)
10798 ax_pthread_check_macro="_REENTRANT"
10801 aix*)
10802 ax_pthread_check_macro="_THREAD_SAFE"
10806 ax_pthread_check_macro="--"
10808 esac
10809 if test "x$ax_pthread_check_macro" = "x--"; then :
10810 ax_pthread_check_cond=0
10811 else
10812 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10815 # Are we compiling with Clang?
10817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10818 $as_echo_n "checking whether $CC is Clang... " >&6; }
10819 if ${ax_cv_PTHREAD_CLANG+:} false; then :
10820 $as_echo_n "(cached) " >&6
10821 else
10822 ax_cv_PTHREAD_CLANG=no
10823 # Note that Autoconf sets GCC=yes for Clang as well as GCC
10824 if test "x$GCC" = "xyes"; then
10825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10826 /* end confdefs.h. */
10827 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10828 # if defined(__clang__) && defined(__llvm__)
10829 AX_PTHREAD_CC_IS_CLANG
10830 # endif
10832 _ACEOF
10833 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10834 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10835 ax_cv_PTHREAD_CLANG=yes
10837 rm -f conftest*
10842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10843 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10844 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10846 ax_pthread_clang_warning=no
10848 # Clang needs special handling, because older versions handle the -pthread
10849 # option in a rather... idiosyncratic way
10851 if test "x$ax_pthread_clang" = "xyes"; then
10853 # Clang takes -pthread; it has never supported any other flag
10855 # (Note 1: This will need to be revisited if a system that Clang
10856 # supports has POSIX threads in a separate library. This tends not
10857 # to be the way of modern systems, but it's conceivable.)
10859 # (Note 2: On some systems, notably Darwin, -pthread is not needed
10860 # to get POSIX threads support; the API is always present and
10861 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
10862 # -pthread does define _REENTRANT, and while the Darwin headers
10863 # ignore this macro, third-party headers might not.)
10865 PTHREAD_CFLAGS="-pthread"
10866 PTHREAD_LIBS=
10868 ax_pthread_ok=yes
10870 # However, older versions of Clang make a point of warning the user
10871 # that, in an invocation where only linking and no compilation is
10872 # taking place, the -pthread option has no effect ("argument unused
10873 # during compilation"). They expect -pthread to be passed in only
10874 # when source code is being compiled.
10876 # Problem is, this is at odds with the way Automake and most other
10877 # C build frameworks function, which is that the same flags used in
10878 # compilation (CFLAGS) are also used in linking. Many systems
10879 # supported by AX_PTHREAD require exactly this for POSIX threads
10880 # support, and in fact it is often not straightforward to specify a
10881 # flag that is used only in the compilation phase and not in
10882 # linking. Such a scenario is extremely rare in practice.
10884 # Even though use of the -pthread flag in linking would only print
10885 # a warning, this can be a nuisance for well-run software projects
10886 # that build with -Werror. So if the active version of Clang has
10887 # this misfeature, we search for an option to squash it.
10889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10890 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10891 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10892 $as_echo_n "(cached) " >&6
10893 else
10894 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10895 # Create an alternate version of $ac_link that compiles and
10896 # links in two steps (.c -> .o, .o -> exe) instead of one
10897 # (.c -> exe), because the warning occurs only in the second
10898 # step
10899 ax_pthread_save_ac_link="$ac_link"
10900 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10901 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
10902 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10903 ax_pthread_save_CFLAGS="$CFLAGS"
10904 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10905 if test "x$ax_pthread_try" = "xunknown"; then :
10906 break
10908 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10909 ac_link="$ax_pthread_save_ac_link"
10910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10911 /* end confdefs.h. */
10912 int main(void){return 0;}
10913 _ACEOF
10914 if ac_fn_c_try_link "$LINENO"; then :
10915 ac_link="$ax_pthread_2step_ac_link"
10916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10917 /* end confdefs.h. */
10918 int main(void){return 0;}
10919 _ACEOF
10920 if ac_fn_c_try_link "$LINENO"; then :
10921 break
10923 rm -f core conftest.err conftest.$ac_objext \
10924 conftest$ac_exeext conftest.$ac_ext
10927 rm -f core conftest.err conftest.$ac_objext \
10928 conftest$ac_exeext conftest.$ac_ext
10929 done
10930 ac_link="$ax_pthread_save_ac_link"
10931 CFLAGS="$ax_pthread_save_CFLAGS"
10932 if test "x$ax_pthread_try" = "x"; then :
10933 ax_pthread_try=no
10935 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
10938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
10939 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
10941 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
10942 no | unknown) ;;
10943 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
10944 esac
10946 fi # $ax_pthread_clang = yes
10948 if test "x$ax_pthread_ok" = "xno"; then
10949 for ax_pthread_try_flag in $ax_pthread_flags; do
10951 case $ax_pthread_try_flag in
10952 none)
10953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10954 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10957 -mt,pthread)
10958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10959 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10960 PTHREAD_CFLAGS="-mt"
10961 PTHREAD_LIBS="-lpthread"
10965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
10966 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
10967 PTHREAD_CFLAGS="$ax_pthread_try_flag"
10970 pthread-config)
10971 # Extract the first word of "pthread-config", so it can be a program name with args.
10972 set dummy pthread-config; ac_word=$2
10973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10974 $as_echo_n "checking for $ac_word... " >&6; }
10975 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10976 $as_echo_n "(cached) " >&6
10977 else
10978 if test -n "$ax_pthread_config"; then
10979 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10980 else
10981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10982 for as_dir in $PATH
10984 IFS=$as_save_IFS
10985 test -z "$as_dir" && as_dir=.
10986 for ac_exec_ext in '' $ac_executable_extensions; do
10987 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10988 ac_cv_prog_ax_pthread_config="yes"
10989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10990 break 2
10992 done
10993 done
10994 IFS=$as_save_IFS
10996 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10999 ax_pthread_config=$ac_cv_prog_ax_pthread_config
11000 if test -n "$ax_pthread_config"; then
11001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11002 $as_echo "$ax_pthread_config" >&6; }
11003 else
11004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11005 $as_echo "no" >&6; }
11009 if test "x$ax_pthread_config" = "xno"; then :
11010 continue
11012 PTHREAD_CFLAGS="`pthread-config --cflags`"
11013 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11018 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11019 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11021 esac
11023 ax_pthread_save_CFLAGS="$CFLAGS"
11024 ax_pthread_save_LIBS="$LIBS"
11025 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11026 LIBS="$PTHREAD_LIBS $LIBS"
11028 # Check for various functions. We must include pthread.h,
11029 # since some functions may be macros. (On the Sequent, we
11030 # need a special flag -Kthread to make this header compile.)
11031 # We check for pthread_join because it is in -lpthread on IRIX
11032 # while pthread_create is in libc. We check for pthread_attr_init
11033 # due to DEC craziness with -lpthreads. We check for
11034 # pthread_cleanup_push because it is one of the few pthread
11035 # functions on Solaris that doesn't have a non-functional libc stub.
11036 # We try pthread_create on general principles.
11038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11039 /* end confdefs.h. */
11040 #include <pthread.h>
11041 # if $ax_pthread_check_cond
11042 # error "$ax_pthread_check_macro must be defined"
11043 # endif
11044 static void routine(void *a) { a = 0; }
11045 static void *start_routine(void *a) { return a; }
11047 main ()
11049 pthread_t th; pthread_attr_t attr;
11050 pthread_create(&th, 0, start_routine, 0);
11051 pthread_join(th, 0);
11052 pthread_attr_init(&attr);
11053 pthread_cleanup_push(routine, 0);
11054 pthread_cleanup_pop(0) /* ; */
11056 return 0;
11058 _ACEOF
11059 if ac_fn_c_try_link "$LINENO"; then :
11060 ax_pthread_ok=yes
11062 rm -f core conftest.err conftest.$ac_objext \
11063 conftest$ac_exeext conftest.$ac_ext
11065 CFLAGS="$ax_pthread_save_CFLAGS"
11066 LIBS="$ax_pthread_save_LIBS"
11068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11069 $as_echo "$ax_pthread_ok" >&6; }
11070 if test "x$ax_pthread_ok" = "xyes"; then :
11071 break
11074 PTHREAD_LIBS=""
11075 PTHREAD_CFLAGS=""
11076 done
11079 # Various other checks:
11080 if test "x$ax_pthread_ok" = "xyes"; then
11081 ax_pthread_save_CFLAGS="$CFLAGS"
11082 ax_pthread_save_LIBS="$LIBS"
11083 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11084 LIBS="$PTHREAD_LIBS $LIBS"
11086 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11088 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11089 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11090 $as_echo_n "(cached) " >&6
11091 else
11092 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11093 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11095 /* end confdefs.h. */
11096 #include <pthread.h>
11098 main ()
11100 int attr = $ax_pthread_attr; return attr /* ; */
11102 return 0;
11104 _ACEOF
11105 if ac_fn_c_try_link "$LINENO"; then :
11106 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11108 rm -f core conftest.err conftest.$ac_objext \
11109 conftest$ac_exeext conftest.$ac_ext
11110 done
11113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11114 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11115 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11116 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11117 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11119 cat >>confdefs.h <<_ACEOF
11120 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11121 _ACEOF
11123 ax_pthread_joinable_attr_defined=yes
11127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11128 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11129 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11130 $as_echo_n "(cached) " >&6
11131 else
11132 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11133 case $host_os in
11134 solaris*)
11135 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11137 esac
11140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11141 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11142 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11143 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11144 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11145 ax_pthread_special_flags_added=yes
11148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11149 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11150 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11151 $as_echo_n "(cached) " >&6
11152 else
11153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11154 /* end confdefs.h. */
11155 #include <pthread.h>
11157 main ()
11159 int i = PTHREAD_PRIO_INHERIT;
11161 return 0;
11163 _ACEOF
11164 if ac_fn_c_try_link "$LINENO"; then :
11165 ax_cv_PTHREAD_PRIO_INHERIT=yes
11166 else
11167 ax_cv_PTHREAD_PRIO_INHERIT=no
11169 rm -f core conftest.err conftest.$ac_objext \
11170 conftest$ac_exeext conftest.$ac_ext
11173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11174 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11175 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11176 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11178 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11180 ax_pthread_prio_inherit_defined=yes
11184 CFLAGS="$ax_pthread_save_CFLAGS"
11185 LIBS="$ax_pthread_save_LIBS"
11187 # More AIX lossage: compile with *_r variant
11188 if test "x$GCC" != "xyes"; then
11189 case $host_os in
11190 aix*)
11191 case "x/$CC" in #(
11192 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11193 #handle absolute path differently from PATH based program lookup
11194 case "x$CC" in #(
11195 x/*) :
11196 if as_fn_executable_p ${CC}_r; then :
11197 PTHREAD_CC="${CC}_r"
11198 fi ;; #(
11199 *) :
11200 for ac_prog in ${CC}_r
11202 # Extract the first word of "$ac_prog", so it can be a program name with args.
11203 set dummy $ac_prog; ac_word=$2
11204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11205 $as_echo_n "checking for $ac_word... " >&6; }
11206 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11207 $as_echo_n "(cached) " >&6
11208 else
11209 if test -n "$PTHREAD_CC"; then
11210 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11211 else
11212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11213 for as_dir in $PATH
11215 IFS=$as_save_IFS
11216 test -z "$as_dir" && as_dir=.
11217 for ac_exec_ext in '' $ac_executable_extensions; do
11218 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11219 ac_cv_prog_PTHREAD_CC="$ac_prog"
11220 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11221 break 2
11223 done
11224 done
11225 IFS=$as_save_IFS
11229 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11230 if test -n "$PTHREAD_CC"; then
11231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11232 $as_echo "$PTHREAD_CC" >&6; }
11233 else
11234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11235 $as_echo "no" >&6; }
11239 test -n "$PTHREAD_CC" && break
11240 done
11241 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11243 esac ;; #(
11244 *) :
11246 esac
11248 esac
11252 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11258 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11259 if test "x$ax_pthread_ok" = "xyes"; then
11261 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11264 else
11265 ax_pthread_ok=no
11268 ac_ext=c
11269 ac_cpp='$CPP $CPPFLAGS'
11270 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11271 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11272 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11274 # set thread flags
11276 # Some platforms use these, so just define them. They can't hurt if they
11277 # are not supported.
11278 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE"
11280 # Check for *_r functions
11281 _CFLAGS="$CFLAGS"
11282 _LIBS="$LIBS"
11283 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11284 LIBS="$LIBS $PTHREAD_LIBS"
11286 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11287 if test "x$ac_cv_header_pthread_h" = xyes; then :
11289 else
11290 as_fn_error $? "
11291 pthread.h not found" "$LINENO" 5
11296 for ac_func in strerror_r
11297 do :
11298 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
11299 if test "x$ac_cv_func_strerror_r" = xyes; then :
11300 cat >>confdefs.h <<_ACEOF
11301 #define HAVE_STRERROR_R 1
11302 _ACEOF
11305 done
11308 # Do test here with the proper thread flags
11309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11310 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11311 if ${pgac_cv_func_strerror_r_int+:} false; then :
11312 $as_echo_n "(cached) " >&6
11313 else
11314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11315 /* end confdefs.h. */
11316 #include <string.h>
11318 main ()
11320 char buf[100];
11321 switch (strerror_r(1, buf, sizeof(buf)))
11322 { case 0: break; default: break; }
11325 return 0;
11327 _ACEOF
11328 if ac_fn_c_try_compile "$LINENO"; then :
11329 pgac_cv_func_strerror_r_int=yes
11330 else
11331 pgac_cv_func_strerror_r_int=no
11333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11336 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11337 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11339 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11344 CFLAGS="$_CFLAGS"
11345 LIBS="$_LIBS"
11348 else
11349 # else
11350 # do not use values from template file
11351 PTHREAD_CFLAGS=
11352 PTHREAD_LIBS=
11354 fi # fi
11361 ## Libraries
11363 ## Most libraries are included only if they demonstrably provide a function
11364 ## we need, but libm is an exception: always include it, because there are
11365 ## too many compilers that play cute optimization games that will break
11366 ## probes for standard functions such as pow().
11369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11370 $as_echo_n "checking for main in -lm... " >&6; }
11371 if ${ac_cv_lib_m_main+:} false; then :
11372 $as_echo_n "(cached) " >&6
11373 else
11374 ac_check_lib_save_LIBS=$LIBS
11375 LIBS="-lm $LIBS"
11376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11377 /* end confdefs.h. */
11381 main ()
11383 return main ();
11385 return 0;
11387 _ACEOF
11388 if ac_fn_c_try_link "$LINENO"; then :
11389 ac_cv_lib_m_main=yes
11390 else
11391 ac_cv_lib_m_main=no
11393 rm -f core conftest.err conftest.$ac_objext \
11394 conftest$ac_exeext conftest.$ac_ext
11395 LIBS=$ac_check_lib_save_LIBS
11397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11398 $as_echo "$ac_cv_lib_m_main" >&6; }
11399 if test "x$ac_cv_lib_m_main" = xyes; then :
11400 cat >>confdefs.h <<_ACEOF
11401 #define HAVE_LIBM 1
11402 _ACEOF
11404 LIBS="-lm $LIBS"
11408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11409 $as_echo_n "checking for library containing setproctitle... " >&6; }
11410 if ${ac_cv_search_setproctitle+:} false; then :
11411 $as_echo_n "(cached) " >&6
11412 else
11413 ac_func_search_save_LIBS=$LIBS
11414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11415 /* end confdefs.h. */
11417 /* Override any GCC internal prototype to avoid an error.
11418 Use char because int might match the return type of a GCC
11419 builtin and then its argument prototype would still apply. */
11420 #ifdef __cplusplus
11421 extern "C"
11422 #endif
11423 char setproctitle ();
11425 main ()
11427 return setproctitle ();
11429 return 0;
11431 _ACEOF
11432 for ac_lib in '' util; do
11433 if test -z "$ac_lib"; then
11434 ac_res="none required"
11435 else
11436 ac_res=-l$ac_lib
11437 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11439 if ac_fn_c_try_link "$LINENO"; then :
11440 ac_cv_search_setproctitle=$ac_res
11442 rm -f core conftest.err conftest.$ac_objext \
11443 conftest$ac_exeext
11444 if ${ac_cv_search_setproctitle+:} false; then :
11445 break
11447 done
11448 if ${ac_cv_search_setproctitle+:} false; then :
11450 else
11451 ac_cv_search_setproctitle=no
11453 rm conftest.$ac_ext
11454 LIBS=$ac_func_search_save_LIBS
11456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11457 $as_echo "$ac_cv_search_setproctitle" >&6; }
11458 ac_res=$ac_cv_search_setproctitle
11459 if test "$ac_res" != no; then :
11460 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11464 # gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
11465 # when enabling asan the dlopen check doesn't notice that -ldl is actually
11466 # required. Just checking for dlsym() ought to suffice.
11467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
11468 $as_echo_n "checking for library containing dlsym... " >&6; }
11469 if ${ac_cv_search_dlsym+:} false; then :
11470 $as_echo_n "(cached) " >&6
11471 else
11472 ac_func_search_save_LIBS=$LIBS
11473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11474 /* end confdefs.h. */
11476 /* Override any GCC internal prototype to avoid an error.
11477 Use char because int might match the return type of a GCC
11478 builtin and then its argument prototype would still apply. */
11479 #ifdef __cplusplus
11480 extern "C"
11481 #endif
11482 char dlsym ();
11484 main ()
11486 return dlsym ();
11488 return 0;
11490 _ACEOF
11491 for ac_lib in '' dl; do
11492 if test -z "$ac_lib"; then
11493 ac_res="none required"
11494 else
11495 ac_res=-l$ac_lib
11496 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11498 if ac_fn_c_try_link "$LINENO"; then :
11499 ac_cv_search_dlsym=$ac_res
11501 rm -f core conftest.err conftest.$ac_objext \
11502 conftest$ac_exeext
11503 if ${ac_cv_search_dlsym+:} false; then :
11504 break
11506 done
11507 if ${ac_cv_search_dlsym+:} false; then :
11509 else
11510 ac_cv_search_dlsym=no
11512 rm conftest.$ac_ext
11513 LIBS=$ac_func_search_save_LIBS
11515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
11516 $as_echo "$ac_cv_search_dlsym" >&6; }
11517 ac_res=$ac_cv_search_dlsym
11518 if test "$ac_res" != no; then :
11519 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11524 $as_echo_n "checking for library containing socket... " >&6; }
11525 if ${ac_cv_search_socket+:} false; then :
11526 $as_echo_n "(cached) " >&6
11527 else
11528 ac_func_search_save_LIBS=$LIBS
11529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11530 /* end confdefs.h. */
11532 /* Override any GCC internal prototype to avoid an error.
11533 Use char because int might match the return type of a GCC
11534 builtin and then its argument prototype would still apply. */
11535 #ifdef __cplusplus
11536 extern "C"
11537 #endif
11538 char socket ();
11540 main ()
11542 return socket ();
11544 return 0;
11546 _ACEOF
11547 for ac_lib in '' socket ws2_32; do
11548 if test -z "$ac_lib"; then
11549 ac_res="none required"
11550 else
11551 ac_res=-l$ac_lib
11552 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11554 if ac_fn_c_try_link "$LINENO"; then :
11555 ac_cv_search_socket=$ac_res
11557 rm -f core conftest.err conftest.$ac_objext \
11558 conftest$ac_exeext
11559 if ${ac_cv_search_socket+:} false; then :
11560 break
11562 done
11563 if ${ac_cv_search_socket+:} false; then :
11565 else
11566 ac_cv_search_socket=no
11568 rm conftest.$ac_ext
11569 LIBS=$ac_func_search_save_LIBS
11571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11572 $as_echo "$ac_cv_search_socket" >&6; }
11573 ac_res=$ac_cv_search_socket
11574 if test "$ac_res" != no; then :
11575 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11580 $as_echo_n "checking for library containing getopt_long... " >&6; }
11581 if ${ac_cv_search_getopt_long+:} false; then :
11582 $as_echo_n "(cached) " >&6
11583 else
11584 ac_func_search_save_LIBS=$LIBS
11585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11586 /* end confdefs.h. */
11588 /* Override any GCC internal prototype to avoid an error.
11589 Use char because int might match the return type of a GCC
11590 builtin and then its argument prototype would still apply. */
11591 #ifdef __cplusplus
11592 extern "C"
11593 #endif
11594 char getopt_long ();
11596 main ()
11598 return getopt_long ();
11600 return 0;
11602 _ACEOF
11603 for ac_lib in '' getopt gnugetopt; do
11604 if test -z "$ac_lib"; then
11605 ac_res="none required"
11606 else
11607 ac_res=-l$ac_lib
11608 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11610 if ac_fn_c_try_link "$LINENO"; then :
11611 ac_cv_search_getopt_long=$ac_res
11613 rm -f core conftest.err conftest.$ac_objext \
11614 conftest$ac_exeext
11615 if ${ac_cv_search_getopt_long+:} false; then :
11616 break
11618 done
11619 if ${ac_cv_search_getopt_long+:} false; then :
11621 else
11622 ac_cv_search_getopt_long=no
11624 rm conftest.$ac_ext
11625 LIBS=$ac_func_search_save_LIBS
11627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11628 $as_echo "$ac_cv_search_getopt_long" >&6; }
11629 ac_res=$ac_cv_search_getopt_long
11630 if test "$ac_res" != no; then :
11631 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11636 $as_echo_n "checking for library containing shm_open... " >&6; }
11637 if ${ac_cv_search_shm_open+:} false; then :
11638 $as_echo_n "(cached) " >&6
11639 else
11640 ac_func_search_save_LIBS=$LIBS
11641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11642 /* end confdefs.h. */
11644 /* Override any GCC internal prototype to avoid an error.
11645 Use char because int might match the return type of a GCC
11646 builtin and then its argument prototype would still apply. */
11647 #ifdef __cplusplus
11648 extern "C"
11649 #endif
11650 char shm_open ();
11652 main ()
11654 return shm_open ();
11656 return 0;
11658 _ACEOF
11659 for ac_lib in '' rt; do
11660 if test -z "$ac_lib"; then
11661 ac_res="none required"
11662 else
11663 ac_res=-l$ac_lib
11664 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11666 if ac_fn_c_try_link "$LINENO"; then :
11667 ac_cv_search_shm_open=$ac_res
11669 rm -f core conftest.err conftest.$ac_objext \
11670 conftest$ac_exeext
11671 if ${ac_cv_search_shm_open+:} false; then :
11672 break
11674 done
11675 if ${ac_cv_search_shm_open+:} false; then :
11677 else
11678 ac_cv_search_shm_open=no
11680 rm conftest.$ac_ext
11681 LIBS=$ac_func_search_save_LIBS
11683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11684 $as_echo "$ac_cv_search_shm_open" >&6; }
11685 ac_res=$ac_cv_search_shm_open
11686 if test "$ac_res" != no; then :
11687 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11692 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11693 if ${ac_cv_search_shm_unlink+:} false; then :
11694 $as_echo_n "(cached) " >&6
11695 else
11696 ac_func_search_save_LIBS=$LIBS
11697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11698 /* end confdefs.h. */
11700 /* Override any GCC internal prototype to avoid an error.
11701 Use char because int might match the return type of a GCC
11702 builtin and then its argument prototype would still apply. */
11703 #ifdef __cplusplus
11704 extern "C"
11705 #endif
11706 char shm_unlink ();
11708 main ()
11710 return shm_unlink ();
11712 return 0;
11714 _ACEOF
11715 for ac_lib in '' rt; do
11716 if test -z "$ac_lib"; then
11717 ac_res="none required"
11718 else
11719 ac_res=-l$ac_lib
11720 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11722 if ac_fn_c_try_link "$LINENO"; then :
11723 ac_cv_search_shm_unlink=$ac_res
11725 rm -f core conftest.err conftest.$ac_objext \
11726 conftest$ac_exeext
11727 if ${ac_cv_search_shm_unlink+:} false; then :
11728 break
11730 done
11731 if ${ac_cv_search_shm_unlink+:} false; then :
11733 else
11734 ac_cv_search_shm_unlink=no
11736 rm conftest.$ac_ext
11737 LIBS=$ac_func_search_save_LIBS
11739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11740 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11741 ac_res=$ac_cv_search_shm_unlink
11742 if test "$ac_res" != no; then :
11743 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11748 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11749 if ${ac_cv_search_clock_gettime+:} false; then :
11750 $as_echo_n "(cached) " >&6
11751 else
11752 ac_func_search_save_LIBS=$LIBS
11753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11754 /* end confdefs.h. */
11756 /* Override any GCC internal prototype to avoid an error.
11757 Use char because int might match the return type of a GCC
11758 builtin and then its argument prototype would still apply. */
11759 #ifdef __cplusplus
11760 extern "C"
11761 #endif
11762 char clock_gettime ();
11764 main ()
11766 return clock_gettime ();
11768 return 0;
11770 _ACEOF
11771 for ac_lib in '' rt; do
11772 if test -z "$ac_lib"; then
11773 ac_res="none required"
11774 else
11775 ac_res=-l$ac_lib
11776 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11778 if ac_fn_c_try_link "$LINENO"; then :
11779 ac_cv_search_clock_gettime=$ac_res
11781 rm -f core conftest.err conftest.$ac_objext \
11782 conftest$ac_exeext
11783 if ${ac_cv_search_clock_gettime+:} false; then :
11784 break
11786 done
11787 if ${ac_cv_search_clock_gettime+:} false; then :
11789 else
11790 ac_cv_search_clock_gettime=no
11792 rm conftest.$ac_ext
11793 LIBS=$ac_func_search_save_LIBS
11795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11796 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11797 ac_res=$ac_cv_search_clock_gettime
11798 if test "$ac_res" != no; then :
11799 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11803 # Cygwin:
11804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11805 $as_echo_n "checking for library containing shmget... " >&6; }
11806 if ${ac_cv_search_shmget+:} false; then :
11807 $as_echo_n "(cached) " >&6
11808 else
11809 ac_func_search_save_LIBS=$LIBS
11810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11811 /* end confdefs.h. */
11813 /* Override any GCC internal prototype to avoid an error.
11814 Use char because int might match the return type of a GCC
11815 builtin and then its argument prototype would still apply. */
11816 #ifdef __cplusplus
11817 extern "C"
11818 #endif
11819 char shmget ();
11821 main ()
11823 return shmget ();
11825 return 0;
11827 _ACEOF
11828 for ac_lib in '' cygipc; do
11829 if test -z "$ac_lib"; then
11830 ac_res="none required"
11831 else
11832 ac_res=-l$ac_lib
11833 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11835 if ac_fn_c_try_link "$LINENO"; then :
11836 ac_cv_search_shmget=$ac_res
11838 rm -f core conftest.err conftest.$ac_objext \
11839 conftest$ac_exeext
11840 if ${ac_cv_search_shmget+:} false; then :
11841 break
11843 done
11844 if ${ac_cv_search_shmget+:} false; then :
11846 else
11847 ac_cv_search_shmget=no
11849 rm conftest.$ac_ext
11850 LIBS=$ac_func_search_save_LIBS
11852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11853 $as_echo "$ac_cv_search_shmget" >&6; }
11854 ac_res=$ac_cv_search_shmget
11855 if test "$ac_res" != no; then :
11856 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11860 # *BSD:
11861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
11862 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
11863 if ${ac_cv_search_backtrace_symbols+:} false; then :
11864 $as_echo_n "(cached) " >&6
11865 else
11866 ac_func_search_save_LIBS=$LIBS
11867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11868 /* end confdefs.h. */
11870 /* Override any GCC internal prototype to avoid an error.
11871 Use char because int might match the return type of a GCC
11872 builtin and then its argument prototype would still apply. */
11873 #ifdef __cplusplus
11874 extern "C"
11875 #endif
11876 char backtrace_symbols ();
11878 main ()
11880 return backtrace_symbols ();
11882 return 0;
11884 _ACEOF
11885 for ac_lib in '' execinfo; do
11886 if test -z "$ac_lib"; then
11887 ac_res="none required"
11888 else
11889 ac_res=-l$ac_lib
11890 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11892 if ac_fn_c_try_link "$LINENO"; then :
11893 ac_cv_search_backtrace_symbols=$ac_res
11895 rm -f core conftest.err conftest.$ac_objext \
11896 conftest$ac_exeext
11897 if ${ac_cv_search_backtrace_symbols+:} false; then :
11898 break
11900 done
11901 if ${ac_cv_search_backtrace_symbols+:} false; then :
11903 else
11904 ac_cv_search_backtrace_symbols=no
11906 rm conftest.$ac_ext
11907 LIBS=$ac_func_search_save_LIBS
11909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
11910 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
11911 ac_res=$ac_cv_search_backtrace_symbols
11912 if test "$ac_res" != no; then :
11913 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
11919 $as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
11920 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
11921 $as_echo_n "(cached) " >&6
11922 else
11923 ac_func_search_save_LIBS=$LIBS
11924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11925 /* end confdefs.h. */
11927 /* Override any GCC internal prototype to avoid an error.
11928 Use char because int might match the return type of a GCC
11929 builtin and then its argument prototype would still apply. */
11930 #ifdef __cplusplus
11931 extern "C"
11932 #endif
11933 char pthread_barrier_wait ();
11935 main ()
11937 return pthread_barrier_wait ();
11939 return 0;
11941 _ACEOF
11942 for ac_lib in '' pthread; do
11943 if test -z "$ac_lib"; then
11944 ac_res="none required"
11945 else
11946 ac_res=-l$ac_lib
11947 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11949 if ac_fn_c_try_link "$LINENO"; then :
11950 ac_cv_search_pthread_barrier_wait=$ac_res
11952 rm -f core conftest.err conftest.$ac_objext \
11953 conftest$ac_exeext
11954 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
11955 break
11957 done
11958 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
11960 else
11961 ac_cv_search_pthread_barrier_wait=no
11963 rm conftest.$ac_ext
11964 LIBS=$ac_func_search_save_LIBS
11966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_barrier_wait" >&5
11967 $as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
11968 ac_res=$ac_cv_search_pthread_barrier_wait
11969 if test "$ac_res" != no; then :
11970 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11975 if test "$with_readline" = yes; then
11978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11979 $as_echo_n "checking for library containing readline... " >&6; }
11980 if ${pgac_cv_check_readline+:} false; then :
11981 $as_echo_n "(cached) " >&6
11982 else
11983 pgac_cv_check_readline=no
11984 pgac_save_LIBS=$LIBS
11985 if test x"$with_libedit_preferred" != x"yes"
11986 then READLINE_ORDER="-lreadline -ledit"
11987 else READLINE_ORDER="-ledit -lreadline"
11989 for pgac_rllib in $READLINE_ORDER ; do
11990 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11991 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11993 /* end confdefs.h. */
11995 /* Override any GCC internal prototype to avoid an error.
11996 Use char because int might match the return type of a GCC
11997 builtin and then its argument prototype would still apply. */
11998 #ifdef __cplusplus
11999 extern "C"
12000 #endif
12001 char readline ();
12003 main ()
12005 return readline ();
12007 return 0;
12009 _ACEOF
12010 if ac_fn_c_try_link "$LINENO"; then :
12012 # Older NetBSD and OpenBSD have a broken linker that does not
12013 # recognize dependent libraries; assume curses is needed if we didn't
12014 # find any dependency.
12015 case $host_os in
12016 netbsd* | openbsd*)
12017 if test x"$pgac_lib" = x"" ; then
12018 pgac_lib=" -lcurses"
12019 fi ;;
12020 esac
12022 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12023 break
12026 rm -f core conftest.err conftest.$ac_objext \
12027 conftest$ac_exeext conftest.$ac_ext
12028 done
12029 if test "$pgac_cv_check_readline" != no ; then
12030 break
12032 done
12033 LIBS=$pgac_save_LIBS
12036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12037 $as_echo "$pgac_cv_check_readline" >&6; }
12038 if test "$pgac_cv_check_readline" != no ; then
12039 LIBS="$pgac_cv_check_readline $LIBS"
12041 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12046 if test x"$pgac_cv_check_readline" = x"no"; then
12047 as_fn_error $? "readline library not found
12048 If you have readline already installed, see config.log for details on the
12049 failure. It is possible the compiler isn't looking in the proper directory.
12050 Use --without-readline to disable readline support." "$LINENO" 5
12054 if test "$with_zlib" = yes; then
12055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12056 $as_echo_n "checking for inflate in -lz... " >&6; }
12057 if ${ac_cv_lib_z_inflate+:} false; then :
12058 $as_echo_n "(cached) " >&6
12059 else
12060 ac_check_lib_save_LIBS=$LIBS
12061 LIBS="-lz $LIBS"
12062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12063 /* end confdefs.h. */
12065 /* Override any GCC internal prototype to avoid an error.
12066 Use char because int might match the return type of a GCC
12067 builtin and then its argument prototype would still apply. */
12068 #ifdef __cplusplus
12069 extern "C"
12070 #endif
12071 char inflate ();
12073 main ()
12075 return inflate ();
12077 return 0;
12079 _ACEOF
12080 if ac_fn_c_try_link "$LINENO"; then :
12081 ac_cv_lib_z_inflate=yes
12082 else
12083 ac_cv_lib_z_inflate=no
12085 rm -f core conftest.err conftest.$ac_objext \
12086 conftest$ac_exeext conftest.$ac_ext
12087 LIBS=$ac_check_lib_save_LIBS
12089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12090 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12091 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12092 cat >>confdefs.h <<_ACEOF
12093 #define HAVE_LIBZ 1
12094 _ACEOF
12096 LIBS="-lz $LIBS"
12098 else
12099 as_fn_error $? "zlib library not found
12100 If you have zlib already installed, see config.log for details on the
12101 failure. It is possible the compiler isn't looking in the proper directory.
12102 Use --without-zlib to disable zlib support." "$LINENO" 5
12107 if test "$with_gssapi" = yes ; then
12108 if test "$PORTNAME" != "win32"; then
12109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_store_cred_into" >&5
12110 $as_echo_n "checking for library containing gss_store_cred_into... " >&6; }
12111 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12112 $as_echo_n "(cached) " >&6
12113 else
12114 ac_func_search_save_LIBS=$LIBS
12115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12116 /* end confdefs.h. */
12118 /* Override any GCC internal prototype to avoid an error.
12119 Use char because int might match the return type of a GCC
12120 builtin and then its argument prototype would still apply. */
12121 #ifdef __cplusplus
12122 extern "C"
12123 #endif
12124 char gss_store_cred_into ();
12126 main ()
12128 return gss_store_cred_into ();
12130 return 0;
12132 _ACEOF
12133 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12134 if test -z "$ac_lib"; then
12135 ac_res="none required"
12136 else
12137 ac_res=-l$ac_lib
12138 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12140 if ac_fn_c_try_link "$LINENO"; then :
12141 ac_cv_search_gss_store_cred_into=$ac_res
12143 rm -f core conftest.err conftest.$ac_objext \
12144 conftest$ac_exeext
12145 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12146 break
12148 done
12149 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12151 else
12152 ac_cv_search_gss_store_cred_into=no
12154 rm conftest.$ac_ext
12155 LIBS=$ac_func_search_save_LIBS
12157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_store_cred_into" >&5
12158 $as_echo "$ac_cv_search_gss_store_cred_into" >&6; }
12159 ac_res=$ac_cv_search_gss_store_cred_into
12160 if test "$ac_res" != no; then :
12161 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12163 else
12164 as_fn_error $? "could not find function 'gss_store_cred_into' required for GSSAPI" "$LINENO" 5
12167 else
12168 LIBS="$LIBS -lgssapi32"
12173 # SSL Library
12175 # There is currently only one supported SSL/TLS library: OpenSSL.
12180 # Check whether --with-ssl was given.
12181 if test "${with_ssl+set}" = set; then :
12182 withval=$with_ssl;
12183 case $withval in
12184 yes)
12185 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12188 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12193 esac
12198 if test x"$with_ssl" = x"" ; then
12199 with_ssl=no
12204 # Check whether --with-openssl was given.
12205 if test "${with_openssl+set}" = set; then :
12206 withval=$with_openssl;
12207 case $withval in
12208 yes)
12215 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12217 esac
12219 else
12220 with_openssl=no
12225 if test "$with_openssl" = yes ; then
12226 with_ssl=openssl
12229 if test "$with_ssl" = openssl ; then
12230 # Minimum required OpenSSL version is 1.1.1
12232 $as_echo "#define OPENSSL_API_COMPAT 0x10101000L" >>confdefs.h
12234 if test "$PORTNAME" != "win32"; then
12235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12236 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12237 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12238 $as_echo_n "(cached) " >&6
12239 else
12240 ac_check_lib_save_LIBS=$LIBS
12241 LIBS="-lcrypto $LIBS"
12242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12243 /* end confdefs.h. */
12245 /* Override any GCC internal prototype to avoid an error.
12246 Use char because int might match the return type of a GCC
12247 builtin and then its argument prototype would still apply. */
12248 #ifdef __cplusplus
12249 extern "C"
12250 #endif
12251 char CRYPTO_new_ex_data ();
12253 main ()
12255 return CRYPTO_new_ex_data ();
12257 return 0;
12259 _ACEOF
12260 if ac_fn_c_try_link "$LINENO"; then :
12261 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12262 else
12263 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12265 rm -f core conftest.err conftest.$ac_objext \
12266 conftest$ac_exeext conftest.$ac_ext
12267 LIBS=$ac_check_lib_save_LIBS
12269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12270 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12271 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12272 cat >>confdefs.h <<_ACEOF
12273 #define HAVE_LIBCRYPTO 1
12274 _ACEOF
12276 LIBS="-lcrypto $LIBS"
12278 else
12279 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12283 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12284 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12285 $as_echo_n "(cached) " >&6
12286 else
12287 ac_check_lib_save_LIBS=$LIBS
12288 LIBS="-lssl $LIBS"
12289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12290 /* end confdefs.h. */
12292 /* Override any GCC internal prototype to avoid an error.
12293 Use char because int might match the return type of a GCC
12294 builtin and then its argument prototype would still apply. */
12295 #ifdef __cplusplus
12296 extern "C"
12297 #endif
12298 char SSL_new ();
12300 main ()
12302 return SSL_new ();
12304 return 0;
12306 _ACEOF
12307 if ac_fn_c_try_link "$LINENO"; then :
12308 ac_cv_lib_ssl_SSL_new=yes
12309 else
12310 ac_cv_lib_ssl_SSL_new=no
12312 rm -f core conftest.err conftest.$ac_objext \
12313 conftest$ac_exeext conftest.$ac_ext
12314 LIBS=$ac_check_lib_save_LIBS
12316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12317 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12318 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12319 cat >>confdefs.h <<_ACEOF
12320 #define HAVE_LIBSSL 1
12321 _ACEOF
12323 LIBS="-lssl $LIBS"
12325 else
12326 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12329 else
12330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12331 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12332 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12333 $as_echo_n "(cached) " >&6
12334 else
12335 ac_func_search_save_LIBS=$LIBS
12336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12337 /* end confdefs.h. */
12339 /* Override any GCC internal prototype to avoid an error.
12340 Use char because int might match the return type of a GCC
12341 builtin and then its argument prototype would still apply. */
12342 #ifdef __cplusplus
12343 extern "C"
12344 #endif
12345 char CRYPTO_new_ex_data ();
12347 main ()
12349 return CRYPTO_new_ex_data ();
12351 return 0;
12353 _ACEOF
12354 for ac_lib in '' eay32 crypto; do
12355 if test -z "$ac_lib"; then
12356 ac_res="none required"
12357 else
12358 ac_res=-l$ac_lib
12359 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12361 if ac_fn_c_try_link "$LINENO"; then :
12362 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12364 rm -f core conftest.err conftest.$ac_objext \
12365 conftest$ac_exeext
12366 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12367 break
12369 done
12370 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12372 else
12373 ac_cv_search_CRYPTO_new_ex_data=no
12375 rm conftest.$ac_ext
12376 LIBS=$ac_func_search_save_LIBS
12378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12379 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12380 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12381 if test "$ac_res" != no; then :
12382 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12384 else
12385 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12389 $as_echo_n "checking for library containing SSL_new... " >&6; }
12390 if ${ac_cv_search_SSL_new+:} false; then :
12391 $as_echo_n "(cached) " >&6
12392 else
12393 ac_func_search_save_LIBS=$LIBS
12394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12395 /* end confdefs.h. */
12397 /* Override any GCC internal prototype to avoid an error.
12398 Use char because int might match the return type of a GCC
12399 builtin and then its argument prototype would still apply. */
12400 #ifdef __cplusplus
12401 extern "C"
12402 #endif
12403 char SSL_new ();
12405 main ()
12407 return SSL_new ();
12409 return 0;
12411 _ACEOF
12412 for ac_lib in '' ssleay32 ssl; do
12413 if test -z "$ac_lib"; then
12414 ac_res="none required"
12415 else
12416 ac_res=-l$ac_lib
12417 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12419 if ac_fn_c_try_link "$LINENO"; then :
12420 ac_cv_search_SSL_new=$ac_res
12422 rm -f core conftest.err conftest.$ac_objext \
12423 conftest$ac_exeext
12424 if ${ac_cv_search_SSL_new+:} false; then :
12425 break
12427 done
12428 if ${ac_cv_search_SSL_new+:} false; then :
12430 else
12431 ac_cv_search_SSL_new=no
12433 rm conftest.$ac_ext
12434 LIBS=$ac_func_search_save_LIBS
12436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12437 $as_echo "$ac_cv_search_SSL_new" >&6; }
12438 ac_res=$ac_cv_search_SSL_new
12439 if test "$ac_res" != no; then :
12440 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12442 else
12443 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12447 # Functions introduced in OpenSSL 1.1.1.
12448 for ac_func in SSL_CTX_set_ciphersuites
12449 do :
12450 ac_fn_c_check_func "$LINENO" "SSL_CTX_set_ciphersuites" "ac_cv_func_SSL_CTX_set_ciphersuites"
12451 if test "x$ac_cv_func_SSL_CTX_set_ciphersuites" = xyes; then :
12452 cat >>confdefs.h <<_ACEOF
12453 #define HAVE_SSL_CTX_SET_CIPHERSUITES 1
12454 _ACEOF
12456 else
12457 as_fn_error $? "OpenSSL version >= 1.1.1 is required for SSL support" "$LINENO" 5
12459 done
12461 # Function introduced in OpenSSL 1.0.2, not in LibreSSL.
12462 for ac_func in SSL_CTX_set_cert_cb
12463 do :
12464 ac_fn_c_check_func "$LINENO" "SSL_CTX_set_cert_cb" "ac_cv_func_SSL_CTX_set_cert_cb"
12465 if test "x$ac_cv_func_SSL_CTX_set_cert_cb" = xyes; then :
12466 cat >>confdefs.h <<_ACEOF
12467 #define HAVE_SSL_CTX_SET_CERT_CB 1
12468 _ACEOF
12471 done
12473 # Function introduced in OpenSSL 1.1.1, not in LibreSSL.
12474 for ac_func in X509_get_signature_info SSL_CTX_set_num_tickets
12475 do :
12476 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12477 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12478 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12479 cat >>confdefs.h <<_ACEOF
12480 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12481 _ACEOF
12484 done
12487 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
12489 elif test "$with_ssl" != no ; then
12490 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
12494 if test "$with_pam" = yes ; then
12495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12496 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12497 if ${ac_cv_lib_pam_pam_start+:} false; then :
12498 $as_echo_n "(cached) " >&6
12499 else
12500 ac_check_lib_save_LIBS=$LIBS
12501 LIBS="-lpam $LIBS"
12502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12503 /* end confdefs.h. */
12505 /* Override any GCC internal prototype to avoid an error.
12506 Use char because int might match the return type of a GCC
12507 builtin and then its argument prototype would still apply. */
12508 #ifdef __cplusplus
12509 extern "C"
12510 #endif
12511 char pam_start ();
12513 main ()
12515 return pam_start ();
12517 return 0;
12519 _ACEOF
12520 if ac_fn_c_try_link "$LINENO"; then :
12521 ac_cv_lib_pam_pam_start=yes
12522 else
12523 ac_cv_lib_pam_pam_start=no
12525 rm -f core conftest.err conftest.$ac_objext \
12526 conftest$ac_exeext conftest.$ac_ext
12527 LIBS=$ac_check_lib_save_LIBS
12529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12530 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12531 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12532 cat >>confdefs.h <<_ACEOF
12533 #define HAVE_LIBPAM 1
12534 _ACEOF
12536 LIBS="-lpam $LIBS"
12538 else
12539 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12544 if test "$with_libxml" = yes ; then
12545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12546 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12547 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12548 $as_echo_n "(cached) " >&6
12549 else
12550 ac_check_lib_save_LIBS=$LIBS
12551 LIBS="-lxml2 $LIBS"
12552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12553 /* end confdefs.h. */
12555 /* Override any GCC internal prototype to avoid an error.
12556 Use char because int might match the return type of a GCC
12557 builtin and then its argument prototype would still apply. */
12558 #ifdef __cplusplus
12559 extern "C"
12560 #endif
12561 char xmlSaveToBuffer ();
12563 main ()
12565 return xmlSaveToBuffer ();
12567 return 0;
12569 _ACEOF
12570 if ac_fn_c_try_link "$LINENO"; then :
12571 ac_cv_lib_xml2_xmlSaveToBuffer=yes
12572 else
12573 ac_cv_lib_xml2_xmlSaveToBuffer=no
12575 rm -f core conftest.err conftest.$ac_objext \
12576 conftest$ac_exeext conftest.$ac_ext
12577 LIBS=$ac_check_lib_save_LIBS
12579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12580 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12581 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12582 cat >>confdefs.h <<_ACEOF
12583 #define HAVE_LIBXML2 1
12584 _ACEOF
12586 LIBS="-lxml2 $LIBS"
12588 else
12589 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12594 if test "$with_libxslt" = yes ; then
12595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12596 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12597 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12598 $as_echo_n "(cached) " >&6
12599 else
12600 ac_check_lib_save_LIBS=$LIBS
12601 LIBS="-lxslt $LIBS"
12602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12603 /* end confdefs.h. */
12605 /* Override any GCC internal prototype to avoid an error.
12606 Use char because int might match the return type of a GCC
12607 builtin and then its argument prototype would still apply. */
12608 #ifdef __cplusplus
12609 extern "C"
12610 #endif
12611 char xsltCleanupGlobals ();
12613 main ()
12615 return xsltCleanupGlobals ();
12617 return 0;
12619 _ACEOF
12620 if ac_fn_c_try_link "$LINENO"; then :
12621 ac_cv_lib_xslt_xsltCleanupGlobals=yes
12622 else
12623 ac_cv_lib_xslt_xsltCleanupGlobals=no
12625 rm -f core conftest.err conftest.$ac_objext \
12626 conftest$ac_exeext conftest.$ac_ext
12627 LIBS=$ac_check_lib_save_LIBS
12629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12630 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12631 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12632 cat >>confdefs.h <<_ACEOF
12633 #define HAVE_LIBXSLT 1
12634 _ACEOF
12636 LIBS="-lxslt $LIBS"
12638 else
12639 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12644 if test "$with_lz4" = yes ; then
12645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
12646 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
12647 if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
12648 $as_echo_n "(cached) " >&6
12649 else
12650 ac_check_lib_save_LIBS=$LIBS
12651 LIBS="-llz4 $LIBS"
12652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12653 /* end confdefs.h. */
12655 /* Override any GCC internal prototype to avoid an error.
12656 Use char because int might match the return type of a GCC
12657 builtin and then its argument prototype would still apply. */
12658 #ifdef __cplusplus
12659 extern "C"
12660 #endif
12661 char LZ4_compress_default ();
12663 main ()
12665 return LZ4_compress_default ();
12667 return 0;
12669 _ACEOF
12670 if ac_fn_c_try_link "$LINENO"; then :
12671 ac_cv_lib_lz4_LZ4_compress_default=yes
12672 else
12673 ac_cv_lib_lz4_LZ4_compress_default=no
12675 rm -f core conftest.err conftest.$ac_objext \
12676 conftest$ac_exeext conftest.$ac_ext
12677 LIBS=$ac_check_lib_save_LIBS
12679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5
12680 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
12681 if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
12682 cat >>confdefs.h <<_ACEOF
12683 #define HAVE_LIBLZ4 1
12684 _ACEOF
12686 LIBS="-llz4 $LIBS"
12688 else
12689 as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
12694 if test "$with_zstd" = yes ; then
12695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5
12696 $as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; }
12697 if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then :
12698 $as_echo_n "(cached) " >&6
12699 else
12700 ac_check_lib_save_LIBS=$LIBS
12701 LIBS="-lzstd $LIBS"
12702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12703 /* end confdefs.h. */
12705 /* Override any GCC internal prototype to avoid an error.
12706 Use char because int might match the return type of a GCC
12707 builtin and then its argument prototype would still apply. */
12708 #ifdef __cplusplus
12709 extern "C"
12710 #endif
12711 char ZSTD_compress ();
12713 main ()
12715 return ZSTD_compress ();
12717 return 0;
12719 _ACEOF
12720 if ac_fn_c_try_link "$LINENO"; then :
12721 ac_cv_lib_zstd_ZSTD_compress=yes
12722 else
12723 ac_cv_lib_zstd_ZSTD_compress=no
12725 rm -f core conftest.err conftest.$ac_objext \
12726 conftest$ac_exeext conftest.$ac_ext
12727 LIBS=$ac_check_lib_save_LIBS
12729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5
12730 $as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; }
12731 if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then :
12732 cat >>confdefs.h <<_ACEOF
12733 #define HAVE_LIBZSTD 1
12734 _ACEOF
12736 LIBS="-lzstd $LIBS"
12738 else
12739 as_fn_error $? "library 'zstd' is required for ZSTD support" "$LINENO" 5
12744 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12745 if test "$with_ldap" = yes ; then
12746 _LIBS="$LIBS"
12747 if test "$PORTNAME" != "win32"; then
12748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12749 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12750 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12751 $as_echo_n "(cached) " >&6
12752 else
12753 ac_check_lib_save_LIBS=$LIBS
12754 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12756 /* end confdefs.h. */
12758 /* Override any GCC internal prototype to avoid an error.
12759 Use char because int might match the return type of a GCC
12760 builtin and then its argument prototype would still apply. */
12761 #ifdef __cplusplus
12762 extern "C"
12763 #endif
12764 char ldap_bind ();
12766 main ()
12768 return ldap_bind ();
12770 return 0;
12772 _ACEOF
12773 if ac_fn_c_try_link "$LINENO"; then :
12774 ac_cv_lib_ldap_ldap_bind=yes
12775 else
12776 ac_cv_lib_ldap_ldap_bind=no
12778 rm -f core conftest.err conftest.$ac_objext \
12779 conftest$ac_exeext conftest.$ac_ext
12780 LIBS=$ac_check_lib_save_LIBS
12782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12783 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12784 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12785 cat >>confdefs.h <<_ACEOF
12786 #define HAVE_LIBLDAP 1
12787 _ACEOF
12789 LIBS="-lldap $LIBS"
12791 else
12792 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12795 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12796 # This test is carried out against libldap.
12797 for ac_func in ldap_initialize
12798 do :
12799 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12800 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12801 cat >>confdefs.h <<_ACEOF
12802 #define HAVE_LDAP_INITIALIZE 1
12803 _ACEOF
12806 done
12808 # The separate ldap_r library only exists in OpenLDAP < 2.5, and if we
12809 # have 2.5 or later, we shouldn't even probe for ldap_r (we might find a
12810 # library from a separate OpenLDAP installation). The most reliable
12811 # way to check that is to check for a function introduced in 2.5.
12812 ac_fn_c_check_func "$LINENO" "ldap_verify_credentials" "ac_cv_func_ldap_verify_credentials"
12813 if test "x$ac_cv_func_ldap_verify_credentials" = xyes; then :
12814 thread_safe_libldap=yes
12815 else
12816 thread_safe_libldap=no
12819 if test "$thread_safe_libldap" = no; then
12820 # Use ldap_r for FE if available, else assume ldap is thread-safe.
12821 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
12822 LIBS="$_LIBS"
12823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
12824 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
12825 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
12826 $as_echo_n "(cached) " >&6
12827 else
12828 ac_check_lib_save_LIBS=$LIBS
12829 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12831 /* end confdefs.h. */
12833 /* Override any GCC internal prototype to avoid an error.
12834 Use char because int might match the return type of a GCC
12835 builtin and then its argument prototype would still apply. */
12836 #ifdef __cplusplus
12837 extern "C"
12838 #endif
12839 char ldap_bind ();
12841 main ()
12843 return ldap_bind ();
12845 return 0;
12847 _ACEOF
12848 if ac_fn_c_try_link "$LINENO"; then :
12849 ac_cv_lib_ldap_r_ldap_bind=yes
12850 else
12851 ac_cv_lib_ldap_r_ldap_bind=no
12853 rm -f core conftest.err conftest.$ac_objext \
12854 conftest$ac_exeext conftest.$ac_ext
12855 LIBS=$ac_check_lib_save_LIBS
12857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
12858 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
12859 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
12860 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12861 else
12862 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12865 else
12866 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12868 else
12869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12870 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12871 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12872 $as_echo_n "(cached) " >&6
12873 else
12874 ac_check_lib_save_LIBS=$LIBS
12875 LIBS="-lwldap32 $LIBS"
12876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12877 /* end confdefs.h. */
12879 /* Override any GCC internal prototype to avoid an error.
12880 Use char because int might match the return type of a GCC
12881 builtin and then its argument prototype would still apply. */
12882 #ifdef __cplusplus
12883 extern "C"
12884 #endif
12885 char ldap_bind ();
12887 main ()
12889 return ldap_bind ();
12891 return 0;
12893 _ACEOF
12894 if ac_fn_c_try_link "$LINENO"; then :
12895 ac_cv_lib_wldap32_ldap_bind=yes
12896 else
12897 ac_cv_lib_wldap32_ldap_bind=no
12899 rm -f core conftest.err conftest.$ac_objext \
12900 conftest$ac_exeext conftest.$ac_ext
12901 LIBS=$ac_check_lib_save_LIBS
12903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12904 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12905 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12906 cat >>confdefs.h <<_ACEOF
12907 #define HAVE_LIBWLDAP32 1
12908 _ACEOF
12910 LIBS="-lwldap32 $LIBS"
12912 else
12913 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12916 LDAP_LIBS_FE="-lwldap32"
12917 LDAP_LIBS_BE="-lwldap32"
12919 LIBS="$_LIBS"
12924 # for contrib/sepgsql
12925 if test "$with_selinux" = yes; then
12926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12927 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12928 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12929 $as_echo_n "(cached) " >&6
12930 else
12931 ac_check_lib_save_LIBS=$LIBS
12932 LIBS="-lselinux $LIBS"
12933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12934 /* end confdefs.h. */
12936 /* Override any GCC internal prototype to avoid an error.
12937 Use char because int might match the return type of a GCC
12938 builtin and then its argument prototype would still apply. */
12939 #ifdef __cplusplus
12940 extern "C"
12941 #endif
12942 char security_compute_create_name ();
12944 main ()
12946 return security_compute_create_name ();
12948 return 0;
12950 _ACEOF
12951 if ac_fn_c_try_link "$LINENO"; then :
12952 ac_cv_lib_selinux_security_compute_create_name=yes
12953 else
12954 ac_cv_lib_selinux_security_compute_create_name=no
12956 rm -f core conftest.err conftest.$ac_objext \
12957 conftest$ac_exeext conftest.$ac_ext
12958 LIBS=$ac_check_lib_save_LIBS
12960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12961 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12962 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12963 cat >>confdefs.h <<_ACEOF
12964 #define HAVE_LIBSELINUX 1
12965 _ACEOF
12967 LIBS="-lselinux $LIBS"
12969 else
12970 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12975 # for contrib/uuid-ossp
12976 if test "$with_uuid" = bsd ; then
12977 # On BSD, the UUID functions are in libc
12978 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12979 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12980 UUID_LIBS=""
12981 else
12982 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12985 elif test "$with_uuid" = e2fs ; then
12986 # On macOS, the UUID functions are in libc
12987 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12988 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12989 UUID_LIBS=""
12990 else
12991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12992 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12993 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12994 $as_echo_n "(cached) " >&6
12995 else
12996 ac_check_lib_save_LIBS=$LIBS
12997 LIBS="-luuid $LIBS"
12998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12999 /* end confdefs.h. */
13001 /* Override any GCC internal prototype to avoid an error.
13002 Use char because int might match the return type of a GCC
13003 builtin and then its argument prototype would still apply. */
13004 #ifdef __cplusplus
13005 extern "C"
13006 #endif
13007 char uuid_generate ();
13009 main ()
13011 return uuid_generate ();
13013 return 0;
13015 _ACEOF
13016 if ac_fn_c_try_link "$LINENO"; then :
13017 ac_cv_lib_uuid_uuid_generate=yes
13018 else
13019 ac_cv_lib_uuid_uuid_generate=no
13021 rm -f core conftest.err conftest.$ac_objext \
13022 conftest$ac_exeext conftest.$ac_ext
13023 LIBS=$ac_check_lib_save_LIBS
13025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13026 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13027 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13028 UUID_LIBS="-luuid"
13029 else
13030 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13035 elif test "$with_uuid" = ossp ; then
13036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13037 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13038 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13039 $as_echo_n "(cached) " >&6
13040 else
13041 ac_check_lib_save_LIBS=$LIBS
13042 LIBS="-lossp-uuid $LIBS"
13043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13044 /* end confdefs.h. */
13046 /* Override any GCC internal prototype to avoid an error.
13047 Use char because int might match the return type of a GCC
13048 builtin and then its argument prototype would still apply. */
13049 #ifdef __cplusplus
13050 extern "C"
13051 #endif
13052 char uuid_export ();
13054 main ()
13056 return uuid_export ();
13058 return 0;
13060 _ACEOF
13061 if ac_fn_c_try_link "$LINENO"; then :
13062 ac_cv_lib_ossp_uuid_uuid_export=yes
13063 else
13064 ac_cv_lib_ossp_uuid_uuid_export=no
13066 rm -f core conftest.err conftest.$ac_objext \
13067 conftest$ac_exeext conftest.$ac_ext
13068 LIBS=$ac_check_lib_save_LIBS
13070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13071 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13072 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13073 UUID_LIBS="-lossp-uuid"
13074 else
13075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13076 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13077 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13078 $as_echo_n "(cached) " >&6
13079 else
13080 ac_check_lib_save_LIBS=$LIBS
13081 LIBS="-luuid $LIBS"
13082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13083 /* end confdefs.h. */
13085 /* Override any GCC internal prototype to avoid an error.
13086 Use char because int might match the return type of a GCC
13087 builtin and then its argument prototype would still apply. */
13088 #ifdef __cplusplus
13089 extern "C"
13090 #endif
13091 char uuid_export ();
13093 main ()
13095 return uuid_export ();
13097 return 0;
13099 _ACEOF
13100 if ac_fn_c_try_link "$LINENO"; then :
13101 ac_cv_lib_uuid_uuid_export=yes
13102 else
13103 ac_cv_lib_uuid_uuid_export=no
13105 rm -f core conftest.err conftest.$ac_objext \
13106 conftest$ac_exeext conftest.$ac_ext
13107 LIBS=$ac_check_lib_save_LIBS
13109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13110 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13111 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13112 UUID_LIBS="-luuid"
13113 else
13114 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13124 ## Header files
13127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13128 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13129 if ${ac_cv_header_stdbool_h+:} false; then :
13130 $as_echo_n "(cached) " >&6
13131 else
13132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13133 /* end confdefs.h. */
13135 #include <stdbool.h>
13136 #ifndef bool
13137 "error: bool is not defined"
13138 #endif
13139 #ifndef false
13140 "error: false is not defined"
13141 #endif
13142 #if false
13143 "error: false is not 0"
13144 #endif
13145 #ifndef true
13146 "error: true is not defined"
13147 #endif
13148 #if true != 1
13149 "error: true is not 1"
13150 #endif
13151 #ifndef __bool_true_false_are_defined
13152 "error: __bool_true_false_are_defined is not defined"
13153 #endif
13155 struct s { _Bool s: 1; _Bool t; } s;
13157 char a[true == 1 ? 1 : -1];
13158 char b[false == 0 ? 1 : -1];
13159 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13160 char d[(bool) 0.5 == true ? 1 : -1];
13161 /* See body of main program for 'e'. */
13162 char f[(_Bool) 0.0 == false ? 1 : -1];
13163 char g[true];
13164 char h[sizeof (_Bool)];
13165 char i[sizeof s.t];
13166 enum { j = false, k = true, l = false * true, m = true * 256 };
13167 /* The following fails for
13168 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13169 _Bool n[m];
13170 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13171 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13172 /* Catch a bug in an HP-UX C compiler. See
13173 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13174 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13176 _Bool q = true;
13177 _Bool *pq = &q;
13180 main ()
13183 bool e = &s;
13184 *pq |= q;
13185 *pq |= ! q;
13186 /* Refer to every declared value, to avoid compiler optimizations. */
13187 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13188 + !m + !n + !o + !p + !q + !pq);
13191 return 0;
13193 _ACEOF
13194 if ac_fn_c_try_compile "$LINENO"; then :
13195 ac_cv_header_stdbool_h=yes
13196 else
13197 ac_cv_header_stdbool_h=no
13199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13202 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13203 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13204 if test "x$ac_cv_type__Bool" = xyes; then :
13206 cat >>confdefs.h <<_ACEOF
13207 #define HAVE__BOOL 1
13208 _ACEOF
13214 if test $ac_cv_header_stdbool_h = yes; then
13216 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13221 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
13222 do :
13223 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13224 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13225 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13226 cat >>confdefs.h <<_ACEOF
13227 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13228 _ACEOF
13232 done
13235 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13236 for ac_header in readline/readline.h
13237 do :
13238 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13239 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13240 cat >>confdefs.h <<_ACEOF
13241 #define HAVE_READLINE_READLINE_H 1
13242 _ACEOF
13244 else
13245 for ac_header in readline.h
13246 do :
13247 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13248 if test "x$ac_cv_header_readline_h" = xyes; then :
13249 cat >>confdefs.h <<_ACEOF
13250 #define HAVE_READLINE_H 1
13251 _ACEOF
13253 else
13254 as_fn_error $? "readline header not found
13255 If you have readline already installed, see config.log for details on the
13256 failure. It is possible the compiler isn't looking in the proper directory.
13257 Use --without-readline to disable readline support." "$LINENO" 5
13260 done
13264 done
13266 for ac_header in readline/history.h
13267 do :
13268 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13269 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13270 cat >>confdefs.h <<_ACEOF
13271 #define HAVE_READLINE_HISTORY_H 1
13272 _ACEOF
13274 else
13275 for ac_header in history.h
13276 do :
13277 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13278 if test "x$ac_cv_header_history_h" = xyes; then :
13279 cat >>confdefs.h <<_ACEOF
13280 #define HAVE_HISTORY_H 1
13281 _ACEOF
13283 else
13284 as_fn_error $? "history header not found
13285 If you have readline already installed, see config.log for details on the
13286 failure. It is possible the compiler isn't looking in the proper directory.
13287 Use --without-readline to disable readline support." "$LINENO" 5
13290 done
13294 done
13298 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13299 # Some installations of libedit usurp /usr/include/readline/, which seems
13300 # bad practice, since in combined installations readline will have its headers
13301 # there. We might have to resort to AC_EGREP checks to make sure we found
13302 # the proper header...
13303 for ac_header in editline/readline.h
13304 do :
13305 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13306 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13307 cat >>confdefs.h <<_ACEOF
13308 #define HAVE_EDITLINE_READLINE_H 1
13309 _ACEOF
13311 else
13312 for ac_header in readline.h
13313 do :
13314 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13315 if test "x$ac_cv_header_readline_h" = xyes; then :
13316 cat >>confdefs.h <<_ACEOF
13317 #define HAVE_READLINE_H 1
13318 _ACEOF
13320 else
13321 for ac_header in readline/readline.h
13322 do :
13323 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13324 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13325 cat >>confdefs.h <<_ACEOF
13326 #define HAVE_READLINE_READLINE_H 1
13327 _ACEOF
13329 else
13330 as_fn_error $? "readline header not found
13331 If you have libedit already installed, see config.log for details on the
13332 failure. It is possible the compiler isn't looking in the proper directory.
13333 Use --without-readline to disable libedit support." "$LINENO" 5
13336 done
13340 done
13344 done
13346 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13347 # not be there at all. Hence, don't complain if not found. We must check
13348 # though, since in yet other versions it is an independent header.
13349 for ac_header in editline/history.h
13350 do :
13351 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13352 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13353 cat >>confdefs.h <<_ACEOF
13354 #define HAVE_EDITLINE_HISTORY_H 1
13355 _ACEOF
13357 else
13358 for ac_header in history.h
13359 do :
13360 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13361 if test "x$ac_cv_header_history_h" = xyes; then :
13362 cat >>confdefs.h <<_ACEOF
13363 #define HAVE_HISTORY_H 1
13364 _ACEOF
13366 else
13367 for ac_header in readline/history.h
13368 do :
13369 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13370 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13371 cat >>confdefs.h <<_ACEOF
13372 #define HAVE_READLINE_HISTORY_H 1
13373 _ACEOF
13377 done
13381 done
13385 done
13389 if test "$with_zlib" = yes; then
13390 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13391 if test "x$ac_cv_header_zlib_h" = xyes; then :
13393 else
13394 as_fn_error $? "zlib header not found
13395 If you have zlib already installed, see config.log for details on the
13396 failure. It is possible the compiler isn't looking in the proper directory.
13397 Use --without-zlib to disable zlib support." "$LINENO" 5
13403 if test -z "$LZ4"; then
13404 for ac_prog in lz4
13406 # Extract the first word of "$ac_prog", so it can be a program name with args.
13407 set dummy $ac_prog; ac_word=$2
13408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13409 $as_echo_n "checking for $ac_word... " >&6; }
13410 if ${ac_cv_path_LZ4+:} false; then :
13411 $as_echo_n "(cached) " >&6
13412 else
13413 case $LZ4 in
13414 [\\/]* | ?:[\\/]*)
13415 ac_cv_path_LZ4="$LZ4" # Let the user override the test with a path.
13418 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13419 for as_dir in $PATH
13421 IFS=$as_save_IFS
13422 test -z "$as_dir" && as_dir=.
13423 for ac_exec_ext in '' $ac_executable_extensions; do
13424 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13425 ac_cv_path_LZ4="$as_dir/$ac_word$ac_exec_ext"
13426 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13427 break 2
13429 done
13430 done
13431 IFS=$as_save_IFS
13434 esac
13436 LZ4=$ac_cv_path_LZ4
13437 if test -n "$LZ4"; then
13438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13439 $as_echo "$LZ4" >&6; }
13440 else
13441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13442 $as_echo "no" >&6; }
13446 test -n "$LZ4" && break
13447 done
13449 else
13450 # Report the value of LZ4 in configure's output in all cases.
13451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4" >&5
13452 $as_echo_n "checking for LZ4... " >&6; }
13453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13454 $as_echo "$LZ4" >&6; }
13457 if test "$with_lz4" = yes; then
13458 ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
13459 if test "x$ac_cv_header_lz4_h" = xyes; then :
13461 else
13462 as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
13468 if test -z "$ZSTD"; then
13469 for ac_prog in zstd
13471 # Extract the first word of "$ac_prog", so it can be a program name with args.
13472 set dummy $ac_prog; ac_word=$2
13473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13474 $as_echo_n "checking for $ac_word... " >&6; }
13475 if ${ac_cv_path_ZSTD+:} false; then :
13476 $as_echo_n "(cached) " >&6
13477 else
13478 case $ZSTD in
13479 [\\/]* | ?:[\\/]*)
13480 ac_cv_path_ZSTD="$ZSTD" # Let the user override the test with a path.
13483 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13484 for as_dir in $PATH
13486 IFS=$as_save_IFS
13487 test -z "$as_dir" && as_dir=.
13488 for ac_exec_ext in '' $ac_executable_extensions; do
13489 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13490 ac_cv_path_ZSTD="$as_dir/$ac_word$ac_exec_ext"
13491 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13492 break 2
13494 done
13495 done
13496 IFS=$as_save_IFS
13499 esac
13501 ZSTD=$ac_cv_path_ZSTD
13502 if test -n "$ZSTD"; then
13503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13504 $as_echo "$ZSTD" >&6; }
13505 else
13506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13507 $as_echo "no" >&6; }
13511 test -n "$ZSTD" && break
13512 done
13514 else
13515 # Report the value of ZSTD in configure's output in all cases.
13516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD" >&5
13517 $as_echo_n "checking for ZSTD... " >&6; }
13518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13519 $as_echo "$ZSTD" >&6; }
13522 if test "$with_zstd" = yes; then
13523 ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default"
13524 if test "x$ac_cv_header_zstd_h" = xyes; then :
13526 else
13527 as_fn_error $? "zstd.h header file is required for ZSTD" "$LINENO" 5
13533 if test "$with_gssapi" = yes ; then
13534 for ac_header in gssapi/gssapi.h
13535 do :
13536 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13537 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13538 cat >>confdefs.h <<_ACEOF
13539 #define HAVE_GSSAPI_GSSAPI_H 1
13540 _ACEOF
13542 else
13543 for ac_header in gssapi.h
13544 do :
13545 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13546 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13547 cat >>confdefs.h <<_ACEOF
13548 #define HAVE_GSSAPI_H 1
13549 _ACEOF
13551 else
13552 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13555 done
13559 done
13561 for ac_header in gssapi/gssapi_ext.h
13562 do :
13563 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi_ext.h" "ac_cv_header_gssapi_gssapi_ext_h" "$ac_includes_default"
13564 if test "x$ac_cv_header_gssapi_gssapi_ext_h" = xyes; then :
13565 cat >>confdefs.h <<_ACEOF
13566 #define HAVE_GSSAPI_GSSAPI_EXT_H 1
13567 _ACEOF
13569 else
13570 for ac_header in gssapi_ext.h
13571 do :
13572 ac_fn_c_check_header_mongrel "$LINENO" "gssapi_ext.h" "ac_cv_header_gssapi_ext_h" "$ac_includes_default"
13573 if test "x$ac_cv_header_gssapi_ext_h" = xyes; then :
13574 cat >>confdefs.h <<_ACEOF
13575 #define HAVE_GSSAPI_EXT_H 1
13576 _ACEOF
13578 else
13579 as_fn_error $? "gssapi_ext.h header file is required for GSSAPI" "$LINENO" 5
13582 done
13586 done
13590 if test -z "$OPENSSL"; then
13591 for ac_prog in openssl
13593 # Extract the first word of "$ac_prog", so it can be a program name with args.
13594 set dummy $ac_prog; ac_word=$2
13595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13596 $as_echo_n "checking for $ac_word... " >&6; }
13597 if ${ac_cv_path_OPENSSL+:} false; then :
13598 $as_echo_n "(cached) " >&6
13599 else
13600 case $OPENSSL in
13601 [\\/]* | ?:[\\/]*)
13602 ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a path.
13605 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13606 for as_dir in $PATH
13608 IFS=$as_save_IFS
13609 test -z "$as_dir" && as_dir=.
13610 for ac_exec_ext in '' $ac_executable_extensions; do
13611 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13612 ac_cv_path_OPENSSL="$as_dir/$ac_word$ac_exec_ext"
13613 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13614 break 2
13616 done
13617 done
13618 IFS=$as_save_IFS
13621 esac
13623 OPENSSL=$ac_cv_path_OPENSSL
13624 if test -n "$OPENSSL"; then
13625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
13626 $as_echo "$OPENSSL" >&6; }
13627 else
13628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13629 $as_echo "no" >&6; }
13633 test -n "$OPENSSL" && break
13634 done
13636 else
13637 # Report the value of OPENSSL in configure's output in all cases.
13638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
13639 $as_echo_n "checking for OPENSSL... " >&6; }
13640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
13641 $as_echo "$OPENSSL" >&6; }
13644 pgac_openssl_version="$($OPENSSL version 2> /dev/null || echo openssl not found)"
13645 { $as_echo "$as_me:${as_lineno-$LINENO}: using openssl: $pgac_openssl_version" >&5
13646 $as_echo "$as_me: using openssl: $pgac_openssl_version" >&6;}
13647 if test "$with_ssl" = openssl ; then
13648 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13649 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13651 else
13652 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13656 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13657 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13659 else
13660 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13666 if test "$with_pam" = yes ; then
13667 for ac_header in security/pam_appl.h
13668 do :
13669 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13670 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13671 cat >>confdefs.h <<_ACEOF
13672 #define HAVE_SECURITY_PAM_APPL_H 1
13673 _ACEOF
13675 else
13676 for ac_header in pam/pam_appl.h
13677 do :
13678 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13679 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13680 cat >>confdefs.h <<_ACEOF
13681 #define HAVE_PAM_PAM_APPL_H 1
13682 _ACEOF
13684 else
13685 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13688 done
13692 done
13696 if test "$with_bsd_auth" = yes ; then
13697 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13698 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13700 else
13701 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13707 if test "$with_systemd" = yes ; then
13708 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13709 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13711 else
13712 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13718 if test "$with_libxml" = yes ; then
13719 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13720 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13722 else
13723 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13729 if test "$with_libxslt" = yes ; then
13730 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13731 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13733 else
13734 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13740 if test "$with_ldap" = yes ; then
13741 if test "$PORTNAME" != "win32"; then
13742 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13743 if test "x$ac_cv_header_ldap_h" = xyes; then :
13745 else
13746 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13751 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13752 if ${pgac_cv_ldap_safe+:} false; then :
13753 $as_echo_n "(cached) " >&6
13754 else
13755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13756 /* end confdefs.h. */
13757 #include <ldap.h>
13758 #if !defined(LDAP_VENDOR_VERSION) || \
13759 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13760 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13761 choke me
13762 #endif
13764 main ()
13768 return 0;
13770 _ACEOF
13771 if ac_fn_c_try_compile "$LINENO"; then :
13772 pgac_cv_ldap_safe=yes
13773 else
13774 pgac_cv_ldap_safe=no
13776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13779 $as_echo "$pgac_cv_ldap_safe" >&6; }
13781 if test "$pgac_cv_ldap_safe" != yes; then
13782 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13783 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13784 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13785 *** also uses LDAP will crash on exit." >&5
13786 $as_echo "$as_me: WARNING:
13787 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13788 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13789 *** also uses LDAP will crash on exit." >&2;}
13791 else
13792 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13793 #include <windows.h>
13796 if test "x$ac_cv_header_winldap_h" = xyes; then :
13798 else
13799 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13806 if test "$with_bonjour" = yes ; then
13807 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13808 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13810 else
13811 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13817 # for contrib/uuid-ossp
13818 if test "$with_uuid" = bsd ; then
13819 for ac_header in uuid.h
13820 do :
13821 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13822 if test "x$ac_cv_header_uuid_h" = xyes; then :
13823 cat >>confdefs.h <<_ACEOF
13824 #define HAVE_UUID_H 1
13825 _ACEOF
13826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13827 /* end confdefs.h. */
13828 #include <uuid.h>
13830 _ACEOF
13831 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13832 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13834 else
13835 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13837 rm -f conftest*
13839 else
13840 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13843 done
13845 elif test "$with_uuid" = e2fs ; then
13846 for ac_header in uuid/uuid.h
13847 do :
13848 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13849 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13850 cat >>confdefs.h <<_ACEOF
13851 #define HAVE_UUID_UUID_H 1
13852 _ACEOF
13853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13854 /* end confdefs.h. */
13855 #include <uuid/uuid.h>
13857 _ACEOF
13858 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13859 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13861 else
13862 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13864 rm -f conftest*
13866 else
13867 for ac_header in uuid.h
13868 do :
13869 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13870 if test "x$ac_cv_header_uuid_h" = xyes; then :
13871 cat >>confdefs.h <<_ACEOF
13872 #define HAVE_UUID_H 1
13873 _ACEOF
13874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13875 /* end confdefs.h. */
13876 #include <uuid.h>
13878 _ACEOF
13879 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13880 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13882 else
13883 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13885 rm -f conftest*
13887 else
13888 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13891 done
13895 done
13897 elif test "$with_uuid" = ossp ; then
13898 for ac_header in ossp/uuid.h
13899 do :
13900 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13901 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13902 cat >>confdefs.h <<_ACEOF
13903 #define HAVE_OSSP_UUID_H 1
13904 _ACEOF
13905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13906 /* end confdefs.h. */
13907 #include <ossp/uuid.h>
13909 _ACEOF
13910 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13911 $EGREP "uuid_export" >/dev/null 2>&1; then :
13913 else
13914 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13916 rm -f conftest*
13918 else
13919 for ac_header in uuid.h
13920 do :
13921 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13922 if test "x$ac_cv_header_uuid_h" = xyes; then :
13923 cat >>confdefs.h <<_ACEOF
13924 #define HAVE_UUID_H 1
13925 _ACEOF
13926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13927 /* end confdefs.h. */
13928 #include <uuid.h>
13930 _ACEOF
13931 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13932 $EGREP "uuid_export" >/dev/null 2>&1; then :
13934 else
13935 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13937 rm -f conftest*
13939 else
13940 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13943 done
13947 done
13951 if test "$PORTNAME" = "win32" ; then
13952 for ac_header in crtdefs.h
13953 do :
13954 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13955 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13956 cat >>confdefs.h <<_ACEOF
13957 #define HAVE_CRTDEFS_H 1
13958 _ACEOF
13962 done
13967 ## Types, structures, compiler characteristics
13970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13971 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13972 if ${ac_cv_c_bigendian+:} false; then :
13973 $as_echo_n "(cached) " >&6
13974 else
13975 ac_cv_c_bigendian=unknown
13976 # See if we're dealing with a universal compiler.
13977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13978 /* end confdefs.h. */
13979 #ifndef __APPLE_CC__
13980 not a universal capable compiler
13981 #endif
13982 typedef int dummy;
13984 _ACEOF
13985 if ac_fn_c_try_compile "$LINENO"; then :
13987 # Check for potential -arch flags. It is not universal unless
13988 # there are at least two -arch flags with different values.
13989 ac_arch=
13990 ac_prev=
13991 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13992 if test -n "$ac_prev"; then
13993 case $ac_word in
13994 i?86 | x86_64 | ppc | ppc64)
13995 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13996 ac_arch=$ac_word
13997 else
13998 ac_cv_c_bigendian=universal
13999 break
14002 esac
14003 ac_prev=
14004 elif test "x$ac_word" = "x-arch"; then
14005 ac_prev=arch
14007 done
14009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14010 if test $ac_cv_c_bigendian = unknown; then
14011 # See if sys/param.h defines the BYTE_ORDER macro.
14012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14013 /* end confdefs.h. */
14014 #include <sys/types.h>
14015 #include <sys/param.h>
14018 main ()
14020 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14021 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14022 && LITTLE_ENDIAN)
14023 bogus endian macros
14024 #endif
14027 return 0;
14029 _ACEOF
14030 if ac_fn_c_try_compile "$LINENO"; then :
14031 # It does; now see whether it defined to BIG_ENDIAN or not.
14032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14033 /* end confdefs.h. */
14034 #include <sys/types.h>
14035 #include <sys/param.h>
14038 main ()
14040 #if BYTE_ORDER != BIG_ENDIAN
14041 not big endian
14042 #endif
14045 return 0;
14047 _ACEOF
14048 if ac_fn_c_try_compile "$LINENO"; then :
14049 ac_cv_c_bigendian=yes
14050 else
14051 ac_cv_c_bigendian=no
14053 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14055 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14057 if test $ac_cv_c_bigendian = unknown; then
14058 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14060 /* end confdefs.h. */
14061 #include <limits.h>
14064 main ()
14066 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14067 bogus endian macros
14068 #endif
14071 return 0;
14073 _ACEOF
14074 if ac_fn_c_try_compile "$LINENO"; then :
14075 # It does; now see whether it defined to _BIG_ENDIAN or not.
14076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14077 /* end confdefs.h. */
14078 #include <limits.h>
14081 main ()
14083 #ifndef _BIG_ENDIAN
14084 not big endian
14085 #endif
14088 return 0;
14090 _ACEOF
14091 if ac_fn_c_try_compile "$LINENO"; then :
14092 ac_cv_c_bigendian=yes
14093 else
14094 ac_cv_c_bigendian=no
14096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14100 if test $ac_cv_c_bigendian = unknown; then
14101 # Compile a test program.
14102 if test "$cross_compiling" = yes; then :
14103 # Try to guess by grepping values from an object file.
14104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14105 /* end confdefs.h. */
14106 short int ascii_mm[] =
14107 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14108 short int ascii_ii[] =
14109 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14110 int use_ascii (int i) {
14111 return ascii_mm[i] + ascii_ii[i];
14113 short int ebcdic_ii[] =
14114 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14115 short int ebcdic_mm[] =
14116 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14117 int use_ebcdic (int i) {
14118 return ebcdic_mm[i] + ebcdic_ii[i];
14120 extern int foo;
14123 main ()
14125 return use_ascii (foo) == use_ebcdic (foo);
14127 return 0;
14129 _ACEOF
14130 if ac_fn_c_try_compile "$LINENO"; then :
14131 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14132 ac_cv_c_bigendian=yes
14134 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14135 if test "$ac_cv_c_bigendian" = unknown; then
14136 ac_cv_c_bigendian=no
14137 else
14138 # finding both strings is unlikely to happen, but who knows?
14139 ac_cv_c_bigendian=unknown
14143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14144 else
14145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14146 /* end confdefs.h. */
14147 $ac_includes_default
14149 main ()
14152 /* Are we little or big endian? From Harbison&Steele. */
14153 union
14155 long int l;
14156 char c[sizeof (long int)];
14157 } u;
14158 u.l = 1;
14159 return u.c[sizeof (long int) - 1] == 1;
14162 return 0;
14164 _ACEOF
14165 if ac_fn_c_try_run "$LINENO"; then :
14166 ac_cv_c_bigendian=no
14167 else
14168 ac_cv_c_bigendian=yes
14170 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14171 conftest.$ac_objext conftest.beam conftest.$ac_ext
14176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14177 $as_echo "$ac_cv_c_bigendian" >&6; }
14178 case $ac_cv_c_bigendian in #(
14179 yes)
14180 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14181 ;; #(
14183 ;; #(
14184 universal)
14186 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14188 ;; #(
14190 as_fn_error $? "unknown endianness
14191 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14192 esac
14194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14195 $as_echo_n "checking for inline... " >&6; }
14196 if ${ac_cv_c_inline+:} false; then :
14197 $as_echo_n "(cached) " >&6
14198 else
14199 ac_cv_c_inline=no
14200 for ac_kw in inline __inline__ __inline; do
14201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14202 /* end confdefs.h. */
14203 #ifndef __cplusplus
14204 typedef int foo_t;
14205 static $ac_kw foo_t static_foo () {return 0; }
14206 $ac_kw foo_t foo () {return 0; }
14207 #endif
14209 _ACEOF
14210 if ac_fn_c_try_compile "$LINENO"; then :
14211 ac_cv_c_inline=$ac_kw
14213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14214 test "$ac_cv_c_inline" != no && break
14215 done
14218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14219 $as_echo "$ac_cv_c_inline" >&6; }
14221 case $ac_cv_c_inline in
14222 inline | yes) ;;
14224 case $ac_cv_c_inline in
14225 no) ac_val=;;
14226 *) ac_val=$ac_cv_c_inline;;
14227 esac
14228 cat >>confdefs.h <<_ACEOF
14229 #ifndef __cplusplus
14230 #define inline $ac_val
14231 #endif
14232 _ACEOF
14234 esac
14236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14237 $as_echo_n "checking for printf format archetype... " >&6; }
14238 if ${pgac_cv_printf_archetype+:} false; then :
14239 $as_echo_n "(cached) " >&6
14240 else
14241 pgac_cv_printf_archetype=gnu_printf
14242 ac_save_c_werror_flag=$ac_c_werror_flag
14243 ac_c_werror_flag=yes
14244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14245 /* end confdefs.h. */
14246 extern void pgac_write(int ignore, const char *fmt,...)
14247 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14249 main ()
14251 pgac_write(0, "error %s: %m", "foo");
14253 return 0;
14255 _ACEOF
14256 if ac_fn_c_try_compile "$LINENO"; then :
14257 ac_archetype_ok=yes
14258 else
14259 ac_archetype_ok=no
14261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14262 ac_c_werror_flag=$ac_save_c_werror_flag
14264 if [ "$ac_archetype_ok" = no ]; then
14265 pgac_cv_printf_archetype=__syslog__
14266 ac_save_c_werror_flag=$ac_c_werror_flag
14267 ac_c_werror_flag=yes
14268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14269 /* end confdefs.h. */
14270 extern void pgac_write(int ignore, const char *fmt,...)
14271 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14273 main ()
14275 pgac_write(0, "error %s: %m", "foo");
14277 return 0;
14279 _ACEOF
14280 if ac_fn_c_try_compile "$LINENO"; then :
14281 ac_archetype_ok=yes
14282 else
14283 ac_archetype_ok=no
14285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14286 ac_c_werror_flag=$ac_save_c_werror_flag
14288 if [ "$ac_archetype_ok" = no ]; then
14289 pgac_cv_printf_archetype=printf
14293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14294 $as_echo "$pgac_cv_printf_archetype" >&6; }
14296 cat >>confdefs.h <<_ACEOF
14297 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14298 _ACEOF
14301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14302 $as_echo_n "checking for _Static_assert... " >&6; }
14303 if ${pgac_cv__static_assert+:} false; then :
14304 $as_echo_n "(cached) " >&6
14305 else
14306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14307 /* end confdefs.h. */
14310 main ()
14312 ({ _Static_assert(1, "foo"); })
14314 return 0;
14316 _ACEOF
14317 if ac_fn_c_try_link "$LINENO"; then :
14318 pgac_cv__static_assert=yes
14319 else
14320 pgac_cv__static_assert=no
14322 rm -f core conftest.err conftest.$ac_objext \
14323 conftest$ac_exeext conftest.$ac_ext
14325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14326 $as_echo "$pgac_cv__static_assert" >&6; }
14327 if test x"$pgac_cv__static_assert" = xyes ; then
14329 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14333 $as_echo_n "checking for typeof... " >&6; }
14334 if ${pgac_cv_c_typeof+:} false; then :
14335 $as_echo_n "(cached) " >&6
14336 else
14337 pgac_cv_c_typeof=no
14338 for pgac_kw in typeof __typeof__ decltype; do
14339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14340 /* end confdefs.h. */
14343 main ()
14345 int x = 0;
14346 $pgac_kw(x) y;
14347 y = x;
14348 return y;
14350 return 0;
14352 _ACEOF
14353 if ac_fn_c_try_compile "$LINENO"; then :
14354 pgac_cv_c_typeof=$pgac_kw
14356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14357 test "$pgac_cv_c_typeof" != no && break
14358 done
14360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14361 $as_echo "$pgac_cv_c_typeof" >&6; }
14362 if test "$pgac_cv_c_typeof" != no; then
14364 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14366 if test "$pgac_cv_c_typeof" != typeof; then
14368 cat >>confdefs.h <<_ACEOF
14369 #define typeof $pgac_cv_c_typeof
14370 _ACEOF
14374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14375 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14376 if ${pgac_cv__types_compatible+:} false; then :
14377 $as_echo_n "(cached) " >&6
14378 else
14379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14380 /* end confdefs.h. */
14383 main ()
14385 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14387 return 0;
14389 _ACEOF
14390 if ac_fn_c_try_compile "$LINENO"; then :
14391 pgac_cv__types_compatible=yes
14392 else
14393 pgac_cv__types_compatible=no
14395 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14398 $as_echo "$pgac_cv__types_compatible" >&6; }
14399 if test x"$pgac_cv__types_compatible" = xyes ; then
14401 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14405 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14406 if ${pgac_cv__builtin_constant_p+:} false; then :
14407 $as_echo_n "(cached) " >&6
14408 else
14409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14410 /* end confdefs.h. */
14411 static int x;
14412 static int y[__builtin_constant_p(x) ? x : 1];
14413 static int z[__builtin_constant_p("string literal") ? 1 : x];
14416 _ACEOF
14417 if ac_fn_c_try_compile "$LINENO"; then :
14418 pgac_cv__builtin_constant_p=yes
14419 else
14420 pgac_cv__builtin_constant_p=no
14422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14425 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14426 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14428 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14432 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14433 if ${pgac_cv__builtin_unreachable+:} false; then :
14434 $as_echo_n "(cached) " >&6
14435 else
14436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14437 /* end confdefs.h. */
14440 main ()
14442 __builtin_unreachable();
14444 return 0;
14446 _ACEOF
14447 if ac_fn_c_try_link "$LINENO"; then :
14448 pgac_cv__builtin_unreachable=yes
14449 else
14450 pgac_cv__builtin_unreachable=no
14452 rm -f core conftest.err conftest.$ac_objext \
14453 conftest$ac_exeext conftest.$ac_ext
14455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14456 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14457 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14459 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14463 $as_echo_n "checking for computed goto support... " >&6; }
14464 if ${pgac_cv_computed_goto+:} false; then :
14465 $as_echo_n "(cached) " >&6
14466 else
14467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14468 /* end confdefs.h. */
14471 main ()
14473 void *labeladdrs[] = {&&my_label};
14474 goto *labeladdrs[0];
14475 my_label:
14476 return 1;
14479 return 0;
14481 _ACEOF
14482 if ac_fn_c_try_compile "$LINENO"; then :
14483 pgac_cv_computed_goto=yes
14484 else
14485 pgac_cv_computed_goto=no
14487 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14490 $as_echo "$pgac_cv_computed_goto" >&6; }
14491 if test x"$pgac_cv_computed_goto" = xyes ; then
14493 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14496 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14497 #include <time.h>
14500 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14502 cat >>confdefs.h <<_ACEOF
14503 #define HAVE_STRUCT_TM_TM_ZONE 1
14504 _ACEOF
14510 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14511 #include <sys/ipc.h>
14512 #include <sys/sem.h>
14515 if test "x$ac_cv_type_union_semun" = xyes; then :
14517 cat >>confdefs.h <<_ACEOF
14518 #define HAVE_UNION_SEMUN 1
14519 _ACEOF
14524 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/socket.h>
14526 if test "x$ac_cv_type_socklen_t" = xyes; then :
14528 cat >>confdefs.h <<_ACEOF
14529 #define HAVE_SOCKLEN_T 1
14530 _ACEOF
14535 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14536 #include <sys/socket.h>
14539 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14541 cat >>confdefs.h <<_ACEOF
14542 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14543 _ACEOF
14549 # MSVC doesn't cope well with defining restrict to __restrict, the
14550 # spelling it understands, because it conflicts with
14551 # __declspec(restrict). Therefore we define pg_restrict to the
14552 # appropriate definition, which presumably won't conflict.
14553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14554 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14555 if ${ac_cv_c_restrict+:} false; then :
14556 $as_echo_n "(cached) " >&6
14557 else
14558 ac_cv_c_restrict=no
14559 # The order here caters to the fact that C++ does not require restrict.
14560 for ac_kw in __restrict __restrict__ _Restrict restrict; do
14561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14562 /* end confdefs.h. */
14563 typedef int * int_ptr;
14564 int foo (int_ptr $ac_kw ip) {
14565 return ip[0];
14568 main ()
14570 int s[1];
14571 int * $ac_kw t = s;
14572 t[0] = 0;
14573 return foo(t)
14575 return 0;
14577 _ACEOF
14578 if ac_fn_c_try_compile "$LINENO"; then :
14579 ac_cv_c_restrict=$ac_kw
14581 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14582 test "$ac_cv_c_restrict" != no && break
14583 done
14586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14587 $as_echo "$ac_cv_c_restrict" >&6; }
14589 case $ac_cv_c_restrict in
14590 restrict) ;;
14591 no) $as_echo "#define restrict /**/" >>confdefs.h
14593 *) cat >>confdefs.h <<_ACEOF
14594 #define restrict $ac_cv_c_restrict
14595 _ACEOF
14597 esac
14599 if test "$ac_cv_c_restrict" = "no"; then
14600 pg_restrict=""
14601 else
14602 pg_restrict="$ac_cv_c_restrict"
14605 cat >>confdefs.h <<_ACEOF
14606 #define pg_restrict $pg_restrict
14607 _ACEOF
14610 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14611 #include <getopt.h>
14612 #endif
14614 if test "x$ac_cv_type_struct_option" = xyes; then :
14616 cat >>confdefs.h <<_ACEOF
14617 #define HAVE_STRUCT_OPTION 1
14618 _ACEOF
14624 case $host_cpu in
14625 x86_64)
14626 # On x86_64, check if we can compile a popcntq instruction
14627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
14628 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
14629 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
14630 $as_echo_n "(cached) " >&6
14631 else
14632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14633 /* end confdefs.h. */
14636 main ()
14638 long long x = 1; long long r;
14639 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
14641 return 0;
14643 _ACEOF
14644 if ac_fn_c_try_compile "$LINENO"; then :
14645 pgac_cv_have_x86_64_popcntq=yes
14646 else
14647 pgac_cv_have_x86_64_popcntq=no
14649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
14652 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
14653 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
14655 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
14659 ppc*|powerpc*)
14660 # On PPC, check if compiler accepts "i"(x) when __builtin_constant_p(x).
14661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
14662 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
14663 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
14664 $as_echo_n "(cached) " >&6
14665 else
14666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14667 /* end confdefs.h. */
14668 static inline int
14669 addi(int ra, int si)
14671 int res = 0;
14672 if (__builtin_constant_p(si))
14673 __asm__ __volatile__(
14674 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
14675 return res;
14677 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
14679 main ()
14683 return 0;
14685 _ACEOF
14686 if ac_fn_c_try_compile "$LINENO"; then :
14687 pgac_cv_have_i_constraint__builtin_constant_p=yes
14688 else
14689 pgac_cv_have_i_constraint__builtin_constant_p=no
14691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
14694 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
14695 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
14697 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
14701 esac
14703 # Check largefile support. You might think this is a system service not a
14704 # compiler characteristic, but you'd be wrong. We must check this before
14705 # probing existence of related functions such as fseeko, since the largefile
14706 # defines can affect what is generated for that.
14707 if test "$PORTNAME" != "win32"; then
14708 # Check whether --enable-largefile was given.
14709 if test "${enable_largefile+set}" = set; then :
14710 enableval=$enable_largefile;
14713 if test "$enable_largefile" != no; then
14715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14716 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14717 if ${ac_cv_sys_largefile_CC+:} false; then :
14718 $as_echo_n "(cached) " >&6
14719 else
14720 ac_cv_sys_largefile_CC=no
14721 if test "$GCC" != yes; then
14722 ac_save_CC=$CC
14723 while :; do
14724 # IRIX 6.2 and later do not support large files by default,
14725 # so use the C compiler's -n32 option if that helps.
14726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14727 /* end confdefs.h. */
14728 #include <sys/types.h>
14729 /* Check that off_t can represent 2**63 - 1 correctly.
14730 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14731 since some C++ compilers masquerading as C compilers
14732 incorrectly reject 9223372036854775807. */
14733 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14734 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14735 && LARGE_OFF_T % 2147483647 == 1)
14736 ? 1 : -1];
14738 main ()
14742 return 0;
14744 _ACEOF
14745 if ac_fn_c_try_compile "$LINENO"; then :
14746 break
14748 rm -f core conftest.err conftest.$ac_objext
14749 CC="$CC -n32"
14750 if ac_fn_c_try_compile "$LINENO"; then :
14751 ac_cv_sys_largefile_CC=' -n32'; break
14753 rm -f core conftest.err conftest.$ac_objext
14754 break
14755 done
14756 CC=$ac_save_CC
14757 rm -f conftest.$ac_ext
14760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14761 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14762 if test "$ac_cv_sys_largefile_CC" != no; then
14763 CC=$CC$ac_cv_sys_largefile_CC
14766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14767 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14768 if ${ac_cv_sys_file_offset_bits+:} false; then :
14769 $as_echo_n "(cached) " >&6
14770 else
14771 while :; do
14772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14773 /* end confdefs.h. */
14774 #include <sys/types.h>
14775 /* Check that off_t can represent 2**63 - 1 correctly.
14776 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14777 since some C++ compilers masquerading as C compilers
14778 incorrectly reject 9223372036854775807. */
14779 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14780 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14781 && LARGE_OFF_T % 2147483647 == 1)
14782 ? 1 : -1];
14784 main ()
14788 return 0;
14790 _ACEOF
14791 if ac_fn_c_try_compile "$LINENO"; then :
14792 ac_cv_sys_file_offset_bits=no; break
14794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14796 /* end confdefs.h. */
14797 #define _FILE_OFFSET_BITS 64
14798 #include <sys/types.h>
14799 /* Check that off_t can represent 2**63 - 1 correctly.
14800 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14801 since some C++ compilers masquerading as C compilers
14802 incorrectly reject 9223372036854775807. */
14803 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14804 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14805 && LARGE_OFF_T % 2147483647 == 1)
14806 ? 1 : -1];
14808 main ()
14812 return 0;
14814 _ACEOF
14815 if ac_fn_c_try_compile "$LINENO"; then :
14816 ac_cv_sys_file_offset_bits=64; break
14818 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14819 ac_cv_sys_file_offset_bits=unknown
14820 break
14821 done
14823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14824 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14825 case $ac_cv_sys_file_offset_bits in #(
14826 no | unknown) ;;
14828 cat >>confdefs.h <<_ACEOF
14829 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14830 _ACEOF
14832 esac
14833 rm -rf conftest*
14834 if test $ac_cv_sys_file_offset_bits = unknown; then
14835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14836 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14837 if ${ac_cv_sys_large_files+:} false; then :
14838 $as_echo_n "(cached) " >&6
14839 else
14840 while :; do
14841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14842 /* end confdefs.h. */
14843 #include <sys/types.h>
14844 /* Check that off_t can represent 2**63 - 1 correctly.
14845 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14846 since some C++ compilers masquerading as C compilers
14847 incorrectly reject 9223372036854775807. */
14848 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14849 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14850 && LARGE_OFF_T % 2147483647 == 1)
14851 ? 1 : -1];
14853 main ()
14857 return 0;
14859 _ACEOF
14860 if ac_fn_c_try_compile "$LINENO"; then :
14861 ac_cv_sys_large_files=no; break
14863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14865 /* end confdefs.h. */
14866 #define _LARGE_FILES 1
14867 #include <sys/types.h>
14868 /* Check that off_t can represent 2**63 - 1 correctly.
14869 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14870 since some C++ compilers masquerading as C compilers
14871 incorrectly reject 9223372036854775807. */
14872 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14873 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14874 && LARGE_OFF_T % 2147483647 == 1)
14875 ? 1 : -1];
14877 main ()
14881 return 0;
14883 _ACEOF
14884 if ac_fn_c_try_compile "$LINENO"; then :
14885 ac_cv_sys_large_files=1; break
14887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14888 ac_cv_sys_large_files=unknown
14889 break
14890 done
14892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14893 $as_echo "$ac_cv_sys_large_files" >&6; }
14894 case $ac_cv_sys_large_files in #(
14895 no | unknown) ;;
14897 cat >>confdefs.h <<_ACEOF
14898 #define _LARGE_FILES $ac_cv_sys_large_files
14899 _ACEOF
14901 esac
14902 rm -rf conftest*
14911 # The cast to long int works around a bug in the HP C Compiler
14912 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14913 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14914 # This bug is HP SR number 8606223364.
14915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14916 $as_echo_n "checking size of off_t... " >&6; }
14917 if ${ac_cv_sizeof_off_t+:} false; then :
14918 $as_echo_n "(cached) " >&6
14919 else
14920 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
14922 else
14923 if test "$ac_cv_type_off_t" = yes; then
14924 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14925 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14926 as_fn_error 77 "cannot compute sizeof (off_t)
14927 See \`config.log' for more details" "$LINENO" 5; }
14928 else
14929 ac_cv_sizeof_off_t=0
14934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14935 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14939 cat >>confdefs.h <<_ACEOF
14940 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14941 _ACEOF
14945 # If we don't have largefile support, can't handle segment size >= 2GB.
14946 if test "$ac_cv_sizeof_off_t" -lt 8; then
14947 if expr $RELSEG_SIZE '*' $blocksize '>=' 2 '*' 1024 '*' 1024; then
14948 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14952 # The cast to long int works around a bug in the HP C Compiler
14953 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14954 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14955 # This bug is HP SR number 8606223364.
14956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14957 $as_echo_n "checking size of bool... " >&6; }
14958 if ${ac_cv_sizeof_bool+:} false; then :
14959 $as_echo_n "(cached) " >&6
14960 else
14961 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
14962 #include <stdbool.h>
14963 #endif
14964 "; then :
14966 else
14967 if test "$ac_cv_type_bool" = yes; then
14968 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14969 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14970 as_fn_error 77 "cannot compute sizeof (bool)
14971 See \`config.log' for more details" "$LINENO" 5; }
14972 else
14973 ac_cv_sizeof_bool=0
14978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
14979 $as_echo "$ac_cv_sizeof_bool" >&6; }
14983 cat >>confdefs.h <<_ACEOF
14984 #define SIZEOF_BOOL $ac_cv_sizeof_bool
14985 _ACEOF
14989 if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
14991 $as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
14997 ## Functions, global variables
15000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15001 $as_echo_n "checking for int timezone... " >&6; }
15002 if ${pgac_cv_var_int_timezone+:} false; then :
15003 $as_echo_n "(cached) " >&6
15004 else
15005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15006 /* end confdefs.h. */
15007 #include <time.h>
15008 int res;
15010 main ()
15012 #ifndef __CYGWIN__
15013 res = timezone / 60;
15014 #else
15015 res = _timezone / 60;
15016 #endif
15018 return 0;
15020 _ACEOF
15021 if ac_fn_c_try_link "$LINENO"; then :
15022 pgac_cv_var_int_timezone=yes
15023 else
15024 pgac_cv_var_int_timezone=no
15026 rm -f core conftest.err conftest.$ac_objext \
15027 conftest$ac_exeext conftest.$ac_ext
15029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15030 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15031 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15033 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15037 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15038 # symbols that that library has no business exposing to the world. Pending
15039 # acquisition of a clue by those developers, ignore libedit (including its
15040 # possible alias of libreadline) while checking for everything else.
15041 LIBS_including_readline="$LIBS"
15042 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15044 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
15045 do :
15046 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15047 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15048 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15049 cat >>confdefs.h <<_ACEOF
15050 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15051 _ACEOF
15054 done
15057 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15059 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15060 if ${pgac_cv__builtin_bswap16+:} false; then :
15061 $as_echo_n "(cached) " >&6
15062 else
15063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15064 /* end confdefs.h. */
15067 call__builtin_bswap16(int x)
15069 return __builtin_bswap16(x);
15072 main ()
15076 return 0;
15078 _ACEOF
15079 if ac_fn_c_try_link "$LINENO"; then :
15080 pgac_cv__builtin_bswap16=yes
15081 else
15082 pgac_cv__builtin_bswap16=no
15084 rm -f core conftest.err conftest.$ac_objext \
15085 conftest$ac_exeext conftest.$ac_ext
15087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15088 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15089 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15091 cat >>confdefs.h <<_ACEOF
15092 #define HAVE__BUILTIN_BSWAP16 1
15093 _ACEOF
15096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15097 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15098 if ${pgac_cv__builtin_bswap32+:} false; then :
15099 $as_echo_n "(cached) " >&6
15100 else
15101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15102 /* end confdefs.h. */
15105 call__builtin_bswap32(int x)
15107 return __builtin_bswap32(x);
15110 main ()
15114 return 0;
15116 _ACEOF
15117 if ac_fn_c_try_link "$LINENO"; then :
15118 pgac_cv__builtin_bswap32=yes
15119 else
15120 pgac_cv__builtin_bswap32=no
15122 rm -f core conftest.err conftest.$ac_objext \
15123 conftest$ac_exeext conftest.$ac_ext
15125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15126 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15127 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15129 cat >>confdefs.h <<_ACEOF
15130 #define HAVE__BUILTIN_BSWAP32 1
15131 _ACEOF
15134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15135 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15136 if ${pgac_cv__builtin_bswap64+:} false; then :
15137 $as_echo_n "(cached) " >&6
15138 else
15139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15140 /* end confdefs.h. */
15143 call__builtin_bswap64(long int x)
15145 return __builtin_bswap64(x);
15148 main ()
15152 return 0;
15154 _ACEOF
15155 if ac_fn_c_try_link "$LINENO"; then :
15156 pgac_cv__builtin_bswap64=yes
15157 else
15158 pgac_cv__builtin_bswap64=no
15160 rm -f core conftest.err conftest.$ac_objext \
15161 conftest$ac_exeext conftest.$ac_ext
15163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15164 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15165 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15167 cat >>confdefs.h <<_ACEOF
15168 #define HAVE__BUILTIN_BSWAP64 1
15169 _ACEOF
15172 # We assume that we needn't test all widths of these explicitly:
15173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15174 $as_echo_n "checking for __builtin_clz... " >&6; }
15175 if ${pgac_cv__builtin_clz+:} false; then :
15176 $as_echo_n "(cached) " >&6
15177 else
15178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15179 /* end confdefs.h. */
15182 call__builtin_clz(unsigned int x)
15184 return __builtin_clz(x);
15187 main ()
15191 return 0;
15193 _ACEOF
15194 if ac_fn_c_try_link "$LINENO"; then :
15195 pgac_cv__builtin_clz=yes
15196 else
15197 pgac_cv__builtin_clz=no
15199 rm -f core conftest.err conftest.$ac_objext \
15200 conftest$ac_exeext conftest.$ac_ext
15202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15203 $as_echo "$pgac_cv__builtin_clz" >&6; }
15204 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15206 cat >>confdefs.h <<_ACEOF
15207 #define HAVE__BUILTIN_CLZ 1
15208 _ACEOF
15211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15212 $as_echo_n "checking for __builtin_ctz... " >&6; }
15213 if ${pgac_cv__builtin_ctz+:} false; then :
15214 $as_echo_n "(cached) " >&6
15215 else
15216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15217 /* end confdefs.h. */
15220 call__builtin_ctz(unsigned int x)
15222 return __builtin_ctz(x);
15225 main ()
15229 return 0;
15231 _ACEOF
15232 if ac_fn_c_try_link "$LINENO"; then :
15233 pgac_cv__builtin_ctz=yes
15234 else
15235 pgac_cv__builtin_ctz=no
15237 rm -f core conftest.err conftest.$ac_objext \
15238 conftest$ac_exeext conftest.$ac_ext
15240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15241 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15242 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15244 cat >>confdefs.h <<_ACEOF
15245 #define HAVE__BUILTIN_CTZ 1
15246 _ACEOF
15249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15250 $as_echo_n "checking for __builtin_popcount... " >&6; }
15251 if ${pgac_cv__builtin_popcount+:} false; then :
15252 $as_echo_n "(cached) " >&6
15253 else
15254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15255 /* end confdefs.h. */
15258 call__builtin_popcount(unsigned int x)
15260 return __builtin_popcount(x);
15263 main ()
15267 return 0;
15269 _ACEOF
15270 if ac_fn_c_try_link "$LINENO"; then :
15271 pgac_cv__builtin_popcount=yes
15272 else
15273 pgac_cv__builtin_popcount=no
15275 rm -f core conftest.err conftest.$ac_objext \
15276 conftest$ac_exeext conftest.$ac_ext
15278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15279 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15280 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15282 cat >>confdefs.h <<_ACEOF
15283 #define HAVE__BUILTIN_POPCOUNT 1
15284 _ACEOF
15287 # __builtin_frame_address may draw a diagnostic for non-constant argument,
15288 # so it needs a different test function.
15289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
15290 $as_echo_n "checking for __builtin_frame_address... " >&6; }
15291 if ${pgac_cv__builtin_frame_address+:} false; then :
15292 $as_echo_n "(cached) " >&6
15293 else
15294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15295 /* end confdefs.h. */
15297 void *
15298 call__builtin_frame_address(void)
15300 return __builtin_frame_address(0);
15303 main ()
15307 return 0;
15309 _ACEOF
15310 if ac_fn_c_try_link "$LINENO"; then :
15311 pgac_cv__builtin_frame_address=yes
15312 else
15313 pgac_cv__builtin_frame_address=no
15315 rm -f core conftest.err conftest.$ac_objext \
15316 conftest$ac_exeext conftest.$ac_ext
15318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5
15319 $as_echo "$pgac_cv__builtin_frame_address" >&6; }
15320 if test x"${pgac_cv__builtin_frame_address}" = xyes ; then
15322 cat >>confdefs.h <<_ACEOF
15323 #define HAVE__BUILTIN_FRAME_ADDRESS 1
15324 _ACEOF
15328 # We require 64-bit fseeko() to be available, but run this check anyway
15329 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
15330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15331 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15332 if ${ac_cv_sys_largefile_source+:} false; then :
15333 $as_echo_n "(cached) " >&6
15334 else
15335 while :; do
15336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15337 /* end confdefs.h. */
15338 #include <sys/types.h> /* for off_t */
15339 #include <stdio.h>
15341 main ()
15343 int (*fp) (FILE *, off_t, int) = fseeko;
15344 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15346 return 0;
15348 _ACEOF
15349 if ac_fn_c_try_link "$LINENO"; then :
15350 ac_cv_sys_largefile_source=no; break
15352 rm -f core conftest.err conftest.$ac_objext \
15353 conftest$ac_exeext conftest.$ac_ext
15354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15355 /* end confdefs.h. */
15356 #define _LARGEFILE_SOURCE 1
15357 #include <sys/types.h> /* for off_t */
15358 #include <stdio.h>
15360 main ()
15362 int (*fp) (FILE *, off_t, int) = fseeko;
15363 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15365 return 0;
15367 _ACEOF
15368 if ac_fn_c_try_link "$LINENO"; then :
15369 ac_cv_sys_largefile_source=1; break
15371 rm -f core conftest.err conftest.$ac_objext \
15372 conftest$ac_exeext conftest.$ac_ext
15373 ac_cv_sys_largefile_source=unknown
15374 break
15375 done
15377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15378 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15379 case $ac_cv_sys_largefile_source in #(
15380 no | unknown) ;;
15382 cat >>confdefs.h <<_ACEOF
15383 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15384 _ACEOF
15386 esac
15387 rm -rf conftest*
15389 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15390 # in glibc 2.1.3, but that breaks too many other things.
15391 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15392 if test $ac_cv_sys_largefile_source != unknown; then
15394 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15399 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15400 # by calling it, 2009-04-02
15401 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15402 # The Clang compiler raises a warning for an undeclared identifier that matches
15403 # a compiler builtin function. All extant Clang versions are affected, as of
15404 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
15405 # C and Objective C languages, but Clang does report an error under C++ and
15406 # Objective C++.
15408 # Passing -fno-builtin to the compiler would suppress this problem. That
15409 # strategy would have the advantage of being insensitive to stray warnings, but
15410 # it would make tests less realistic.
15411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15412 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15413 if ${ac_cv_c_decl_report+:} false; then :
15414 $as_echo_n "(cached) " >&6
15415 else
15416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15417 /* end confdefs.h. */
15420 main ()
15422 (void) strchr;
15424 return 0;
15426 _ACEOF
15427 if ac_fn_c_try_compile "$LINENO"; then :
15428 if test -s conftest.err; then :
15429 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15430 # valid AC_CHECK_DECL input. No library function is consistently available
15431 # on freestanding implementations, so test against a dummy declaration.
15432 # Include always-available headers on the off chance that they somehow
15433 # elicit warnings.
15434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15435 /* end confdefs.h. */
15436 #include <float.h>
15437 #include <limits.h>
15438 #include <stdarg.h>
15439 #include <stddef.h>
15440 extern void ac_decl (int, char *);
15442 main ()
15444 #ifdef __cplusplus
15445 (void) ac_decl ((int) 0, (char *) 0);
15446 (void) ac_decl;
15447 #else
15448 (void) ac_decl;
15449 #endif
15452 return 0;
15454 _ACEOF
15455 if ac_fn_c_try_compile "$LINENO"; then :
15456 if test -s conftest.err; then :
15457 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15458 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15459 as_fn_error $? "cannot detect from compiler exit status or warnings
15460 See \`config.log' for more details" "$LINENO" 5; }
15461 else
15462 ac_cv_c_decl_report=warning
15464 else
15465 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15466 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15467 as_fn_error $? "cannot compile a simple declaration test
15468 See \`config.log' for more details" "$LINENO" 5; }
15470 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15471 else
15472 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15473 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15474 as_fn_error $? "compiler does not report undeclared identifiers
15475 See \`config.log' for more details" "$LINENO" 5; }
15477 else
15478 ac_cv_c_decl_report=error
15480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15483 $as_echo "$ac_cv_c_decl_report" >&6; }
15485 case $ac_cv_c_decl_report in
15486 warning) ac_c_decl_warn_flag=yes ;;
15487 *) ac_c_decl_warn_flag= ;;
15488 esac
15490 if test "$PORTNAME" != "solaris"; then :
15492 for ac_func in posix_fadvise
15493 do :
15494 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15495 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15496 cat >>confdefs.h <<_ACEOF
15497 #define HAVE_POSIX_FADVISE 1
15498 _ACEOF
15501 done
15503 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15505 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15506 ac_have_decl=1
15507 else
15508 ac_have_decl=0
15511 cat >>confdefs.h <<_ACEOF
15512 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15513 _ACEOF
15516 fi # fi
15518 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15520 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15521 ac_have_decl=1
15522 else
15523 ac_have_decl=0
15526 cat >>confdefs.h <<_ACEOF
15527 #define HAVE_DECL_FDATASYNC $ac_have_decl
15528 _ACEOF
15530 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15531 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15532 ac_have_decl=1
15533 else
15534 ac_have_decl=0
15537 cat >>confdefs.h <<_ACEOF
15538 #define HAVE_DECL_STRLCAT $ac_have_decl
15539 _ACEOF
15540 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15541 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15542 ac_have_decl=1
15543 else
15544 ac_have_decl=0
15547 cat >>confdefs.h <<_ACEOF
15548 #define HAVE_DECL_STRLCPY $ac_have_decl
15549 _ACEOF
15550 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15551 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15552 ac_have_decl=1
15553 else
15554 ac_have_decl=0
15557 cat >>confdefs.h <<_ACEOF
15558 #define HAVE_DECL_STRNLEN $ac_have_decl
15559 _ACEOF
15560 ac_fn_c_check_decl "$LINENO" "strsep" "ac_cv_have_decl_strsep" "$ac_includes_default"
15561 if test "x$ac_cv_have_decl_strsep" = xyes; then :
15562 ac_have_decl=1
15563 else
15564 ac_have_decl=0
15567 cat >>confdefs.h <<_ACEOF
15568 #define HAVE_DECL_STRSEP $ac_have_decl
15569 _ACEOF
15572 # We can't use AC_CHECK_FUNCS to detect these functions, because it
15573 # won't handle deployment target restrictions on macOS
15574 ac_fn_c_check_decl "$LINENO" "preadv" "ac_cv_have_decl_preadv" "#include <sys/uio.h>
15576 if test "x$ac_cv_have_decl_preadv" = xyes; then :
15577 ac_have_decl=1
15578 else
15579 ac_have_decl=0
15582 cat >>confdefs.h <<_ACEOF
15583 #define HAVE_DECL_PREADV $ac_have_decl
15584 _ACEOF
15586 ac_fn_c_check_decl "$LINENO" "pwritev" "ac_cv_have_decl_pwritev" "#include <sys/uio.h>
15588 if test "x$ac_cv_have_decl_pwritev" = xyes; then :
15589 ac_have_decl=1
15590 else
15591 ac_have_decl=0
15594 cat >>confdefs.h <<_ACEOF
15595 #define HAVE_DECL_PWRITEV $ac_have_decl
15596 _ACEOF
15599 # This is probably only present on macOS, but may as well check always
15600 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15602 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15603 ac_have_decl=1
15604 else
15605 ac_have_decl=0
15608 cat >>confdefs.h <<_ACEOF
15609 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15610 _ACEOF
15613 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
15614 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
15615 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
15617 else
15618 case " $LIBOBJS " in
15619 *" explicit_bzero.$ac_objext "* ) ;;
15620 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
15622 esac
15626 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15627 if test "x$ac_cv_func_getopt" = xyes; then :
15628 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15630 else
15631 case " $LIBOBJS " in
15632 *" getopt.$ac_objext "* ) ;;
15633 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15635 esac
15639 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15640 if test "x$ac_cv_func_getpeereid" = xyes; then :
15641 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15643 else
15644 case " $LIBOBJS " in
15645 *" getpeereid.$ac_objext "* ) ;;
15646 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15648 esac
15652 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15653 if test "x$ac_cv_func_inet_aton" = xyes; then :
15654 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15656 else
15657 case " $LIBOBJS " in
15658 *" inet_aton.$ac_objext "* ) ;;
15659 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15661 esac
15665 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15666 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15667 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15669 else
15670 case " $LIBOBJS " in
15671 *" mkdtemp.$ac_objext "* ) ;;
15672 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15674 esac
15678 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15679 if test "x$ac_cv_func_strlcat" = xyes; then :
15680 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15682 else
15683 case " $LIBOBJS " in
15684 *" strlcat.$ac_objext "* ) ;;
15685 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15687 esac
15691 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15692 if test "x$ac_cv_func_strlcpy" = xyes; then :
15693 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15695 else
15696 case " $LIBOBJS " in
15697 *" strlcpy.$ac_objext "* ) ;;
15698 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15700 esac
15704 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15705 if test "x$ac_cv_func_strnlen" = xyes; then :
15706 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15708 else
15709 case " $LIBOBJS " in
15710 *" strnlen.$ac_objext "* ) ;;
15711 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15713 esac
15717 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
15718 if test "x$ac_cv_func_strsep" = xyes; then :
15719 $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
15721 else
15722 case " $LIBOBJS " in
15723 *" strsep.$ac_objext "* ) ;;
15724 *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
15726 esac
15732 ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
15733 if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
15734 $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
15736 else
15737 case " $LIBOBJS " in
15738 *" pthread_barrier_wait.$ac_objext "* ) ;;
15739 *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
15741 esac
15747 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
15748 # Cygwin and (apparently, based on test results) Mingw both
15749 # have a broken strtof(), so substitute its implementation.
15750 # That's not a perfect fix, since it doesn't avoid double-rounding,
15751 # but we have no better options.
15752 case " $LIBOBJS " in
15753 *" strtof.$ac_objext "* ) ;;
15754 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
15756 esac
15758 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
15759 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
15762 # Similarly, use system's getopt_long() only if system provides struct option.
15763 if test x"$ac_cv_type_struct_option" = xyes ; then
15764 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15765 if test "x$ac_cv_func_getopt_long" = xyes; then :
15766 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15768 else
15769 case " $LIBOBJS " in
15770 *" getopt_long.$ac_objext "* ) ;;
15771 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15773 esac
15778 else
15779 case " $LIBOBJS " in
15780 *" getopt_long.$ac_objext "* ) ;;
15781 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15783 esac
15787 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
15788 # (i.e., allow '-' as a flag character), so use our version on those platforms.
15789 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
15790 case " $LIBOBJS " in
15791 *" getopt.$ac_objext "* ) ;;
15792 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15794 esac
15798 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15799 # so always use our version on Windows.
15800 if test "$PORTNAME" = "win32"; then
15801 case " $LIBOBJS " in
15802 *" getopt.$ac_objext "* ) ;;
15803 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15805 esac
15807 case " $LIBOBJS " in
15808 *" getopt_long.$ac_objext "* ) ;;
15809 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15811 esac
15815 # Win32 (really MinGW) support
15816 if test "$PORTNAME" = "win32"; then
15817 for ac_func in _configthreadlocale
15818 do :
15819 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
15820 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
15821 cat >>confdefs.h <<_ACEOF
15822 #define HAVE__CONFIGTHREADLOCALE 1
15823 _ACEOF
15826 done
15828 case " $LIBOBJS " in
15829 *" dirmod.$ac_objext "* ) ;;
15830 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15832 esac
15834 case " $LIBOBJS " in
15835 *" kill.$ac_objext "* ) ;;
15836 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
15838 esac
15840 case " $LIBOBJS " in
15841 *" open.$ac_objext "* ) ;;
15842 *) LIBOBJS="$LIBOBJS open.$ac_objext"
15844 esac
15846 case " $LIBOBJS " in
15847 *" system.$ac_objext "* ) ;;
15848 *) LIBOBJS="$LIBOBJS system.$ac_objext"
15850 esac
15852 case " $LIBOBJS " in
15853 *" win32common.$ac_objext "* ) ;;
15854 *) LIBOBJS="$LIBOBJS win32common.$ac_objext"
15856 esac
15858 case " $LIBOBJS " in
15859 *" win32dlopen.$ac_objext "* ) ;;
15860 *) LIBOBJS="$LIBOBJS win32dlopen.$ac_objext"
15862 esac
15864 case " $LIBOBJS " in
15865 *" win32env.$ac_objext "* ) ;;
15866 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
15868 esac
15870 case " $LIBOBJS " in
15871 *" win32error.$ac_objext "* ) ;;
15872 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
15874 esac
15876 case " $LIBOBJS " in
15877 *" win32fdatasync.$ac_objext "* ) ;;
15878 *) LIBOBJS="$LIBOBJS win32fdatasync.$ac_objext"
15880 esac
15882 case " $LIBOBJS " in
15883 *" win32gai_strerror.$ac_objext "* ) ;;
15884 *) LIBOBJS="$LIBOBJS win32gai_strerror.$ac_objext"
15886 esac
15888 case " $LIBOBJS " in
15889 *" win32getrusage.$ac_objext "* ) ;;
15890 *) LIBOBJS="$LIBOBJS win32getrusage.$ac_objext"
15892 esac
15894 case " $LIBOBJS " in
15895 *" win32link.$ac_objext "* ) ;;
15896 *) LIBOBJS="$LIBOBJS win32link.$ac_objext"
15898 esac
15900 case " $LIBOBJS " in
15901 *" win32ntdll.$ac_objext "* ) ;;
15902 *) LIBOBJS="$LIBOBJS win32ntdll.$ac_objext"
15904 esac
15906 case " $LIBOBJS " in
15907 *" win32pread.$ac_objext "* ) ;;
15908 *) LIBOBJS="$LIBOBJS win32pread.$ac_objext"
15910 esac
15912 case " $LIBOBJS " in
15913 *" win32pwrite.$ac_objext "* ) ;;
15914 *) LIBOBJS="$LIBOBJS win32pwrite.$ac_objext"
15916 esac
15918 case " $LIBOBJS " in
15919 *" win32security.$ac_objext "* ) ;;
15920 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
15922 esac
15924 case " $LIBOBJS " in
15925 *" win32setlocale.$ac_objext "* ) ;;
15926 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
15928 esac
15930 case " $LIBOBJS " in
15931 *" win32stat.$ac_objext "* ) ;;
15932 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
15934 esac
15937 # Cygwin needs only a bit of that
15938 if test "$PORTNAME" = "cygwin"; then
15939 case " $LIBOBJS " in
15940 *" dirmod.$ac_objext "* ) ;;
15941 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15943 esac
15947 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
15948 if test "x$ac_cv_func_syslog" = xyes; then :
15949 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
15950 if test "x$ac_cv_header_syslog_h" = xyes; then :
15952 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
15960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
15961 $as_echo_n "checking for opterr... " >&6; }
15962 if ${pgac_cv_var_int_opterr+:} false; then :
15963 $as_echo_n "(cached) " >&6
15964 else
15965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15966 /* end confdefs.h. */
15967 #include <unistd.h>
15969 main ()
15971 extern int opterr; opterr = 1;
15973 return 0;
15975 _ACEOF
15976 if ac_fn_c_try_link "$LINENO"; then :
15977 pgac_cv_var_int_opterr=yes
15978 else
15979 pgac_cv_var_int_opterr=no
15981 rm -f core conftest.err conftest.$ac_objext \
15982 conftest$ac_exeext conftest.$ac_ext
15984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
15985 $as_echo "$pgac_cv_var_int_opterr" >&6; }
15986 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
15988 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
15992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
15993 $as_echo_n "checking for optreset... " >&6; }
15994 if ${pgac_cv_var_int_optreset+:} false; then :
15995 $as_echo_n "(cached) " >&6
15996 else
15997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15998 /* end confdefs.h. */
15999 #include <unistd.h>
16001 main ()
16003 extern int optreset; optreset = 1;
16005 return 0;
16007 _ACEOF
16008 if ac_fn_c_try_link "$LINENO"; then :
16009 pgac_cv_var_int_optreset=yes
16010 else
16011 pgac_cv_var_int_optreset=no
16013 rm -f core conftest.err conftest.$ac_objext \
16014 conftest$ac_exeext conftest.$ac_ext
16016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16017 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16018 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16020 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16024 if test "$with_icu" = yes; then
16025 ac_save_CPPFLAGS=$CPPFLAGS
16026 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16028 # Verify we have ICU's header files
16029 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16030 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16032 else
16033 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16038 CPPFLAGS=$ac_save_CPPFLAGS
16041 if test "$with_llvm" = yes; then
16043 # Check which functionality is present
16044 SAVE_CPPFLAGS="$CPPFLAGS"
16045 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16046 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16048 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16049 ac_have_decl=1
16050 else
16051 ac_have_decl=0
16054 cat >>confdefs.h <<_ACEOF
16055 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16056 _ACEOF
16057 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16059 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16060 ac_have_decl=1
16061 else
16062 ac_have_decl=0
16065 cat >>confdefs.h <<_ACEOF
16066 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16067 _ACEOF
16069 CPPFLAGS="$SAVE_CPPFLAGS"
16073 # Lastly, restore full LIBS list and check for readline/libedit symbols
16074 LIBS="$LIBS_including_readline"
16076 if test "$with_readline" = yes; then
16077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
16078 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
16079 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
16080 $as_echo_n "(cached) " >&6
16081 else
16082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16083 /* end confdefs.h. */
16084 #include <stdio.h>
16085 #if defined(HAVE_READLINE_READLINE_H)
16086 #include <readline/readline.h>
16087 #elif defined(HAVE_EDITLINE_READLINE_H)
16088 #include <editline/readline.h>
16089 #elif defined(HAVE_READLINE_H)
16090 #include <readline.h>
16091 #endif
16094 main ()
16096 rl_completion_suppress_quote = 1;
16098 return 0;
16100 _ACEOF
16101 if ac_fn_c_try_link "$LINENO"; then :
16102 pgac_cv_var_rl_completion_suppress_quote=yes
16103 else
16104 pgac_cv_var_rl_completion_suppress_quote=no
16106 rm -f core conftest.err conftest.$ac_objext \
16107 conftest$ac_exeext conftest.$ac_ext
16109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
16110 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
16111 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
16113 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
16116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
16117 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
16118 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
16119 $as_echo_n "(cached) " >&6
16120 else
16121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16122 /* end confdefs.h. */
16123 #include <stdio.h>
16124 #if defined(HAVE_READLINE_READLINE_H)
16125 #include <readline/readline.h>
16126 #elif defined(HAVE_EDITLINE_READLINE_H)
16127 #include <editline/readline.h>
16128 #elif defined(HAVE_READLINE_H)
16129 #include <readline.h>
16130 #endif
16133 main ()
16135 rl_filename_quote_characters = "x";
16137 return 0;
16139 _ACEOF
16140 if ac_fn_c_try_link "$LINENO"; then :
16141 pgac_cv_var_rl_filename_quote_characters=yes
16142 else
16143 pgac_cv_var_rl_filename_quote_characters=no
16145 rm -f core conftest.err conftest.$ac_objext \
16146 conftest$ac_exeext conftest.$ac_ext
16148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
16149 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
16150 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
16152 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
16155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
16156 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
16157 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
16158 $as_echo_n "(cached) " >&6
16159 else
16160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16161 /* end confdefs.h. */
16162 #include <stdio.h>
16163 #if defined(HAVE_READLINE_READLINE_H)
16164 #include <readline/readline.h>
16165 #elif defined(HAVE_EDITLINE_READLINE_H)
16166 #include <editline/readline.h>
16167 #elif defined(HAVE_READLINE_H)
16168 #include <readline.h>
16169 #endif
16172 main ()
16174 rl_filename_quoting_function = 0;
16176 return 0;
16178 _ACEOF
16179 if ac_fn_c_try_link "$LINENO"; then :
16180 pgac_cv_var_rl_filename_quoting_function=yes
16181 else
16182 pgac_cv_var_rl_filename_quoting_function=no
16184 rm -f core conftest.err conftest.$ac_objext \
16185 conftest$ac_exeext conftest.$ac_ext
16187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
16188 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
16189 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
16191 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
16195 for ac_func in append_history history_truncate_file rl_completion_matches rl_filename_completion_function rl_reset_screen_size rl_variable_bind
16196 do :
16197 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16198 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16199 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16200 cat >>confdefs.h <<_ACEOF
16201 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16202 _ACEOF
16205 done
16210 # This test makes sure that run tests work at all. Sometimes a shared
16211 # library is found by the linker, but the runtime linker can't find it.
16212 # This check should come after all modifications of compiler or linker
16213 # variables, and before any other run tests.
16214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16215 $as_echo_n "checking test program... " >&6; }
16216 if test "$cross_compiling" = yes; then :
16217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16218 $as_echo "cross-compiling" >&6; }
16219 else
16220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16221 /* end confdefs.h. */
16222 int main() { return 0; }
16223 _ACEOF
16224 if ac_fn_c_try_run "$LINENO"; then :
16225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16226 $as_echo "ok" >&6; }
16227 else
16228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16229 $as_echo "failed" >&6; }
16230 as_fn_error $? "
16231 Could not execute a simple test program. This may be a problem
16232 related to locating shared libraries. Check the file 'config.log'
16233 for the exact reason." "$LINENO" 5
16235 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16236 conftest.$ac_objext conftest.beam conftest.$ac_ext
16240 # --------------------
16241 # Run tests below here
16242 # --------------------
16245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16246 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16247 if ${pgac_cv_type_long_int_64+:} false; then :
16248 $as_echo_n "(cached) " >&6
16249 else
16250 if test "$cross_compiling" = yes; then :
16251 # If cross-compiling, check the size reported by the compiler and
16252 # trust that the arithmetic works.
16253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16254 /* end confdefs.h. */
16257 main ()
16259 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16260 test_array [0] = 0;
16261 return test_array [0];
16264 return 0;
16266 _ACEOF
16267 if ac_fn_c_try_compile "$LINENO"; then :
16268 pgac_cv_type_long_int_64=yes
16269 else
16270 pgac_cv_type_long_int_64=no
16272 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16273 else
16274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16275 /* end confdefs.h. */
16276 typedef long int ac_int64;
16279 * These are globals to discourage the compiler from folding all the
16280 * arithmetic tests down to compile-time constants.
16282 ac_int64 a = 20000001;
16283 ac_int64 b = 40000005;
16285 int does_int64_work()
16287 ac_int64 c,d;
16289 if (sizeof(ac_int64) != 8)
16290 return 0; /* definitely not the right size */
16292 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16293 c = a * b;
16294 d = (c + b) / b;
16295 if (d != a+1)
16296 return 0;
16297 return 1;
16301 main() {
16302 return (! does_int64_work());
16304 _ACEOF
16305 if ac_fn_c_try_run "$LINENO"; then :
16306 pgac_cv_type_long_int_64=yes
16307 else
16308 pgac_cv_type_long_int_64=no
16310 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16311 conftest.$ac_objext conftest.beam conftest.$ac_ext
16315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16316 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16318 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16319 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16321 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16326 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16327 pg_int64_type="long int"
16328 else
16329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16330 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16331 if ${pgac_cv_type_long_long_int_64+:} false; then :
16332 $as_echo_n "(cached) " >&6
16333 else
16334 if test "$cross_compiling" = yes; then :
16335 # If cross-compiling, check the size reported by the compiler and
16336 # trust that the arithmetic works.
16337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16338 /* end confdefs.h. */
16341 main ()
16343 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16344 test_array [0] = 0;
16345 return test_array [0];
16348 return 0;
16350 _ACEOF
16351 if ac_fn_c_try_compile "$LINENO"; then :
16352 pgac_cv_type_long_long_int_64=yes
16353 else
16354 pgac_cv_type_long_long_int_64=no
16356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16357 else
16358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16359 /* end confdefs.h. */
16360 typedef long long int ac_int64;
16363 * These are globals to discourage the compiler from folding all the
16364 * arithmetic tests down to compile-time constants.
16366 ac_int64 a = 20000001;
16367 ac_int64 b = 40000005;
16369 int does_int64_work()
16371 ac_int64 c,d;
16373 if (sizeof(ac_int64) != 8)
16374 return 0; /* definitely not the right size */
16376 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16377 c = a * b;
16378 d = (c + b) / b;
16379 if (d != a+1)
16380 return 0;
16381 return 1;
16385 main() {
16386 return (! does_int64_work());
16388 _ACEOF
16389 if ac_fn_c_try_run "$LINENO"; then :
16390 pgac_cv_type_long_long_int_64=yes
16391 else
16392 pgac_cv_type_long_long_int_64=no
16394 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16395 conftest.$ac_objext conftest.beam conftest.$ac_ext
16399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16400 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16402 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16403 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16405 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16409 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16410 pg_int64_type="long long int"
16411 else
16412 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16417 cat >>confdefs.h <<_ACEOF
16418 #define PG_INT64_TYPE $pg_int64_type
16419 _ACEOF
16422 # Select the printf length modifier that goes with that, too.
16423 if test x"$pg_int64_type" = x"long long int" ; then
16424 INT64_MODIFIER='"ll"'
16425 else
16426 INT64_MODIFIER='"l"'
16430 cat >>confdefs.h <<_ACEOF
16431 #define INT64_MODIFIER $INT64_MODIFIER
16432 _ACEOF
16435 # has to be down here, rather than with the other builtins, because
16436 # the test uses PG_INT64_TYPE.
16437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16438 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16439 if ${pgac_cv__builtin_op_overflow+:} false; then :
16440 $as_echo_n "(cached) " >&6
16441 else
16442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16443 /* end confdefs.h. */
16445 PG_INT64_TYPE a = 1;
16446 PG_INT64_TYPE b = 1;
16447 PG_INT64_TYPE result;
16448 int oflo;
16451 main ()
16453 oflo = __builtin_mul_overflow(a, b, &result);
16455 return 0;
16457 _ACEOF
16458 if ac_fn_c_try_link "$LINENO"; then :
16459 pgac_cv__builtin_op_overflow=yes
16460 else
16461 pgac_cv__builtin_op_overflow=no
16463 rm -f core conftest.err conftest.$ac_objext \
16464 conftest$ac_exeext conftest.$ac_ext
16466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16467 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16468 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16470 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16474 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16475 # The cast to long int works around a bug in the HP C Compiler
16476 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16477 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16478 # This bug is HP SR number 8606223364.
16479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16480 $as_echo_n "checking size of void *... " >&6; }
16481 if ${ac_cv_sizeof_void_p+:} false; then :
16482 $as_echo_n "(cached) " >&6
16483 else
16484 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
16486 else
16487 if test "$ac_cv_type_void_p" = yes; then
16488 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16489 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16490 as_fn_error 77 "cannot compute sizeof (void *)
16491 See \`config.log' for more details" "$LINENO" 5; }
16492 else
16493 ac_cv_sizeof_void_p=0
16498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16499 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16503 cat >>confdefs.h <<_ACEOF
16504 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16505 _ACEOF
16508 # The cast to long int works around a bug in the HP C Compiler
16509 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16510 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16511 # This bug is HP SR number 8606223364.
16512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16513 $as_echo_n "checking size of size_t... " >&6; }
16514 if ${ac_cv_sizeof_size_t+:} false; then :
16515 $as_echo_n "(cached) " >&6
16516 else
16517 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
16519 else
16520 if test "$ac_cv_type_size_t" = yes; then
16521 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16522 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16523 as_fn_error 77 "cannot compute sizeof (size_t)
16524 See \`config.log' for more details" "$LINENO" 5; }
16525 else
16526 ac_cv_sizeof_size_t=0
16531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16532 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16536 cat >>confdefs.h <<_ACEOF
16537 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16538 _ACEOF
16541 # The cast to long int works around a bug in the HP C Compiler
16542 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16543 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16544 # This bug is HP SR number 8606223364.
16545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16546 $as_echo_n "checking size of long... " >&6; }
16547 if ${ac_cv_sizeof_long+:} false; then :
16548 $as_echo_n "(cached) " >&6
16549 else
16550 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
16552 else
16553 if test "$ac_cv_type_long" = yes; then
16554 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16555 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16556 as_fn_error 77 "cannot compute sizeof (long)
16557 See \`config.log' for more details" "$LINENO" 5; }
16558 else
16559 ac_cv_sizeof_long=0
16564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16565 $as_echo "$ac_cv_sizeof_long" >&6; }
16569 cat >>confdefs.h <<_ACEOF
16570 #define SIZEOF_LONG $ac_cv_sizeof_long
16571 _ACEOF
16575 # Determine memory alignment requirements for the basic C data types.
16577 # The cast to long int works around a bug in the HP C Compiler,
16578 # see AC_CHECK_SIZEOF for more information.
16579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16580 $as_echo_n "checking alignment of short... " >&6; }
16581 if ${ac_cv_alignof_short+:} false; then :
16582 $as_echo_n "(cached) " >&6
16583 else
16584 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
16585 #ifndef offsetof
16586 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16587 #endif
16588 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16590 else
16591 if test "$ac_cv_type_short" = yes; then
16592 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16593 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16594 as_fn_error 77 "cannot compute alignment of short
16595 See \`config.log' for more details" "$LINENO" 5; }
16596 else
16597 ac_cv_alignof_short=0
16602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16603 $as_echo "$ac_cv_alignof_short" >&6; }
16607 cat >>confdefs.h <<_ACEOF
16608 #define ALIGNOF_SHORT $ac_cv_alignof_short
16609 _ACEOF
16612 # The cast to long int works around a bug in the HP C Compiler,
16613 # see AC_CHECK_SIZEOF for more information.
16614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16615 $as_echo_n "checking alignment of int... " >&6; }
16616 if ${ac_cv_alignof_int+:} false; then :
16617 $as_echo_n "(cached) " >&6
16618 else
16619 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
16620 #ifndef offsetof
16621 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16622 #endif
16623 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16625 else
16626 if test "$ac_cv_type_int" = yes; then
16627 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16628 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16629 as_fn_error 77 "cannot compute alignment of int
16630 See \`config.log' for more details" "$LINENO" 5; }
16631 else
16632 ac_cv_alignof_int=0
16637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16638 $as_echo "$ac_cv_alignof_int" >&6; }
16642 cat >>confdefs.h <<_ACEOF
16643 #define ALIGNOF_INT $ac_cv_alignof_int
16644 _ACEOF
16647 # The cast to long int works around a bug in the HP C Compiler,
16648 # see AC_CHECK_SIZEOF for more information.
16649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16650 $as_echo_n "checking alignment of long... " >&6; }
16651 if ${ac_cv_alignof_long+:} false; then :
16652 $as_echo_n "(cached) " >&6
16653 else
16654 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
16655 #ifndef offsetof
16656 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16657 #endif
16658 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16660 else
16661 if test "$ac_cv_type_long" = yes; then
16662 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16663 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16664 as_fn_error 77 "cannot compute alignment of long
16665 See \`config.log' for more details" "$LINENO" 5; }
16666 else
16667 ac_cv_alignof_long=0
16672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16673 $as_echo "$ac_cv_alignof_long" >&6; }
16677 cat >>confdefs.h <<_ACEOF
16678 #define ALIGNOF_LONG $ac_cv_alignof_long
16679 _ACEOF
16682 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16683 # The cast to long int works around a bug in the HP C Compiler,
16684 # see AC_CHECK_SIZEOF for more information.
16685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16686 $as_echo_n "checking alignment of long long int... " >&6; }
16687 if ${ac_cv_alignof_long_long_int+:} false; then :
16688 $as_echo_n "(cached) " >&6
16689 else
16690 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
16691 #ifndef offsetof
16692 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16693 #endif
16694 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16696 else
16697 if test "$ac_cv_type_long_long_int" = yes; then
16698 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16699 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16700 as_fn_error 77 "cannot compute alignment of long long int
16701 See \`config.log' for more details" "$LINENO" 5; }
16702 else
16703 ac_cv_alignof_long_long_int=0
16708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16709 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
16713 cat >>confdefs.h <<_ACEOF
16714 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16715 _ACEOF
16719 # The cast to long int works around a bug in the HP C Compiler,
16720 # see AC_CHECK_SIZEOF for more information.
16721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16722 $as_echo_n "checking alignment of double... " >&6; }
16723 if ${ac_cv_alignof_double+:} false; then :
16724 $as_echo_n "(cached) " >&6
16725 else
16726 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
16727 #ifndef offsetof
16728 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16729 #endif
16730 typedef struct { char x; double y; } ac__type_alignof_;"; then :
16732 else
16733 if test "$ac_cv_type_double" = yes; then
16734 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16735 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16736 as_fn_error 77 "cannot compute alignment of double
16737 See \`config.log' for more details" "$LINENO" 5; }
16738 else
16739 ac_cv_alignof_double=0
16744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
16745 $as_echo "$ac_cv_alignof_double" >&6; }
16749 cat >>confdefs.h <<_ACEOF
16750 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
16751 _ACEOF
16755 # Compute maximum alignment of any basic type.
16757 # We require 'double' to have the strictest alignment among the basic types,
16758 # because otherwise the C ABI might impose 8-byte alignment on some of the
16759 # other C types that correspond to TYPALIGN_DOUBLE SQL types. That could
16760 # cause a mismatch between the tuple layout and the C struct layout of a
16761 # catalog tuple. We used to carefully order catalog columns such that any
16762 # fixed-width, attalign=4 columns were at offsets divisible by 8 regardless
16763 # of MAXIMUM_ALIGNOF to avoid that, but we no longer support any platforms
16764 # where TYPALIGN_DOUBLE != MAXIMUM_ALIGNOF.
16766 # We assume without checking that long's alignment is at least as strong as
16767 # char, short, or int. Note that we intentionally do not consider any types
16768 # wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8 would be too
16769 # much of a penalty for disk and memory space.
16771 MAX_ALIGNOF=$ac_cv_alignof_double
16773 if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
16774 as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5
16776 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $ac_cv_alignof_long_long_int -gt $MAX_ALIGNOF ; then
16777 as_fn_error $? "alignment of 'long long int' is greater than the alignment of 'double'" "$LINENO" 5
16780 cat >>confdefs.h <<_ACEOF
16781 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
16782 _ACEOF
16786 # Some compilers offer a 128-bit integer scalar type.
16787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
16788 $as_echo_n "checking for __int128... " >&6; }
16789 if ${pgac_cv__128bit_int+:} false; then :
16790 $as_echo_n "(cached) " >&6
16791 else
16792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16793 /* end confdefs.h. */
16796 * We don't actually run this test, just link it to verify that any support
16797 * functions needed for __int128 are present.
16799 * These are globals to discourage the compiler from folding all the
16800 * arithmetic tests down to compile-time constants. We do not have
16801 * convenient support for 128bit literals at this point...
16803 __int128 a = 48828125;
16804 __int128 b = 97656250;
16807 main ()
16810 __int128 c,d;
16811 a = (a << 12) + 1; /* 200000000001 */
16812 b = (b << 12) + 5; /* 400000000005 */
16813 /* try the most relevant arithmetic ops */
16814 c = a * b;
16815 d = (c + b) / b;
16816 /* must use the results, else compiler may optimize arithmetic away */
16817 if (d != a+1)
16818 return 1;
16821 return 0;
16823 _ACEOF
16824 if ac_fn_c_try_link "$LINENO"; then :
16825 pgac_cv__128bit_int=yes
16826 else
16827 pgac_cv__128bit_int=no
16829 rm -f core conftest.err conftest.$ac_objext \
16830 conftest$ac_exeext conftest.$ac_ext
16832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
16833 $as_echo "$pgac_cv__128bit_int" >&6; }
16834 if test x"$pgac_cv__128bit_int" = xyes ; then
16835 # Use of non-default alignment with __int128 tickles bugs in some compilers.
16836 # If not cross-compiling, we can test for bugs and disable use of __int128
16837 # with buggy compilers. If cross-compiling, hope for the best.
16838 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
16839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
16840 $as_echo_n "checking for __int128 alignment bug... " >&6; }
16841 if ${pgac_cv__128bit_int_bug+:} false; then :
16842 $as_echo_n "(cached) " >&6
16843 else
16844 if test "$cross_compiling" = yes; then :
16845 pgac_cv__128bit_int_bug="assuming ok"
16846 else
16847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16848 /* end confdefs.h. */
16850 /* This must match the corresponding code in c.h: */
16851 #if defined(__GNUC__) || defined(__SUNPRO_C)
16852 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
16853 #elif defined(_MSC_VER)
16854 #define pg_attribute_aligned(a) __declspec(align(a))
16855 #endif
16856 typedef __int128 int128a
16857 #if defined(pg_attribute_aligned)
16858 pg_attribute_aligned(8)
16859 #endif
16861 int128a holder;
16862 void pass_by_val(void *buffer, int128a par) { holder = par; }
16865 main ()
16868 long int i64 = 97656225L << 12;
16869 int128a q;
16870 pass_by_val(main, (int128a) i64);
16871 q = (int128a) i64;
16872 if (q != holder)
16873 return 1;
16876 return 0;
16878 _ACEOF
16879 if ac_fn_c_try_run "$LINENO"; then :
16880 pgac_cv__128bit_int_bug=ok
16881 else
16882 pgac_cv__128bit_int_bug=broken
16884 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16885 conftest.$ac_objext conftest.beam conftest.$ac_ext
16889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
16890 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
16891 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
16893 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
16895 # The cast to long int works around a bug in the HP C Compiler,
16896 # see AC_CHECK_SIZEOF for more information.
16897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
16898 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
16899 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
16900 $as_echo_n "(cached) " >&6
16901 else
16902 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
16903 #ifndef offsetof
16904 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16905 #endif
16906 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
16908 else
16909 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
16910 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16911 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16912 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
16913 See \`config.log' for more details" "$LINENO" 5; }
16914 else
16915 ac_cv_alignof_PG_INT128_TYPE=0
16920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
16921 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
16925 cat >>confdefs.h <<_ACEOF
16926 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
16927 _ACEOF
16933 # Check for various atomic operations now that we have checked how to declare
16934 # 64bit integers.
16935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
16936 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
16937 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
16938 $as_echo_n "(cached) " >&6
16939 else
16940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16941 /* end confdefs.h. */
16944 main ()
16946 char lock = 0;
16947 __sync_lock_test_and_set(&lock, 1);
16948 __sync_lock_release(&lock);
16950 return 0;
16952 _ACEOF
16953 if ac_fn_c_try_link "$LINENO"; then :
16954 pgac_cv_gcc_sync_char_tas="yes"
16955 else
16956 pgac_cv_gcc_sync_char_tas="no"
16958 rm -f core conftest.err conftest.$ac_objext \
16959 conftest$ac_exeext conftest.$ac_ext
16961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
16962 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
16963 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
16965 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
16968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
16969 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
16970 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
16971 $as_echo_n "(cached) " >&6
16972 else
16973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16974 /* end confdefs.h. */
16977 main ()
16979 int lock = 0;
16980 __sync_lock_test_and_set(&lock, 1);
16981 __sync_lock_release(&lock);
16983 return 0;
16985 _ACEOF
16986 if ac_fn_c_try_link "$LINENO"; then :
16987 pgac_cv_gcc_sync_int32_tas="yes"
16988 else
16989 pgac_cv_gcc_sync_int32_tas="no"
16991 rm -f core conftest.err conftest.$ac_objext \
16992 conftest$ac_exeext conftest.$ac_ext
16994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
16995 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
16996 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
16998 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17002 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17003 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17004 $as_echo_n "(cached) " >&6
17005 else
17006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17007 /* end confdefs.h. */
17010 main ()
17012 int val = 0;
17013 __sync_val_compare_and_swap(&val, 0, 37);
17015 return 0;
17017 _ACEOF
17018 if ac_fn_c_try_link "$LINENO"; then :
17019 pgac_cv_gcc_sync_int32_cas="yes"
17020 else
17021 pgac_cv_gcc_sync_int32_cas="no"
17023 rm -f core conftest.err conftest.$ac_objext \
17024 conftest$ac_exeext conftest.$ac_ext
17026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17027 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17028 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17030 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17034 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17035 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17036 $as_echo_n "(cached) " >&6
17037 else
17038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17039 /* end confdefs.h. */
17042 main ()
17044 PG_INT64_TYPE lock = 0;
17045 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17047 return 0;
17049 _ACEOF
17050 if ac_fn_c_try_link "$LINENO"; then :
17051 pgac_cv_gcc_sync_int64_cas="yes"
17052 else
17053 pgac_cv_gcc_sync_int64_cas="no"
17055 rm -f core conftest.err conftest.$ac_objext \
17056 conftest$ac_exeext conftest.$ac_ext
17058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17059 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17060 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17062 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17066 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17067 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17068 $as_echo_n "(cached) " >&6
17069 else
17070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17071 /* end confdefs.h. */
17074 main ()
17076 int val = 0;
17077 int expect = 0;
17078 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17080 return 0;
17082 _ACEOF
17083 if ac_fn_c_try_link "$LINENO"; then :
17084 pgac_cv_gcc_atomic_int32_cas="yes"
17085 else
17086 pgac_cv_gcc_atomic_int32_cas="no"
17088 rm -f core conftest.err conftest.$ac_objext \
17089 conftest$ac_exeext conftest.$ac_ext
17091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17092 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17093 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17095 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17099 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17100 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17101 $as_echo_n "(cached) " >&6
17102 else
17103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17104 /* end confdefs.h. */
17107 main ()
17109 PG_INT64_TYPE val = 0;
17110 PG_INT64_TYPE expect = 0;
17111 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17113 return 0;
17115 _ACEOF
17116 if ac_fn_c_try_link "$LINENO"; then :
17117 pgac_cv_gcc_atomic_int64_cas="yes"
17118 else
17119 pgac_cv_gcc_atomic_int64_cas="no"
17121 rm -f core conftest.err conftest.$ac_objext \
17122 conftest$ac_exeext conftest.$ac_ext
17124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17125 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17126 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17128 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17133 # Check for x86 cpuid instruction
17134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17135 $as_echo_n "checking for __get_cpuid... " >&6; }
17136 if ${pgac_cv__get_cpuid+:} false; then :
17137 $as_echo_n "(cached) " >&6
17138 else
17139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17140 /* end confdefs.h. */
17141 #include <cpuid.h>
17143 main ()
17145 unsigned int exx[4] = {0, 0, 0, 0};
17146 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17149 return 0;
17151 _ACEOF
17152 if ac_fn_c_try_link "$LINENO"; then :
17153 pgac_cv__get_cpuid="yes"
17154 else
17155 pgac_cv__get_cpuid="no"
17157 rm -f core conftest.err conftest.$ac_objext \
17158 conftest$ac_exeext conftest.$ac_ext
17160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17161 $as_echo "$pgac_cv__get_cpuid" >&6; }
17162 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17164 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid_count" >&5
17169 $as_echo_n "checking for __get_cpuid_count... " >&6; }
17170 if ${pgac_cv__get_cpuid_count+:} false; then :
17171 $as_echo_n "(cached) " >&6
17172 else
17173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17174 /* end confdefs.h. */
17175 #include <cpuid.h>
17177 main ()
17179 unsigned int exx[4] = {0, 0, 0, 0};
17180 __get_cpuid_count(7, 0, &exx[0], &exx[1], &exx[2], &exx[3]);
17183 return 0;
17185 _ACEOF
17186 if ac_fn_c_try_link "$LINENO"; then :
17187 pgac_cv__get_cpuid_count="yes"
17188 else
17189 pgac_cv__get_cpuid_count="no"
17191 rm -f core conftest.err conftest.$ac_objext \
17192 conftest$ac_exeext conftest.$ac_ext
17194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid_count" >&5
17195 $as_echo "$pgac_cv__get_cpuid_count" >&6; }
17196 if test x"$pgac_cv__get_cpuid_count" = x"yes"; then
17198 $as_echo "#define HAVE__GET_CPUID_COUNT 1" >>confdefs.h
17202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17203 $as_echo_n "checking for __cpuid... " >&6; }
17204 if ${pgac_cv__cpuid+:} false; then :
17205 $as_echo_n "(cached) " >&6
17206 else
17207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17208 /* end confdefs.h. */
17209 #include <intrin.h>
17211 main ()
17213 unsigned int exx[4] = {0, 0, 0, 0};
17214 __get_cpuid(exx[0], 1);
17217 return 0;
17219 _ACEOF
17220 if ac_fn_c_try_link "$LINENO"; then :
17221 pgac_cv__cpuid="yes"
17222 else
17223 pgac_cv__cpuid="no"
17225 rm -f core conftest.err conftest.$ac_objext \
17226 conftest$ac_exeext conftest.$ac_ext
17228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17229 $as_echo "$pgac_cv__cpuid" >&6; }
17230 if test x"$pgac_cv__cpuid" = x"yes"; then
17232 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuidex" >&5
17237 $as_echo_n "checking for __cpuidex... " >&6; }
17238 if ${pgac_cv__cpuidex+:} false; then :
17239 $as_echo_n "(cached) " >&6
17240 else
17241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17242 /* end confdefs.h. */
17243 #include <intrin.h>
17245 main ()
17247 unsigned int exx[4] = {0, 0, 0, 0};
17248 __get_cpuidex(exx[0], 7, 0);
17251 return 0;
17253 _ACEOF
17254 if ac_fn_c_try_link "$LINENO"; then :
17255 pgac_cv__cpuidex="yes"
17256 else
17257 pgac_cv__cpuidex="no"
17259 rm -f core conftest.err conftest.$ac_objext \
17260 conftest$ac_exeext conftest.$ac_ext
17262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuidex" >&5
17263 $as_echo "$pgac_cv__cpuidex" >&6; }
17264 if test x"$pgac_cv__cpuidex" = x"yes"; then
17266 $as_echo "#define HAVE__CPUIDEX 1" >>confdefs.h
17270 # Check for XSAVE intrinsics
17272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xgetbv" >&5
17273 $as_echo_n "checking for _xgetbv... " >&6; }
17274 if ${pgac_cv_xsave_intrinsics+:} false; then :
17275 $as_echo_n "(cached) " >&6
17276 else
17277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17278 /* end confdefs.h. */
17279 #include <immintrin.h>
17280 #if defined(__has_attribute) && __has_attribute (target)
17281 __attribute__((target("xsave")))
17282 #endif
17283 static int xsave_test(void)
17285 return _xgetbv(0) & 0xe0;
17288 main ()
17290 return xsave_test();
17292 return 0;
17294 _ACEOF
17295 if ac_fn_c_try_link "$LINENO"; then :
17296 pgac_cv_xsave_intrinsics=yes
17297 else
17298 pgac_cv_xsave_intrinsics=no
17300 rm -f core conftest.err conftest.$ac_objext \
17301 conftest$ac_exeext conftest.$ac_ext
17303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_xsave_intrinsics" >&5
17304 $as_echo "$pgac_cv_xsave_intrinsics" >&6; }
17305 if test x"$pgac_cv_xsave_intrinsics" = x"yes"; then
17306 pgac_xsave_intrinsics=yes
17309 if test x"$pgac_xsave_intrinsics" = x"yes"; then
17311 $as_echo "#define HAVE_XSAVE_INTRINSICS 1" >>confdefs.h
17315 # Check for AVX-512 popcount intrinsics
17317 if test x"$host_cpu" = x"x86_64"; then
17318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm512_popcnt_epi64" >&5
17319 $as_echo_n "checking for _mm512_popcnt_epi64... " >&6; }
17320 if ${pgac_cv_avx512_popcnt_intrinsics+:} false; then :
17321 $as_echo_n "(cached) " >&6
17322 else
17323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17324 /* end confdefs.h. */
17325 #include <immintrin.h>
17326 #if defined(__has_attribute) && __has_attribute (target)
17327 __attribute__((target("avx512vpopcntdq,avx512bw")))
17328 #endif
17329 static int popcount_test(void)
17331 const char buf[sizeof(__m512i)];
17332 PG_INT64_TYPE popcnt = 0;
17333 __m512i accum = _mm512_setzero_si512();
17334 const __m512i val = _mm512_maskz_loadu_epi8((__mmask64) 0xf0f0f0f0f0f0f0f0, (const __m512i *) buf);
17335 const __m512i cnt = _mm512_popcnt_epi64(val);
17336 accum = _mm512_add_epi64(accum, cnt);
17337 popcnt = _mm512_reduce_add_epi64(accum);
17338 return (int) popcnt;
17341 main ()
17343 return popcount_test();
17345 return 0;
17347 _ACEOF
17348 if ac_fn_c_try_link "$LINENO"; then :
17349 pgac_cv_avx512_popcnt_intrinsics=yes
17350 else
17351 pgac_cv_avx512_popcnt_intrinsics=no
17353 rm -f core conftest.err conftest.$ac_objext \
17354 conftest$ac_exeext conftest.$ac_ext
17356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_avx512_popcnt_intrinsics" >&5
17357 $as_echo "$pgac_cv_avx512_popcnt_intrinsics" >&6; }
17358 if test x"$pgac_cv_avx512_popcnt_intrinsics" = x"yes"; then
17359 pgac_avx512_popcnt_intrinsics=yes
17362 if test x"$pgac_avx512_popcnt_intrinsics" = x"yes"; then
17364 $as_echo "#define USE_AVX512_POPCNT_WITH_RUNTIME_CHECK 1" >>confdefs.h
17369 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17371 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17372 # with the default compiler flags. If not, check if adding the -msse4.2
17373 # flag helps. CFLAGS_CRC is set to -msse4.2 if that's required.
17374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17375 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17376 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17377 $as_echo_n "(cached) " >&6
17378 else
17379 pgac_save_CFLAGS=$CFLAGS
17380 CFLAGS="$pgac_save_CFLAGS "
17381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17382 /* end confdefs.h. */
17383 #include <nmmintrin.h>
17385 main ()
17387 unsigned int crc = 0;
17388 crc = _mm_crc32_u8(crc, 0);
17389 crc = _mm_crc32_u32(crc, 0);
17390 /* return computed value, to prevent the above being optimized away */
17391 return crc == 0;
17393 return 0;
17395 _ACEOF
17396 if ac_fn_c_try_link "$LINENO"; then :
17397 pgac_cv_sse42_crc32_intrinsics_=yes
17398 else
17399 pgac_cv_sse42_crc32_intrinsics_=no
17401 rm -f core conftest.err conftest.$ac_objext \
17402 conftest$ac_exeext conftest.$ac_ext
17403 CFLAGS="$pgac_save_CFLAGS"
17405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17406 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17407 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17408 CFLAGS_CRC=""
17409 pgac_sse42_crc32_intrinsics=yes
17412 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17414 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17415 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17416 $as_echo_n "(cached) " >&6
17417 else
17418 pgac_save_CFLAGS=$CFLAGS
17419 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17421 /* end confdefs.h. */
17422 #include <nmmintrin.h>
17424 main ()
17426 unsigned int crc = 0;
17427 crc = _mm_crc32_u8(crc, 0);
17428 crc = _mm_crc32_u32(crc, 0);
17429 /* return computed value, to prevent the above being optimized away */
17430 return crc == 0;
17432 return 0;
17434 _ACEOF
17435 if ac_fn_c_try_link "$LINENO"; then :
17436 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17437 else
17438 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17440 rm -f core conftest.err conftest.$ac_objext \
17441 conftest$ac_exeext conftest.$ac_ext
17442 CFLAGS="$pgac_save_CFLAGS"
17444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17445 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17446 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17447 CFLAGS_CRC="-msse4.2"
17448 pgac_sse42_crc32_intrinsics=yes
17453 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17454 # define __SSE4_2__ in that case.
17455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17456 /* end confdefs.h. */
17459 main ()
17462 #ifndef __SSE4_2__
17463 #error __SSE4_2__ not defined
17464 #endif
17467 return 0;
17469 _ACEOF
17470 if ac_fn_c_try_compile "$LINENO"; then :
17471 SSE4_2_TARGETED=1
17473 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17475 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17477 # First check if __crc32c* intrinsics can be used with the default compiler
17478 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17479 # CFLAGS_CRC is set if the extra flag is required.
17480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17481 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17482 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17483 $as_echo_n "(cached) " >&6
17484 else
17485 pgac_save_CFLAGS=$CFLAGS
17486 CFLAGS="$pgac_save_CFLAGS "
17487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17488 /* end confdefs.h. */
17489 #include <arm_acle.h>
17491 main ()
17493 unsigned int crc = 0;
17494 crc = __crc32cb(crc, 0);
17495 crc = __crc32ch(crc, 0);
17496 crc = __crc32cw(crc, 0);
17497 crc = __crc32cd(crc, 0);
17498 /* return computed value, to prevent the above being optimized away */
17499 return crc == 0;
17501 return 0;
17503 _ACEOF
17504 if ac_fn_c_try_link "$LINENO"; then :
17505 pgac_cv_armv8_crc32c_intrinsics_=yes
17506 else
17507 pgac_cv_armv8_crc32c_intrinsics_=no
17509 rm -f core conftest.err conftest.$ac_objext \
17510 conftest$ac_exeext conftest.$ac_ext
17511 CFLAGS="$pgac_save_CFLAGS"
17513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17514 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17515 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17516 CFLAGS_CRC=""
17517 pgac_armv8_crc32c_intrinsics=yes
17520 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17522 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17523 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17524 $as_echo_n "(cached) " >&6
17525 else
17526 pgac_save_CFLAGS=$CFLAGS
17527 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17529 /* end confdefs.h. */
17530 #include <arm_acle.h>
17532 main ()
17534 unsigned int crc = 0;
17535 crc = __crc32cb(crc, 0);
17536 crc = __crc32ch(crc, 0);
17537 crc = __crc32cw(crc, 0);
17538 crc = __crc32cd(crc, 0);
17539 /* return computed value, to prevent the above being optimized away */
17540 return crc == 0;
17542 return 0;
17544 _ACEOF
17545 if ac_fn_c_try_link "$LINENO"; then :
17546 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17547 else
17548 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17550 rm -f core conftest.err conftest.$ac_objext \
17551 conftest$ac_exeext conftest.$ac_ext
17552 CFLAGS="$pgac_save_CFLAGS"
17554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17555 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17556 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17557 CFLAGS_CRC="-march=armv8-a+crc"
17558 pgac_armv8_crc32c_intrinsics=yes
17563 # Check for LoongArch CRC intrinsics to do CRC calculations.
17565 # Check if __builtin_loongarch_crcc_* intrinsics can be used
17566 # with the default compiler flags.
17567 { $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
17568 $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; }
17569 if ${pgac_cv_loongarch_crc32c_intrinsics+:} false; then :
17570 $as_echo_n "(cached) " >&6
17571 else
17572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17573 /* end confdefs.h. */
17576 main ()
17578 unsigned int crc = 0;
17579 crc = __builtin_loongarch_crcc_w_b_w(0, crc);
17580 crc = __builtin_loongarch_crcc_w_h_w(0, crc);
17581 crc = __builtin_loongarch_crcc_w_w_w(0, crc);
17582 crc = __builtin_loongarch_crcc_w_d_w(0, crc);
17583 /* return computed value, to prevent the above being optimized away */
17584 return crc == 0;
17586 return 0;
17588 _ACEOF
17589 if ac_fn_c_try_link "$LINENO"; then :
17590 pgac_cv_loongarch_crc32c_intrinsics=yes
17591 else
17592 pgac_cv_loongarch_crc32c_intrinsics=no
17594 rm -f core conftest.err conftest.$ac_objext \
17595 conftest$ac_exeext conftest.$ac_ext
17597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_loongarch_crc32c_intrinsics" >&5
17598 $as_echo "$pgac_cv_loongarch_crc32c_intrinsics" >&6; }
17599 if test x"$pgac_cv_loongarch_crc32c_intrinsics" = x"yes"; then
17600 pgac_loongarch_crc32c_intrinsics=yes
17606 # Select CRC-32C implementation.
17608 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17609 # use the special CRC instructions for calculating CRC-32C. If we're not
17610 # targeting such a processor, but we can nevertheless produce code that uses
17611 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17612 # implementations and select which one to use at runtime, depending on whether
17613 # SSE 4.2 is supported by the processor we're running on.
17615 # Similarly, if we are targeting an ARM processor that has the CRC
17616 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17617 # we're not targeting such a processor, but can nevertheless produce code that
17618 # uses the CRC instructions, compile both, and select at runtime.
17620 # You can skip the runtime check by setting the appropriate USE_*_CRC32 flag to 1
17621 # in the template or configure command line.
17623 # If we are targeting a LoongArch processor, CRC instructions are
17624 # always available (at least on 64 bit), so no runtime check is needed.
17625 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
17626 # Use Intel SSE 4.2 if available.
17627 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17628 USE_SSE42_CRC32C=1
17629 else
17630 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17631 # the runtime check.
17632 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
17633 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17634 else
17635 # Use ARM CRC Extension if available.
17636 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_CRC" = x""; then
17637 USE_ARMV8_CRC32C=1
17638 else
17639 # ARM CRC Extension, with runtime check?
17640 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17641 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17642 else
17643 # LoongArch CRCC instructions.
17644 if test x"$pgac_loongarch_crc32c_intrinsics" = x"yes"; then
17645 USE_LOONGARCH_CRC32C=1
17646 else
17647 # fall back to slicing-by-8 algorithm, which doesn't require any
17648 # special CPU support.
17649 USE_SLICING_BY_8_CRC32C=1
17657 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17659 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17660 if test x"$USE_SSE42_CRC32C" = x"1"; then
17662 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17664 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17666 $as_echo "SSE 4.2" >&6; }
17667 else
17668 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17670 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17672 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17674 $as_echo "SSE 4.2 with runtime check" >&6; }
17675 else
17676 if test x"$USE_ARMV8_CRC32C" = x"1"; then
17678 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17680 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17682 $as_echo "ARMv8 CRC instructions" >&6; }
17683 else
17684 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17686 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17688 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17690 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17691 else
17692 if test x"$USE_LOONGARCH_CRC32C" = x"1"; then
17694 $as_echo "#define USE_LOONGARCH_CRC32C 1" >>confdefs.h
17696 PG_CRC32C_OBJS="pg_crc32c_loongarch.o"
17697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: LoongArch CRCC instructions" >&5
17698 $as_echo "LoongArch CRCC instructions" >&6; }
17699 else
17701 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17703 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17705 $as_echo "slicing-by-8" >&6; }
17714 # Select semaphore implementation type.
17715 if test "$PORTNAME" != "win32"; then
17716 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17717 # Need sem_open for this
17718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17719 $as_echo_n "checking for library containing sem_open... " >&6; }
17720 if ${ac_cv_search_sem_open+:} false; then :
17721 $as_echo_n "(cached) " >&6
17722 else
17723 ac_func_search_save_LIBS=$LIBS
17724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17725 /* end confdefs.h. */
17727 /* Override any GCC internal prototype to avoid an error.
17728 Use char because int might match the return type of a GCC
17729 builtin and then its argument prototype would still apply. */
17730 #ifdef __cplusplus
17731 extern "C"
17732 #endif
17733 char sem_open ();
17735 main ()
17737 return sem_open ();
17739 return 0;
17741 _ACEOF
17742 for ac_lib in '' rt pthread; do
17743 if test -z "$ac_lib"; then
17744 ac_res="none required"
17745 else
17746 ac_res=-l$ac_lib
17747 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17749 if ac_fn_c_try_link "$LINENO"; then :
17750 ac_cv_search_sem_open=$ac_res
17752 rm -f core conftest.err conftest.$ac_objext \
17753 conftest$ac_exeext
17754 if ${ac_cv_search_sem_open+:} false; then :
17755 break
17757 done
17758 if ${ac_cv_search_sem_open+:} false; then :
17760 else
17761 ac_cv_search_sem_open=no
17763 rm conftest.$ac_ext
17764 LIBS=$ac_func_search_save_LIBS
17766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17767 $as_echo "$ac_cv_search_sem_open" >&6; }
17768 ac_res=$ac_cv_search_sem_open
17769 if test "$ac_res" != no; then :
17770 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17771 USE_NAMED_POSIX_SEMAPHORES=1
17775 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17776 # Need sem_init for this
17777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17778 $as_echo_n "checking for library containing sem_init... " >&6; }
17779 if ${ac_cv_search_sem_init+:} false; then :
17780 $as_echo_n "(cached) " >&6
17781 else
17782 ac_func_search_save_LIBS=$LIBS
17783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17784 /* end confdefs.h. */
17786 /* Override any GCC internal prototype to avoid an error.
17787 Use char because int might match the return type of a GCC
17788 builtin and then its argument prototype would still apply. */
17789 #ifdef __cplusplus
17790 extern "C"
17791 #endif
17792 char sem_init ();
17794 main ()
17796 return sem_init ();
17798 return 0;
17800 _ACEOF
17801 for ac_lib in '' rt pthread; do
17802 if test -z "$ac_lib"; then
17803 ac_res="none required"
17804 else
17805 ac_res=-l$ac_lib
17806 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17808 if ac_fn_c_try_link "$LINENO"; then :
17809 ac_cv_search_sem_init=$ac_res
17811 rm -f core conftest.err conftest.$ac_objext \
17812 conftest$ac_exeext
17813 if ${ac_cv_search_sem_init+:} false; then :
17814 break
17816 done
17817 if ${ac_cv_search_sem_init+:} false; then :
17819 else
17820 ac_cv_search_sem_init=no
17822 rm conftest.$ac_ext
17823 LIBS=$ac_func_search_save_LIBS
17825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17826 $as_echo "$ac_cv_search_sem_init" >&6; }
17827 ac_res=$ac_cv_search_sem_init
17828 if test "$ac_res" != no; then :
17829 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17830 USE_UNNAMED_POSIX_SEMAPHORES=1
17834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17835 $as_echo_n "checking which semaphore API to use... " >&6; }
17836 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17838 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17840 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17841 sematype="named POSIX"
17842 else
17843 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17845 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17847 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17848 sematype="unnamed POSIX"
17849 else
17851 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17853 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17854 sematype="System V"
17857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17858 $as_echo "$sematype" >&6; }
17859 else
17861 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17863 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
17867 # Select shared-memory implementation type.
17868 if test "$PORTNAME" != "win32"; then
17870 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
17872 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17873 else
17875 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
17877 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
17880 # Select random number source. If a TLS library is used then it will be the
17881 # first choice, else the native platform sources (Windows API or /dev/urandom)
17882 # will be used.
17883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
17884 $as_echo_n "checking which random number source to use... " >&6; }
17885 if test x"$with_ssl" = x"openssl" ; then
17886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
17887 $as_echo "OpenSSL" >&6; }
17888 elif test x"$PORTNAME" = x"win32" ; then
17889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
17890 $as_echo "Windows native" >&6; }
17891 elif test x"$cross_compiling" = x"yes"; then
17892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming /dev/urandom" >&5
17893 $as_echo "assuming /dev/urandom" >&6; }
17894 else
17895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
17896 $as_echo "/dev/urandom" >&6; }
17897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
17898 $as_echo_n "checking for /dev/urandom... " >&6; }
17899 if ${ac_cv_file__dev_urandom+:} false; then :
17900 $as_echo_n "(cached) " >&6
17901 else
17902 test "$cross_compiling" = yes &&
17903 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17904 if test -r "/dev/urandom"; then
17905 ac_cv_file__dev_urandom=yes
17906 else
17907 ac_cv_file__dev_urandom=no
17910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
17911 $as_echo "$ac_cv_file__dev_urandom" >&6; }
17912 if test "x$ac_cv_file__dev_urandom" = xyes; then :
17917 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
17918 as_fn_error $? "
17919 no source of strong random numbers was found
17920 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
17924 # If not set in template file, set bytes to use libc memset()
17925 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
17926 MEMSET_LOOP_LIMIT=1024
17929 cat >>confdefs.h <<_ACEOF
17930 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
17931 _ACEOF
17935 if test "$enable_nls" = yes ; then
17937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
17938 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
17939 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17940 $as_echo_n "(cached) " >&6
17941 else
17942 ac_func_search_save_LIBS=$LIBS
17943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17944 /* end confdefs.h. */
17946 /* Override any GCC internal prototype to avoid an error.
17947 Use char because int might match the return type of a GCC
17948 builtin and then its argument prototype would still apply. */
17949 #ifdef __cplusplus
17950 extern "C"
17951 #endif
17952 char bind_textdomain_codeset ();
17954 main ()
17956 return bind_textdomain_codeset ();
17958 return 0;
17960 _ACEOF
17961 for ac_lib in '' intl; do
17962 if test -z "$ac_lib"; then
17963 ac_res="none required"
17964 else
17965 ac_res=-l$ac_lib
17966 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17968 if ac_fn_c_try_link "$LINENO"; then :
17969 ac_cv_search_bind_textdomain_codeset=$ac_res
17971 rm -f core conftest.err conftest.$ac_objext \
17972 conftest$ac_exeext
17973 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17974 break
17976 done
17977 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17979 else
17980 ac_cv_search_bind_textdomain_codeset=no
17982 rm conftest.$ac_ext
17983 LIBS=$ac_func_search_save_LIBS
17985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
17986 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
17987 ac_res=$ac_cv_search_bind_textdomain_codeset
17988 if test "$ac_res" != no; then :
17989 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17991 else
17992 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
17995 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
17996 if test "x$ac_cv_header_libintl_h" = xyes; then :
17998 else
17999 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18003 if test -z "$MSGFMT"; then
18004 for ac_prog in msgfmt
18006 # Extract the first word of "$ac_prog", so it can be a program name with args.
18007 set dummy $ac_prog; ac_word=$2
18008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18009 $as_echo_n "checking for $ac_word... " >&6; }
18010 if ${ac_cv_path_MSGFMT+:} false; then :
18011 $as_echo_n "(cached) " >&6
18012 else
18013 case $MSGFMT in
18014 [\\/]* | ?:[\\/]*)
18015 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18018 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18019 for as_dir in $PATH
18021 IFS=$as_save_IFS
18022 test -z "$as_dir" && as_dir=.
18023 for ac_exec_ext in '' $ac_executable_extensions; do
18024 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18025 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18026 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18027 break 2
18029 done
18030 done
18031 IFS=$as_save_IFS
18034 esac
18036 MSGFMT=$ac_cv_path_MSGFMT
18037 if test -n "$MSGFMT"; then
18038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18039 $as_echo "$MSGFMT" >&6; }
18040 else
18041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18042 $as_echo "no" >&6; }
18046 test -n "$MSGFMT" && break
18047 done
18049 else
18050 # Report the value of MSGFMT in configure's output in all cases.
18051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18052 $as_echo_n "checking for MSGFMT... " >&6; }
18053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18054 $as_echo "$MSGFMT" >&6; }
18057 if test -z "$MSGFMT"; then
18058 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18061 $as_echo_n "checking for msgfmt flags... " >&6; }
18062 if ${pgac_cv_msgfmt_flags+:} false; then :
18063 $as_echo_n "(cached) " >&6
18064 else
18065 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18066 pgac_cv_msgfmt_flags=-c
18069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18070 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18071 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18073 if test -z "$MSGMERGE"; then
18074 for ac_prog in msgmerge
18076 # Extract the first word of "$ac_prog", so it can be a program name with args.
18077 set dummy $ac_prog; ac_word=$2
18078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18079 $as_echo_n "checking for $ac_word... " >&6; }
18080 if ${ac_cv_path_MSGMERGE+:} false; then :
18081 $as_echo_n "(cached) " >&6
18082 else
18083 case $MSGMERGE in
18084 [\\/]* | ?:[\\/]*)
18085 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18089 for as_dir in $PATH
18091 IFS=$as_save_IFS
18092 test -z "$as_dir" && as_dir=.
18093 for ac_exec_ext in '' $ac_executable_extensions; do
18094 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18095 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18096 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18097 break 2
18099 done
18100 done
18101 IFS=$as_save_IFS
18104 esac
18106 MSGMERGE=$ac_cv_path_MSGMERGE
18107 if test -n "$MSGMERGE"; then
18108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18109 $as_echo "$MSGMERGE" >&6; }
18110 else
18111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18112 $as_echo "no" >&6; }
18116 test -n "$MSGMERGE" && break
18117 done
18119 else
18120 # Report the value of MSGMERGE in configure's output in all cases.
18121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18122 $as_echo_n "checking for MSGMERGE... " >&6; }
18123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18124 $as_echo "$MSGMERGE" >&6; }
18127 if test -z "$XGETTEXT"; then
18128 for ac_prog in xgettext
18130 # Extract the first word of "$ac_prog", so it can be a program name with args.
18131 set dummy $ac_prog; ac_word=$2
18132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18133 $as_echo_n "checking for $ac_word... " >&6; }
18134 if ${ac_cv_path_XGETTEXT+:} false; then :
18135 $as_echo_n "(cached) " >&6
18136 else
18137 case $XGETTEXT in
18138 [\\/]* | ?:[\\/]*)
18139 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18142 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18143 for as_dir in $PATH
18145 IFS=$as_save_IFS
18146 test -z "$as_dir" && as_dir=.
18147 for ac_exec_ext in '' $ac_executable_extensions; do
18148 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18149 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18150 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18151 break 2
18153 done
18154 done
18155 IFS=$as_save_IFS
18158 esac
18160 XGETTEXT=$ac_cv_path_XGETTEXT
18161 if test -n "$XGETTEXT"; then
18162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18163 $as_echo "$XGETTEXT" >&6; }
18164 else
18165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18166 $as_echo "no" >&6; }
18170 test -n "$XGETTEXT" && break
18171 done
18173 else
18174 # Report the value of XGETTEXT in configure's output in all cases.
18175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18176 $as_echo_n "checking for XGETTEXT... " >&6; }
18177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18178 $as_echo "$XGETTEXT" >&6; }
18184 # Check for Tcl configuration script tclConfig.sh
18185 if test "$with_tcl" = yes; then
18186 if test -z "$TCLSH"; then
18187 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18189 # Extract the first word of "$ac_prog", so it can be a program name with args.
18190 set dummy $ac_prog; ac_word=$2
18191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18192 $as_echo_n "checking for $ac_word... " >&6; }
18193 if ${ac_cv_path_TCLSH+:} false; then :
18194 $as_echo_n "(cached) " >&6
18195 else
18196 case $TCLSH in
18197 [\\/]* | ?:[\\/]*)
18198 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18201 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18202 for as_dir in $PATH
18204 IFS=$as_save_IFS
18205 test -z "$as_dir" && as_dir=.
18206 for ac_exec_ext in '' $ac_executable_extensions; do
18207 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18208 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18209 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18210 break 2
18212 done
18213 done
18214 IFS=$as_save_IFS
18217 esac
18219 TCLSH=$ac_cv_path_TCLSH
18220 if test -n "$TCLSH"; then
18221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18222 $as_echo "$TCLSH" >&6; }
18223 else
18224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18225 $as_echo "no" >&6; }
18229 test -n "$TCLSH" && break
18230 done
18232 else
18233 # Report the value of TCLSH in configure's output in all cases.
18234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18235 $as_echo_n "checking for TCLSH... " >&6; }
18236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18237 $as_echo "$TCLSH" >&6; }
18240 if test x"$TCLSH" = x""; then
18241 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18245 $as_echo_n "checking for tclConfig.sh... " >&6; }
18246 # Let user override test
18247 if test -z "$TCL_CONFIG_SH"; then
18248 pgac_test_dirs="$with_tclconfig"
18250 set X $pgac_test_dirs; shift
18251 if test $# -eq 0; then
18252 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18253 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18254 # On newer macOS, $auto_path frequently doesn't include the place
18255 # where tclConfig.sh actually lives. Append that to the end, so as not
18256 # to break cases where a non-default Tcl installation is being used.
18257 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18258 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18260 set X $pgac_test_dirs; shift
18263 for pgac_dir do
18264 if test -r "$pgac_dir/tclConfig.sh"; then
18265 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18266 break
18268 done
18271 if test -z "$TCL_CONFIG_SH"; then
18272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18273 $as_echo "no" >&6; }
18274 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18275 else
18276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18277 $as_echo "$TCL_CONFIG_SH" >&6; }
18282 . "$TCL_CONFIG_SH"
18283 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18284 eval TCL_LIBS=\"$TCL_LIBS\"
18285 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18286 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18288 if test "$TCL_SHARED_BUILD" != 1; then
18289 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18290 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18292 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18293 ac_save_CPPFLAGS=$CPPFLAGS
18294 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18295 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18296 if test "x$ac_cv_header_tcl_h" = xyes; then :
18298 else
18299 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18303 CPPFLAGS=$ac_save_CPPFLAGS
18306 # check for <perl.h>
18307 if test "$with_perl" = yes; then
18308 ac_save_CPPFLAGS=$CPPFLAGS
18309 CPPFLAGS="$CPPFLAGS $perl_includespec"
18310 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18312 if test "x$ac_cv_header_perl_h" = xyes; then :
18314 else
18315 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18319 # While we're at it, check that we can link to libperl.
18320 # On most platforms, if perl.h is there then libperl.so will be too, but at
18321 # this writing Debian packages them separately. There is no known reason to
18322 # waste cycles on separate probes for the Tcl or Python libraries, though.
18323 # On some Red Hat platforms, the link attempt can fail if we don't use
18324 # CFLAGS_SL while building the test program.
18325 ac_save_CFLAGS=$CFLAGS
18326 CFLAGS="$CFLAGS $CFLAGS_SL"
18327 pgac_save_LIBS=$LIBS
18328 LIBS="$perl_embed_ldflags"
18329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18330 $as_echo_n "checking for libperl... " >&6; }
18331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18332 /* end confdefs.h. */
18334 #include <EXTERN.h>
18335 #include <perl.h>
18338 main ()
18340 perl_alloc();
18342 return 0;
18344 _ACEOF
18345 if ac_fn_c_try_link "$LINENO"; then :
18346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18347 $as_echo "yes" >&6; }
18348 else
18349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18350 $as_echo "no" >&6; }
18351 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18353 rm -f core conftest.err conftest.$ac_objext \
18354 conftest$ac_exeext conftest.$ac_ext
18355 LIBS=$pgac_save_LIBS
18356 CFLAGS=$ac_save_CFLAGS
18357 CPPFLAGS=$ac_save_CPPFLAGS
18360 # check for <Python.h>
18361 if test "$with_python" = yes; then
18362 ac_save_CPPFLAGS=$CPPFLAGS
18363 CPPFLAGS="$python_includespec $CPPFLAGS"
18364 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18365 if test "x$ac_cv_header_Python_h" = xyes; then :
18367 else
18368 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18372 CPPFLAGS=$ac_save_CPPFLAGS
18376 # Check for documentation-building tools
18378 if test -z "$XMLLINT"; then
18379 for ac_prog in xmllint
18381 # Extract the first word of "$ac_prog", so it can be a program name with args.
18382 set dummy $ac_prog; ac_word=$2
18383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18384 $as_echo_n "checking for $ac_word... " >&6; }
18385 if ${ac_cv_path_XMLLINT+:} false; then :
18386 $as_echo_n "(cached) " >&6
18387 else
18388 case $XMLLINT in
18389 [\\/]* | ?:[\\/]*)
18390 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18393 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18394 for as_dir in $PATH
18396 IFS=$as_save_IFS
18397 test -z "$as_dir" && as_dir=.
18398 for ac_exec_ext in '' $ac_executable_extensions; do
18399 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18400 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18401 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18402 break 2
18404 done
18405 done
18406 IFS=$as_save_IFS
18409 esac
18411 XMLLINT=$ac_cv_path_XMLLINT
18412 if test -n "$XMLLINT"; then
18413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18414 $as_echo "$XMLLINT" >&6; }
18415 else
18416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18417 $as_echo "no" >&6; }
18421 test -n "$XMLLINT" && break
18422 done
18424 else
18425 # Report the value of XMLLINT in configure's output in all cases.
18426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18427 $as_echo_n "checking for XMLLINT... " >&6; }
18428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18429 $as_echo "$XMLLINT" >&6; }
18432 if test -z "$XSLTPROC"; then
18433 for ac_prog in xsltproc
18435 # Extract the first word of "$ac_prog", so it can be a program name with args.
18436 set dummy $ac_prog; ac_word=$2
18437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18438 $as_echo_n "checking for $ac_word... " >&6; }
18439 if ${ac_cv_path_XSLTPROC+:} false; then :
18440 $as_echo_n "(cached) " >&6
18441 else
18442 case $XSLTPROC in
18443 [\\/]* | ?:[\\/]*)
18444 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18447 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18448 for as_dir in $PATH
18450 IFS=$as_save_IFS
18451 test -z "$as_dir" && as_dir=.
18452 for ac_exec_ext in '' $ac_executable_extensions; do
18453 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18454 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18455 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18456 break 2
18458 done
18459 done
18460 IFS=$as_save_IFS
18463 esac
18465 XSLTPROC=$ac_cv_path_XSLTPROC
18466 if test -n "$XSLTPROC"; then
18467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18468 $as_echo "$XSLTPROC" >&6; }
18469 else
18470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18471 $as_echo "no" >&6; }
18475 test -n "$XSLTPROC" && break
18476 done
18478 else
18479 # Report the value of XSLTPROC in configure's output in all cases.
18480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18481 $as_echo_n "checking for XSLTPROC... " >&6; }
18482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18483 $as_echo "$XSLTPROC" >&6; }
18486 if test -z "$FOP"; then
18487 for ac_prog in fop
18489 # Extract the first word of "$ac_prog", so it can be a program name with args.
18490 set dummy $ac_prog; ac_word=$2
18491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18492 $as_echo_n "checking for $ac_word... " >&6; }
18493 if ${ac_cv_path_FOP+:} false; then :
18494 $as_echo_n "(cached) " >&6
18495 else
18496 case $FOP in
18497 [\\/]* | ?:[\\/]*)
18498 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18502 for as_dir in $PATH
18504 IFS=$as_save_IFS
18505 test -z "$as_dir" && as_dir=.
18506 for ac_exec_ext in '' $ac_executable_extensions; do
18507 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18508 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18509 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18510 break 2
18512 done
18513 done
18514 IFS=$as_save_IFS
18517 esac
18519 FOP=$ac_cv_path_FOP
18520 if test -n "$FOP"; then
18521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18522 $as_echo "$FOP" >&6; }
18523 else
18524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18525 $as_echo "no" >&6; }
18529 test -n "$FOP" && break
18530 done
18532 else
18533 # Report the value of FOP in configure's output in all cases.
18534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18535 $as_echo_n "checking for FOP... " >&6; }
18536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18537 $as_echo "$FOP" >&6; }
18540 if test -z "$DBTOEPUB"; then
18541 for ac_prog in dbtoepub
18543 # Extract the first word of "$ac_prog", so it can be a program name with args.
18544 set dummy $ac_prog; ac_word=$2
18545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18546 $as_echo_n "checking for $ac_word... " >&6; }
18547 if ${ac_cv_path_DBTOEPUB+:} false; then :
18548 $as_echo_n "(cached) " >&6
18549 else
18550 case $DBTOEPUB in
18551 [\\/]* | ?:[\\/]*)
18552 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18556 for as_dir in $PATH
18558 IFS=$as_save_IFS
18559 test -z "$as_dir" && as_dir=.
18560 for ac_exec_ext in '' $ac_executable_extensions; do
18561 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18562 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18563 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18564 break 2
18566 done
18567 done
18568 IFS=$as_save_IFS
18571 esac
18573 DBTOEPUB=$ac_cv_path_DBTOEPUB
18574 if test -n "$DBTOEPUB"; then
18575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18576 $as_echo "$DBTOEPUB" >&6; }
18577 else
18578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18579 $as_echo "no" >&6; }
18583 test -n "$DBTOEPUB" && break
18584 done
18586 else
18587 # Report the value of DBTOEPUB in configure's output in all cases.
18588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18589 $as_echo_n "checking for DBTOEPUB... " >&6; }
18590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18591 $as_echo "$DBTOEPUB" >&6; }
18596 # Check for test tools
18598 if test "$enable_tap_tests" = yes; then
18599 # Make sure we know where prove is.
18600 if test -z "$PROVE"; then
18601 for ac_prog in prove
18603 # Extract the first word of "$ac_prog", so it can be a program name with args.
18604 set dummy $ac_prog; ac_word=$2
18605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18606 $as_echo_n "checking for $ac_word... " >&6; }
18607 if ${ac_cv_path_PROVE+:} false; then :
18608 $as_echo_n "(cached) " >&6
18609 else
18610 case $PROVE in
18611 [\\/]* | ?:[\\/]*)
18612 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18615 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18616 for as_dir in $PATH
18618 IFS=$as_save_IFS
18619 test -z "$as_dir" && as_dir=.
18620 for ac_exec_ext in '' $ac_executable_extensions; do
18621 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18622 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18623 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18624 break 2
18626 done
18627 done
18628 IFS=$as_save_IFS
18631 esac
18633 PROVE=$ac_cv_path_PROVE
18634 if test -n "$PROVE"; then
18635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18636 $as_echo "$PROVE" >&6; }
18637 else
18638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18639 $as_echo "no" >&6; }
18643 test -n "$PROVE" && break
18644 done
18646 else
18647 # Report the value of PROVE in configure's output in all cases.
18648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18649 $as_echo_n "checking for PROVE... " >&6; }
18650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18651 $as_echo "$PROVE" >&6; }
18654 if test -z "$PROVE"; then
18655 as_fn_error $? "prove not found" "$LINENO" 5
18657 # Check for necessary Perl modules. You might think we should use
18658 # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
18659 # installation than perl, eg on MSys, so we have to check using prove.
18660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
18661 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
18662 __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__
18663 modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
18664 if test $? -eq 0; then
18665 # log the module version details, but don't show them interactively
18666 echo "$modulestderr" >&5
18667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18668 $as_echo "yes" >&6; }
18669 else
18670 # on failure, though, show the results to the user
18671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modulestderr" >&5
18672 $as_echo "$modulestderr" >&6; }
18673 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18677 # If compiler will take -Wl,--as-needed (or various platform-specific
18678 # spellings thereof) then add that to LDFLAGS. This is much easier than
18679 # trying to filter LIBS to the minimum for each executable.
18680 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18681 # libreadline; therefore we postpone testing it until we know what library
18682 # dependencies readline has. The test code will try to link with $LIBS.
18683 if test "$with_readline" = yes; then
18684 link_test_func=readline
18685 else
18686 link_test_func=exit
18689 if test "$PORTNAME" = "darwin"; then
18690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS" >&5
18691 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS... " >&6; }
18692 if ${pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs+:} false; then :
18693 $as_echo_n "(cached) " >&6
18694 else
18695 pgac_save_LDFLAGS=$LDFLAGS
18696 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
18697 if test "$cross_compiling" = yes; then :
18698 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs="assuming no"
18699 else
18700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18701 /* end confdefs.h. */
18702 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18704 main ()
18708 return 0;
18710 _ACEOF
18711 if ac_fn_c_try_run "$LINENO"; then :
18712 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=yes
18713 else
18714 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=no
18716 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18717 conftest.$ac_objext conftest.beam conftest.$ac_ext
18720 LDFLAGS="$pgac_save_LDFLAGS"
18722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&5
18723 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&6; }
18724 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" = x"yes"; then
18725 LDFLAGS="${LDFLAGS} -Wl,-dead_strip_dylibs"
18729 elif test "$PORTNAME" = "openbsd"; then
18730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS" >&5
18731 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS... " >&6; }
18732 if ${pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic+:} false; then :
18733 $as_echo_n "(cached) " >&6
18734 else
18735 pgac_save_LDFLAGS=$LDFLAGS
18736 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
18737 if test "$cross_compiling" = yes; then :
18738 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic="assuming no"
18739 else
18740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18741 /* end confdefs.h. */
18742 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18744 main ()
18748 return 0;
18750 _ACEOF
18751 if ac_fn_c_try_run "$LINENO"; then :
18752 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=yes
18753 else
18754 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=no
18756 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18757 conftest.$ac_objext conftest.beam conftest.$ac_ext
18760 LDFLAGS="$pgac_save_LDFLAGS"
18762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&5
18763 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&6; }
18764 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" = x"yes"; then
18765 LDFLAGS="${LDFLAGS} -Wl,-Bdynamic"
18769 else
18770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed, for LDFLAGS" >&5
18771 $as_echo_n "checking whether $CC supports -Wl,--as-needed, for LDFLAGS... " >&6; }
18772 if ${pgac_cv_prog_cc_LDFLAGS__Wl___as_needed+:} false; then :
18773 $as_echo_n "(cached) " >&6
18774 else
18775 pgac_save_LDFLAGS=$LDFLAGS
18776 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
18777 if test "$cross_compiling" = yes; then :
18778 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed="assuming no"
18779 else
18780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18781 /* end confdefs.h. */
18782 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18784 main ()
18788 return 0;
18790 _ACEOF
18791 if ac_fn_c_try_run "$LINENO"; then :
18792 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=yes
18793 else
18794 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=no
18796 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18797 conftest.$ac_objext conftest.beam conftest.$ac_ext
18800 LDFLAGS="$pgac_save_LDFLAGS"
18802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&5
18803 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&6; }
18804 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" = x"yes"; then
18805 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
18811 # For linkers that understand --export-dynamic, add that to the LDFLAGS_EX_BE
18812 # (backend specific ldflags). One some platforms this will always fail (e.g.,
18813 # windows), but on others it depends on the choice of linker (e.g., solaris).
18814 # macOS uses -export_dynamic instead. (On macOS, the option is only
18815 # needed when also using -flto, but we add it anyway since it's
18816 # harmless.)
18817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE" >&5
18818 $as_echo_n "checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE... " >&6; }
18819 if ${pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic+:} false; then :
18820 $as_echo_n "(cached) " >&6
18821 else
18822 pgac_save_LDFLAGS=$LDFLAGS
18823 LDFLAGS="$pgac_save_LDFLAGS -Wl,--export-dynamic"
18824 if test "$cross_compiling" = yes; then :
18825 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic="assuming no"
18826 else
18827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18828 /* end confdefs.h. */
18829 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18831 main ()
18835 return 0;
18837 _ACEOF
18838 if ac_fn_c_try_run "$LINENO"; then :
18839 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=yes
18840 else
18841 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=no
18843 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18844 conftest.$ac_objext conftest.beam conftest.$ac_ext
18847 LDFLAGS="$pgac_save_LDFLAGS"
18849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&5
18850 $as_echo "$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&6; }
18851 if test x"$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" = x"yes"; then
18852 LDFLAGS_EX_BE="${LDFLAGS_EX_BE} -Wl,--export-dynamic"
18855 if test x"$LDFLAGS_EX_BE" = x""; then
18856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-export_dynamic, for LDFLAGS_EX_BE" >&5
18857 $as_echo_n "checking whether $CC supports -Wl,-export_dynamic, for LDFLAGS_EX_BE... " >&6; }
18858 if ${pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic+:} false; then :
18859 $as_echo_n "(cached) " >&6
18860 else
18861 pgac_save_LDFLAGS=$LDFLAGS
18862 LDFLAGS="$pgac_save_LDFLAGS -Wl,-export_dynamic"
18863 if test "$cross_compiling" = yes; then :
18864 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic="assuming no"
18865 else
18866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18867 /* end confdefs.h. */
18868 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18870 main ()
18874 return 0;
18876 _ACEOF
18877 if ac_fn_c_try_run "$LINENO"; then :
18878 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic=yes
18879 else
18880 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic=no
18882 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18883 conftest.$ac_objext conftest.beam conftest.$ac_ext
18886 LDFLAGS="$pgac_save_LDFLAGS"
18888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic" >&5
18889 $as_echo "$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic" >&6; }
18890 if test x"$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic" = x"yes"; then
18891 LDFLAGS_EX_BE="${LDFLAGS_EX_BE} -Wl,-export_dynamic"
18897 # Create compiler version string
18898 if test x"$GCC" = x"yes" ; then
18899 cc_string=`${CC} --version | sed q`
18900 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
18901 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
18902 cc_string=`${CC} -V 2>&1 | sed q`
18903 else
18904 cc_string=$CC
18908 cat >>confdefs.h <<_ACEOF
18909 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
18910 _ACEOF
18913 # Supply a numeric version string for use by 3rd party add-ons
18914 # awk -F is a regex on some platforms, and not on others, so make "." a tab
18915 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
18916 $AWK '{printf "%d%04d", $1, $2}'`"
18918 cat >>confdefs.h <<_ACEOF
18919 #define PG_VERSION_NUM $PG_VERSION_NUM
18920 _ACEOF
18924 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
18925 # literally, so that it's possible to override it at build time using
18926 # a command like "make ... PG_SYSROOT=path". This has to be done after
18927 # we've finished all configure checks that depend on CPPFLAGS.
18928 # The same for LDFLAGS, too.
18929 if test x"$PG_SYSROOT" != x; then
18930 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
18931 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
18936 # Begin output steps
18938 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
18939 $as_echo "$as_me: using compiler=$cc_string" >&6;}
18940 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
18941 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
18942 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
18943 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
18944 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
18945 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
18946 # Currently only used when LLVM is used
18947 if test "$with_llvm" = yes ; then
18948 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
18949 $as_echo "$as_me: using CXX=$CXX" >&6;}
18950 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
18951 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
18952 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
18953 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
18954 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
18955 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
18956 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
18957 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
18960 # prepare build tree if outside source tree
18961 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
18962 # Note 2: /bin/pwd might be better than shell's built-in at getting
18963 # a symlink-free name.
18964 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
18965 vpath_build=no
18966 else
18967 vpath_build=yes
18968 if test "$no_create" != yes; then
18969 $as_echo_n "preparing build tree... " >&6
18970 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
18971 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
18972 || as_fn_error $? "failed" "$LINENO" 5
18973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
18974 $as_echo "done" >&6; }
18980 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
18983 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}"
18986 if test "$PORTNAME" = "win32"; then
18987 ac_config_commands="$ac_config_commands check_win32_symlinks"
18991 ac_config_headers="$ac_config_headers src/include/pg_config.h"
18994 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
18997 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19000 cat >confcache <<\_ACEOF
19001 # This file is a shell script that caches the results of configure
19002 # tests run on this system so they can be shared between configure
19003 # scripts and configure runs, see configure's option --config-cache.
19004 # It is not useful on other systems. If it contains results you don't
19005 # want to keep, you may remove or edit it.
19007 # config.status only pays attention to the cache file if you give it
19008 # the --recheck option to rerun configure.
19010 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19011 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19012 # following values.
19014 _ACEOF
19016 # The following way of writing the cache mishandles newlines in values,
19017 # but we know of no workaround that is simple, portable, and efficient.
19018 # So, we kill variables containing newlines.
19019 # Ultrix sh set writes to stderr and can't be redirected directly,
19020 # and sets the high bit in the cache file unless we assign to the vars.
19022 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19023 eval ac_val=\$$ac_var
19024 case $ac_val in #(
19025 *${as_nl}*)
19026 case $ac_var in #(
19027 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19028 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19029 esac
19030 case $ac_var in #(
19031 _ | IFS | as_nl) ;; #(
19032 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19033 *) { eval $ac_var=; unset $ac_var;} ;;
19034 esac ;;
19035 esac
19036 done
19038 (set) 2>&1 |
19039 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19040 *${as_nl}ac_space=\ *)
19041 # `set' does not quote correctly, so add quotes: double-quote
19042 # substitution turns \\\\ into \\, and sed turns \\ into \.
19043 sed -n \
19044 "s/'/'\\\\''/g;
19045 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19046 ;; #(
19048 # `set' quotes correctly as required by POSIX, so do not add quotes.
19049 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19051 esac |
19052 sort
19054 sed '
19055 /^ac_cv_env_/b end
19056 t clear
19057 :clear
19058 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19059 t end
19060 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19061 :end' >>confcache
19062 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19063 if test -w "$cache_file"; then
19064 if test "x$cache_file" != "x/dev/null"; then
19065 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19066 $as_echo "$as_me: updating cache $cache_file" >&6;}
19067 if test ! -f "$cache_file" || test -h "$cache_file"; then
19068 cat confcache >"$cache_file"
19069 else
19070 case $cache_file in #(
19071 */* | ?:*)
19072 mv -f confcache "$cache_file"$$ &&
19073 mv -f "$cache_file"$$ "$cache_file" ;; #(
19075 mv -f confcache "$cache_file" ;;
19076 esac
19079 else
19080 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19081 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19084 rm -f confcache
19086 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19087 # Let make expand exec_prefix.
19088 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19090 DEFS=-DHAVE_CONFIG_H
19092 ac_libobjs=
19093 ac_ltlibobjs=
19095 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19096 # 1. Remove the extension, and $U if already installed.
19097 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19098 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19099 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19100 # will be set to the directory where LIBOBJS objects are built.
19101 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19102 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19103 done
19104 LIBOBJS=$ac_libobjs
19106 LTLIBOBJS=$ac_ltlibobjs
19111 : "${CONFIG_STATUS=./config.status}"
19112 ac_write_fail=0
19113 ac_clean_files_save=$ac_clean_files
19114 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19115 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19116 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19117 as_write_fail=0
19118 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19119 #! $SHELL
19120 # Generated by $as_me.
19121 # Run this file to recreate the current configuration.
19122 # Compiler output produced by configure, useful for debugging
19123 # configure, is in config.log if it exists.
19125 debug=false
19126 ac_cs_recheck=false
19127 ac_cs_silent=false
19129 SHELL=\${CONFIG_SHELL-$SHELL}
19130 export SHELL
19131 _ASEOF
19132 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19133 ## -------------------- ##
19134 ## M4sh Initialization. ##
19135 ## -------------------- ##
19137 # Be more Bourne compatible
19138 DUALCASE=1; export DUALCASE # for MKS sh
19139 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19140 emulate sh
19141 NULLCMD=:
19142 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19143 # is contrary to our usage. Disable this feature.
19144 alias -g '${1+"$@"}'='"$@"'
19145 setopt NO_GLOB_SUBST
19146 else
19147 case `(set -o) 2>/dev/null` in #(
19148 *posix*) :
19149 set -o posix ;; #(
19150 *) :
19152 esac
19156 as_nl='
19158 export as_nl
19159 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19160 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19161 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19162 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19163 # Prefer a ksh shell builtin over an external printf program on Solaris,
19164 # but without wasting forks for bash or zsh.
19165 if test -z "$BASH_VERSION$ZSH_VERSION" \
19166 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19167 as_echo='print -r --'
19168 as_echo_n='print -rn --'
19169 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19170 as_echo='printf %s\n'
19171 as_echo_n='printf %s'
19172 else
19173 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19174 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19175 as_echo_n='/usr/ucb/echo -n'
19176 else
19177 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19178 as_echo_n_body='eval
19179 arg=$1;
19180 case $arg in #(
19181 *"$as_nl"*)
19182 expr "X$arg" : "X\\(.*\\)$as_nl";
19183 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19184 esac;
19185 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19187 export as_echo_n_body
19188 as_echo_n='sh -c $as_echo_n_body as_echo'
19190 export as_echo_body
19191 as_echo='sh -c $as_echo_body as_echo'
19194 # The user is always right.
19195 if test "${PATH_SEPARATOR+set}" != set; then
19196 PATH_SEPARATOR=:
19197 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19198 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19199 PATH_SEPARATOR=';'
19204 # IFS
19205 # We need space, tab and new line, in precisely that order. Quoting is
19206 # there to prevent editors from complaining about space-tab.
19207 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19208 # splitting by setting IFS to empty value.)
19209 IFS=" "" $as_nl"
19211 # Find who we are. Look in the path if we contain no directory separator.
19212 as_myself=
19213 case $0 in #((
19214 *[\\/]* ) as_myself=$0 ;;
19215 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19216 for as_dir in $PATH
19218 IFS=$as_save_IFS
19219 test -z "$as_dir" && as_dir=.
19220 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19221 done
19222 IFS=$as_save_IFS
19225 esac
19226 # We did not find ourselves, most probably we were run as `sh COMMAND'
19227 # in which case we are not to be found in the path.
19228 if test "x$as_myself" = x; then
19229 as_myself=$0
19231 if test ! -f "$as_myself"; then
19232 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19233 exit 1
19236 # Unset variables that we do not need and which cause bugs (e.g. in
19237 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19238 # suppresses any "Segmentation fault" message there. '((' could
19239 # trigger a bug in pdksh 5.2.14.
19240 for as_var in BASH_ENV ENV MAIL MAILPATH
19241 do eval test x\${$as_var+set} = xset \
19242 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19243 done
19244 PS1='$ '
19245 PS2='> '
19246 PS4='+ '
19248 # NLS nuisances.
19249 LC_ALL=C
19250 export LC_ALL
19251 LANGUAGE=C
19252 export LANGUAGE
19254 # CDPATH.
19255 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19258 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19259 # ----------------------------------------
19260 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19261 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19262 # script with STATUS, using 1 if that was 0.
19263 as_fn_error ()
19265 as_status=$1; test $as_status -eq 0 && as_status=1
19266 if test "$4"; then
19267 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19268 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19270 $as_echo "$as_me: error: $2" >&2
19271 as_fn_exit $as_status
19272 } # as_fn_error
19275 # as_fn_set_status STATUS
19276 # -----------------------
19277 # Set $? to STATUS, without forking.
19278 as_fn_set_status ()
19280 return $1
19281 } # as_fn_set_status
19283 # as_fn_exit STATUS
19284 # -----------------
19285 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19286 as_fn_exit ()
19288 set +e
19289 as_fn_set_status $1
19290 exit $1
19291 } # as_fn_exit
19293 # as_fn_unset VAR
19294 # ---------------
19295 # Portably unset VAR.
19296 as_fn_unset ()
19298 { eval $1=; unset $1;}
19300 as_unset=as_fn_unset
19301 # as_fn_append VAR VALUE
19302 # ----------------------
19303 # Append the text in VALUE to the end of the definition contained in VAR. Take
19304 # advantage of any shell optimizations that allow amortized linear growth over
19305 # repeated appends, instead of the typical quadratic growth present in naive
19306 # implementations.
19307 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19308 eval 'as_fn_append ()
19310 eval $1+=\$2
19312 else
19313 as_fn_append ()
19315 eval $1=\$$1\$2
19317 fi # as_fn_append
19319 # as_fn_arith ARG...
19320 # ------------------
19321 # Perform arithmetic evaluation on the ARGs, and store the result in the
19322 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19323 # must be portable across $(()) and expr.
19324 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19325 eval 'as_fn_arith ()
19327 as_val=$(( $* ))
19329 else
19330 as_fn_arith ()
19332 as_val=`expr "$@" || test $? -eq 1`
19334 fi # as_fn_arith
19337 if expr a : '\(a\)' >/dev/null 2>&1 &&
19338 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19339 as_expr=expr
19340 else
19341 as_expr=false
19344 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19345 as_basename=basename
19346 else
19347 as_basename=false
19350 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19351 as_dirname=dirname
19352 else
19353 as_dirname=false
19356 as_me=`$as_basename -- "$0" ||
19357 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19358 X"$0" : 'X\(//\)$' \| \
19359 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19360 $as_echo X/"$0" |
19361 sed '/^.*\/\([^/][^/]*\)\/*$/{
19362 s//\1/
19365 /^X\/\(\/\/\)$/{
19366 s//\1/
19369 /^X\/\(\/\).*/{
19370 s//\1/
19373 s/.*/./; q'`
19375 # Avoid depending upon Character Ranges.
19376 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19377 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19378 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19379 as_cr_digits='0123456789'
19380 as_cr_alnum=$as_cr_Letters$as_cr_digits
19382 ECHO_C= ECHO_N= ECHO_T=
19383 case `echo -n x` in #(((((
19384 -n*)
19385 case `echo 'xy\c'` in
19386 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19387 xy) ECHO_C='\c';;
19388 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19389 ECHO_T=' ';;
19390 esac;;
19392 ECHO_N='-n';;
19393 esac
19395 rm -f conf$$ conf$$.exe conf$$.file
19396 if test -d conf$$.dir; then
19397 rm -f conf$$.dir/conf$$.file
19398 else
19399 rm -f conf$$.dir
19400 mkdir conf$$.dir 2>/dev/null
19402 if (echo >conf$$.file) 2>/dev/null; then
19403 if ln -s conf$$.file conf$$ 2>/dev/null; then
19404 as_ln_s='ln -s'
19405 # ... but there are two gotchas:
19406 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19407 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19408 # In both cases, we have to default to `cp -pR'.
19409 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19410 as_ln_s='cp -pR'
19411 elif ln conf$$.file conf$$ 2>/dev/null; then
19412 as_ln_s=ln
19413 else
19414 as_ln_s='cp -pR'
19416 else
19417 as_ln_s='cp -pR'
19419 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19420 rmdir conf$$.dir 2>/dev/null
19423 # as_fn_mkdir_p
19424 # -------------
19425 # Create "$as_dir" as a directory, including parents if necessary.
19426 as_fn_mkdir_p ()
19429 case $as_dir in #(
19430 -*) as_dir=./$as_dir;;
19431 esac
19432 test -d "$as_dir" || eval $as_mkdir_p || {
19433 as_dirs=
19434 while :; do
19435 case $as_dir in #(
19436 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19437 *) as_qdir=$as_dir;;
19438 esac
19439 as_dirs="'$as_qdir' $as_dirs"
19440 as_dir=`$as_dirname -- "$as_dir" ||
19441 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19442 X"$as_dir" : 'X\(//\)[^/]' \| \
19443 X"$as_dir" : 'X\(//\)$' \| \
19444 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19445 $as_echo X"$as_dir" |
19446 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19447 s//\1/
19450 /^X\(\/\/\)[^/].*/{
19451 s//\1/
19454 /^X\(\/\/\)$/{
19455 s//\1/
19458 /^X\(\/\).*/{
19459 s//\1/
19462 s/.*/./; q'`
19463 test -d "$as_dir" && break
19464 done
19465 test -z "$as_dirs" || eval "mkdir $as_dirs"
19466 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19469 } # as_fn_mkdir_p
19470 if mkdir -p . 2>/dev/null; then
19471 as_mkdir_p='mkdir -p "$as_dir"'
19472 else
19473 test -d ./-p && rmdir ./-p
19474 as_mkdir_p=false
19478 # as_fn_executable_p FILE
19479 # -----------------------
19480 # Test if FILE is an executable regular file.
19481 as_fn_executable_p ()
19483 test -f "$1" && test -x "$1"
19484 } # as_fn_executable_p
19485 as_test_x='test -x'
19486 as_executable_p=as_fn_executable_p
19488 # Sed expression to map a string onto a valid CPP name.
19489 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19491 # Sed expression to map a string onto a valid variable name.
19492 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19495 exec 6>&1
19496 ## ----------------------------------- ##
19497 ## Main body of $CONFIG_STATUS script. ##
19498 ## ----------------------------------- ##
19499 _ASEOF
19500 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19502 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19503 # Save the log message, to keep $0 and so on meaningful, and to
19504 # report actual input values of CONFIG_FILES etc. instead of their
19505 # values after options handling.
19506 ac_log="
19507 This file was extended by PostgreSQL $as_me 18devel, which was
19508 generated by GNU Autoconf 2.69. Invocation command line was
19510 CONFIG_FILES = $CONFIG_FILES
19511 CONFIG_HEADERS = $CONFIG_HEADERS
19512 CONFIG_LINKS = $CONFIG_LINKS
19513 CONFIG_COMMANDS = $CONFIG_COMMANDS
19514 $ $0 $@
19516 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19519 _ACEOF
19521 case $ac_config_files in *"
19522 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19523 esac
19525 case $ac_config_headers in *"
19526 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19527 esac
19530 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19531 # Files that config.status was made for.
19532 config_files="$ac_config_files"
19533 config_headers="$ac_config_headers"
19534 config_links="$ac_config_links"
19535 config_commands="$ac_config_commands"
19537 _ACEOF
19539 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19540 ac_cs_usage="\
19541 \`$as_me' instantiates files and other configuration actions
19542 from templates according to the current configuration. Unless the files
19543 and actions are specified as TAGs, all are instantiated by default.
19545 Usage: $0 [OPTION]... [TAG]...
19547 -h, --help print this help, then exit
19548 -V, --version print version number and configuration settings, then exit
19549 --config print configuration, then exit
19550 -q, --quiet, --silent
19551 do not print progress messages
19552 -d, --debug don't remove temporary files
19553 --recheck update $as_me by reconfiguring in the same conditions
19554 --file=FILE[:TEMPLATE]
19555 instantiate the configuration file FILE
19556 --header=FILE[:TEMPLATE]
19557 instantiate the configuration header FILE
19559 Configuration files:
19560 $config_files
19562 Configuration headers:
19563 $config_headers
19565 Configuration links:
19566 $config_links
19568 Configuration commands:
19569 $config_commands
19571 Report bugs to <pgsql-bugs@lists.postgresql.org>.
19572 PostgreSQL home page: <https://www.postgresql.org/>."
19574 _ACEOF
19575 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19576 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19577 ac_cs_version="\\
19578 PostgreSQL config.status 18devel
19579 configured by $0, generated by GNU Autoconf 2.69,
19580 with options \\"\$ac_cs_config\\"
19582 Copyright (C) 2012 Free Software Foundation, Inc.
19583 This config.status script is free software; the Free Software Foundation
19584 gives unlimited permission to copy, distribute and modify it."
19586 ac_pwd='$ac_pwd'
19587 srcdir='$srcdir'
19588 INSTALL='$INSTALL'
19589 MKDIR_P='$MKDIR_P'
19590 AWK='$AWK'
19591 test -n "\$AWK" || AWK=awk
19592 _ACEOF
19594 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19595 # The default lists apply if the user does not specify any file.
19596 ac_need_defaults=:
19597 while test $# != 0
19599 case $1 in
19600 --*=?*)
19601 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19602 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19603 ac_shift=:
19605 --*=)
19606 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19607 ac_optarg=
19608 ac_shift=:
19611 ac_option=$1
19612 ac_optarg=$2
19613 ac_shift=shift
19615 esac
19617 case $ac_option in
19618 # Handling of the options.
19619 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19620 ac_cs_recheck=: ;;
19621 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19622 $as_echo "$ac_cs_version"; exit ;;
19623 --config | --confi | --conf | --con | --co | --c )
19624 $as_echo "$ac_cs_config"; exit ;;
19625 --debug | --debu | --deb | --de | --d | -d )
19626 debug=: ;;
19627 --file | --fil | --fi | --f )
19628 $ac_shift
19629 case $ac_optarg in
19630 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19631 '') as_fn_error $? "missing file argument" ;;
19632 esac
19633 as_fn_append CONFIG_FILES " '$ac_optarg'"
19634 ac_need_defaults=false;;
19635 --header | --heade | --head | --hea )
19636 $ac_shift
19637 case $ac_optarg in
19638 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19639 esac
19640 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19641 ac_need_defaults=false;;
19642 --he | --h)
19643 # Conflict between --help and --header
19644 as_fn_error $? "ambiguous option: \`$1'
19645 Try \`$0 --help' for more information.";;
19646 --help | --hel | -h )
19647 $as_echo "$ac_cs_usage"; exit ;;
19648 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19649 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19650 ac_cs_silent=: ;;
19652 # This is an error.
19653 -*) as_fn_error $? "unrecognized option: \`$1'
19654 Try \`$0 --help' for more information." ;;
19656 *) as_fn_append ac_config_targets " $1"
19657 ac_need_defaults=false ;;
19659 esac
19660 shift
19661 done
19663 ac_configure_extra_args=
19665 if $ac_cs_silent; then
19666 exec 6>/dev/null
19667 ac_configure_extra_args="$ac_configure_extra_args --silent"
19670 _ACEOF
19671 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19672 if \$ac_cs_recheck; then
19673 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19674 shift
19675 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19676 CONFIG_SHELL='$SHELL'
19677 export CONFIG_SHELL
19678 exec "\$@"
19681 _ACEOF
19682 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19683 exec 5>>config.log
19685 echo
19686 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19687 ## Running $as_me. ##
19688 _ASBOX
19689 $as_echo "$ac_log"
19690 } >&5
19692 _ACEOF
19693 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19694 _ACEOF
19696 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19698 # Handling of arguments.
19699 for ac_config_target in $ac_config_targets
19701 case $ac_config_target in
19702 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19703 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19704 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19705 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19706 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19707 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19708 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19709 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19710 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19711 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19712 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19714 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19715 esac
19716 done
19719 # If the user did not use the arguments to specify the items to instantiate,
19720 # then the envvar interface is used. Set only those that are not.
19721 # We use the long form for the default assignment because of an extremely
19722 # bizarre bug on SunOS 4.1.3.
19723 if $ac_need_defaults; then
19724 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19725 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19726 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19727 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19730 # Have a temporary directory for convenience. Make it in the build tree
19731 # simply because there is no reason against having it here, and in addition,
19732 # creating and moving files from /tmp can sometimes cause problems.
19733 # Hook for its removal unless debugging.
19734 # Note that there is a small window in which the directory will not be cleaned:
19735 # after its creation but before its name has been assigned to `$tmp'.
19736 $debug ||
19738 tmp= ac_tmp=
19739 trap 'exit_status=$?
19740 : "${ac_tmp:=$tmp}"
19741 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19743 trap 'as_fn_exit 1' 1 2 13 15
19745 # Create a (secure) tmp directory for tmp files.
19748 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19749 test -d "$tmp"
19750 } ||
19752 tmp=./conf$$-$RANDOM
19753 (umask 077 && mkdir "$tmp")
19754 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19755 ac_tmp=$tmp
19757 # Set up the scripts for CONFIG_FILES section.
19758 # No need to generate them if there are no CONFIG_FILES.
19759 # This happens for instance with `./config.status config.h'.
19760 if test -n "$CONFIG_FILES"; then
19763 ac_cr=`echo X | tr X '\015'`
19764 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19765 # But we know of no other shell where ac_cr would be empty at this
19766 # point, so we can use a bashism as a fallback.
19767 if test "x$ac_cr" = x; then
19768 eval ac_cr=\$\'\\r\'
19770 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19771 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19772 ac_cs_awk_cr='\\r'
19773 else
19774 ac_cs_awk_cr=$ac_cr
19777 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19778 _ACEOF
19782 echo "cat >conf$$subs.awk <<_ACEOF" &&
19783 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19784 echo "_ACEOF"
19785 } >conf$$subs.sh ||
19786 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19787 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19788 ac_delim='%!_!# '
19789 for ac_last_try in false false false false false :; do
19790 . ./conf$$subs.sh ||
19791 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19793 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19794 if test $ac_delim_n = $ac_delim_num; then
19795 break
19796 elif $ac_last_try; then
19797 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19798 else
19799 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19801 done
19802 rm -f conf$$subs.sh
19804 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19805 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19806 _ACEOF
19807 sed -n '
19809 s/^/S["/; s/!.*/"]=/
19812 s/^[^!]*!//
19813 :repl
19814 t repl
19815 s/'"$ac_delim"'$//
19816 t delim
19819 s/\(.\{148\}\)..*/\1/
19820 t more1
19821 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19824 b repl
19825 :more1
19826 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19829 s/.\{148\}//
19830 t nl
19831 :delim
19833 s/\(.\{148\}\)..*/\1/
19834 t more2
19835 s/["\\]/\\&/g; s/^/"/; s/$/"/
19838 :more2
19839 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19842 s/.\{148\}//
19843 t delim
19844 ' <conf$$subs.awk | sed '
19845 /^[^""]/{
19847 s/\n//
19849 ' >>$CONFIG_STATUS || ac_write_fail=1
19850 rm -f conf$$subs.awk
19851 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19852 _ACAWK
19853 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19854 for (key in S) S_is_set[key] = 1
19855 FS = "\a"
19859 line = $ 0
19860 nfields = split(line, field, "@")
19861 substed = 0
19862 len = length(field[1])
19863 for (i = 2; i < nfields; i++) {
19864 key = field[i]
19865 keylen = length(key)
19866 if (S_is_set[key]) {
19867 value = S[key]
19868 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19869 len += length(value) + length(field[++i])
19870 substed = 1
19871 } else
19872 len += 1 + keylen
19875 print line
19878 _ACAWK
19879 _ACEOF
19880 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19881 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19882 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19883 else
19885 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19886 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19887 _ACEOF
19889 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19890 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19891 # trailing colons and then remove the whole line if VPATH becomes empty
19892 # (actually we leave an empty line to preserve line numbers).
19893 if test "x$srcdir" = x.; then
19894 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
19896 s///
19897 s/^/:/
19898 s/[ ]*$/:/
19899 s/:\$(srcdir):/:/g
19900 s/:\${srcdir}:/:/g
19901 s/:@srcdir@:/:/g
19902 s/^:*//
19903 s/:*$//
19905 s/\(=[ ]*\).*/\1/
19907 s/\n//
19908 s/^[^=]*=[ ]*$//
19912 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19913 fi # test -n "$CONFIG_FILES"
19915 # Set up the scripts for CONFIG_HEADERS section.
19916 # No need to generate them if there are no CONFIG_HEADERS.
19917 # This happens for instance with `./config.status Makefile'.
19918 if test -n "$CONFIG_HEADERS"; then
19919 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19920 BEGIN {
19921 _ACEOF
19923 # Transform confdefs.h into an awk script `defines.awk', embedded as
19924 # here-document in config.status, that substitutes the proper values into
19925 # config.h.in to produce config.h.
19927 # Create a delimiter string that does not exist in confdefs.h, to ease
19928 # handling of long lines.
19929 ac_delim='%!_!# '
19930 for ac_last_try in false false :; do
19931 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19932 if test -z "$ac_tt"; then
19933 break
19934 elif $ac_last_try; then
19935 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
19936 else
19937 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19939 done
19941 # For the awk script, D is an array of macro values keyed by name,
19942 # likewise P contains macro parameters if any. Preserve backslash
19943 # newline sequences.
19945 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19946 sed -n '
19947 s/.\{148\}/&'"$ac_delim"'/g
19948 t rset
19949 :rset
19950 s/^[ ]*#[ ]*define[ ][ ]*/ /
19951 t def
19953 :def
19954 s/\\$//
19955 t bsnl
19956 s/["\\]/\\&/g
19957 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19958 D["\1"]=" \3"/p
19959 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
19961 :bsnl
19962 s/["\\]/\\&/g
19963 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19964 D["\1"]=" \3\\\\\\n"\\/p
19965 t cont
19966 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19967 t cont
19969 :cont
19971 s/.\{148\}/&'"$ac_delim"'/g
19972 t clear
19973 :clear
19974 s/\\$//
19975 t bsnlc
19976 s/["\\]/\\&/g; s/^/"/; s/$/"/p
19978 :bsnlc
19979 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
19980 b cont
19981 ' <confdefs.h | sed '
19982 s/'"$ac_delim"'/"\\\
19983 "/g' >>$CONFIG_STATUS || ac_write_fail=1
19985 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19986 for (key in D) D_is_set[key] = 1
19987 FS = "\a"
19989 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
19990 line = \$ 0
19991 split(line, arg, " ")
19992 if (arg[1] == "#") {
19993 defundef = arg[2]
19994 mac1 = arg[3]
19995 } else {
19996 defundef = substr(arg[1], 2)
19997 mac1 = arg[2]
19999 split(mac1, mac2, "(") #)
20000 macro = mac2[1]
20001 prefix = substr(line, 1, index(line, defundef) - 1)
20002 if (D_is_set[macro]) {
20003 # Preserve the white space surrounding the "#".
20004 print prefix "define", macro P[macro] D[macro]
20005 next
20006 } else {
20007 # Replace #undef with comments. This is necessary, for example,
20008 # in the case of _POSIX_SOURCE, which is predefined and required
20009 # on some systems where configure will not decide to define it.
20010 if (defundef == "undef") {
20011 print "/*", prefix defundef, macro, "*/"
20012 next
20016 { print }
20017 _ACAWK
20018 _ACEOF
20019 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20020 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20021 fi # test -n "$CONFIG_HEADERS"
20024 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20025 shift
20026 for ac_tag
20028 case $ac_tag in
20029 :[FHLC]) ac_mode=$ac_tag; continue;;
20030 esac
20031 case $ac_mode$ac_tag in
20032 :[FHL]*:*);;
20033 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20034 :[FH]-) ac_tag=-:-;;
20035 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20036 esac
20037 ac_save_IFS=$IFS
20038 IFS=:
20039 set x $ac_tag
20040 IFS=$ac_save_IFS
20041 shift
20042 ac_file=$1
20043 shift
20045 case $ac_mode in
20046 :L) ac_source=$1;;
20047 :[FH])
20048 ac_file_inputs=
20049 for ac_f
20051 case $ac_f in
20052 -) ac_f="$ac_tmp/stdin";;
20053 *) # Look for the file first in the build tree, then in the source tree
20054 # (if the path is not absolute). The absolute path cannot be DOS-style,
20055 # because $ac_f cannot contain `:'.
20056 test -f "$ac_f" ||
20057 case $ac_f in
20058 [\\/$]*) false;;
20059 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20060 esac ||
20061 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20062 esac
20063 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20064 as_fn_append ac_file_inputs " '$ac_f'"
20065 done
20067 # Let's still pretend it is `configure' which instantiates (i.e., don't
20068 # use $as_me), people would be surprised to read:
20069 # /* config.h. Generated by config.status. */
20070 configure_input='Generated from '`
20071 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20072 `' by configure.'
20073 if test x"$ac_file" != x-; then
20074 configure_input="$ac_file. $configure_input"
20075 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20076 $as_echo "$as_me: creating $ac_file" >&6;}
20078 # Neutralize special characters interpreted by sed in replacement strings.
20079 case $configure_input in #(
20080 *\&* | *\|* | *\\* )
20081 ac_sed_conf_input=`$as_echo "$configure_input" |
20082 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20083 *) ac_sed_conf_input=$configure_input;;
20084 esac
20086 case $ac_tag in
20087 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20088 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20089 esac
20091 esac
20093 ac_dir=`$as_dirname -- "$ac_file" ||
20094 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20095 X"$ac_file" : 'X\(//\)[^/]' \| \
20096 X"$ac_file" : 'X\(//\)$' \| \
20097 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20098 $as_echo X"$ac_file" |
20099 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20100 s//\1/
20103 /^X\(\/\/\)[^/].*/{
20104 s//\1/
20107 /^X\(\/\/\)$/{
20108 s//\1/
20111 /^X\(\/\).*/{
20112 s//\1/
20115 s/.*/./; q'`
20116 as_dir="$ac_dir"; as_fn_mkdir_p
20117 ac_builddir=.
20119 case "$ac_dir" in
20120 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20122 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20123 # A ".." for each directory in $ac_dir_suffix.
20124 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20125 case $ac_top_builddir_sub in
20126 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20127 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20128 esac ;;
20129 esac
20130 ac_abs_top_builddir=$ac_pwd
20131 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20132 # for backward compatibility:
20133 ac_top_builddir=$ac_top_build_prefix
20135 case $srcdir in
20136 .) # We are building in place.
20137 ac_srcdir=.
20138 ac_top_srcdir=$ac_top_builddir_sub
20139 ac_abs_top_srcdir=$ac_pwd ;;
20140 [\\/]* | ?:[\\/]* ) # Absolute name.
20141 ac_srcdir=$srcdir$ac_dir_suffix;
20142 ac_top_srcdir=$srcdir
20143 ac_abs_top_srcdir=$srcdir ;;
20144 *) # Relative name.
20145 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20146 ac_top_srcdir=$ac_top_build_prefix$srcdir
20147 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20148 esac
20149 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20152 case $ac_mode in
20155 # CONFIG_FILE
20158 case $INSTALL in
20159 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20160 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20161 esac
20162 ac_MKDIR_P=$MKDIR_P
20163 case $MKDIR_P in
20164 [\\/$]* | ?:[\\/]* ) ;;
20165 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20166 esac
20167 _ACEOF
20169 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20170 # If the template does not know about datarootdir, expand it.
20171 # FIXME: This hack should be removed a few years after 2.60.
20172 ac_datarootdir_hack=; ac_datarootdir_seen=
20173 ac_sed_dataroot='
20174 /datarootdir/ {
20178 /@datadir@/p
20179 /@docdir@/p
20180 /@infodir@/p
20181 /@localedir@/p
20182 /@mandir@/p'
20183 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20184 *datarootdir*) ac_datarootdir_seen=yes;;
20185 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20186 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20187 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20188 _ACEOF
20189 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20190 ac_datarootdir_hack='
20191 s&@datadir@&$datadir&g
20192 s&@docdir@&$docdir&g
20193 s&@infodir@&$infodir&g
20194 s&@localedir@&$localedir&g
20195 s&@mandir@&$mandir&g
20196 s&\\\${datarootdir}&$datarootdir&g' ;;
20197 esac
20198 _ACEOF
20200 # Neutralize VPATH when `$srcdir' = `.'.
20201 # Shell code in configure.ac might set extrasub.
20202 # FIXME: do we really want to maintain this feature?
20203 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20204 ac_sed_extra="$ac_vpsub
20205 $extrasub
20206 _ACEOF
20207 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20209 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20210 s|@configure_input@|$ac_sed_conf_input|;t t
20211 s&@top_builddir@&$ac_top_builddir_sub&;t t
20212 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20213 s&@srcdir@&$ac_srcdir&;t t
20214 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20215 s&@top_srcdir@&$ac_top_srcdir&;t t
20216 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20217 s&@builddir@&$ac_builddir&;t t
20218 s&@abs_builddir@&$ac_abs_builddir&;t t
20219 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20220 s&@INSTALL@&$ac_INSTALL&;t t
20221 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20222 $ac_datarootdir_hack
20224 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20225 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20227 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20228 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20229 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20230 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20231 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20232 which seems to be undefined. Please make sure it is defined" >&5
20233 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20234 which seems to be undefined. Please make sure it is defined" >&2;}
20236 rm -f "$ac_tmp/stdin"
20237 case $ac_file in
20238 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20239 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20240 esac \
20241 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20245 # CONFIG_HEADER
20247 if test x"$ac_file" != x-; then
20249 $as_echo "/* $configure_input */" \
20250 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20251 } >"$ac_tmp/config.h" \
20252 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20253 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20254 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20255 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20256 else
20257 rm -f "$ac_file"
20258 mv "$ac_tmp/config.h" "$ac_file" \
20259 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20261 else
20262 $as_echo "/* $configure_input */" \
20263 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20264 || as_fn_error $? "could not create -" "$LINENO" 5
20269 # CONFIG_LINK
20272 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20274 else
20275 # Prefer the file from the source tree if names are identical.
20276 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20277 ac_source=$srcdir/$ac_source
20280 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20281 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20283 if test ! -r "$ac_source"; then
20284 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20286 rm -f "$ac_file"
20288 # Try a relative symlink, then a hard link, then a copy.
20289 case $ac_source in
20290 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20291 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20292 esac
20293 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20294 ln "$ac_source" "$ac_file" 2>/dev/null ||
20295 cp -p "$ac_source" "$ac_file" ||
20296 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20299 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20300 $as_echo "$as_me: executing $ac_file commands" >&6;}
20302 esac
20305 case $ac_file$ac_mode in
20306 "check_win32_symlinks":C)
20307 # Links sometimes fail undetected on Mingw -
20308 # so here we detect it and warn the user
20309 for FILE in $CONFIG_LINKS
20311 # test -e works for symlinks in the MinGW console
20312 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20313 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20314 done
20316 "src/include/pg_config.h":H)
20317 # Update timestamp for pg_config.h (see Makefile.global)
20318 echo >src/include/stamp-h
20320 "src/include/pg_config_ext.h":H)
20321 # Update timestamp for pg_config_ext.h (see Makefile.global)
20322 echo >src/include/stamp-ext-h
20324 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20326 esac
20327 done # for ac_tag
20330 as_fn_exit 0
20331 _ACEOF
20332 ac_clean_files=$ac_clean_files_save
20334 test $ac_write_fail = 0 ||
20335 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20338 # configure is writing to config.log, and then calls config.status.
20339 # config.status does its own redirection, appending to config.log.
20340 # Unfortunately, on DOS this fails, as config.log is still kept open
20341 # by configure, so config.status won't be able to write to it; its
20342 # output is simply discarded. So we exec the FD to /dev/null,
20343 # effectively closing config.log, so it can be properly (re)opened and
20344 # appended to by config.status. When coming back to configure, we
20345 # need to make the FD available again.
20346 if test "$no_create" != yes; then
20347 ac_cs_success=:
20348 ac_config_status_args=
20349 test "$silent" = yes &&
20350 ac_config_status_args="$ac_config_status_args --quiet"
20351 exec 5>/dev/null
20352 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20353 exec 5>>config.log
20354 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20355 # would make configure fail if this is the last instruction.
20356 $ac_cs_success || as_fn_exit 1
20358 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20359 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20360 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20364 # Ensure that any meson build directories would reconfigure and see that
20365 # there's a conflicting in-tree build and can error out.
20366 if test "$vpath_build" = "no"; then
20367 touch meson.build