Create infrastructure for "soft" error reporting.
[pgsql.git] / configure
blob62f382c1d13b160dbb8dbd47503ff6fb20a1a9d3
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 16devel.
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-2022, 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='16devel'
586 PACKAGE_STRING='PostgreSQL 16devel'
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 enable_thread_safety
726 INCLUDES
727 autodepend
728 PKG_CONFIG_LIBDIR
729 PKG_CONFIG_PATH
730 PKG_CONFIG
731 DLSUFFIX
735 CFLAGS_SL
736 BITCODE_CXXFLAGS
737 BITCODE_CFLAGS
738 CXXFLAGS_SL_MODULE
739 CFLAGS_SL_MODULE
740 CFLAGS_VECTORIZE
741 CFLAGS_UNROLL_LOOPS
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_tap_tests
764 enable_dtrace
765 DTRACEFLAGS
766 DTRACE
767 enable_coverage
768 GENHTML
769 LCOV
770 GCOV
771 enable_debug
772 enable_rpath
773 default_port
774 WANTED_LANGUAGES
775 enable_nls
776 PORTNAME
777 host_os
778 host_vendor
779 host_cpu
780 host
781 build_os
782 build_vendor
783 build_cpu
784 build
785 PG_MAJORVERSION
786 target_alias
787 host_alias
788 build_alias
789 LIBS
790 ECHO_T
791 ECHO_N
792 ECHO_C
793 DEFS
794 mandir
795 localedir
796 libdir
797 psdir
798 pdfdir
799 dvidir
800 htmldir
801 infodir
802 docdir
803 oldincludedir
804 includedir
805 localstatedir
806 sharedstatedir
807 sysconfdir
808 datadir
809 datarootdir
810 libexecdir
811 sbindir
812 bindir
813 program_transform_name
814 prefix
815 exec_prefix
816 PACKAGE_URL
817 PACKAGE_BUGREPORT
818 PACKAGE_STRING
819 PACKAGE_VERSION
820 PACKAGE_TARNAME
821 PACKAGE_NAME
822 PATH_SEPARATOR
823 SHELL'
824 ac_subst_files=''
825 ac_user_opts='
826 enable_option_checking
827 with_extra_version
828 with_template
829 with_includes
830 with_libraries
831 with_libs
832 enable_integer_datetimes
833 enable_nls
834 with_pgport
835 enable_rpath
836 enable_spinlocks
837 enable_atomics
838 enable_debug
839 enable_profiling
840 enable_coverage
841 enable_dtrace
842 enable_tap_tests
843 with_blocksize
844 with_segsize
845 with_segsize_blocks
846 with_wal_blocksize
847 with_CC
848 with_llvm
849 enable_depend
850 enable_cassert
851 enable_thread_safety
852 with_icu
853 with_tcl
854 with_tclconfig
855 with_perl
856 with_python
857 with_gssapi
858 with_krb_srvnam
859 with_pam
860 with_bsd_auth
861 with_ldap
862 with_bonjour
863 with_selinux
864 with_systemd
865 with_readline
866 with_libedit_preferred
867 with_uuid
868 with_ossp_uuid
869 with_libxml
870 with_libxslt
871 with_system_tzdata
872 with_zlib
873 with_lz4
874 with_zstd
875 with_ssl
876 with_openssl
877 enable_largefile
879 ac_precious_vars='build_alias
880 host_alias
881 target_alias
883 CFLAGS
884 LDFLAGS
885 LIBS
886 CPPFLAGS
888 CXXFLAGS
890 LLVM_CONFIG
891 CLANG
893 PKG_CONFIG
894 PKG_CONFIG_PATH
895 PKG_CONFIG_LIBDIR
896 ICU_CFLAGS
897 ICU_LIBS
898 XML2_CONFIG
899 XML2_CFLAGS
900 XML2_LIBS
901 LZ4_CFLAGS
902 LZ4_LIBS
903 ZSTD_CFLAGS
904 ZSTD_LIBS
905 LDFLAGS_EX
906 LDFLAGS_SL
907 PERL
908 PYTHON
909 MSGFMT
910 TCLSH'
913 # Initialize some variables set by options.
914 ac_init_help=
915 ac_init_version=false
916 ac_unrecognized_opts=
917 ac_unrecognized_sep=
918 # The variables have the same names as the options, with
919 # dashes changed to underlines.
920 cache_file=/dev/null
921 exec_prefix=NONE
922 no_create=
923 no_recursion=
924 prefix=NONE
925 program_prefix=NONE
926 program_suffix=NONE
927 program_transform_name=s,x,x,
928 silent=
929 site=
930 srcdir=
931 verbose=
932 x_includes=NONE
933 x_libraries=NONE
935 # Installation directory options.
936 # These are left unexpanded so users can "make install exec_prefix=/foo"
937 # and all the variables that are supposed to be based on exec_prefix
938 # by default will actually change.
939 # Use braces instead of parens because sh, perl, etc. also accept them.
940 # (The list follows the same order as the GNU Coding Standards.)
941 bindir='${exec_prefix}/bin'
942 sbindir='${exec_prefix}/sbin'
943 libexecdir='${exec_prefix}/libexec'
944 datarootdir='${prefix}/share'
945 datadir='${datarootdir}'
946 sysconfdir='${prefix}/etc'
947 sharedstatedir='${prefix}/com'
948 localstatedir='${prefix}/var'
949 includedir='${prefix}/include'
950 oldincludedir='/usr/include'
951 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
952 infodir='${datarootdir}/info'
953 htmldir='${docdir}'
954 dvidir='${docdir}'
955 pdfdir='${docdir}'
956 psdir='${docdir}'
957 libdir='${exec_prefix}/lib'
958 localedir='${datarootdir}/locale'
959 mandir='${datarootdir}/man'
961 ac_prev=
962 ac_dashdash=
963 for ac_option
965 # If the previous option needs an argument, assign it.
966 if test -n "$ac_prev"; then
967 eval $ac_prev=\$ac_option
968 ac_prev=
969 continue
972 case $ac_option in
973 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
974 *=) ac_optarg= ;;
975 *) ac_optarg=yes ;;
976 esac
978 # Accept the important Cygnus configure options, so we can diagnose typos.
980 case $ac_dashdash$ac_option in
982 ac_dashdash=yes ;;
984 -bindir | --bindir | --bindi | --bind | --bin | --bi)
985 ac_prev=bindir ;;
986 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
987 bindir=$ac_optarg ;;
989 -build | --build | --buil | --bui | --bu)
990 ac_prev=build_alias ;;
991 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
992 build_alias=$ac_optarg ;;
994 -cache-file | --cache-file | --cache-fil | --cache-fi \
995 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
996 ac_prev=cache_file ;;
997 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
998 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
999 cache_file=$ac_optarg ;;
1001 --config-cache | -C)
1002 cache_file=config.cache ;;
1004 -datadir | --datadir | --datadi | --datad)
1005 ac_prev=datadir ;;
1006 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1007 datadir=$ac_optarg ;;
1009 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1010 | --dataroo | --dataro | --datar)
1011 ac_prev=datarootdir ;;
1012 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1013 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1014 datarootdir=$ac_optarg ;;
1016 -disable-* | --disable-*)
1017 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1018 # Reject names that are not valid shell variable names.
1019 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1020 as_fn_error $? "invalid feature name: $ac_useropt"
1021 ac_useropt_orig=$ac_useropt
1022 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1023 case $ac_user_opts in
1025 "enable_$ac_useropt"
1026 "*) ;;
1027 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1028 ac_unrecognized_sep=', ';;
1029 esac
1030 eval enable_$ac_useropt=no ;;
1032 -docdir | --docdir | --docdi | --doc | --do)
1033 ac_prev=docdir ;;
1034 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1035 docdir=$ac_optarg ;;
1037 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1038 ac_prev=dvidir ;;
1039 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1040 dvidir=$ac_optarg ;;
1042 -enable-* | --enable-*)
1043 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1044 # Reject names that are not valid shell variable names.
1045 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1046 as_fn_error $? "invalid feature name: $ac_useropt"
1047 ac_useropt_orig=$ac_useropt
1048 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1049 case $ac_user_opts in
1051 "enable_$ac_useropt"
1052 "*) ;;
1053 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1054 ac_unrecognized_sep=', ';;
1055 esac
1056 eval enable_$ac_useropt=\$ac_optarg ;;
1058 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1059 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1060 | --exec | --exe | --ex)
1061 ac_prev=exec_prefix ;;
1062 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1063 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1064 | --exec=* | --exe=* | --ex=*)
1065 exec_prefix=$ac_optarg ;;
1067 -gas | --gas | --ga | --g)
1068 # Obsolete; use --with-gas.
1069 with_gas=yes ;;
1071 -help | --help | --hel | --he | -h)
1072 ac_init_help=long ;;
1073 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1074 ac_init_help=recursive ;;
1075 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1076 ac_init_help=short ;;
1078 -host | --host | --hos | --ho)
1079 ac_prev=host_alias ;;
1080 -host=* | --host=* | --hos=* | --ho=*)
1081 host_alias=$ac_optarg ;;
1083 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1084 ac_prev=htmldir ;;
1085 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1086 | --ht=*)
1087 htmldir=$ac_optarg ;;
1089 -includedir | --includedir | --includedi | --included | --include \
1090 | --includ | --inclu | --incl | --inc)
1091 ac_prev=includedir ;;
1092 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1093 | --includ=* | --inclu=* | --incl=* | --inc=*)
1094 includedir=$ac_optarg ;;
1096 -infodir | --infodir | --infodi | --infod | --info | --inf)
1097 ac_prev=infodir ;;
1098 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1099 infodir=$ac_optarg ;;
1101 -libdir | --libdir | --libdi | --libd)
1102 ac_prev=libdir ;;
1103 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1104 libdir=$ac_optarg ;;
1106 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1107 | --libexe | --libex | --libe)
1108 ac_prev=libexecdir ;;
1109 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1110 | --libexe=* | --libex=* | --libe=*)
1111 libexecdir=$ac_optarg ;;
1113 -localedir | --localedir | --localedi | --localed | --locale)
1114 ac_prev=localedir ;;
1115 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1116 localedir=$ac_optarg ;;
1118 -localstatedir | --localstatedir | --localstatedi | --localstated \
1119 | --localstate | --localstat | --localsta | --localst | --locals)
1120 ac_prev=localstatedir ;;
1121 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1122 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1123 localstatedir=$ac_optarg ;;
1125 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1126 ac_prev=mandir ;;
1127 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1128 mandir=$ac_optarg ;;
1130 -nfp | --nfp | --nf)
1131 # Obsolete; use --without-fp.
1132 with_fp=no ;;
1134 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1135 | --no-cr | --no-c | -n)
1136 no_create=yes ;;
1138 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1139 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1140 no_recursion=yes ;;
1142 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1143 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1144 | --oldin | --oldi | --old | --ol | --o)
1145 ac_prev=oldincludedir ;;
1146 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1147 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1148 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1149 oldincludedir=$ac_optarg ;;
1151 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1152 ac_prev=prefix ;;
1153 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1154 prefix=$ac_optarg ;;
1156 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1157 | --program-pre | --program-pr | --program-p)
1158 ac_prev=program_prefix ;;
1159 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1160 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1161 program_prefix=$ac_optarg ;;
1163 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1164 | --program-suf | --program-su | --program-s)
1165 ac_prev=program_suffix ;;
1166 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1167 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1168 program_suffix=$ac_optarg ;;
1170 -program-transform-name | --program-transform-name \
1171 | --program-transform-nam | --program-transform-na \
1172 | --program-transform-n | --program-transform- \
1173 | --program-transform | --program-transfor \
1174 | --program-transfo | --program-transf \
1175 | --program-trans | --program-tran \
1176 | --progr-tra | --program-tr | --program-t)
1177 ac_prev=program_transform_name ;;
1178 -program-transform-name=* | --program-transform-name=* \
1179 | --program-transform-nam=* | --program-transform-na=* \
1180 | --program-transform-n=* | --program-transform-=* \
1181 | --program-transform=* | --program-transfor=* \
1182 | --program-transfo=* | --program-transf=* \
1183 | --program-trans=* | --program-tran=* \
1184 | --progr-tra=* | --program-tr=* | --program-t=*)
1185 program_transform_name=$ac_optarg ;;
1187 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1188 ac_prev=pdfdir ;;
1189 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1190 pdfdir=$ac_optarg ;;
1192 -psdir | --psdir | --psdi | --psd | --ps)
1193 ac_prev=psdir ;;
1194 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1195 psdir=$ac_optarg ;;
1197 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1198 | -silent | --silent | --silen | --sile | --sil)
1199 silent=yes ;;
1201 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1202 ac_prev=sbindir ;;
1203 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1204 | --sbi=* | --sb=*)
1205 sbindir=$ac_optarg ;;
1207 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1208 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1209 | --sharedst | --shareds | --shared | --share | --shar \
1210 | --sha | --sh)
1211 ac_prev=sharedstatedir ;;
1212 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1213 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1214 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1215 | --sha=* | --sh=*)
1216 sharedstatedir=$ac_optarg ;;
1218 -site | --site | --sit)
1219 ac_prev=site ;;
1220 -site=* | --site=* | --sit=*)
1221 site=$ac_optarg ;;
1223 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1224 ac_prev=srcdir ;;
1225 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1226 srcdir=$ac_optarg ;;
1228 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1229 | --syscon | --sysco | --sysc | --sys | --sy)
1230 ac_prev=sysconfdir ;;
1231 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1232 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1233 sysconfdir=$ac_optarg ;;
1235 -target | --target | --targe | --targ | --tar | --ta | --t)
1236 ac_prev=target_alias ;;
1237 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1238 target_alias=$ac_optarg ;;
1240 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1241 verbose=yes ;;
1243 -version | --version | --versio | --versi | --vers | -V)
1244 ac_init_version=: ;;
1246 -with-* | --with-*)
1247 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1248 # Reject names that are not valid shell variable names.
1249 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1250 as_fn_error $? "invalid package name: $ac_useropt"
1251 ac_useropt_orig=$ac_useropt
1252 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1253 case $ac_user_opts in
1255 "with_$ac_useropt"
1256 "*) ;;
1257 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1258 ac_unrecognized_sep=', ';;
1259 esac
1260 eval with_$ac_useropt=\$ac_optarg ;;
1262 -without-* | --without-*)
1263 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1264 # Reject names that are not valid shell variable names.
1265 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1266 as_fn_error $? "invalid package name: $ac_useropt"
1267 ac_useropt_orig=$ac_useropt
1268 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1269 case $ac_user_opts in
1271 "with_$ac_useropt"
1272 "*) ;;
1273 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1274 ac_unrecognized_sep=', ';;
1275 esac
1276 eval with_$ac_useropt=no ;;
1278 --x)
1279 # Obsolete; use --with-x.
1280 with_x=yes ;;
1282 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1283 | --x-incl | --x-inc | --x-in | --x-i)
1284 ac_prev=x_includes ;;
1285 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1286 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1287 x_includes=$ac_optarg ;;
1289 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1290 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1291 ac_prev=x_libraries ;;
1292 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1293 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1294 x_libraries=$ac_optarg ;;
1296 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1297 Try \`$0 --help' for more information"
1300 *=*)
1301 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1302 # Reject names that are not valid shell variable names.
1303 case $ac_envvar in #(
1304 '' | [0-9]* | *[!_$as_cr_alnum]* )
1305 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1306 esac
1307 eval $ac_envvar=\$ac_optarg
1308 export $ac_envvar ;;
1311 # FIXME: should be removed in autoconf 3.0.
1312 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1313 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1314 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1315 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1318 esac
1319 done
1321 if test -n "$ac_prev"; then
1322 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1323 as_fn_error $? "missing argument to $ac_option"
1326 if test -n "$ac_unrecognized_opts"; then
1327 case $enable_option_checking in
1328 no) ;;
1329 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1330 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1331 esac
1334 # Check all directory arguments for consistency.
1335 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1336 datadir sysconfdir sharedstatedir localstatedir includedir \
1337 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1338 libdir localedir mandir
1340 eval ac_val=\$$ac_var
1341 # Remove trailing slashes.
1342 case $ac_val in
1343 */ )
1344 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1345 eval $ac_var=\$ac_val;;
1346 esac
1347 # Be sure to have absolute directory names.
1348 case $ac_val in
1349 [\\/$]* | ?:[\\/]* ) continue;;
1350 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1351 esac
1352 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1353 done
1355 # There might be people who depend on the old broken behavior: `$host'
1356 # used to hold the argument of --host etc.
1357 # FIXME: To remove some day.
1358 build=$build_alias
1359 host=$host_alias
1360 target=$target_alias
1362 # FIXME: To remove some day.
1363 if test "x$host_alias" != x; then
1364 if test "x$build_alias" = x; then
1365 cross_compiling=maybe
1366 elif test "x$build_alias" != "x$host_alias"; then
1367 cross_compiling=yes
1371 ac_tool_prefix=
1372 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1374 test "$silent" = yes && exec 6>/dev/null
1377 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1378 ac_ls_di=`ls -di .` &&
1379 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1380 as_fn_error $? "working directory cannot be determined"
1381 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1382 as_fn_error $? "pwd does not report name of working directory"
1385 # Find the source files, if location was not specified.
1386 if test -z "$srcdir"; then
1387 ac_srcdir_defaulted=yes
1388 # Try the directory containing this script, then the parent directory.
1389 ac_confdir=`$as_dirname -- "$as_myself" ||
1390 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1391 X"$as_myself" : 'X\(//\)[^/]' \| \
1392 X"$as_myself" : 'X\(//\)$' \| \
1393 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1394 $as_echo X"$as_myself" |
1395 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1396 s//\1/
1399 /^X\(\/\/\)[^/].*/{
1400 s//\1/
1403 /^X\(\/\/\)$/{
1404 s//\1/
1407 /^X\(\/\).*/{
1408 s//\1/
1411 s/.*/./; q'`
1412 srcdir=$ac_confdir
1413 if test ! -r "$srcdir/$ac_unique_file"; then
1414 srcdir=..
1416 else
1417 ac_srcdir_defaulted=no
1419 if test ! -r "$srcdir/$ac_unique_file"; then
1420 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1421 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1423 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1424 ac_abs_confdir=`(
1425 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1426 pwd)`
1427 # When building in place, set srcdir=.
1428 if test "$ac_abs_confdir" = "$ac_pwd"; then
1429 srcdir=.
1431 # Remove unnecessary trailing slashes from srcdir.
1432 # Double slashes in file names in object file debugging info
1433 # mess up M-x gdb in Emacs.
1434 case $srcdir in
1435 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1436 esac
1437 for ac_var in $ac_precious_vars; do
1438 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1439 eval ac_env_${ac_var}_value=\$${ac_var}
1440 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1441 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1442 done
1445 # Report the --help message.
1447 if test "$ac_init_help" = "long"; then
1448 # Omit some internal or obsolete options to make the list less imposing.
1449 # This message is too long to be a string in the A/UX 3.1 sh.
1450 cat <<_ACEOF
1451 \`configure' configures PostgreSQL 16devel 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 16devel:";;
1517 esac
1518 cat <<\_ACEOF
1520 Optional Features:
1521 --disable-option-checking ignore unrecognized --enable/--with options
1522 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1523 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1524 --disable-integer-datetimes
1525 obsolete option, no longer supported
1526 --enable-nls[=LANGUAGES]
1527 enable Native Language Support
1528 --disable-rpath do not embed shared library search path in
1529 executables
1530 --disable-spinlocks do not use spinlocks
1531 --disable-atomics do not use atomic operations
1532 --enable-debug build with debugging symbols (-g)
1533 --enable-profiling build with profiling enabled
1534 --enable-coverage build with coverage testing instrumentation
1535 --enable-dtrace build with DTrace support
1536 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1537 --enable-depend turn on automatic dependency tracking
1538 --enable-cassert enable assertion checks (for debugging)
1539 --disable-thread-safety disable thread-safety in client libraries
1540 --disable-largefile omit support for large files
1542 Optional Packages:
1543 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1544 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1545 --with-extra-version=STRING
1546 append STRING to version
1547 --with-template=NAME override operating system template
1548 --with-includes=DIRS look for additional header files in DIRS
1549 --with-libraries=DIRS look for additional libraries in DIRS
1550 --with-libs=DIRS alternative spelling of --with-libraries
1551 --with-pgport=PORTNUM set default port number [5432]
1552 --with-blocksize=BLOCKSIZE
1553 set table block size in kB [8]
1554 --with-segsize=SEGSIZE set table segment size in GB [1]
1555 --with-segsize-blocks=SEGSIZE_BLOCKS
1556 set table segment size in blocks [0]
1557 --with-wal-blocksize=BLOCKSIZE
1558 set WAL block size in kB [8]
1559 --with-CC=CMD set compiler (deprecated)
1560 --with-llvm build with LLVM based JIT support
1561 --with-icu build with ICU support
1562 --with-tcl build Tcl modules (PL/Tcl)
1563 --with-tclconfig=DIR tclConfig.sh is in DIR
1564 --with-perl build Perl modules (PL/Perl)
1565 --with-python build Python modules (PL/Python)
1566 --with-gssapi build with GSSAPI support
1567 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1568 [postgres]
1569 --with-pam build with PAM support
1570 --with-bsd-auth build with BSD Authentication support
1571 --with-ldap build with LDAP support
1572 --with-bonjour build with Bonjour support
1573 --with-selinux build with SELinux support
1574 --with-systemd build with systemd support
1575 --without-readline do not use GNU Readline nor BSD Libedit for editing
1576 --with-libedit-preferred
1577 prefer BSD Libedit over GNU Readline
1578 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1579 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1580 --with-libxml build with XML support
1581 --with-libxslt use XSLT support when building contrib/xml2
1582 --with-system-tzdata=DIR
1583 use system time zone data in DIR
1584 --without-zlib do not use Zlib
1585 --with-lz4 build with LZ4 support
1586 --with-zstd build with ZSTD support
1587 --with-ssl=LIB use LIB for SSL/TLS support (openssl)
1588 --with-openssl obsolete spelling of --with-ssl=openssl
1590 Some influential environment variables:
1591 CC C compiler command
1592 CFLAGS C compiler flags
1593 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1594 nonstandard directory <lib dir>
1595 LIBS libraries to pass to the linker, e.g. -l<library>
1596 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1597 you have headers in a nonstandard directory <include dir>
1598 CXX C++ compiler command
1599 CXXFLAGS C++ compiler flags
1600 LLVM_CONFIG path to llvm-config command
1601 CLANG path to clang compiler to generate bitcode
1602 CPP C preprocessor
1603 PKG_CONFIG path to pkg-config utility
1604 PKG_CONFIG_PATH
1605 directories to add to pkg-config's search path
1606 PKG_CONFIG_LIBDIR
1607 path overriding pkg-config's built-in search path
1608 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1609 ICU_LIBS linker flags for ICU, overriding pkg-config
1610 XML2_CONFIG path to xml2-config utility
1611 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1612 XML2_LIBS linker flags for XML2, overriding pkg-config
1613 LZ4_CFLAGS C compiler flags for LZ4, overriding pkg-config
1614 LZ4_LIBS linker flags for LZ4, overriding pkg-config
1615 ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
1616 ZSTD_LIBS linker flags for ZSTD, overriding pkg-config
1617 LDFLAGS_EX extra linker flags for linking executables only
1618 LDFLAGS_SL extra linker flags for linking shared libraries only
1619 PERL Perl program
1620 PYTHON Python program
1621 MSGFMT msgfmt program for NLS
1622 TCLSH Tcl interpreter program (tclsh)
1624 Use these variables to override the choices made by `configure' or to help
1625 it to find libraries and programs with nonstandard names/locations.
1627 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1628 PostgreSQL home page: <https://www.postgresql.org/>.
1629 _ACEOF
1630 ac_status=$?
1633 if test "$ac_init_help" = "recursive"; then
1634 # If there are subdirs, report their specific --help.
1635 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1636 test -d "$ac_dir" ||
1637 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1638 continue
1639 ac_builddir=.
1641 case "$ac_dir" in
1642 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1644 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1645 # A ".." for each directory in $ac_dir_suffix.
1646 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1647 case $ac_top_builddir_sub in
1648 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1649 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1650 esac ;;
1651 esac
1652 ac_abs_top_builddir=$ac_pwd
1653 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1654 # for backward compatibility:
1655 ac_top_builddir=$ac_top_build_prefix
1657 case $srcdir in
1658 .) # We are building in place.
1659 ac_srcdir=.
1660 ac_top_srcdir=$ac_top_builddir_sub
1661 ac_abs_top_srcdir=$ac_pwd ;;
1662 [\\/]* | ?:[\\/]* ) # Absolute name.
1663 ac_srcdir=$srcdir$ac_dir_suffix;
1664 ac_top_srcdir=$srcdir
1665 ac_abs_top_srcdir=$srcdir ;;
1666 *) # Relative name.
1667 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1668 ac_top_srcdir=$ac_top_build_prefix$srcdir
1669 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1670 esac
1671 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1673 cd "$ac_dir" || { ac_status=$?; continue; }
1674 # Check for guested configure.
1675 if test -f "$ac_srcdir/configure.gnu"; then
1676 echo &&
1677 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1678 elif test -f "$ac_srcdir/configure"; then
1679 echo &&
1680 $SHELL "$ac_srcdir/configure" --help=recursive
1681 else
1682 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1683 fi || ac_status=$?
1684 cd "$ac_pwd" || { ac_status=$?; break; }
1685 done
1688 test -n "$ac_init_help" && exit $ac_status
1689 if $ac_init_version; then
1690 cat <<\_ACEOF
1691 PostgreSQL configure 16devel
1692 generated by GNU Autoconf 2.69
1694 Copyright (C) 2012 Free Software Foundation, Inc.
1695 This configure script is free software; the Free Software Foundation
1696 gives unlimited permission to copy, distribute and modify it.
1698 Copyright (c) 1996-2022, PostgreSQL Global Development Group
1699 _ACEOF
1700 exit
1703 ## ------------------------ ##
1704 ## Autoconf initialization. ##
1705 ## ------------------------ ##
1707 # ac_fn_c_try_compile LINENO
1708 # --------------------------
1709 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1710 ac_fn_c_try_compile ()
1712 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1713 rm -f conftest.$ac_objext
1714 if { { ac_try="$ac_compile"
1715 case "(($ac_try" in
1716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1717 *) ac_try_echo=$ac_try;;
1718 esac
1719 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1720 $as_echo "$ac_try_echo"; } >&5
1721 (eval "$ac_compile") 2>conftest.err
1722 ac_status=$?
1723 if test -s conftest.err; then
1724 grep -v '^ *+' conftest.err >conftest.er1
1725 cat conftest.er1 >&5
1726 mv -f conftest.er1 conftest.err
1728 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1729 test $ac_status = 0; } && {
1730 test -z "$ac_c_werror_flag" ||
1731 test ! -s conftest.err
1732 } && test -s conftest.$ac_objext; then :
1733 ac_retval=0
1734 else
1735 $as_echo "$as_me: failed program was:" >&5
1736 sed 's/^/| /' conftest.$ac_ext >&5
1738 ac_retval=1
1740 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1741 as_fn_set_status $ac_retval
1743 } # ac_fn_c_try_compile
1745 # ac_fn_cxx_try_compile LINENO
1746 # ----------------------------
1747 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1748 ac_fn_cxx_try_compile ()
1750 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1751 rm -f conftest.$ac_objext
1752 if { { ac_try="$ac_compile"
1753 case "(($ac_try" in
1754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1755 *) ac_try_echo=$ac_try;;
1756 esac
1757 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1758 $as_echo "$ac_try_echo"; } >&5
1759 (eval "$ac_compile") 2>conftest.err
1760 ac_status=$?
1761 if test -s conftest.err; then
1762 grep -v '^ *+' conftest.err >conftest.er1
1763 cat conftest.er1 >&5
1764 mv -f conftest.er1 conftest.err
1766 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1767 test $ac_status = 0; } && {
1768 test -z "$ac_cxx_werror_flag" ||
1769 test ! -s conftest.err
1770 } && test -s conftest.$ac_objext; then :
1771 ac_retval=0
1772 else
1773 $as_echo "$as_me: failed program was:" >&5
1774 sed 's/^/| /' conftest.$ac_ext >&5
1776 ac_retval=1
1778 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1779 as_fn_set_status $ac_retval
1781 } # ac_fn_cxx_try_compile
1783 # ac_fn_c_try_link LINENO
1784 # -----------------------
1785 # Try to link conftest.$ac_ext, and return whether this succeeded.
1786 ac_fn_c_try_link ()
1788 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1789 rm -f conftest.$ac_objext conftest$ac_exeext
1790 if { { ac_try="$ac_link"
1791 case "(($ac_try" in
1792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1793 *) ac_try_echo=$ac_try;;
1794 esac
1795 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1796 $as_echo "$ac_try_echo"; } >&5
1797 (eval "$ac_link") 2>conftest.err
1798 ac_status=$?
1799 if test -s conftest.err; then
1800 grep -v '^ *+' conftest.err >conftest.er1
1801 cat conftest.er1 >&5
1802 mv -f conftest.er1 conftest.err
1804 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1805 test $ac_status = 0; } && {
1806 test -z "$ac_c_werror_flag" ||
1807 test ! -s conftest.err
1808 } && test -s conftest$ac_exeext && {
1809 test "$cross_compiling" = yes ||
1810 test -x conftest$ac_exeext
1811 }; then :
1812 ac_retval=0
1813 else
1814 $as_echo "$as_me: failed program was:" >&5
1815 sed 's/^/| /' conftest.$ac_ext >&5
1817 ac_retval=1
1819 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1820 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1821 # interfere with the next link command; also delete a directory that is
1822 # left behind by Apple's compiler. We do this before executing the actions.
1823 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1824 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1825 as_fn_set_status $ac_retval
1827 } # ac_fn_c_try_link
1829 # ac_fn_c_try_cpp LINENO
1830 # ----------------------
1831 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1832 ac_fn_c_try_cpp ()
1834 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1835 if { { ac_try="$ac_cpp conftest.$ac_ext"
1836 case "(($ac_try" in
1837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1838 *) ac_try_echo=$ac_try;;
1839 esac
1840 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1841 $as_echo "$ac_try_echo"; } >&5
1842 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1843 ac_status=$?
1844 if test -s conftest.err; then
1845 grep -v '^ *+' conftest.err >conftest.er1
1846 cat conftest.er1 >&5
1847 mv -f conftest.er1 conftest.err
1849 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1850 test $ac_status = 0; } > conftest.i && {
1851 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1852 test ! -s conftest.err
1853 }; then :
1854 ac_retval=0
1855 else
1856 $as_echo "$as_me: failed program was:" >&5
1857 sed 's/^/| /' conftest.$ac_ext >&5
1859 ac_retval=1
1861 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1862 as_fn_set_status $ac_retval
1864 } # ac_fn_c_try_cpp
1866 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1867 # -------------------------------------------------------
1868 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1869 # the include files in INCLUDES and setting the cache variable VAR
1870 # accordingly.
1871 ac_fn_c_check_header_mongrel ()
1873 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1874 if eval \${$3+:} false; then :
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1876 $as_echo_n "checking for $2... " >&6; }
1877 if eval \${$3+:} false; then :
1878 $as_echo_n "(cached) " >&6
1880 eval ac_res=\$$3
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1882 $as_echo "$ac_res" >&6; }
1883 else
1884 # Is the header compilable?
1885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1886 $as_echo_n "checking $2 usability... " >&6; }
1887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1888 /* end confdefs.h. */
1890 #include <$2>
1891 _ACEOF
1892 if ac_fn_c_try_compile "$LINENO"; then :
1893 ac_header_compiler=yes
1894 else
1895 ac_header_compiler=no
1897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1899 $as_echo "$ac_header_compiler" >&6; }
1901 # Is the header present?
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1903 $as_echo_n "checking $2 presence... " >&6; }
1904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1905 /* end confdefs.h. */
1906 #include <$2>
1907 _ACEOF
1908 if ac_fn_c_try_cpp "$LINENO"; then :
1909 ac_header_preproc=yes
1910 else
1911 ac_header_preproc=no
1913 rm -f conftest.err conftest.i conftest.$ac_ext
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1915 $as_echo "$ac_header_preproc" >&6; }
1917 # So? What about this header?
1918 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1919 yes:no: )
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1921 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1923 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1925 no:yes:* )
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1927 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1929 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1931 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1933 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1935 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1936 ( $as_echo "## ---------------------------------------------- ##
1937 ## Report this to pgsql-bugs@lists.postgresql.org ##
1938 ## ---------------------------------------------- ##"
1939 ) | sed "s/^/$as_me: WARNING: /" >&2
1941 esac
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1943 $as_echo_n "checking for $2... " >&6; }
1944 if eval \${$3+:} false; then :
1945 $as_echo_n "(cached) " >&6
1946 else
1947 eval "$3=\$ac_header_compiler"
1949 eval ac_res=\$$3
1950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1951 $as_echo "$ac_res" >&6; }
1953 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1955 } # ac_fn_c_check_header_mongrel
1957 # ac_fn_c_try_run LINENO
1958 # ----------------------
1959 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1960 # that executables *can* be run.
1961 ac_fn_c_try_run ()
1963 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1964 if { { ac_try="$ac_link"
1965 case "(($ac_try" in
1966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1967 *) ac_try_echo=$ac_try;;
1968 esac
1969 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1970 $as_echo "$ac_try_echo"; } >&5
1971 (eval "$ac_link") 2>&5
1972 ac_status=$?
1973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1974 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1975 { { case "(($ac_try" in
1976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1977 *) ac_try_echo=$ac_try;;
1978 esac
1979 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1980 $as_echo "$ac_try_echo"; } >&5
1981 (eval "$ac_try") 2>&5
1982 ac_status=$?
1983 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1984 test $ac_status = 0; }; }; then :
1985 ac_retval=0
1986 else
1987 $as_echo "$as_me: program exited with status $ac_status" >&5
1988 $as_echo "$as_me: failed program was:" >&5
1989 sed 's/^/| /' conftest.$ac_ext >&5
1991 ac_retval=$ac_status
1993 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1994 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1995 as_fn_set_status $ac_retval
1997 } # ac_fn_c_try_run
1999 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2000 # -------------------------------------------------------
2001 # Tests whether HEADER exists and can be compiled using the include files in
2002 # INCLUDES, setting the cache variable VAR accordingly.
2003 ac_fn_c_check_header_compile ()
2005 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2007 $as_echo_n "checking for $2... " >&6; }
2008 if eval \${$3+:} false; then :
2009 $as_echo_n "(cached) " >&6
2010 else
2011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012 /* end confdefs.h. */
2014 #include <$2>
2015 _ACEOF
2016 if ac_fn_c_try_compile "$LINENO"; then :
2017 eval "$3=yes"
2018 else
2019 eval "$3=no"
2021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2023 eval ac_res=\$$3
2024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2025 $as_echo "$ac_res" >&6; }
2026 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2028 } # ac_fn_c_check_header_compile
2030 # ac_fn_c_check_func LINENO FUNC VAR
2031 # ----------------------------------
2032 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2033 ac_fn_c_check_func ()
2035 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2037 $as_echo_n "checking for $2... " >&6; }
2038 if eval \${$3+:} false; then :
2039 $as_echo_n "(cached) " >&6
2040 else
2041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042 /* end confdefs.h. */
2043 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2044 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2045 #define $2 innocuous_$2
2047 /* System header to define __stub macros and hopefully few prototypes,
2048 which can conflict with char $2 (); below.
2049 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2050 <limits.h> exists even on freestanding compilers. */
2052 #ifdef __STDC__
2053 # include <limits.h>
2054 #else
2055 # include <assert.h>
2056 #endif
2058 #undef $2
2060 /* Override any GCC internal prototype to avoid an error.
2061 Use char because int might match the return type of a GCC
2062 builtin and then its argument prototype would still apply. */
2063 #ifdef __cplusplus
2064 extern "C"
2065 #endif
2066 char $2 ();
2067 /* The GNU C library defines this for functions which it implements
2068 to always fail with ENOSYS. Some functions are actually named
2069 something starting with __ and the normal name is an alias. */
2070 #if defined __stub_$2 || defined __stub___$2
2071 choke me
2072 #endif
2075 main ()
2077 return $2 ();
2079 return 0;
2081 _ACEOF
2082 if ac_fn_c_try_link "$LINENO"; then :
2083 eval "$3=yes"
2084 else
2085 eval "$3=no"
2087 rm -f core conftest.err conftest.$ac_objext \
2088 conftest$ac_exeext conftest.$ac_ext
2090 eval ac_res=\$$3
2091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2092 $as_echo "$ac_res" >&6; }
2093 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2095 } # ac_fn_c_check_func
2097 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2098 # -------------------------------------------
2099 # Tests whether TYPE exists after having included INCLUDES, setting cache
2100 # variable VAR accordingly.
2101 ac_fn_c_check_type ()
2103 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2105 $as_echo_n "checking for $2... " >&6; }
2106 if eval \${$3+:} false; then :
2107 $as_echo_n "(cached) " >&6
2108 else
2109 eval "$3=no"
2110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2111 /* end confdefs.h. */
2114 main ()
2116 if (sizeof ($2))
2117 return 0;
2119 return 0;
2121 _ACEOF
2122 if ac_fn_c_try_compile "$LINENO"; then :
2123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2124 /* end confdefs.h. */
2127 main ()
2129 if (sizeof (($2)))
2130 return 0;
2132 return 0;
2134 _ACEOF
2135 if ac_fn_c_try_compile "$LINENO"; then :
2137 else
2138 eval "$3=yes"
2140 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2144 eval ac_res=\$$3
2145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2146 $as_echo "$ac_res" >&6; }
2147 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2149 } # ac_fn_c_check_type
2151 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2152 # ----------------------------------------------------
2153 # Tries to find if the field MEMBER exists in type AGGR, after including
2154 # INCLUDES, setting cache variable VAR accordingly.
2155 ac_fn_c_check_member ()
2157 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2159 $as_echo_n "checking for $2.$3... " >&6; }
2160 if eval \${$4+:} false; then :
2161 $as_echo_n "(cached) " >&6
2162 else
2163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2164 /* end confdefs.h. */
2167 main ()
2169 static $2 ac_aggr;
2170 if (ac_aggr.$3)
2171 return 0;
2173 return 0;
2175 _ACEOF
2176 if ac_fn_c_try_compile "$LINENO"; then :
2177 eval "$4=yes"
2178 else
2179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2180 /* end confdefs.h. */
2183 main ()
2185 static $2 ac_aggr;
2186 if (sizeof ac_aggr.$3)
2187 return 0;
2189 return 0;
2191 _ACEOF
2192 if ac_fn_c_try_compile "$LINENO"; then :
2193 eval "$4=yes"
2194 else
2195 eval "$4=no"
2197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2201 eval ac_res=\$$4
2202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2203 $as_echo "$ac_res" >&6; }
2204 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2206 } # ac_fn_c_check_member
2208 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2209 # --------------------------------------------
2210 # Tries to find the compile-time value of EXPR in a program that includes
2211 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2212 # computed
2213 ac_fn_c_compute_int ()
2215 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2216 if test "$cross_compiling" = yes; then
2217 # Depending upon the size, compute the lo and hi bounds.
2218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2219 /* end confdefs.h. */
2222 main ()
2224 static int test_array [1 - 2 * !(($2) >= 0)];
2225 test_array [0] = 0;
2226 return test_array [0];
2229 return 0;
2231 _ACEOF
2232 if ac_fn_c_try_compile "$LINENO"; then :
2233 ac_lo=0 ac_mid=0
2234 while :; do
2235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2236 /* end confdefs.h. */
2239 main ()
2241 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2242 test_array [0] = 0;
2243 return test_array [0];
2246 return 0;
2248 _ACEOF
2249 if ac_fn_c_try_compile "$LINENO"; then :
2250 ac_hi=$ac_mid; break
2251 else
2252 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2253 if test $ac_lo -le $ac_mid; then
2254 ac_lo= ac_hi=
2255 break
2257 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2259 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2260 done
2261 else
2262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2263 /* end confdefs.h. */
2266 main ()
2268 static int test_array [1 - 2 * !(($2) < 0)];
2269 test_array [0] = 0;
2270 return test_array [0];
2273 return 0;
2275 _ACEOF
2276 if ac_fn_c_try_compile "$LINENO"; then :
2277 ac_hi=-1 ac_mid=-1
2278 while :; do
2279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2280 /* end confdefs.h. */
2283 main ()
2285 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2286 test_array [0] = 0;
2287 return test_array [0];
2290 return 0;
2292 _ACEOF
2293 if ac_fn_c_try_compile "$LINENO"; then :
2294 ac_lo=$ac_mid; break
2295 else
2296 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2297 if test $ac_mid -le $ac_hi; then
2298 ac_lo= ac_hi=
2299 break
2301 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2304 done
2305 else
2306 ac_lo= ac_hi=
2308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2311 # Binary search between lo and hi bounds.
2312 while test "x$ac_lo" != "x$ac_hi"; do
2313 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2315 /* end confdefs.h. */
2318 main ()
2320 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2321 test_array [0] = 0;
2322 return test_array [0];
2325 return 0;
2327 _ACEOF
2328 if ac_fn_c_try_compile "$LINENO"; then :
2329 ac_hi=$ac_mid
2330 else
2331 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2334 done
2335 case $ac_lo in #((
2336 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2337 '') ac_retval=1 ;;
2338 esac
2339 else
2340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2341 /* end confdefs.h. */
2343 static long int longval () { return $2; }
2344 static unsigned long int ulongval () { return $2; }
2345 #include <stdio.h>
2346 #include <stdlib.h>
2348 main ()
2351 FILE *f = fopen ("conftest.val", "w");
2352 if (! f)
2353 return 1;
2354 if (($2) < 0)
2356 long int i = longval ();
2357 if (i != ($2))
2358 return 1;
2359 fprintf (f, "%ld", i);
2361 else
2363 unsigned long int i = ulongval ();
2364 if (i != ($2))
2365 return 1;
2366 fprintf (f, "%lu", i);
2368 /* Do not output a trailing newline, as this causes \r\n confusion
2369 on some platforms. */
2370 return ferror (f) || fclose (f) != 0;
2373 return 0;
2375 _ACEOF
2376 if ac_fn_c_try_run "$LINENO"; then :
2377 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2378 else
2379 ac_retval=1
2381 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2382 conftest.$ac_objext conftest.beam conftest.$ac_ext
2383 rm -f conftest.val
2386 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2387 as_fn_set_status $ac_retval
2389 } # ac_fn_c_compute_int
2391 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2392 # ---------------------------------------------
2393 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2394 # accordingly.
2395 ac_fn_c_check_decl ()
2397 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2398 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2399 as_decl_name=`echo $2|sed 's/ *(.*//'`
2400 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2402 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2403 if eval \${$3+:} false; then :
2404 $as_echo_n "(cached) " >&6
2405 else
2406 ac_save_werror_flag=$ac_c_werror_flag
2407 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2409 /* end confdefs.h. */
2412 main ()
2414 #ifndef $as_decl_name
2415 #ifdef __cplusplus
2416 (void) $as_decl_use;
2417 #else
2418 (void) $as_decl_name;
2419 #endif
2420 #endif
2423 return 0;
2425 _ACEOF
2426 if ac_fn_c_try_compile "$LINENO"; then :
2427 eval "$3=yes"
2428 else
2429 eval "$3=no"
2431 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2432 ac_c_werror_flag=$ac_save_werror_flag
2434 eval ac_res=\$$3
2435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2436 $as_echo "$ac_res" >&6; }
2437 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2439 } # ac_fn_c_check_decl
2440 cat >config.log <<_ACEOF
2441 This file contains any messages produced by compilers while
2442 running configure, to aid debugging if configure makes a mistake.
2444 It was created by PostgreSQL $as_me 16devel, which was
2445 generated by GNU Autoconf 2.69. Invocation command line was
2447 $ $0 $@
2449 _ACEOF
2450 exec 5>>config.log
2452 cat <<_ASUNAME
2453 ## --------- ##
2454 ## Platform. ##
2455 ## --------- ##
2457 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2458 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2459 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2460 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2461 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2463 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2464 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2466 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2467 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2468 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2469 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2470 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2471 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2472 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2474 _ASUNAME
2476 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2477 for as_dir in $PATH
2479 IFS=$as_save_IFS
2480 test -z "$as_dir" && as_dir=.
2481 $as_echo "PATH: $as_dir"
2482 done
2483 IFS=$as_save_IFS
2485 } >&5
2487 cat >&5 <<_ACEOF
2490 ## ----------- ##
2491 ## Core tests. ##
2492 ## ----------- ##
2494 _ACEOF
2497 # Keep a trace of the command line.
2498 # Strip out --no-create and --no-recursion so they do not pile up.
2499 # Strip out --silent because we don't want to record it for future runs.
2500 # Also quote any args containing shell meta-characters.
2501 # Make two passes to allow for proper duplicate-argument suppression.
2502 ac_configure_args=
2503 ac_configure_args0=
2504 ac_configure_args1=
2505 ac_must_keep_next=false
2506 for ac_pass in 1 2
2508 for ac_arg
2510 case $ac_arg in
2511 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2512 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2513 | -silent | --silent | --silen | --sile | --sil)
2514 continue ;;
2515 *\'*)
2516 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2517 esac
2518 case $ac_pass in
2519 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2521 as_fn_append ac_configure_args1 " '$ac_arg'"
2522 if test $ac_must_keep_next = true; then
2523 ac_must_keep_next=false # Got value, back to normal.
2524 else
2525 case $ac_arg in
2526 *=* | --config-cache | -C | -disable-* | --disable-* \
2527 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2528 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2529 | -with-* | --with-* | -without-* | --without-* | --x)
2530 case "$ac_configure_args0 " in
2531 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2532 esac
2534 -* ) ac_must_keep_next=true ;;
2535 esac
2537 as_fn_append ac_configure_args " '$ac_arg'"
2539 esac
2540 done
2541 done
2542 { ac_configure_args0=; unset ac_configure_args0;}
2543 { ac_configure_args1=; unset ac_configure_args1;}
2545 # When interrupted or exit'd, cleanup temporary files, and complete
2546 # config.log. We remove comments because anyway the quotes in there
2547 # would cause problems or look ugly.
2548 # WARNING: Use '\'' to represent an apostrophe within the trap.
2549 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2550 trap 'exit_status=$?
2551 # Save into config.log some information that might help in debugging.
2553 echo
2555 $as_echo "## ---------------- ##
2556 ## Cache variables. ##
2557 ## ---------------- ##"
2558 echo
2559 # The following way of writing the cache mishandles newlines in values,
2561 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2562 eval ac_val=\$$ac_var
2563 case $ac_val in #(
2564 *${as_nl}*)
2565 case $ac_var in #(
2566 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2567 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2568 esac
2569 case $ac_var in #(
2570 _ | IFS | as_nl) ;; #(
2571 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2572 *) { eval $ac_var=; unset $ac_var;} ;;
2573 esac ;;
2574 esac
2575 done
2576 (set) 2>&1 |
2577 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2578 *${as_nl}ac_space=\ *)
2579 sed -n \
2580 "s/'\''/'\''\\\\'\'''\''/g;
2581 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2582 ;; #(
2584 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2586 esac |
2587 sort
2589 echo
2591 $as_echo "## ----------------- ##
2592 ## Output variables. ##
2593 ## ----------------- ##"
2594 echo
2595 for ac_var in $ac_subst_vars
2597 eval ac_val=\$$ac_var
2598 case $ac_val in
2599 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2600 esac
2601 $as_echo "$ac_var='\''$ac_val'\''"
2602 done | sort
2603 echo
2605 if test -n "$ac_subst_files"; then
2606 $as_echo "## ------------------- ##
2607 ## File substitutions. ##
2608 ## ------------------- ##"
2609 echo
2610 for ac_var in $ac_subst_files
2612 eval ac_val=\$$ac_var
2613 case $ac_val in
2614 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2615 esac
2616 $as_echo "$ac_var='\''$ac_val'\''"
2617 done | sort
2618 echo
2621 if test -s confdefs.h; then
2622 $as_echo "## ----------- ##
2623 ## confdefs.h. ##
2624 ## ----------- ##"
2625 echo
2626 cat confdefs.h
2627 echo
2629 test "$ac_signal" != 0 &&
2630 $as_echo "$as_me: caught signal $ac_signal"
2631 $as_echo "$as_me: exit $exit_status"
2632 } >&5
2633 rm -f core *.core core.conftest.* &&
2634 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2635 exit $exit_status
2637 for ac_signal in 1 2 13 15; do
2638 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2639 done
2640 ac_signal=0
2642 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2643 rm -f -r conftest* confdefs.h
2645 $as_echo "/* confdefs.h */" > confdefs.h
2647 # Predefined preprocessor variables.
2649 cat >>confdefs.h <<_ACEOF
2650 #define PACKAGE_NAME "$PACKAGE_NAME"
2651 _ACEOF
2653 cat >>confdefs.h <<_ACEOF
2654 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2655 _ACEOF
2657 cat >>confdefs.h <<_ACEOF
2658 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2659 _ACEOF
2661 cat >>confdefs.h <<_ACEOF
2662 #define PACKAGE_STRING "$PACKAGE_STRING"
2663 _ACEOF
2665 cat >>confdefs.h <<_ACEOF
2666 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2667 _ACEOF
2669 cat >>confdefs.h <<_ACEOF
2670 #define PACKAGE_URL "$PACKAGE_URL"
2671 _ACEOF
2674 # Let the site file select an alternate cache file if it wants to.
2675 # Prefer an explicitly selected file to automatically selected ones.
2676 ac_site_file1=NONE
2677 ac_site_file2=NONE
2678 if test -n "$CONFIG_SITE"; then
2679 # We do not want a PATH search for config.site.
2680 case $CONFIG_SITE in #((
2681 -*) ac_site_file1=./$CONFIG_SITE;;
2682 */*) ac_site_file1=$CONFIG_SITE;;
2683 *) ac_site_file1=./$CONFIG_SITE;;
2684 esac
2685 elif test "x$prefix" != xNONE; then
2686 ac_site_file1=$prefix/share/config.site
2687 ac_site_file2=$prefix/etc/config.site
2688 else
2689 ac_site_file1=$ac_default_prefix/share/config.site
2690 ac_site_file2=$ac_default_prefix/etc/config.site
2692 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2694 test "x$ac_site_file" = xNONE && continue
2695 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2697 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2698 sed 's/^/| /' "$ac_site_file" >&5
2699 . "$ac_site_file" \
2700 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2701 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2702 as_fn_error $? "failed to load site script $ac_site_file
2703 See \`config.log' for more details" "$LINENO" 5; }
2705 done
2707 if test -r "$cache_file"; then
2708 # Some versions of bash will fail to source /dev/null (special files
2709 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2710 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2711 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2712 $as_echo "$as_me: loading cache $cache_file" >&6;}
2713 case $cache_file in
2714 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2715 *) . "./$cache_file";;
2716 esac
2718 else
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2720 $as_echo "$as_me: creating cache $cache_file" >&6;}
2721 >$cache_file
2724 # Check that the precious variables saved in the cache have kept the same
2725 # value.
2726 ac_cache_corrupted=false
2727 for ac_var in $ac_precious_vars; do
2728 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2729 eval ac_new_set=\$ac_env_${ac_var}_set
2730 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2731 eval ac_new_val=\$ac_env_${ac_var}_value
2732 case $ac_old_set,$ac_new_set in
2733 set,)
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2735 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2736 ac_cache_corrupted=: ;;
2737 ,set)
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2739 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2740 ac_cache_corrupted=: ;;
2741 ,);;
2743 if test "x$ac_old_val" != "x$ac_new_val"; then
2744 # differences in whitespace do not lead to failure.
2745 ac_old_val_w=`echo x $ac_old_val`
2746 ac_new_val_w=`echo x $ac_new_val`
2747 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2749 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2750 ac_cache_corrupted=:
2751 else
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2753 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2754 eval $ac_var=\$ac_old_val
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2757 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2758 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2759 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2760 fi;;
2761 esac
2762 # Pass precious variables to config.status.
2763 if test "$ac_new_set" = set; then
2764 case $ac_new_val in
2765 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2766 *) ac_arg=$ac_var=$ac_new_val ;;
2767 esac
2768 case " $ac_configure_args " in
2769 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2770 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2771 esac
2773 done
2774 if $ac_cache_corrupted; then
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2776 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2778 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2779 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2781 ## -------------------- ##
2782 ## Main body of script. ##
2783 ## -------------------- ##
2785 ac_ext=c
2786 ac_cpp='$CPP $CPPFLAGS'
2787 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2788 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2789 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2796 ac_aux_dir=
2797 for ac_dir in config "$srcdir"/config; do
2798 if test -f "$ac_dir/install-sh"; then
2799 ac_aux_dir=$ac_dir
2800 ac_install_sh="$ac_aux_dir/install-sh -c"
2801 break
2802 elif test -f "$ac_dir/install.sh"; then
2803 ac_aux_dir=$ac_dir
2804 ac_install_sh="$ac_aux_dir/install.sh -c"
2805 break
2806 elif test -f "$ac_dir/shtool"; then
2807 ac_aux_dir=$ac_dir
2808 ac_install_sh="$ac_aux_dir/shtool install -c"
2809 break
2811 done
2812 if test -z "$ac_aux_dir"; then
2813 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2816 # These three variables are undocumented and unsupported,
2817 # and are intended to be withdrawn in a future Autoconf release.
2818 # They can cause serious problems if a builder's source tree is in a directory
2819 # whose full name contains unusual characters.
2820 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2821 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2822 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2827 cat >>confdefs.h <<_ACEOF
2828 #define CONFIGURE_ARGS "$ac_configure_args"
2829 _ACEOF
2832 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2833 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2834 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2837 cat >>confdefs.h <<_ACEOF
2838 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2839 _ACEOF
2842 cat >>confdefs.h <<_ACEOF
2843 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2844 _ACEOF
2847 cat >>confdefs.h <<_ACEOF
2848 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2849 _ACEOF
2855 # Check whether --with-extra-version was given.
2856 if test "${with_extra_version+set}" = set; then :
2857 withval=$with_extra_version;
2858 case $withval in
2859 yes)
2860 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2863 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2866 PG_VERSION="$PACKAGE_VERSION$withval"
2868 esac
2870 else
2871 PG_VERSION="$PACKAGE_VERSION"
2876 cat >>confdefs.h <<_ACEOF
2877 #define PG_VERSION "$PG_VERSION"
2878 _ACEOF
2881 # Make sure we can run config.sub.
2882 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2883 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2886 $as_echo_n "checking build system type... " >&6; }
2887 if ${ac_cv_build+:} false; then :
2888 $as_echo_n "(cached) " >&6
2889 else
2890 ac_build_alias=$build_alias
2891 test "x$ac_build_alias" = x &&
2892 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2893 test "x$ac_build_alias" = x &&
2894 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2895 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2896 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2900 $as_echo "$ac_cv_build" >&6; }
2901 case $ac_cv_build in
2902 *-*-*) ;;
2903 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2904 esac
2905 build=$ac_cv_build
2906 ac_save_IFS=$IFS; IFS='-'
2907 set x $ac_cv_build
2908 shift
2909 build_cpu=$1
2910 build_vendor=$2
2911 shift; shift
2912 # Remember, the first character of IFS is used to create $*,
2913 # except with old shells:
2914 build_os=$*
2915 IFS=$ac_save_IFS
2916 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2920 $as_echo_n "checking host system type... " >&6; }
2921 if ${ac_cv_host+:} false; then :
2922 $as_echo_n "(cached) " >&6
2923 else
2924 if test "x$host_alias" = x; then
2925 ac_cv_host=$ac_cv_build
2926 else
2927 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2928 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2933 $as_echo "$ac_cv_host" >&6; }
2934 case $ac_cv_host in
2935 *-*-*) ;;
2936 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2937 esac
2938 host=$ac_cv_host
2939 ac_save_IFS=$IFS; IFS='-'
2940 set x $ac_cv_host
2941 shift
2942 host_cpu=$1
2943 host_vendor=$2
2944 shift; shift
2945 # Remember, the first character of IFS is used to create $*,
2946 # except with old shells:
2947 host_os=$*
2948 IFS=$ac_save_IFS
2949 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2953 template=
2954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2955 $as_echo_n "checking which template to use... " >&6; }
2960 # Check whether --with-template was given.
2961 if test "${with_template+set}" = set; then :
2962 withval=$with_template;
2963 case $withval in
2964 yes)
2965 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2968 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2972 case $withval in
2973 list) echo; ls "$srcdir/src/template"; exit;;
2974 *) if test -f "$srcdir/src/template/$with_template" ; then
2975 template=$withval
2976 else
2977 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2978 fi;;
2979 esac
2982 esac
2984 else
2986 # --with-template not given
2988 case $host_os in
2989 aix*) template=aix ;;
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 # Spinlocks
3273 # Check whether --enable-spinlocks was given.
3274 if test "${enable_spinlocks+set}" = set; then :
3275 enableval=$enable_spinlocks;
3276 case $enableval in
3277 yes)
3284 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3286 esac
3288 else
3289 enable_spinlocks=yes
3296 # Atomic operations
3300 # Check whether --enable-atomics was given.
3301 if test "${enable_atomics+set}" = set; then :
3302 enableval=$enable_atomics;
3303 case $enableval in
3304 yes)
3311 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3313 esac
3315 else
3316 enable_atomics=yes
3323 # --enable-debug adds -g to compiler flags
3327 # Check whether --enable-debug was given.
3328 if test "${enable_debug+set}" = set; then :
3329 enableval=$enable_debug;
3330 case $enableval in
3331 yes)
3338 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3340 esac
3342 else
3343 enable_debug=no
3351 # --enable-profiling enables gcc profiling
3355 # Check whether --enable-profiling was given.
3356 if test "${enable_profiling+set}" = set; then :
3357 enableval=$enable_profiling;
3358 case $enableval in
3359 yes)
3366 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3368 esac
3370 else
3371 enable_profiling=no
3378 # --enable-coverage enables generation of code coverage metrics with gcov
3382 # Check whether --enable-coverage was given.
3383 if test "${enable_coverage+set}" = set; then :
3384 enableval=$enable_coverage;
3385 case $enableval in
3386 yes)
3387 if test -z "$GCOV"; then
3388 for ac_prog in gcov
3390 # Extract the first word of "$ac_prog", so it can be a program name with args.
3391 set dummy $ac_prog; ac_word=$2
3392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3393 $as_echo_n "checking for $ac_word... " >&6; }
3394 if ${ac_cv_path_GCOV+:} false; then :
3395 $as_echo_n "(cached) " >&6
3396 else
3397 case $GCOV in
3398 [\\/]* | ?:[\\/]*)
3399 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3403 for as_dir in $PATH
3405 IFS=$as_save_IFS
3406 test -z "$as_dir" && as_dir=.
3407 for ac_exec_ext in '' $ac_executable_extensions; do
3408 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3409 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3410 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3411 break 2
3413 done
3414 done
3415 IFS=$as_save_IFS
3418 esac
3420 GCOV=$ac_cv_path_GCOV
3421 if test -n "$GCOV"; then
3422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3423 $as_echo "$GCOV" >&6; }
3424 else
3425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3426 $as_echo "no" >&6; }
3430 test -n "$GCOV" && break
3431 done
3433 else
3434 # Report the value of GCOV in configure's output in all cases.
3435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3436 $as_echo_n "checking for GCOV... " >&6; }
3437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3438 $as_echo "$GCOV" >&6; }
3441 if test -z "$GCOV"; then
3442 as_fn_error $? "gcov not found" "$LINENO" 5
3444 if test -z "$LCOV"; then
3445 for ac_prog in lcov
3447 # Extract the first word of "$ac_prog", so it can be a program name with args.
3448 set dummy $ac_prog; ac_word=$2
3449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3450 $as_echo_n "checking for $ac_word... " >&6; }
3451 if ${ac_cv_path_LCOV+:} false; then :
3452 $as_echo_n "(cached) " >&6
3453 else
3454 case $LCOV in
3455 [\\/]* | ?:[\\/]*)
3456 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3460 for as_dir in $PATH
3462 IFS=$as_save_IFS
3463 test -z "$as_dir" && as_dir=.
3464 for ac_exec_ext in '' $ac_executable_extensions; do
3465 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3466 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3467 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3468 break 2
3470 done
3471 done
3472 IFS=$as_save_IFS
3475 esac
3477 LCOV=$ac_cv_path_LCOV
3478 if test -n "$LCOV"; then
3479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3480 $as_echo "$LCOV" >&6; }
3481 else
3482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3483 $as_echo "no" >&6; }
3487 test -n "$LCOV" && break
3488 done
3490 else
3491 # Report the value of LCOV in configure's output in all cases.
3492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3493 $as_echo_n "checking for LCOV... " >&6; }
3494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3495 $as_echo "$LCOV" >&6; }
3498 if test -z "$LCOV"; then
3499 as_fn_error $? "lcov not found" "$LINENO" 5
3501 if test -z "$GENHTML"; then
3502 for ac_prog in genhtml
3504 # Extract the first word of "$ac_prog", so it can be a program name with args.
3505 set dummy $ac_prog; ac_word=$2
3506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3507 $as_echo_n "checking for $ac_word... " >&6; }
3508 if ${ac_cv_path_GENHTML+:} false; then :
3509 $as_echo_n "(cached) " >&6
3510 else
3511 case $GENHTML in
3512 [\\/]* | ?:[\\/]*)
3513 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3517 for as_dir in $PATH
3519 IFS=$as_save_IFS
3520 test -z "$as_dir" && as_dir=.
3521 for ac_exec_ext in '' $ac_executable_extensions; do
3522 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3523 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3524 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3525 break 2
3527 done
3528 done
3529 IFS=$as_save_IFS
3532 esac
3534 GENHTML=$ac_cv_path_GENHTML
3535 if test -n "$GENHTML"; then
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3537 $as_echo "$GENHTML" >&6; }
3538 else
3539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3540 $as_echo "no" >&6; }
3544 test -n "$GENHTML" && break
3545 done
3547 else
3548 # Report the value of GENHTML in configure's output in all cases.
3549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3550 $as_echo_n "checking for GENHTML... " >&6; }
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3552 $as_echo "$GENHTML" >&6; }
3555 if test -z "$GENHTML"; then
3556 as_fn_error $? "genhtml not found" "$LINENO" 5
3563 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3565 esac
3567 else
3568 enable_coverage=no
3576 # DTrace
3580 # Check whether --enable-dtrace was given.
3581 if test "${enable_dtrace+set}" = set; then :
3582 enableval=$enable_dtrace;
3583 case $enableval in
3584 yes)
3585 if test -z "$DTRACE"; then
3586 for ac_prog in dtrace
3588 # Extract the first word of "$ac_prog", so it can be a program name with args.
3589 set dummy $ac_prog; ac_word=$2
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3591 $as_echo_n "checking for $ac_word... " >&6; }
3592 if ${ac_cv_path_DTRACE+:} false; then :
3593 $as_echo_n "(cached) " >&6
3594 else
3595 case $DTRACE in
3596 [\\/]* | ?:[\\/]*)
3597 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3600 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3601 for as_dir in $PATH
3603 IFS=$as_save_IFS
3604 test -z "$as_dir" && as_dir=.
3605 for ac_exec_ext in '' $ac_executable_extensions; do
3606 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3607 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3608 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3609 break 2
3611 done
3612 done
3613 IFS=$as_save_IFS
3616 esac
3618 DTRACE=$ac_cv_path_DTRACE
3619 if test -n "$DTRACE"; then
3620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3621 $as_echo "$DTRACE" >&6; }
3622 else
3623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3624 $as_echo "no" >&6; }
3628 test -n "$DTRACE" && break
3629 done
3631 else
3632 # Report the value of DTRACE in configure's output in all cases.
3633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3634 $as_echo_n "checking for DTRACE... " >&6; }
3635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3636 $as_echo "$DTRACE" >&6; }
3639 if test -z "$DTRACE"; then
3640 as_fn_error $? "dtrace not found" "$LINENO" 5
3648 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3650 esac
3652 else
3653 enable_dtrace=no
3661 # TAP tests
3665 # Check whether --enable-tap-tests was given.
3666 if test "${enable_tap_tests+set}" = set; then :
3667 enableval=$enable_tap_tests;
3668 case $enableval in
3669 yes)
3676 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3678 esac
3680 else
3681 enable_tap_tests=no
3689 # Block size
3691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3692 $as_echo_n "checking for block size... " >&6; }
3696 # Check whether --with-blocksize was given.
3697 if test "${with_blocksize+set}" = set; then :
3698 withval=$with_blocksize;
3699 case $withval in
3700 yes)
3701 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3704 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3707 blocksize=$withval
3709 esac
3711 else
3712 blocksize=8
3716 case ${blocksize} in
3717 1) BLCKSZ=1024;;
3718 2) BLCKSZ=2048;;
3719 4) BLCKSZ=4096;;
3720 8) BLCKSZ=8192;;
3721 16) BLCKSZ=16384;;
3722 32) BLCKSZ=32768;;
3723 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3724 esac
3725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3726 $as_echo "${blocksize}kB" >&6; }
3729 cat >>confdefs.h <<_ACEOF
3730 #define BLCKSZ ${BLCKSZ}
3731 _ACEOF
3735 # Relation segment size
3740 # Check whether --with-segsize was given.
3741 if test "${with_segsize+set}" = set; then :
3742 withval=$with_segsize;
3743 case $withval in
3744 yes)
3745 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3748 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3751 segsize=$withval
3753 esac
3755 else
3756 segsize=1
3763 # Check whether --with-segsize-blocks was given.
3764 if test "${with_segsize_blocks+set}" = set; then :
3765 withval=$with_segsize_blocks;
3766 case $withval in
3767 yes)
3768 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3771 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3774 segsize_blocks=$withval
3776 esac
3778 else
3779 segsize_blocks=0
3784 # If --with-segsize-blocks is non-zero, it is used, --with-segsize
3785 # otherwise. segsize-blocks is only really useful for developers wanting to
3786 # test segment related code. Warn if both are used.
3787 if test $segsize_blocks -ne 0 -a $segsize -ne 1; then
3788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&5
3789 $as_echo "$as_me: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&2;}
3792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3793 $as_echo_n "checking for segment size... " >&6; }
3794 if test $segsize_blocks -eq 0; then
3795 # this expression is set up to avoid unnecessary integer overflow
3796 # blocksize is already guaranteed to be a factor of 1024
3797 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3798 test $? -eq 0 || exit 1
3799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3800 $as_echo "${segsize}GB" >&6; }
3801 else
3802 RELSEG_SIZE=$segsize_blocks
3803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${RELSEG_SIZE} blocks" >&5
3804 $as_echo "${RELSEG_SIZE} blocks" >&6; }
3808 cat >>confdefs.h <<_ACEOF
3809 #define RELSEG_SIZE ${RELSEG_SIZE}
3810 _ACEOF
3814 # WAL block size
3816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3817 $as_echo_n "checking for WAL block size... " >&6; }
3821 # Check whether --with-wal-blocksize was given.
3822 if test "${with_wal_blocksize+set}" = set; then :
3823 withval=$with_wal_blocksize;
3824 case $withval in
3825 yes)
3826 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3829 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3832 wal_blocksize=$withval
3834 esac
3836 else
3837 wal_blocksize=8
3841 case ${wal_blocksize} in
3842 1) XLOG_BLCKSZ=1024;;
3843 2) XLOG_BLCKSZ=2048;;
3844 4) XLOG_BLCKSZ=4096;;
3845 8) XLOG_BLCKSZ=8192;;
3846 16) XLOG_BLCKSZ=16384;;
3847 32) XLOG_BLCKSZ=32768;;
3848 64) XLOG_BLCKSZ=65536;;
3849 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3850 esac
3851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3852 $as_echo "${wal_blocksize}kB" >&6; }
3855 cat >>confdefs.h <<_ACEOF
3856 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3857 _ACEOF
3861 # C compiler
3864 # For historical reasons you can also use --with-CC to specify the C compiler
3865 # to use, although the standard way to do this is to set the CC environment
3866 # variable.
3870 # Check whether --with-CC was given.
3871 if test "${with_CC+set}" = set; then :
3872 withval=$with_CC;
3873 case $withval in
3874 yes)
3875 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3878 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3881 CC=$with_CC
3883 esac
3889 case $template in
3890 aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3891 *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3892 esac
3894 ac_ext=c
3895 ac_cpp='$CPP $CPPFLAGS'
3896 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3897 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3898 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3899 if test -n "$ac_tool_prefix"; then
3900 for ac_prog in $pgac_cc_list
3902 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3903 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3905 $as_echo_n "checking for $ac_word... " >&6; }
3906 if ${ac_cv_prog_CC+:} false; then :
3907 $as_echo_n "(cached) " >&6
3908 else
3909 if test -n "$CC"; then
3910 ac_cv_prog_CC="$CC" # Let the user override the test.
3911 else
3912 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3913 for as_dir in $PATH
3915 IFS=$as_save_IFS
3916 test -z "$as_dir" && as_dir=.
3917 for ac_exec_ext in '' $ac_executable_extensions; do
3918 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3919 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3920 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3921 break 2
3923 done
3924 done
3925 IFS=$as_save_IFS
3929 CC=$ac_cv_prog_CC
3930 if test -n "$CC"; then
3931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3932 $as_echo "$CC" >&6; }
3933 else
3934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3935 $as_echo "no" >&6; }
3939 test -n "$CC" && break
3940 done
3942 if test -z "$CC"; then
3943 ac_ct_CC=$CC
3944 for ac_prog in $pgac_cc_list
3946 # Extract the first word of "$ac_prog", so it can be a program name with args.
3947 set dummy $ac_prog; ac_word=$2
3948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3949 $as_echo_n "checking for $ac_word... " >&6; }
3950 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3951 $as_echo_n "(cached) " >&6
3952 else
3953 if test -n "$ac_ct_CC"; then
3954 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3955 else
3956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3957 for as_dir in $PATH
3959 IFS=$as_save_IFS
3960 test -z "$as_dir" && as_dir=.
3961 for ac_exec_ext in '' $ac_executable_extensions; do
3962 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3963 ac_cv_prog_ac_ct_CC="$ac_prog"
3964 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3965 break 2
3967 done
3968 done
3969 IFS=$as_save_IFS
3973 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3974 if test -n "$ac_ct_CC"; then
3975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3976 $as_echo "$ac_ct_CC" >&6; }
3977 else
3978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3979 $as_echo "no" >&6; }
3983 test -n "$ac_ct_CC" && break
3984 done
3986 if test "x$ac_ct_CC" = x; then
3987 CC=""
3988 else
3989 case $cross_compiling:$ac_tool_warned in
3990 yes:)
3991 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3992 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3993 ac_tool_warned=yes ;;
3994 esac
3995 CC=$ac_ct_CC
4000 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4001 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4002 as_fn_error $? "no acceptable C compiler found in \$PATH
4003 See \`config.log' for more details" "$LINENO" 5; }
4005 # Provide some information about the compiler.
4006 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4007 set X $ac_compile
4008 ac_compiler=$2
4009 for ac_option in --version -v -V -qversion; do
4010 { { ac_try="$ac_compiler $ac_option >&5"
4011 case "(($ac_try" in
4012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4013 *) ac_try_echo=$ac_try;;
4014 esac
4015 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4016 $as_echo "$ac_try_echo"; } >&5
4017 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4018 ac_status=$?
4019 if test -s conftest.err; then
4020 sed '10a\
4021 ... rest of stderr output deleted ...
4022 10q' conftest.err >conftest.er1
4023 cat conftest.er1 >&5
4025 rm -f conftest.er1 conftest.err
4026 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4027 test $ac_status = 0; }
4028 done
4030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4031 /* end confdefs.h. */
4034 main ()
4038 return 0;
4040 _ACEOF
4041 ac_clean_files_save=$ac_clean_files
4042 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4043 # Try to create an executable without -o first, disregard a.out.
4044 # It will help us diagnose broken compilers, and finding out an intuition
4045 # of exeext.
4046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4047 $as_echo_n "checking whether the C compiler works... " >&6; }
4048 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4050 # The possible output files:
4051 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4053 ac_rmfiles=
4054 for ac_file in $ac_files
4056 case $ac_file in
4057 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4058 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4059 esac
4060 done
4061 rm -f $ac_rmfiles
4063 if { { ac_try="$ac_link_default"
4064 case "(($ac_try" in
4065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4066 *) ac_try_echo=$ac_try;;
4067 esac
4068 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4069 $as_echo "$ac_try_echo"; } >&5
4070 (eval "$ac_link_default") 2>&5
4071 ac_status=$?
4072 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4073 test $ac_status = 0; }; then :
4074 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4075 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4076 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4077 # so that the user can short-circuit this test for compilers unknown to
4078 # Autoconf.
4079 for ac_file in $ac_files ''
4081 test -f "$ac_file" || continue
4082 case $ac_file in
4083 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4085 [ab].out )
4086 # We found the default executable, but exeext='' is most
4087 # certainly right.
4088 break;;
4089 *.* )
4090 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4091 then :; else
4092 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4094 # We set ac_cv_exeext here because the later test for it is not
4095 # safe: cross compilers may not add the suffix if given an `-o'
4096 # argument, so we may need to know it at that point already.
4097 # Even if this section looks crufty: it has the advantage of
4098 # actually working.
4099 break;;
4101 break;;
4102 esac
4103 done
4104 test "$ac_cv_exeext" = no && ac_cv_exeext=
4106 else
4107 ac_file=''
4109 if test -z "$ac_file"; then :
4110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4111 $as_echo "no" >&6; }
4112 $as_echo "$as_me: failed program was:" >&5
4113 sed 's/^/| /' conftest.$ac_ext >&5
4115 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4116 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4117 as_fn_error 77 "C compiler cannot create executables
4118 See \`config.log' for more details" "$LINENO" 5; }
4119 else
4120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4121 $as_echo "yes" >&6; }
4123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4124 $as_echo_n "checking for C compiler default output file name... " >&6; }
4125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4126 $as_echo "$ac_file" >&6; }
4127 ac_exeext=$ac_cv_exeext
4129 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4130 ac_clean_files=$ac_clean_files_save
4131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4132 $as_echo_n "checking for suffix of executables... " >&6; }
4133 if { { ac_try="$ac_link"
4134 case "(($ac_try" in
4135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4136 *) ac_try_echo=$ac_try;;
4137 esac
4138 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4139 $as_echo "$ac_try_echo"; } >&5
4140 (eval "$ac_link") 2>&5
4141 ac_status=$?
4142 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4143 test $ac_status = 0; }; then :
4144 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4145 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4146 # work properly (i.e., refer to `conftest.exe'), while it won't with
4147 # `rm'.
4148 for ac_file in conftest.exe conftest conftest.*; do
4149 test -f "$ac_file" || continue
4150 case $ac_file in
4151 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4152 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4153 break;;
4154 * ) break;;
4155 esac
4156 done
4157 else
4158 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4159 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4160 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4161 See \`config.log' for more details" "$LINENO" 5; }
4163 rm -f conftest conftest$ac_cv_exeext
4164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4165 $as_echo "$ac_cv_exeext" >&6; }
4167 rm -f conftest.$ac_ext
4168 EXEEXT=$ac_cv_exeext
4169 ac_exeext=$EXEEXT
4170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4171 /* end confdefs.h. */
4172 #include <stdio.h>
4174 main ()
4176 FILE *f = fopen ("conftest.out", "w");
4177 return ferror (f) || fclose (f) != 0;
4180 return 0;
4182 _ACEOF
4183 ac_clean_files="$ac_clean_files conftest.out"
4184 # Check that the compiler produces executables we can run. If not, either
4185 # the compiler is broken, or we cross compile.
4186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4187 $as_echo_n "checking whether we are cross compiling... " >&6; }
4188 if test "$cross_compiling" != yes; then
4189 { { ac_try="$ac_link"
4190 case "(($ac_try" in
4191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4192 *) ac_try_echo=$ac_try;;
4193 esac
4194 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4195 $as_echo "$ac_try_echo"; } >&5
4196 (eval "$ac_link") 2>&5
4197 ac_status=$?
4198 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4199 test $ac_status = 0; }
4200 if { ac_try='./conftest$ac_cv_exeext'
4201 { { case "(($ac_try" in
4202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4203 *) ac_try_echo=$ac_try;;
4204 esac
4205 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4206 $as_echo "$ac_try_echo"; } >&5
4207 (eval "$ac_try") 2>&5
4208 ac_status=$?
4209 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4210 test $ac_status = 0; }; }; then
4211 cross_compiling=no
4212 else
4213 if test "$cross_compiling" = maybe; then
4214 cross_compiling=yes
4215 else
4216 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4217 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4218 as_fn_error $? "cannot run C compiled programs.
4219 If you meant to cross compile, use \`--host'.
4220 See \`config.log' for more details" "$LINENO" 5; }
4224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4225 $as_echo "$cross_compiling" >&6; }
4227 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4228 ac_clean_files=$ac_clean_files_save
4229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4230 $as_echo_n "checking for suffix of object files... " >&6; }
4231 if ${ac_cv_objext+:} false; then :
4232 $as_echo_n "(cached) " >&6
4233 else
4234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4235 /* end confdefs.h. */
4238 main ()
4242 return 0;
4244 _ACEOF
4245 rm -f conftest.o conftest.obj
4246 if { { ac_try="$ac_compile"
4247 case "(($ac_try" in
4248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4249 *) ac_try_echo=$ac_try;;
4250 esac
4251 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4252 $as_echo "$ac_try_echo"; } >&5
4253 (eval "$ac_compile") 2>&5
4254 ac_status=$?
4255 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4256 test $ac_status = 0; }; then :
4257 for ac_file in conftest.o conftest.obj conftest.*; do
4258 test -f "$ac_file" || continue;
4259 case $ac_file in
4260 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4261 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4262 break;;
4263 esac
4264 done
4265 else
4266 $as_echo "$as_me: failed program was:" >&5
4267 sed 's/^/| /' conftest.$ac_ext >&5
4269 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4270 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4271 as_fn_error $? "cannot compute suffix of object files: cannot compile
4272 See \`config.log' for more details" "$LINENO" 5; }
4274 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4277 $as_echo "$ac_cv_objext" >&6; }
4278 OBJEXT=$ac_cv_objext
4279 ac_objext=$OBJEXT
4280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4281 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4282 if ${ac_cv_c_compiler_gnu+:} false; then :
4283 $as_echo_n "(cached) " >&6
4284 else
4285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4286 /* end confdefs.h. */
4289 main ()
4291 #ifndef __GNUC__
4292 choke me
4293 #endif
4296 return 0;
4298 _ACEOF
4299 if ac_fn_c_try_compile "$LINENO"; then :
4300 ac_compiler_gnu=yes
4301 else
4302 ac_compiler_gnu=no
4304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4305 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4309 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4310 if test $ac_compiler_gnu = yes; then
4311 GCC=yes
4312 else
4313 GCC=
4315 ac_test_CFLAGS=${CFLAGS+set}
4316 ac_save_CFLAGS=$CFLAGS
4317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4318 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4319 if ${ac_cv_prog_cc_g+:} false; then :
4320 $as_echo_n "(cached) " >&6
4321 else
4322 ac_save_c_werror_flag=$ac_c_werror_flag
4323 ac_c_werror_flag=yes
4324 ac_cv_prog_cc_g=no
4325 CFLAGS="-g"
4326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4327 /* end confdefs.h. */
4330 main ()
4334 return 0;
4336 _ACEOF
4337 if ac_fn_c_try_compile "$LINENO"; then :
4338 ac_cv_prog_cc_g=yes
4339 else
4340 CFLAGS=""
4341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4342 /* end confdefs.h. */
4345 main ()
4349 return 0;
4351 _ACEOF
4352 if ac_fn_c_try_compile "$LINENO"; then :
4354 else
4355 ac_c_werror_flag=$ac_save_c_werror_flag
4356 CFLAGS="-g"
4357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4358 /* end confdefs.h. */
4361 main ()
4365 return 0;
4367 _ACEOF
4368 if ac_fn_c_try_compile "$LINENO"; then :
4369 ac_cv_prog_cc_g=yes
4371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4376 ac_c_werror_flag=$ac_save_c_werror_flag
4378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4379 $as_echo "$ac_cv_prog_cc_g" >&6; }
4380 if test "$ac_test_CFLAGS" = set; then
4381 CFLAGS=$ac_save_CFLAGS
4382 elif test $ac_cv_prog_cc_g = yes; then
4383 if test "$GCC" = yes; then
4384 CFLAGS="-g -O2"
4385 else
4386 CFLAGS="-g"
4388 else
4389 if test "$GCC" = yes; then
4390 CFLAGS="-O2"
4391 else
4392 CFLAGS=
4395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4396 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4397 if ${ac_cv_prog_cc_c89+:} false; then :
4398 $as_echo_n "(cached) " >&6
4399 else
4400 ac_cv_prog_cc_c89=no
4401 ac_save_CC=$CC
4402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4403 /* end confdefs.h. */
4404 #include <stdarg.h>
4405 #include <stdio.h>
4406 struct stat;
4407 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4408 struct buf { int x; };
4409 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4410 static char *e (p, i)
4411 char **p;
4412 int i;
4414 return p[i];
4416 static char *f (char * (*g) (char **, int), char **p, ...)
4418 char *s;
4419 va_list v;
4420 va_start (v,p);
4421 s = g (p, va_arg (v,int));
4422 va_end (v);
4423 return s;
4426 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4427 function prototypes and stuff, but not '\xHH' hex character constants.
4428 These don't provoke an error unfortunately, instead are silently treated
4429 as 'x'. The following induces an error, until -std is added to get
4430 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4431 array size at least. It's necessary to write '\x00'==0 to get something
4432 that's true only with -std. */
4433 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4435 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4436 inside strings and character constants. */
4437 #define FOO(x) 'x'
4438 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4440 int test (int i, double x);
4441 struct s1 {int (*f) (int a);};
4442 struct s2 {int (*f) (double a);};
4443 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4444 int argc;
4445 char **argv;
4447 main ()
4449 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4451 return 0;
4453 _ACEOF
4454 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4455 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4457 CC="$ac_save_CC $ac_arg"
4458 if ac_fn_c_try_compile "$LINENO"; then :
4459 ac_cv_prog_cc_c89=$ac_arg
4461 rm -f core conftest.err conftest.$ac_objext
4462 test "x$ac_cv_prog_cc_c89" != "xno" && break
4463 done
4464 rm -f conftest.$ac_ext
4465 CC=$ac_save_CC
4468 # AC_CACHE_VAL
4469 case "x$ac_cv_prog_cc_c89" in
4471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4472 $as_echo "none needed" >&6; } ;;
4473 xno)
4474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4475 $as_echo "unsupported" >&6; } ;;
4477 CC="$CC $ac_cv_prog_cc_c89"
4478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4479 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4480 esac
4481 if test "x$ac_cv_prog_cc_c89" != xno; then :
4485 ac_ext=c
4486 ac_cpp='$CPP $CPPFLAGS'
4487 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4488 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4489 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4492 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4493 if ${ac_cv_prog_cc_c99+:} false; then :
4494 $as_echo_n "(cached) " >&6
4495 else
4496 ac_cv_prog_cc_c99=no
4497 ac_save_CC=$CC
4498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4499 /* end confdefs.h. */
4500 #include <stdarg.h>
4501 #include <stdbool.h>
4502 #include <stdlib.h>
4503 #include <wchar.h>
4504 #include <stdio.h>
4506 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4507 #define debug(...) fprintf (stderr, __VA_ARGS__)
4508 #define showlist(...) puts (#__VA_ARGS__)
4509 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4510 static void
4511 test_varargs_macros (void)
4513 int x = 1234;
4514 int y = 5678;
4515 debug ("Flag");
4516 debug ("X = %d\n", x);
4517 showlist (The first, second, and third items.);
4518 report (x>y, "x is %d but y is %d", x, y);
4521 // Check long long types.
4522 #define BIG64 18446744073709551615ull
4523 #define BIG32 4294967295ul
4524 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4525 #if !BIG_OK
4526 your preprocessor is broken;
4527 #endif
4528 #if BIG_OK
4529 #else
4530 your preprocessor is broken;
4531 #endif
4532 static long long int bignum = -9223372036854775807LL;
4533 static unsigned long long int ubignum = BIG64;
4535 struct incomplete_array
4537 int datasize;
4538 double data[];
4541 struct named_init {
4542 int number;
4543 const wchar_t *name;
4544 double average;
4547 typedef const char *ccp;
4549 static inline int
4550 test_restrict (ccp restrict text)
4552 // See if C++-style comments work.
4553 // Iterate through items via the restricted pointer.
4554 // Also check for declarations in for loops.
4555 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4556 continue;
4557 return 0;
4560 // Check varargs and va_copy.
4561 static void
4562 test_varargs (const char *format, ...)
4564 va_list args;
4565 va_start (args, format);
4566 va_list args_copy;
4567 va_copy (args_copy, args);
4569 const char *str;
4570 int number;
4571 float fnumber;
4573 while (*format)
4575 switch (*format++)
4577 case 's': // string
4578 str = va_arg (args_copy, const char *);
4579 break;
4580 case 'd': // int
4581 number = va_arg (args_copy, int);
4582 break;
4583 case 'f': // float
4584 fnumber = va_arg (args_copy, double);
4585 break;
4586 default:
4587 break;
4590 va_end (args_copy);
4591 va_end (args);
4595 main ()
4598 // Check bool.
4599 _Bool success = false;
4601 // Check restrict.
4602 if (test_restrict ("String literal") == 0)
4603 success = true;
4604 char *restrict newvar = "Another string";
4606 // Check varargs.
4607 test_varargs ("s, d' f .", "string", 65, 34.234);
4608 test_varargs_macros ();
4610 // Check flexible array members.
4611 struct incomplete_array *ia =
4612 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4613 ia->datasize = 10;
4614 for (int i = 0; i < ia->datasize; ++i)
4615 ia->data[i] = i * 1.234;
4617 // Check named initializers.
4618 struct named_init ni = {
4619 .number = 34,
4620 .name = L"Test wide string",
4621 .average = 543.34343,
4624 ni.number = 58;
4626 int dynamic_array[ni.number];
4627 dynamic_array[ni.number - 1] = 543;
4629 // work around unused variable warnings
4630 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4631 || dynamic_array[ni.number - 1] != 543);
4634 return 0;
4636 _ACEOF
4637 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4639 CC="$ac_save_CC $ac_arg"
4640 if ac_fn_c_try_compile "$LINENO"; then :
4641 ac_cv_prog_cc_c99=$ac_arg
4643 rm -f core conftest.err conftest.$ac_objext
4644 test "x$ac_cv_prog_cc_c99" != "xno" && break
4645 done
4646 rm -f conftest.$ac_ext
4647 CC=$ac_save_CC
4650 # AC_CACHE_VAL
4651 case "x$ac_cv_prog_cc_c99" in
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4654 $as_echo "none needed" >&6; } ;;
4655 xno)
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4657 $as_echo "unsupported" >&6; } ;;
4659 CC="$CC $ac_cv_prog_cc_c99"
4660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4661 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4662 esac
4663 if test "x$ac_cv_prog_cc_c99" != xno; then :
4669 # Error out if the compiler does not support C99, as the codebase
4670 # relies on that.
4671 if test "$ac_cv_prog_cc_c99" = no; then
4672 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4675 ac_ext=cpp
4676 ac_cpp='$CXXCPP $CPPFLAGS'
4677 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4678 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4679 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4680 if test -z "$CXX"; then
4681 if test -n "$CCC"; then
4682 CXX=$CCC
4683 else
4684 if test -n "$ac_tool_prefix"; then
4685 for ac_prog in $pgac_cxx_list
4687 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4688 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4690 $as_echo_n "checking for $ac_word... " >&6; }
4691 if ${ac_cv_prog_CXX+:} false; then :
4692 $as_echo_n "(cached) " >&6
4693 else
4694 if test -n "$CXX"; then
4695 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4696 else
4697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4698 for as_dir in $PATH
4700 IFS=$as_save_IFS
4701 test -z "$as_dir" && as_dir=.
4702 for ac_exec_ext in '' $ac_executable_extensions; do
4703 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4704 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4706 break 2
4708 done
4709 done
4710 IFS=$as_save_IFS
4714 CXX=$ac_cv_prog_CXX
4715 if test -n "$CXX"; then
4716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4717 $as_echo "$CXX" >&6; }
4718 else
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4720 $as_echo "no" >&6; }
4724 test -n "$CXX" && break
4725 done
4727 if test -z "$CXX"; then
4728 ac_ct_CXX=$CXX
4729 for ac_prog in $pgac_cxx_list
4731 # Extract the first word of "$ac_prog", so it can be a program name with args.
4732 set dummy $ac_prog; ac_word=$2
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4734 $as_echo_n "checking for $ac_word... " >&6; }
4735 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4736 $as_echo_n "(cached) " >&6
4737 else
4738 if test -n "$ac_ct_CXX"; then
4739 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4740 else
4741 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4742 for as_dir in $PATH
4744 IFS=$as_save_IFS
4745 test -z "$as_dir" && as_dir=.
4746 for ac_exec_ext in '' $ac_executable_extensions; do
4747 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4748 ac_cv_prog_ac_ct_CXX="$ac_prog"
4749 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4750 break 2
4752 done
4753 done
4754 IFS=$as_save_IFS
4758 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4759 if test -n "$ac_ct_CXX"; then
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4761 $as_echo "$ac_ct_CXX" >&6; }
4762 else
4763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4764 $as_echo "no" >&6; }
4768 test -n "$ac_ct_CXX" && break
4769 done
4771 if test "x$ac_ct_CXX" = x; then
4772 CXX="g++"
4773 else
4774 case $cross_compiling:$ac_tool_warned in
4775 yes:)
4776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4777 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4778 ac_tool_warned=yes ;;
4779 esac
4780 CXX=$ac_ct_CXX
4786 # Provide some information about the compiler.
4787 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4788 set X $ac_compile
4789 ac_compiler=$2
4790 for ac_option in --version -v -V -qversion; do
4791 { { ac_try="$ac_compiler $ac_option >&5"
4792 case "(($ac_try" in
4793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4794 *) ac_try_echo=$ac_try;;
4795 esac
4796 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4797 $as_echo "$ac_try_echo"; } >&5
4798 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4799 ac_status=$?
4800 if test -s conftest.err; then
4801 sed '10a\
4802 ... rest of stderr output deleted ...
4803 10q' conftest.err >conftest.er1
4804 cat conftest.er1 >&5
4806 rm -f conftest.er1 conftest.err
4807 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4808 test $ac_status = 0; }
4809 done
4811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4812 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4813 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4814 $as_echo_n "(cached) " >&6
4815 else
4816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4817 /* end confdefs.h. */
4820 main ()
4822 #ifndef __GNUC__
4823 choke me
4824 #endif
4827 return 0;
4829 _ACEOF
4830 if ac_fn_cxx_try_compile "$LINENO"; then :
4831 ac_compiler_gnu=yes
4832 else
4833 ac_compiler_gnu=no
4835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4836 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4840 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4841 if test $ac_compiler_gnu = yes; then
4842 GXX=yes
4843 else
4844 GXX=
4846 ac_test_CXXFLAGS=${CXXFLAGS+set}
4847 ac_save_CXXFLAGS=$CXXFLAGS
4848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4849 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4850 if ${ac_cv_prog_cxx_g+:} false; then :
4851 $as_echo_n "(cached) " >&6
4852 else
4853 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4854 ac_cxx_werror_flag=yes
4855 ac_cv_prog_cxx_g=no
4856 CXXFLAGS="-g"
4857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4858 /* end confdefs.h. */
4861 main ()
4865 return 0;
4867 _ACEOF
4868 if ac_fn_cxx_try_compile "$LINENO"; then :
4869 ac_cv_prog_cxx_g=yes
4870 else
4871 CXXFLAGS=""
4872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4873 /* end confdefs.h. */
4876 main ()
4880 return 0;
4882 _ACEOF
4883 if ac_fn_cxx_try_compile "$LINENO"; then :
4885 else
4886 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4887 CXXFLAGS="-g"
4888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4889 /* end confdefs.h. */
4892 main ()
4896 return 0;
4898 _ACEOF
4899 if ac_fn_cxx_try_compile "$LINENO"; then :
4900 ac_cv_prog_cxx_g=yes
4902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4907 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4910 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4911 if test "$ac_test_CXXFLAGS" = set; then
4912 CXXFLAGS=$ac_save_CXXFLAGS
4913 elif test $ac_cv_prog_cxx_g = yes; then
4914 if test "$GXX" = yes; then
4915 CXXFLAGS="-g -O2"
4916 else
4917 CXXFLAGS="-g"
4919 else
4920 if test "$GXX" = yes; then
4921 CXXFLAGS="-O2"
4922 else
4923 CXXFLAGS=
4926 ac_ext=c
4927 ac_cpp='$CPP $CPPFLAGS'
4928 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4929 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4930 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4933 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4934 # but has idiosyncrasies of its own. We assume icc will define
4935 # __INTEL_COMPILER regardless of CFLAGS.
4937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4938 /* end confdefs.h. */
4941 main ()
4943 #ifndef __INTEL_COMPILER
4944 choke me
4945 #endif
4947 return 0;
4949 _ACEOF
4950 if ac_fn_c_try_compile "$LINENO"; then :
4951 ICC=yes
4952 else
4953 ICC=no
4955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4957 # Check if it's Sun Studio compiler. We assume that
4958 # __SUNPRO_C will be defined for Sun Studio compilers
4959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4960 /* end confdefs.h. */
4963 main ()
4965 #ifndef __SUNPRO_C
4966 choke me
4967 #endif
4969 return 0;
4971 _ACEOF
4972 if ac_fn_c_try_compile "$LINENO"; then :
4973 SUN_STUDIO_CC=yes
4974 else
4975 SUN_STUDIO_CC=no
4977 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4983 # LLVM
4985 # Checked early because subsequent tests depend on it.
4989 # Check whether --with-llvm was given.
4990 if test "${with_llvm+set}" = set; then :
4991 withval=$with_llvm;
4992 case $withval in
4993 yes)
4995 $as_echo "#define USE_LLVM 1" >>confdefs.h
5002 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
5004 esac
5006 else
5007 with_llvm=no
5013 for ac_prog in gawk mawk nawk awk
5015 # Extract the first word of "$ac_prog", so it can be a program name with args.
5016 set dummy $ac_prog; ac_word=$2
5017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5018 $as_echo_n "checking for $ac_word... " >&6; }
5019 if ${ac_cv_prog_AWK+:} false; then :
5020 $as_echo_n "(cached) " >&6
5021 else
5022 if test -n "$AWK"; then
5023 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5024 else
5025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5026 for as_dir in $PATH
5028 IFS=$as_save_IFS
5029 test -z "$as_dir" && as_dir=.
5030 for ac_exec_ext in '' $ac_executable_extensions; do
5031 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5032 ac_cv_prog_AWK="$ac_prog"
5033 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5034 break 2
5036 done
5037 done
5038 IFS=$as_save_IFS
5042 AWK=$ac_cv_prog_AWK
5043 if test -n "$AWK"; then
5044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5045 $as_echo "$AWK" >&6; }
5046 else
5047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5048 $as_echo "no" >&6; }
5052 test -n "$AWK" && break
5053 done
5055 if test "$with_llvm" = yes; then :
5061 if test -z "$LLVM_CONFIG"; then
5062 for ac_prog in llvm-config llvm-config-7 llvm-config-6.0 llvm-config-5.0 llvm-config-4.0 llvm-config-3.9
5064 # Extract the first word of "$ac_prog", so it can be a program name with args.
5065 set dummy $ac_prog; ac_word=$2
5066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5067 $as_echo_n "checking for $ac_word... " >&6; }
5068 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5069 $as_echo_n "(cached) " >&6
5070 else
5071 case $LLVM_CONFIG in
5072 [\\/]* | ?:[\\/]*)
5073 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5077 for as_dir in $PATH
5079 IFS=$as_save_IFS
5080 test -z "$as_dir" && as_dir=.
5081 for ac_exec_ext in '' $ac_executable_extensions; do
5082 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5083 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5084 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5085 break 2
5087 done
5088 done
5089 IFS=$as_save_IFS
5092 esac
5094 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5095 if test -n "$LLVM_CONFIG"; then
5096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5097 $as_echo "$LLVM_CONFIG" >&6; }
5098 else
5099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100 $as_echo "no" >&6; }
5104 test -n "$LLVM_CONFIG" && break
5105 done
5107 else
5108 # Report the value of LLVM_CONFIG in configure's output in all cases.
5109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5110 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5112 $as_echo "$LLVM_CONFIG" >&6; }
5116 # no point continuing if llvm wasn't found
5117 if test -z "$LLVM_CONFIG"; then
5118 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5120 # check if detected $LLVM_CONFIG is executable
5121 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5122 if test "x$pgac_llvm_version" = "xno"; then
5123 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5125 # and whether the version is supported
5126 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5127 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5130 # need clang to create some bitcode files
5132 if test -z "$CLANG"; then
5133 for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5135 # Extract the first word of "$ac_prog", so it can be a program name with args.
5136 set dummy $ac_prog; ac_word=$2
5137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5138 $as_echo_n "checking for $ac_word... " >&6; }
5139 if ${ac_cv_path_CLANG+:} false; then :
5140 $as_echo_n "(cached) " >&6
5141 else
5142 case $CLANG in
5143 [\\/]* | ?:[\\/]*)
5144 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5147 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5148 for as_dir in $PATH
5150 IFS=$as_save_IFS
5151 test -z "$as_dir" && as_dir=.
5152 for ac_exec_ext in '' $ac_executable_extensions; do
5153 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5154 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5155 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5156 break 2
5158 done
5159 done
5160 IFS=$as_save_IFS
5163 esac
5165 CLANG=$ac_cv_path_CLANG
5166 if test -n "$CLANG"; then
5167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5168 $as_echo "$CLANG" >&6; }
5169 else
5170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5171 $as_echo "no" >&6; }
5175 test -n "$CLANG" && break
5176 done
5178 else
5179 # Report the value of CLANG in configure's output in all cases.
5180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5181 $as_echo_n "checking for CLANG... " >&6; }
5182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5183 $as_echo "$CLANG" >&6; }
5186 if test -z "$CLANG"; then
5187 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5189 # make sure clang is executable
5190 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5191 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5193 # Could check clang version, but it doesn't seem that
5194 # important. Systems with a new enough LLVM version are usually
5195 # going to have a decent clang version too. It's also not entirely
5196 # clear what the minimum version is.
5198 # Collect compiler flags necessary to build the LLVM dependent
5199 # shared library.
5200 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5201 case $pgac_option in
5202 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5203 esac
5204 done
5206 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5207 case $pgac_option in
5208 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5209 esac
5210 done
5212 # ABI influencing options, standard influencing options
5213 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5214 case $pgac_option in
5215 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5216 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5217 esac
5218 done
5220 # Look for components we're interested in, collect necessary
5221 # libs. As some components are optional, we can't just list all of
5222 # them as it'd raise an error.
5223 pgac_components='';
5224 for pgac_component in `$LLVM_CONFIG --components`; do
5225 case $pgac_component in
5226 engine) pgac_components="$pgac_components $pgac_component";;
5227 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5228 orcjit) pgac_components="$pgac_components $pgac_component";;
5229 passes) pgac_components="$pgac_components $pgac_component";;
5230 native) pgac_components="$pgac_components $pgac_component";;
5231 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5232 esac
5233 done;
5235 # And then get the libraries that need to be linked in for the
5236 # selected components. They're large libraries, we only want to
5237 # link them into the LLVM using shared library.
5238 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5239 case $pgac_option in
5240 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5241 esac
5242 done
5244 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5254 fi # fi
5257 unset CFLAGS
5258 unset CXXFLAGS
5261 # Read the template
5263 . "$srcdir/src/template/$template" || exit
5265 # C[XX]FLAGS are selected so:
5266 # If the user specifies something in the environment, that is used.
5267 # else: If the template file set something, that is used.
5268 # else: If coverage was enabled, don't set anything.
5269 # else: If the compiler is GCC, then we use -O2.
5270 # else: If the compiler is something else, then we use -O, unless debugging.
5272 if test "$ac_env_CFLAGS_set" = set; then
5273 CFLAGS=$ac_env_CFLAGS_value
5274 elif test "${CFLAGS+set}" = set; then
5275 : # (keep what template set)
5276 elif test "$enable_coverage" = yes; then
5277 : # no optimization by default
5278 elif test "$GCC" = yes; then
5279 CFLAGS="-O2"
5280 else
5281 # if the user selected debug mode, don't use -O
5282 if test "$enable_debug" != yes; then
5283 CFLAGS="-O"
5287 if test "$ac_env_CXXFLAGS_set" = set; then
5288 CXXFLAGS=$ac_env_CXXFLAGS_value
5289 elif test "${CXXFLAGS+set}" = set; then
5290 : # (keep what template set)
5291 elif test "$enable_coverage" = yes; then
5292 : # no optimization by default
5293 elif test "$GCC" = yes; then
5294 CXXFLAGS="-O2"
5295 else
5296 # if the user selected debug mode, don't use -O
5297 if test "$enable_debug" != yes; then
5298 CXXFLAGS="-O"
5302 # When generating bitcode (for inlining) we always want to use -O2
5303 # even when --enable-debug is specified. The bitcode is not going to
5304 # be used for line-by-line debugging, and JIT inlining doesn't work
5305 # without at least -O1 (otherwise clang will emit 'noinline'
5306 # attributes everywhere), which is bad for testing. Still allow the
5307 # environment to override if done explicitly.
5308 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5309 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5310 else
5311 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5313 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5314 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5315 else
5316 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5319 # C[XX]FLAGS we determined above will be added back at the end
5320 user_CFLAGS=$CFLAGS
5321 CFLAGS=""
5322 user_CXXFLAGS=$CXXFLAGS
5323 CXXFLAGS=""
5324 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5325 BITCODE_CFLAGS=""
5326 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5327 BITCODE_CXXFLAGS=""
5329 # set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5330 if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5331 CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5333 if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5334 CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5337 # Some versions of GCC support some additional useful warning flags.
5338 # Check whether they are supported, and add them to CFLAGS if so.
5339 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5340 # but has its own. Also check other compiler-specific flags here.
5342 if test "$GCC" = yes -a "$ICC" = no; then
5343 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5344 CXXFLAGS="-Wall -Wpointer-arith"
5345 # These work in some but not all gcc versions
5346 save_CFLAGS=$CFLAGS
5348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5349 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5350 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5351 $as_echo_n "(cached) " >&6
5352 else
5353 pgac_save_CFLAGS=$CFLAGS
5354 pgac_save_CC=$CC
5355 CC=${CC}
5356 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5357 ac_save_c_werror_flag=$ac_c_werror_flag
5358 ac_c_werror_flag=yes
5359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5360 /* end confdefs.h. */
5363 main ()
5367 return 0;
5369 _ACEOF
5370 if ac_fn_c_try_compile "$LINENO"; then :
5371 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5372 else
5373 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5376 ac_c_werror_flag=$ac_save_c_werror_flag
5377 CFLAGS="$pgac_save_CFLAGS"
5378 CC="$pgac_save_CC"
5380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5381 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5382 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5383 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5387 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5388 # disable it, so AC_SUBST the negative form.
5389 PERMIT_DECLARATION_AFTER_STATEMENT=
5390 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5391 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5394 # Really don't want VLAs to be used in our dialect of C
5396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5397 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5398 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5399 $as_echo_n "(cached) " >&6
5400 else
5401 pgac_save_CFLAGS=$CFLAGS
5402 pgac_save_CC=$CC
5403 CC=${CC}
5404 CFLAGS="${CFLAGS} -Werror=vla"
5405 ac_save_c_werror_flag=$ac_c_werror_flag
5406 ac_c_werror_flag=yes
5407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5408 /* end confdefs.h. */
5411 main ()
5415 return 0;
5417 _ACEOF
5418 if ac_fn_c_try_compile "$LINENO"; then :
5419 pgac_cv_prog_CC_cflags__Werror_vla=yes
5420 else
5421 pgac_cv_prog_CC_cflags__Werror_vla=no
5423 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5424 ac_c_werror_flag=$ac_save_c_werror_flag
5425 CFLAGS="$pgac_save_CFLAGS"
5426 CC="$pgac_save_CC"
5428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5429 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5430 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5431 CFLAGS="${CFLAGS} -Werror=vla"
5435 # On macOS, complain about usage of symbols newer than the deployment target
5437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS" >&5
5438 $as_echo_n "checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS... " >&6; }
5439 if ${pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new+:} false; then :
5440 $as_echo_n "(cached) " >&6
5441 else
5442 pgac_save_CFLAGS=$CFLAGS
5443 pgac_save_CC=$CC
5444 CC=${CC}
5445 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5446 ac_save_c_werror_flag=$ac_c_werror_flag
5447 ac_c_werror_flag=yes
5448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5449 /* end confdefs.h. */
5452 main ()
5456 return 0;
5458 _ACEOF
5459 if ac_fn_c_try_compile "$LINENO"; then :
5460 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=yes
5461 else
5462 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=no
5464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5465 ac_c_werror_flag=$ac_save_c_werror_flag
5466 CFLAGS="$pgac_save_CFLAGS"
5467 CC="$pgac_save_CC"
5469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&5
5470 $as_echo "$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&6; }
5471 if test x"$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" = x"yes"; then
5472 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS" >&5
5477 $as_echo_n "checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS... " >&6; }
5478 if ${pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new+:} false; then :
5479 $as_echo_n "(cached) " >&6
5480 else
5481 pgac_save_CXXFLAGS=$CXXFLAGS
5482 pgac_save_CXX=$CXX
5483 CXX=${CXX}
5484 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5485 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5486 ac_cxx_werror_flag=yes
5487 ac_ext=cpp
5488 ac_cpp='$CXXCPP $CPPFLAGS'
5489 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5490 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5491 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5494 /* end confdefs.h. */
5497 main ()
5501 return 0;
5503 _ACEOF
5504 if ac_fn_cxx_try_compile "$LINENO"; then :
5505 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=yes
5506 else
5507 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=no
5509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5510 ac_ext=c
5511 ac_cpp='$CPP $CPPFLAGS'
5512 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5513 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5514 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5516 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5517 CXXFLAGS="$pgac_save_CXXFLAGS"
5518 CXX="$pgac_save_CXX"
5520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&5
5521 $as_echo "$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&6; }
5522 if test x"$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" = x"yes"; then
5523 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5527 # -Wvla is not applicable for C++
5529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5530 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5531 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5532 $as_echo_n "(cached) " >&6
5533 else
5534 pgac_save_CFLAGS=$CFLAGS
5535 pgac_save_CC=$CC
5536 CC=${CC}
5537 CFLAGS="${CFLAGS} -Wendif-labels"
5538 ac_save_c_werror_flag=$ac_c_werror_flag
5539 ac_c_werror_flag=yes
5540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5541 /* end confdefs.h. */
5544 main ()
5548 return 0;
5550 _ACEOF
5551 if ac_fn_c_try_compile "$LINENO"; then :
5552 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5553 else
5554 pgac_cv_prog_CC_cflags__Wendif_labels=no
5556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5557 ac_c_werror_flag=$ac_save_c_werror_flag
5558 CFLAGS="$pgac_save_CFLAGS"
5559 CC="$pgac_save_CC"
5561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5562 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5563 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5564 CFLAGS="${CFLAGS} -Wendif-labels"
5568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5569 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5570 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5571 $as_echo_n "(cached) " >&6
5572 else
5573 pgac_save_CXXFLAGS=$CXXFLAGS
5574 pgac_save_CXX=$CXX
5575 CXX=${CXX}
5576 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5577 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5578 ac_cxx_werror_flag=yes
5579 ac_ext=cpp
5580 ac_cpp='$CXXCPP $CPPFLAGS'
5581 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5582 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5583 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5586 /* end confdefs.h. */
5589 main ()
5593 return 0;
5595 _ACEOF
5596 if ac_fn_cxx_try_compile "$LINENO"; then :
5597 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5598 else
5599 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5602 ac_ext=c
5603 ac_cpp='$CPP $CPPFLAGS'
5604 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5605 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5606 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5608 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5609 CXXFLAGS="$pgac_save_CXXFLAGS"
5610 CXX="$pgac_save_CXX"
5612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5613 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5614 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5615 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5621 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5622 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5623 $as_echo_n "(cached) " >&6
5624 else
5625 pgac_save_CFLAGS=$CFLAGS
5626 pgac_save_CC=$CC
5627 CC=${CC}
5628 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5629 ac_save_c_werror_flag=$ac_c_werror_flag
5630 ac_c_werror_flag=yes
5631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5632 /* end confdefs.h. */
5635 main ()
5639 return 0;
5641 _ACEOF
5642 if ac_fn_c_try_compile "$LINENO"; then :
5643 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5644 else
5645 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5648 ac_c_werror_flag=$ac_save_c_werror_flag
5649 CFLAGS="$pgac_save_CFLAGS"
5650 CC="$pgac_save_CC"
5652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5653 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5654 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5655 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5660 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5661 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5662 $as_echo_n "(cached) " >&6
5663 else
5664 pgac_save_CXXFLAGS=$CXXFLAGS
5665 pgac_save_CXX=$CXX
5666 CXX=${CXX}
5667 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5668 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5669 ac_cxx_werror_flag=yes
5670 ac_ext=cpp
5671 ac_cpp='$CXXCPP $CPPFLAGS'
5672 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5673 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5674 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5677 /* end confdefs.h. */
5680 main ()
5684 return 0;
5686 _ACEOF
5687 if ac_fn_cxx_try_compile "$LINENO"; then :
5688 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5689 else
5690 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5692 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5693 ac_ext=c
5694 ac_cpp='$CPP $CPPFLAGS'
5695 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5696 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5697 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5699 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5700 CXXFLAGS="$pgac_save_CXXFLAGS"
5701 CXX="$pgac_save_CXX"
5703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5704 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5705 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5706 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5712 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5713 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5714 $as_echo_n "(cached) " >&6
5715 else
5716 pgac_save_CFLAGS=$CFLAGS
5717 pgac_save_CC=$CC
5718 CC=${CC}
5719 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5720 ac_save_c_werror_flag=$ac_c_werror_flag
5721 ac_c_werror_flag=yes
5722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5723 /* end confdefs.h. */
5726 main ()
5730 return 0;
5732 _ACEOF
5733 if ac_fn_c_try_compile "$LINENO"; then :
5734 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5735 else
5736 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5739 ac_c_werror_flag=$ac_save_c_werror_flag
5740 CFLAGS="$pgac_save_CFLAGS"
5741 CC="$pgac_save_CC"
5743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5744 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5745 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5746 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5751 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5752 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5753 $as_echo_n "(cached) " >&6
5754 else
5755 pgac_save_CXXFLAGS=$CXXFLAGS
5756 pgac_save_CXX=$CXX
5757 CXX=${CXX}
5758 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5759 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5760 ac_cxx_werror_flag=yes
5761 ac_ext=cpp
5762 ac_cpp='$CXXCPP $CPPFLAGS'
5763 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5764 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5765 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5768 /* end confdefs.h. */
5771 main ()
5775 return 0;
5777 _ACEOF
5778 if ac_fn_cxx_try_compile "$LINENO"; then :
5779 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5780 else
5781 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5784 ac_ext=c
5785 ac_cpp='$CPP $CPPFLAGS'
5786 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5787 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5788 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5790 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5791 CXXFLAGS="$pgac_save_CXXFLAGS"
5792 CXX="$pgac_save_CXX"
5794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5795 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5796 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5797 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5803 $as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5804 if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5805 $as_echo_n "(cached) " >&6
5806 else
5807 pgac_save_CFLAGS=$CFLAGS
5808 pgac_save_CC=$CC
5809 CC=${CC}
5810 CFLAGS="${CFLAGS} -Wcast-function-type"
5811 ac_save_c_werror_flag=$ac_c_werror_flag
5812 ac_c_werror_flag=yes
5813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5814 /* end confdefs.h. */
5817 main ()
5821 return 0;
5823 _ACEOF
5824 if ac_fn_c_try_compile "$LINENO"; then :
5825 pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5826 else
5827 pgac_cv_prog_CC_cflags__Wcast_function_type=no
5829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5830 ac_c_werror_flag=$ac_save_c_werror_flag
5831 CFLAGS="$pgac_save_CFLAGS"
5832 CC="$pgac_save_CC"
5834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5835 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5836 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5837 CFLAGS="${CFLAGS} -Wcast-function-type"
5841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5842 $as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5843 if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5844 $as_echo_n "(cached) " >&6
5845 else
5846 pgac_save_CXXFLAGS=$CXXFLAGS
5847 pgac_save_CXX=$CXX
5848 CXX=${CXX}
5849 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5850 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5851 ac_cxx_werror_flag=yes
5852 ac_ext=cpp
5853 ac_cpp='$CXXCPP $CPPFLAGS'
5854 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5855 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5856 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5859 /* end confdefs.h. */
5862 main ()
5866 return 0;
5868 _ACEOF
5869 if ac_fn_cxx_try_compile "$LINENO"; then :
5870 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5871 else
5872 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5875 ac_ext=c
5876 ac_cpp='$CPP $CPPFLAGS'
5877 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5878 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5879 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5881 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5882 CXXFLAGS="$pgac_save_CXXFLAGS"
5883 CXX="$pgac_save_CXX"
5885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5886 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5887 if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5888 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS" >&5
5894 $as_echo_n "checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS... " >&6; }
5895 if ${pgac_cv_prog_CC_cflags__Wshadow_compatible_local+:} false; then :
5896 $as_echo_n "(cached) " >&6
5897 else
5898 pgac_save_CFLAGS=$CFLAGS
5899 pgac_save_CC=$CC
5900 CC=${CC}
5901 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5902 ac_save_c_werror_flag=$ac_c_werror_flag
5903 ac_c_werror_flag=yes
5904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5905 /* end confdefs.h. */
5908 main ()
5912 return 0;
5914 _ACEOF
5915 if ac_fn_c_try_compile "$LINENO"; then :
5916 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=yes
5917 else
5918 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=no
5920 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5921 ac_c_werror_flag=$ac_save_c_werror_flag
5922 CFLAGS="$pgac_save_CFLAGS"
5923 CC="$pgac_save_CC"
5925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&5
5926 $as_echo "$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&6; }
5927 if test x"$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" = x"yes"; then
5928 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS" >&5
5933 $as_echo_n "checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS... " >&6; }
5934 if ${pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local+:} false; then :
5935 $as_echo_n "(cached) " >&6
5936 else
5937 pgac_save_CXXFLAGS=$CXXFLAGS
5938 pgac_save_CXX=$CXX
5939 CXX=${CXX}
5940 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5941 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5942 ac_cxx_werror_flag=yes
5943 ac_ext=cpp
5944 ac_cpp='$CXXCPP $CPPFLAGS'
5945 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5946 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5947 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5950 /* end confdefs.h. */
5953 main ()
5957 return 0;
5959 _ACEOF
5960 if ac_fn_cxx_try_compile "$LINENO"; then :
5961 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=yes
5962 else
5963 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=no
5965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5966 ac_ext=c
5967 ac_cpp='$CPP $CPPFLAGS'
5968 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5969 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5970 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5972 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5973 CXXFLAGS="$pgac_save_CXXFLAGS"
5974 CXX="$pgac_save_CXX"
5976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&5
5977 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&6; }
5978 if test x"$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" = x"yes"; then
5979 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5983 # This was included in -Wall/-Wformat in older GCC versions
5985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5986 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5987 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5988 $as_echo_n "(cached) " >&6
5989 else
5990 pgac_save_CFLAGS=$CFLAGS
5991 pgac_save_CC=$CC
5992 CC=${CC}
5993 CFLAGS="${CFLAGS} -Wformat-security"
5994 ac_save_c_werror_flag=$ac_c_werror_flag
5995 ac_c_werror_flag=yes
5996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5997 /* end confdefs.h. */
6000 main ()
6004 return 0;
6006 _ACEOF
6007 if ac_fn_c_try_compile "$LINENO"; then :
6008 pgac_cv_prog_CC_cflags__Wformat_security=yes
6009 else
6010 pgac_cv_prog_CC_cflags__Wformat_security=no
6012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6013 ac_c_werror_flag=$ac_save_c_werror_flag
6014 CFLAGS="$pgac_save_CFLAGS"
6015 CC="$pgac_save_CC"
6017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
6018 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
6019 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
6020 CFLAGS="${CFLAGS} -Wformat-security"
6024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
6025 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
6026 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
6027 $as_echo_n "(cached) " >&6
6028 else
6029 pgac_save_CXXFLAGS=$CXXFLAGS
6030 pgac_save_CXX=$CXX
6031 CXX=${CXX}
6032 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6033 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6034 ac_cxx_werror_flag=yes
6035 ac_ext=cpp
6036 ac_cpp='$CXXCPP $CPPFLAGS'
6037 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6038 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6039 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6042 /* end confdefs.h. */
6045 main ()
6049 return 0;
6051 _ACEOF
6052 if ac_fn_cxx_try_compile "$LINENO"; then :
6053 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
6054 else
6055 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
6057 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6058 ac_ext=c
6059 ac_cpp='$CPP $CPPFLAGS'
6060 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6061 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6062 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6064 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6065 CXXFLAGS="$pgac_save_CXXFLAGS"
6066 CXX="$pgac_save_CXX"
6068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
6069 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
6070 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
6071 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6075 # Disable strict-aliasing rules; needed for gcc 3.3+
6077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6078 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6079 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6080 $as_echo_n "(cached) " >&6
6081 else
6082 pgac_save_CFLAGS=$CFLAGS
6083 pgac_save_CC=$CC
6084 CC=${CC}
6085 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6086 ac_save_c_werror_flag=$ac_c_werror_flag
6087 ac_c_werror_flag=yes
6088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6089 /* end confdefs.h. */
6092 main ()
6096 return 0;
6098 _ACEOF
6099 if ac_fn_c_try_compile "$LINENO"; then :
6100 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6101 else
6102 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6105 ac_c_werror_flag=$ac_save_c_werror_flag
6106 CFLAGS="$pgac_save_CFLAGS"
6107 CC="$pgac_save_CC"
6109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6110 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6111 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6112 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6117 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6118 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6119 $as_echo_n "(cached) " >&6
6120 else
6121 pgac_save_CXXFLAGS=$CXXFLAGS
6122 pgac_save_CXX=$CXX
6123 CXX=${CXX}
6124 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6125 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6126 ac_cxx_werror_flag=yes
6127 ac_ext=cpp
6128 ac_cpp='$CXXCPP $CPPFLAGS'
6129 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6130 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6131 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6134 /* end confdefs.h. */
6137 main ()
6141 return 0;
6143 _ACEOF
6144 if ac_fn_cxx_try_compile "$LINENO"; then :
6145 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6146 else
6147 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6150 ac_ext=c
6151 ac_cpp='$CPP $CPPFLAGS'
6152 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6153 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6154 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6156 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6157 CXXFLAGS="$pgac_save_CXXFLAGS"
6158 CXX="$pgac_save_CXX"
6160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6161 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6162 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6163 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6167 # Disable optimizations that assume no overflow; needed for gcc 4.3+
6169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
6170 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
6171 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
6172 $as_echo_n "(cached) " >&6
6173 else
6174 pgac_save_CFLAGS=$CFLAGS
6175 pgac_save_CC=$CC
6176 CC=${CC}
6177 CFLAGS="${CFLAGS} -fwrapv"
6178 ac_save_c_werror_flag=$ac_c_werror_flag
6179 ac_c_werror_flag=yes
6180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6181 /* end confdefs.h. */
6184 main ()
6188 return 0;
6190 _ACEOF
6191 if ac_fn_c_try_compile "$LINENO"; then :
6192 pgac_cv_prog_CC_cflags__fwrapv=yes
6193 else
6194 pgac_cv_prog_CC_cflags__fwrapv=no
6196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6197 ac_c_werror_flag=$ac_save_c_werror_flag
6198 CFLAGS="$pgac_save_CFLAGS"
6199 CC="$pgac_save_CC"
6201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
6202 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
6203 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
6204 CFLAGS="${CFLAGS} -fwrapv"
6208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
6209 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
6210 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
6211 $as_echo_n "(cached) " >&6
6212 else
6213 pgac_save_CXXFLAGS=$CXXFLAGS
6214 pgac_save_CXX=$CXX
6215 CXX=${CXX}
6216 CXXFLAGS="${CXXFLAGS} -fwrapv"
6217 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6218 ac_cxx_werror_flag=yes
6219 ac_ext=cpp
6220 ac_cpp='$CXXCPP $CPPFLAGS'
6221 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6222 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6223 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6226 /* end confdefs.h. */
6229 main ()
6233 return 0;
6235 _ACEOF
6236 if ac_fn_cxx_try_compile "$LINENO"; then :
6237 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6238 else
6239 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6242 ac_ext=c
6243 ac_cpp='$CPP $CPPFLAGS'
6244 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6245 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6246 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6248 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6249 CXXFLAGS="$pgac_save_CXXFLAGS"
6250 CXX="$pgac_save_CXX"
6252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6253 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6254 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6255 CXXFLAGS="${CXXFLAGS} -fwrapv"
6259 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6262 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6263 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6264 $as_echo_n "(cached) " >&6
6265 else
6266 pgac_save_CFLAGS=$CFLAGS
6267 pgac_save_CC=$CC
6268 CC=${CC}
6269 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6270 ac_save_c_werror_flag=$ac_c_werror_flag
6271 ac_c_werror_flag=yes
6272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6273 /* end confdefs.h. */
6276 main ()
6280 return 0;
6282 _ACEOF
6283 if ac_fn_c_try_compile "$LINENO"; then :
6284 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6285 else
6286 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6289 ac_c_werror_flag=$ac_save_c_werror_flag
6290 CFLAGS="$pgac_save_CFLAGS"
6291 CC="$pgac_save_CC"
6293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6294 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6295 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6296 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6301 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6302 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6303 $as_echo_n "(cached) " >&6
6304 else
6305 pgac_save_CXXFLAGS=$CXXFLAGS
6306 pgac_save_CXX=$CXX
6307 CXX=${CXX}
6308 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6309 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6310 ac_cxx_werror_flag=yes
6311 ac_ext=cpp
6312 ac_cpp='$CXXCPP $CPPFLAGS'
6313 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6314 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6315 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6318 /* end confdefs.h. */
6321 main ()
6325 return 0;
6327 _ACEOF
6328 if ac_fn_cxx_try_compile "$LINENO"; then :
6329 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6330 else
6331 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6334 ac_ext=c
6335 ac_cpp='$CPP $CPPFLAGS'
6336 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6337 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6338 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6340 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6341 CXXFLAGS="$pgac_save_CXXFLAGS"
6342 CXX="$pgac_save_CXX"
6344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6345 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6346 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6347 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6351 # Optimization flags for specific files that benefit from loop unrolling
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6353 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6354 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6355 $as_echo_n "(cached) " >&6
6356 else
6357 pgac_save_CFLAGS=$CFLAGS
6358 pgac_save_CC=$CC
6359 CC=${CC}
6360 CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6361 ac_save_c_werror_flag=$ac_c_werror_flag
6362 ac_c_werror_flag=yes
6363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6364 /* end confdefs.h. */
6367 main ()
6371 return 0;
6373 _ACEOF
6374 if ac_fn_c_try_compile "$LINENO"; then :
6375 pgac_cv_prog_CC_cflags__funroll_loops=yes
6376 else
6377 pgac_cv_prog_CC_cflags__funroll_loops=no
6379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6380 ac_c_werror_flag=$ac_save_c_werror_flag
6381 CFLAGS="$pgac_save_CFLAGS"
6382 CC="$pgac_save_CC"
6384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6385 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6386 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6387 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6391 # Optimization flags for specific files that benefit from vectorization
6392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6393 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6394 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6395 $as_echo_n "(cached) " >&6
6396 else
6397 pgac_save_CFLAGS=$CFLAGS
6398 pgac_save_CC=$CC
6399 CC=${CC}
6400 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6401 ac_save_c_werror_flag=$ac_c_werror_flag
6402 ac_c_werror_flag=yes
6403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6404 /* end confdefs.h. */
6407 main ()
6411 return 0;
6413 _ACEOF
6414 if ac_fn_c_try_compile "$LINENO"; then :
6415 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6416 else
6417 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6419 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6420 ac_c_werror_flag=$ac_save_c_werror_flag
6421 CFLAGS="$pgac_save_CFLAGS"
6422 CC="$pgac_save_CC"
6424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6425 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6426 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6427 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6432 # The following tests want to suppress various unhelpful warnings by adding
6433 # -Wno-foo switches. But gcc won't complain about unrecognized -Wno-foo
6434 # switches, so we have to test for the positive form and if that works,
6435 # add the negative form. Note that tests of this form typically need to
6436 # be duplicated in the BITCODE_CFLAGS setup stanza below.
6438 # Suppress clang's unhelpful unused-command-line-argument warnings.
6439 NOT_THE_CFLAGS=""
6440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6441 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6442 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6443 $as_echo_n "(cached) " >&6
6444 else
6445 pgac_save_CFLAGS=$CFLAGS
6446 pgac_save_CC=$CC
6447 CC=${CC}
6448 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6449 ac_save_c_werror_flag=$ac_c_werror_flag
6450 ac_c_werror_flag=yes
6451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6452 /* end confdefs.h. */
6455 main ()
6459 return 0;
6461 _ACEOF
6462 if ac_fn_c_try_compile "$LINENO"; then :
6463 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6464 else
6465 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6468 ac_c_werror_flag=$ac_save_c_werror_flag
6469 CFLAGS="$pgac_save_CFLAGS"
6470 CC="$pgac_save_CC"
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6473 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6474 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6475 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6479 if test -n "$NOT_THE_CFLAGS"; then
6480 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6482 # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
6483 # of warnings when building plperl because of usages in the Perl headers.
6484 NOT_THE_CFLAGS=""
6485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
6486 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
6487 if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then :
6488 $as_echo_n "(cached) " >&6
6489 else
6490 pgac_save_CFLAGS=$CFLAGS
6491 pgac_save_CC=$CC
6492 CC=${CC}
6493 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6494 ac_save_c_werror_flag=$ac_c_werror_flag
6495 ac_c_werror_flag=yes
6496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6497 /* end confdefs.h. */
6500 main ()
6504 return 0;
6506 _ACEOF
6507 if ac_fn_c_try_compile "$LINENO"; then :
6508 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes
6509 else
6510 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no
6512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6513 ac_c_werror_flag=$ac_save_c_werror_flag
6514 CFLAGS="$pgac_save_CFLAGS"
6515 CC="$pgac_save_CC"
6517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5
6518 $as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; }
6519 if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then
6520 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6524 if test -n "$NOT_THE_CFLAGS"; then
6525 CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
6527 # Similarly disable useless truncation warnings from gcc 8+
6528 NOT_THE_CFLAGS=""
6529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6530 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6531 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6532 $as_echo_n "(cached) " >&6
6533 else
6534 pgac_save_CFLAGS=$CFLAGS
6535 pgac_save_CC=$CC
6536 CC=${CC}
6537 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6538 ac_save_c_werror_flag=$ac_c_werror_flag
6539 ac_c_werror_flag=yes
6540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6541 /* end confdefs.h. */
6544 main ()
6548 return 0;
6550 _ACEOF
6551 if ac_fn_c_try_compile "$LINENO"; then :
6552 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6553 else
6554 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6557 ac_c_werror_flag=$ac_save_c_werror_flag
6558 CFLAGS="$pgac_save_CFLAGS"
6559 CC="$pgac_save_CC"
6561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6562 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6563 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6564 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6568 if test -n "$NOT_THE_CFLAGS"; then
6569 CFLAGS="$CFLAGS -Wno-format-truncation"
6571 NOT_THE_CFLAGS=""
6572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6573 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6574 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6575 $as_echo_n "(cached) " >&6
6576 else
6577 pgac_save_CFLAGS=$CFLAGS
6578 pgac_save_CC=$CC
6579 CC=${CC}
6580 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6581 ac_save_c_werror_flag=$ac_c_werror_flag
6582 ac_c_werror_flag=yes
6583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6584 /* end confdefs.h. */
6587 main ()
6591 return 0;
6593 _ACEOF
6594 if ac_fn_c_try_compile "$LINENO"; then :
6595 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6596 else
6597 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6599 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6600 ac_c_werror_flag=$ac_save_c_werror_flag
6601 CFLAGS="$pgac_save_CFLAGS"
6602 CC="$pgac_save_CC"
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6605 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6606 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6607 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6611 if test -n "$NOT_THE_CFLAGS"; then
6612 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6614 elif test "$ICC" = yes; then
6615 # Intel's compiler has a bug/misoptimization in checking for
6616 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6619 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6620 if ${pgac_cv_prog_CC_cflags__mp1+:} 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="${CFLAGS} -mp1"
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__mp1=yes
6642 else
6643 pgac_cv_prog_CC_cflags__mp1=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__mp1" >&5
6651 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6652 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6653 CFLAGS="${CFLAGS} -mp1"
6657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6658 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6659 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6660 $as_echo_n "(cached) " >&6
6661 else
6662 pgac_save_CXXFLAGS=$CXXFLAGS
6663 pgac_save_CXX=$CXX
6664 CXX=${CXX}
6665 CXXFLAGS="${CXXFLAGS} -mp1"
6666 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6667 ac_cxx_werror_flag=yes
6668 ac_ext=cpp
6669 ac_cpp='$CXXCPP $CPPFLAGS'
6670 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6671 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6672 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6675 /* end confdefs.h. */
6678 main ()
6682 return 0;
6684 _ACEOF
6685 if ac_fn_cxx_try_compile "$LINENO"; then :
6686 pgac_cv_prog_CXX_cxxflags__mp1=yes
6687 else
6688 pgac_cv_prog_CXX_cxxflags__mp1=no
6690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6691 ac_ext=c
6692 ac_cpp='$CPP $CPPFLAGS'
6693 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6694 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6695 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6697 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6698 CXXFLAGS="$pgac_save_CXXFLAGS"
6699 CXX="$pgac_save_CXX"
6701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6702 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6703 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6704 CXXFLAGS="${CXXFLAGS} -mp1"
6708 # Make sure strict aliasing is off (though this is said to be the default)
6710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6711 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6712 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6713 $as_echo_n "(cached) " >&6
6714 else
6715 pgac_save_CFLAGS=$CFLAGS
6716 pgac_save_CC=$CC
6717 CC=${CC}
6718 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6719 ac_save_c_werror_flag=$ac_c_werror_flag
6720 ac_c_werror_flag=yes
6721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6722 /* end confdefs.h. */
6725 main ()
6729 return 0;
6731 _ACEOF
6732 if ac_fn_c_try_compile "$LINENO"; then :
6733 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6734 else
6735 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6738 ac_c_werror_flag=$ac_save_c_werror_flag
6739 CFLAGS="$pgac_save_CFLAGS"
6740 CC="$pgac_save_CC"
6742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6743 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6744 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6745 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6750 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6751 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6752 $as_echo_n "(cached) " >&6
6753 else
6754 pgac_save_CXXFLAGS=$CXXFLAGS
6755 pgac_save_CXX=$CXX
6756 CXX=${CXX}
6757 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6758 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6759 ac_cxx_werror_flag=yes
6760 ac_ext=cpp
6761 ac_cpp='$CXXCPP $CPPFLAGS'
6762 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6763 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6764 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6767 /* end confdefs.h. */
6770 main ()
6774 return 0;
6776 _ACEOF
6777 if ac_fn_cxx_try_compile "$LINENO"; then :
6778 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6779 else
6780 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6783 ac_ext=c
6784 ac_cpp='$CPP $CPPFLAGS'
6785 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6786 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6787 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6789 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6790 CXXFLAGS="$pgac_save_CXXFLAGS"
6791 CXX="$pgac_save_CXX"
6793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6794 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6795 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6796 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6800 elif test "$PORTNAME" = "aix"; then
6801 # AIX's xlc has to have strict aliasing turned off too
6803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6804 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6805 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6806 $as_echo_n "(cached) " >&6
6807 else
6808 pgac_save_CFLAGS=$CFLAGS
6809 pgac_save_CC=$CC
6810 CC=${CC}
6811 CFLAGS="${CFLAGS} -qnoansialias"
6812 ac_save_c_werror_flag=$ac_c_werror_flag
6813 ac_c_werror_flag=yes
6814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6815 /* end confdefs.h. */
6818 main ()
6822 return 0;
6824 _ACEOF
6825 if ac_fn_c_try_compile "$LINENO"; then :
6826 pgac_cv_prog_CC_cflags__qnoansialias=yes
6827 else
6828 pgac_cv_prog_CC_cflags__qnoansialias=no
6830 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6831 ac_c_werror_flag=$ac_save_c_werror_flag
6832 CFLAGS="$pgac_save_CFLAGS"
6833 CC="$pgac_save_CC"
6835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6836 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6837 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6838 CFLAGS="${CFLAGS} -qnoansialias"
6842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6843 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6844 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6845 $as_echo_n "(cached) " >&6
6846 else
6847 pgac_save_CXXFLAGS=$CXXFLAGS
6848 pgac_save_CXX=$CXX
6849 CXX=${CXX}
6850 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6851 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6852 ac_cxx_werror_flag=yes
6853 ac_ext=cpp
6854 ac_cpp='$CXXCPP $CPPFLAGS'
6855 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6856 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6857 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6860 /* end confdefs.h. */
6863 main ()
6867 return 0;
6869 _ACEOF
6870 if ac_fn_cxx_try_compile "$LINENO"; then :
6871 pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6872 else
6873 pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6876 ac_ext=c
6877 ac_cpp='$CPP $CPPFLAGS'
6878 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6879 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6880 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6882 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6883 CXXFLAGS="$pgac_save_CXXFLAGS"
6884 CXX="$pgac_save_CXX"
6886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6887 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6888 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6889 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6895 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6896 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6897 $as_echo_n "(cached) " >&6
6898 else
6899 pgac_save_CFLAGS=$CFLAGS
6900 pgac_save_CC=$CC
6901 CC=${CC}
6902 CFLAGS="${CFLAGS} -qlonglong"
6903 ac_save_c_werror_flag=$ac_c_werror_flag
6904 ac_c_werror_flag=yes
6905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6906 /* end confdefs.h. */
6909 main ()
6913 return 0;
6915 _ACEOF
6916 if ac_fn_c_try_compile "$LINENO"; then :
6917 pgac_cv_prog_CC_cflags__qlonglong=yes
6918 else
6919 pgac_cv_prog_CC_cflags__qlonglong=no
6921 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6922 ac_c_werror_flag=$ac_save_c_werror_flag
6923 CFLAGS="$pgac_save_CFLAGS"
6924 CC="$pgac_save_CC"
6926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6927 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6928 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6929 CFLAGS="${CFLAGS} -qlonglong"
6933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6934 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6935 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6936 $as_echo_n "(cached) " >&6
6937 else
6938 pgac_save_CXXFLAGS=$CXXFLAGS
6939 pgac_save_CXX=$CXX
6940 CXX=${CXX}
6941 CXXFLAGS="${CXXFLAGS} -qlonglong"
6942 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6943 ac_cxx_werror_flag=yes
6944 ac_ext=cpp
6945 ac_cpp='$CXXCPP $CPPFLAGS'
6946 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6947 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6948 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6951 /* end confdefs.h. */
6954 main ()
6958 return 0;
6960 _ACEOF
6961 if ac_fn_cxx_try_compile "$LINENO"; then :
6962 pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6963 else
6964 pgac_cv_prog_CXX_cxxflags__qlonglong=no
6966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6967 ac_ext=c
6968 ac_cpp='$CPP $CPPFLAGS'
6969 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6970 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6971 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6973 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6974 CXXFLAGS="$pgac_save_CXXFLAGS"
6975 CXX="$pgac_save_CXX"
6977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6978 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6979 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6980 CXXFLAGS="${CXXFLAGS} -qlonglong"
6986 # If the compiler knows how to hide symbols, add the switch needed for that to
6987 # CFLAGS_SL_MODULE and define HAVE_VISIBILITY_ATTRIBUTE.
6989 # This is done separately from the above because -fvisibility is supported by
6990 # quite a few different compilers, making the required repetition bothersome.
6992 # We might need to add a separate test to check if
6993 # __attribute__((visibility("hidden"))) is supported, if we encounter a
6994 # compiler that supports one of the supported variants of -fvisibility=hidden
6995 # but uses a different syntax to mark a symbol as exported.
6996 if test "$GCC" = yes -o "$SUN_STUDIO_CC" = yes ; then
6997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE" >&5
6998 $as_echo_n "checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
6999 if ${pgac_cv_prog_CC_cflags__fvisibility_hidden+:} false; then :
7000 $as_echo_n "(cached) " >&6
7001 else
7002 pgac_save_CFLAGS=$CFLAGS
7003 pgac_save_CC=$CC
7004 CC=${CC}
7005 CFLAGS="${CFLAGS_SL_MODULE} -fvisibility=hidden"
7006 ac_save_c_werror_flag=$ac_c_werror_flag
7007 ac_c_werror_flag=yes
7008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7009 /* end confdefs.h. */
7012 main ()
7016 return 0;
7018 _ACEOF
7019 if ac_fn_c_try_compile "$LINENO"; then :
7020 pgac_cv_prog_CC_cflags__fvisibility_hidden=yes
7021 else
7022 pgac_cv_prog_CC_cflags__fvisibility_hidden=no
7024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7025 ac_c_werror_flag=$ac_save_c_werror_flag
7026 CFLAGS="$pgac_save_CFLAGS"
7027 CC="$pgac_save_CC"
7029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fvisibility_hidden" >&5
7030 $as_echo "$pgac_cv_prog_CC_cflags__fvisibility_hidden" >&6; }
7031 if test x"$pgac_cv_prog_CC_cflags__fvisibility_hidden" = x"yes"; then
7032 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -fvisibility=hidden"
7036 # For C++ we additionally want -fvisibility-inlines-hidden
7037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
7038 $as_echo_n "checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
7039 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_hidden+:} false; then :
7040 $as_echo_n "(cached) " >&6
7041 else
7042 pgac_save_CXXFLAGS=$CXXFLAGS
7043 pgac_save_CXX=$CXX
7044 CXX=${CXX}
7045 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
7046 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7047 ac_cxx_werror_flag=yes
7048 ac_ext=cpp
7049 ac_cpp='$CXXCPP $CPPFLAGS'
7050 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7051 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7052 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7055 /* end confdefs.h. */
7058 main ()
7062 return 0;
7064 _ACEOF
7065 if ac_fn_cxx_try_compile "$LINENO"; then :
7066 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=yes
7067 else
7068 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=no
7070 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7071 ac_ext=c
7072 ac_cpp='$CPP $CPPFLAGS'
7073 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7074 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7075 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7077 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7078 CXXFLAGS="$pgac_save_CXXFLAGS"
7079 CXX="$pgac_save_CXX"
7081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&5
7082 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&6; }
7083 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" = x"yes"; then
7084 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
7087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE" >&5
7088 $as_echo_n "checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE... " >&6; }
7089 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden+:} false; then :
7090 $as_echo_n "(cached) " >&6
7091 else
7092 pgac_save_CXXFLAGS=$CXXFLAGS
7093 pgac_save_CXX=$CXX
7094 CXX=${CXX}
7095 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
7096 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7097 ac_cxx_werror_flag=yes
7098 ac_ext=cpp
7099 ac_cpp='$CXXCPP $CPPFLAGS'
7100 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7101 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7102 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7105 /* end confdefs.h. */
7108 main ()
7112 return 0;
7114 _ACEOF
7115 if ac_fn_cxx_try_compile "$LINENO"; then :
7116 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=yes
7117 else
7118 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=no
7120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7121 ac_ext=c
7122 ac_cpp='$CPP $CPPFLAGS'
7123 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7124 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7125 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7127 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7128 CXXFLAGS="$pgac_save_CXXFLAGS"
7129 CXX="$pgac_save_CXX"
7131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&5
7132 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&6; }
7133 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" = x"yes"; then
7134 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
7137 have_visibility_attribute=$pgac_cv_prog_CC_cflags__fvisibility_hidden
7138 elif test "$PORTNAME" = "aix"; then
7139 # Note that xlc accepts -fvisibility=hidden as a file.
7140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qvisibility=hidden, for CFLAGS_SL_MODULE" >&5
7141 $as_echo_n "checking whether ${CC} supports -qvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
7142 if ${pgac_cv_prog_CC_cflags__qvisibility_hidden+:} false; then :
7143 $as_echo_n "(cached) " >&6
7144 else
7145 pgac_save_CFLAGS=$CFLAGS
7146 pgac_save_CC=$CC
7147 CC=${CC}
7148 CFLAGS="${CFLAGS_SL_MODULE} -qvisibility=hidden"
7149 ac_save_c_werror_flag=$ac_c_werror_flag
7150 ac_c_werror_flag=yes
7151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7152 /* end confdefs.h. */
7155 main ()
7159 return 0;
7161 _ACEOF
7162 if ac_fn_c_try_compile "$LINENO"; then :
7163 pgac_cv_prog_CC_cflags__qvisibility_hidden=yes
7164 else
7165 pgac_cv_prog_CC_cflags__qvisibility_hidden=no
7167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7168 ac_c_werror_flag=$ac_save_c_werror_flag
7169 CFLAGS="$pgac_save_CFLAGS"
7170 CC="$pgac_save_CC"
7172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qvisibility_hidden" >&5
7173 $as_echo "$pgac_cv_prog_CC_cflags__qvisibility_hidden" >&6; }
7174 if test x"$pgac_cv_prog_CC_cflags__qvisibility_hidden" = x"yes"; then
7175 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -qvisibility=hidden"
7179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
7180 $as_echo_n "checking whether ${CXX} supports -qvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
7181 if ${pgac_cv_prog_CXX_cxxflags__qvisibility_hidden+:} false; then :
7182 $as_echo_n "(cached) " >&6
7183 else
7184 pgac_save_CXXFLAGS=$CXXFLAGS
7185 pgac_save_CXX=$CXX
7186 CXX=${CXX}
7187 CXXFLAGS="${CXXFLAGS_SL_MODULE} -qvisibility=hidden"
7188 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7189 ac_cxx_werror_flag=yes
7190 ac_ext=cpp
7191 ac_cpp='$CXXCPP $CPPFLAGS'
7192 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7193 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7194 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7197 /* end confdefs.h. */
7200 main ()
7204 return 0;
7206 _ACEOF
7207 if ac_fn_cxx_try_compile "$LINENO"; then :
7208 pgac_cv_prog_CXX_cxxflags__qvisibility_hidden=yes
7209 else
7210 pgac_cv_prog_CXX_cxxflags__qvisibility_hidden=no
7212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7213 ac_ext=c
7214 ac_cpp='$CPP $CPPFLAGS'
7215 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7216 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7217 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7219 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7220 CXXFLAGS="$pgac_save_CXXFLAGS"
7221 CXX="$pgac_save_CXX"
7223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" >&5
7224 $as_echo "$pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" >&6; }
7225 if test x"$pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" = x"yes"; then
7226 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -qvisibility=hidden"
7229 have_visibility_attribute=$pgac_cv_prog_CC_cflags__qvisibility_hidden
7230 # Old xlc versions (<13.1) don't have support for -qvisibility. Use expfull to force
7231 # all extension module symbols to be exported.
7232 if test "$pgac_cv_prog_CC_cflags__qvisibility_hidden" != "yes"; then
7233 CFLAGS_SL_MODULE="$CFLAGS_SL_MODULE -Wl,-b,expfull"
7237 if test "$have_visibility_attribute" = "yes"; then
7239 $as_echo "#define HAVE_VISIBILITY_ATTRIBUTE 1" >>confdefs.h
7248 # Determine flags used to emit bitcode for JIT inlining.
7249 # 1. We must duplicate any behaviour-changing compiler flags used above,
7250 # to keep compatibility with the compiler used for normal Postgres code.
7251 # 2. We don't bother to duplicate extra-warnings switches --- seeing a
7252 # warning in the main build is enough.
7253 # 3. But we must duplicate -Wno-warning flags, else we'll see those anyway.
7254 if test "$with_llvm" = yes ; then
7255 CLANGXX="$CLANG -xc++"
7257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
7258 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
7259 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
7260 $as_echo_n "(cached) " >&6
7261 else
7262 pgac_save_CFLAGS=$CFLAGS
7263 pgac_save_CC=$CC
7264 CC=${CLANG}
7265 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7266 ac_save_c_werror_flag=$ac_c_werror_flag
7267 ac_c_werror_flag=yes
7268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7269 /* end confdefs.h. */
7272 main ()
7276 return 0;
7278 _ACEOF
7279 if ac_fn_c_try_compile "$LINENO"; then :
7280 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
7281 else
7282 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
7284 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7285 ac_c_werror_flag=$ac_save_c_werror_flag
7286 CFLAGS="$pgac_save_CFLAGS"
7287 CC="$pgac_save_CC"
7289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
7290 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
7291 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
7292 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
7296 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
7297 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
7298 $as_echo_n "(cached) " >&6
7299 else
7300 pgac_save_CXXFLAGS=$CXXFLAGS
7301 pgac_save_CXX=$CXX
7302 CXX=${CLANGXX}
7303 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7304 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7305 ac_cxx_werror_flag=yes
7306 ac_ext=cpp
7307 ac_cpp='$CXXCPP $CPPFLAGS'
7308 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7309 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7310 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7313 /* end confdefs.h. */
7316 main ()
7320 return 0;
7322 _ACEOF
7323 if ac_fn_cxx_try_compile "$LINENO"; then :
7324 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
7325 else
7326 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
7328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7329 ac_ext=c
7330 ac_cpp='$CPP $CPPFLAGS'
7331 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7332 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7333 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7335 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7336 CXXFLAGS="$pgac_save_CXXFLAGS"
7337 CXX="$pgac_save_CXX"
7339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
7340 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
7341 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
7342 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
7346 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
7347 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
7348 $as_echo_n "(cached) " >&6
7349 else
7350 pgac_save_CFLAGS=$CFLAGS
7351 pgac_save_CC=$CC
7352 CC=${CLANG}
7353 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7354 ac_save_c_werror_flag=$ac_c_werror_flag
7355 ac_c_werror_flag=yes
7356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7357 /* end confdefs.h. */
7360 main ()
7364 return 0;
7366 _ACEOF
7367 if ac_fn_c_try_compile "$LINENO"; then :
7368 pgac_cv_prog_CLANG_cflags__fwrapv=yes
7369 else
7370 pgac_cv_prog_CLANG_cflags__fwrapv=no
7372 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7373 ac_c_werror_flag=$ac_save_c_werror_flag
7374 CFLAGS="$pgac_save_CFLAGS"
7375 CC="$pgac_save_CC"
7377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
7378 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
7379 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
7380 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
7384 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
7385 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
7386 $as_echo_n "(cached) " >&6
7387 else
7388 pgac_save_CXXFLAGS=$CXXFLAGS
7389 pgac_save_CXX=$CXX
7390 CXX=${CLANGXX}
7391 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7392 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7393 ac_cxx_werror_flag=yes
7394 ac_ext=cpp
7395 ac_cpp='$CXXCPP $CPPFLAGS'
7396 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7397 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7398 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7401 /* end confdefs.h. */
7404 main ()
7408 return 0;
7410 _ACEOF
7411 if ac_fn_cxx_try_compile "$LINENO"; then :
7412 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
7413 else
7414 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
7416 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7417 ac_ext=c
7418 ac_cpp='$CPP $CPPFLAGS'
7419 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7420 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7421 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7423 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7424 CXXFLAGS="$pgac_save_CXXFLAGS"
7425 CXX="$pgac_save_CXX"
7427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
7428 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
7429 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
7430 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
7434 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
7435 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
7436 $as_echo_n "(cached) " >&6
7437 else
7438 pgac_save_CFLAGS=$CFLAGS
7439 pgac_save_CC=$CC
7440 CC=${CLANG}
7441 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7442 ac_save_c_werror_flag=$ac_c_werror_flag
7443 ac_c_werror_flag=yes
7444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7445 /* end confdefs.h. */
7448 main ()
7452 return 0;
7454 _ACEOF
7455 if ac_fn_c_try_compile "$LINENO"; then :
7456 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7457 else
7458 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7461 ac_c_werror_flag=$ac_save_c_werror_flag
7462 CFLAGS="$pgac_save_CFLAGS"
7463 CC="$pgac_save_CC"
7465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7466 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7467 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7468 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7472 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7473 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7474 $as_echo_n "(cached) " >&6
7475 else
7476 pgac_save_CXXFLAGS=$CXXFLAGS
7477 pgac_save_CXX=$CXX
7478 CXX=${CLANGXX}
7479 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7480 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7481 ac_cxx_werror_flag=yes
7482 ac_ext=cpp
7483 ac_cpp='$CXXCPP $CPPFLAGS'
7484 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7485 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7486 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7489 /* end confdefs.h. */
7492 main ()
7496 return 0;
7498 _ACEOF
7499 if ac_fn_cxx_try_compile "$LINENO"; then :
7500 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7501 else
7502 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7504 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7505 ac_ext=c
7506 ac_cpp='$CPP $CPPFLAGS'
7507 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7508 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7509 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7511 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7512 CXXFLAGS="$pgac_save_CXXFLAGS"
7513 CXX="$pgac_save_CXX"
7515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7516 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7517 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7518 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS" >&5
7523 $as_echo_n "checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS... " >&6; }
7524 if ${pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers+:} false; then :
7525 $as_echo_n "(cached) " >&6
7526 else
7527 pgac_save_CFLAGS=$CFLAGS
7528 pgac_save_CC=$CC
7529 CC=${CLANG}
7530 CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7531 ac_save_c_werror_flag=$ac_c_werror_flag
7532 ac_c_werror_flag=yes
7533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7534 /* end confdefs.h. */
7537 main ()
7541 return 0;
7543 _ACEOF
7544 if ac_fn_c_try_compile "$LINENO"; then :
7545 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=yes
7546 else
7547 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=no
7549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7550 ac_c_werror_flag=$ac_save_c_werror_flag
7551 CFLAGS="$pgac_save_CFLAGS"
7552 CC="$pgac_save_CC"
7554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&5
7555 $as_echo "$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&6; }
7556 if test x"$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" = x"yes"; then
7557 BITCODE_CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS" >&5
7561 $as_echo_n "checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS... " >&6; }
7562 if ${pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers+:} false; then :
7563 $as_echo_n "(cached) " >&6
7564 else
7565 pgac_save_CXXFLAGS=$CXXFLAGS
7566 pgac_save_CXX=$CXX
7567 CXX=${CLANGXX}
7568 CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7569 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7570 ac_cxx_werror_flag=yes
7571 ac_ext=cpp
7572 ac_cpp='$CXXCPP $CPPFLAGS'
7573 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7574 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7575 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7578 /* end confdefs.h. */
7581 main ()
7585 return 0;
7587 _ACEOF
7588 if ac_fn_cxx_try_compile "$LINENO"; then :
7589 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=yes
7590 else
7591 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=no
7593 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7594 ac_ext=c
7595 ac_cpp='$CPP $CPPFLAGS'
7596 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7597 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7598 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7600 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7601 CXXFLAGS="$pgac_save_CXXFLAGS"
7602 CXX="$pgac_save_CXX"
7604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&5
7605 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&6; }
7606 if test x"$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" = x"yes"; then
7607 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7611 NOT_THE_CFLAGS=""
7612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
7613 $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
7614 if ${pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument+:} false; then :
7615 $as_echo_n "(cached) " >&6
7616 else
7617 pgac_save_CFLAGS=$CFLAGS
7618 pgac_save_CC=$CC
7619 CC=${CLANG}
7620 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7621 ac_save_c_werror_flag=$ac_c_werror_flag
7622 ac_c_werror_flag=yes
7623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7624 /* end confdefs.h. */
7627 main ()
7631 return 0;
7633 _ACEOF
7634 if ac_fn_c_try_compile "$LINENO"; then :
7635 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=yes
7636 else
7637 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=no
7639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7640 ac_c_werror_flag=$ac_save_c_werror_flag
7641 CFLAGS="$pgac_save_CFLAGS"
7642 CC="$pgac_save_CC"
7644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&5
7645 $as_echo "$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&6; }
7646 if test x"$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" = x"yes"; then
7647 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7650 if test -n "$NOT_THE_CFLAGS"; then
7651 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-unused-command-line-argument"
7653 NOT_THE_CFLAGS=""
7654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
7655 $as_echo_n "checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
7656 if ${pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro+:} false; then :
7657 $as_echo_n "(cached) " >&6
7658 else
7659 pgac_save_CFLAGS=$CFLAGS
7660 pgac_save_CC=$CC
7661 CC=${CLANG}
7662 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7663 ac_save_c_werror_flag=$ac_c_werror_flag
7664 ac_c_werror_flag=yes
7665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7666 /* end confdefs.h. */
7669 main ()
7673 return 0;
7675 _ACEOF
7676 if ac_fn_c_try_compile "$LINENO"; then :
7677 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=yes
7678 else
7679 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=no
7681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7682 ac_c_werror_flag=$ac_save_c_werror_flag
7683 CFLAGS="$pgac_save_CFLAGS"
7684 CC="$pgac_save_CC"
7686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&5
7687 $as_echo "$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&6; }
7688 if test x"$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" = x"yes"; then
7689 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7692 if test -n "$NOT_THE_CFLAGS"; then
7693 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
7695 NOT_THE_CFLAGS=""
7696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
7697 $as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
7698 if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :
7699 $as_echo_n "(cached) " >&6
7700 else
7701 pgac_save_CFLAGS=$CFLAGS
7702 pgac_save_CC=$CC
7703 CC=${CLANG}
7704 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7705 ac_save_c_werror_flag=$ac_c_werror_flag
7706 ac_c_werror_flag=yes
7707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7708 /* end confdefs.h. */
7711 main ()
7715 return 0;
7717 _ACEOF
7718 if ac_fn_c_try_compile "$LINENO"; then :
7719 pgac_cv_prog_CLANG_cflags__Wformat_truncation=yes
7720 else
7721 pgac_cv_prog_CLANG_cflags__Wformat_truncation=no
7723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7724 ac_c_werror_flag=$ac_save_c_werror_flag
7725 CFLAGS="$pgac_save_CFLAGS"
7726 CC="$pgac_save_CC"
7728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&5
7729 $as_echo "$pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&6; }
7730 if test x"$pgac_cv_prog_CLANG_cflags__Wformat_truncation" = x"yes"; then
7731 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7734 if test -n "$NOT_THE_CFLAGS"; then
7735 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"
7737 NOT_THE_CFLAGS=""
7738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
7739 $as_echo_n "checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
7740 if ${pgac_cv_prog_CLANG_cflags__Wstringop_truncation+:} false; then :
7741 $as_echo_n "(cached) " >&6
7742 else
7743 pgac_save_CFLAGS=$CFLAGS
7744 pgac_save_CC=$CC
7745 CC=${CLANG}
7746 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7747 ac_save_c_werror_flag=$ac_c_werror_flag
7748 ac_c_werror_flag=yes
7749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7750 /* end confdefs.h. */
7753 main ()
7757 return 0;
7759 _ACEOF
7760 if ac_fn_c_try_compile "$LINENO"; then :
7761 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=yes
7762 else
7763 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=no
7765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7766 ac_c_werror_flag=$ac_save_c_werror_flag
7767 CFLAGS="$pgac_save_CFLAGS"
7768 CC="$pgac_save_CC"
7770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&5
7771 $as_echo "$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&6; }
7772 if test x"$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" = x"yes"; then
7773 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7776 if test -n "$NOT_THE_CFLAGS"; then
7777 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-stringop-truncation"
7781 # supply -g if --enable-debug
7782 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7783 CFLAGS="$CFLAGS -g"
7786 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7787 CXXFLAGS="$CXXFLAGS -g"
7790 # enable code coverage if --enable-coverage
7791 if test "$enable_coverage" = yes; then
7792 if test "$GCC" = yes; then
7793 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7794 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7795 else
7796 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7800 # enable profiling if --enable-profiling
7801 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7802 if test "$GCC" = yes; then
7804 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7806 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7807 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7808 else
7809 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7813 # On Solaris, we need this #define to get POSIX-conforming versions
7814 # of many interfaces (sigwait, getpwuid_r, ...).
7815 if test "$PORTNAME" = "solaris"; then
7816 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
7819 # We already have this in Makefile.win32, but configure needs it too
7820 if test "$PORTNAME" = "win32"; then
7821 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7824 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7825 # user-specified flags (if any) at the end. This lets users override
7826 # the automatic additions.
7827 CFLAGS="$CFLAGS $user_CFLAGS"
7828 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7829 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7830 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7835 # The template file must set up CFLAGS_SL; we don't support user override
7838 # Check if the compiler still works with the final flag settings
7839 # (note, we're not checking that for CXX, which is optional)
7840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7841 $as_echo_n "checking whether the C compiler still works... " >&6; }
7842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7843 /* end confdefs.h. */
7846 main ()
7848 return 0;
7850 return 0;
7852 _ACEOF
7853 if ac_fn_c_try_link "$LINENO"; then :
7854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7855 $as_echo "yes" >&6; }
7856 else
7857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7858 $as_echo "no" >&6; }
7859 as_fn_error $? "cannot proceed" "$LINENO" 5
7861 rm -f core conftest.err conftest.$ac_objext \
7862 conftest$ac_exeext conftest.$ac_ext
7864 # Defend against gcc -ffast-math
7865 if test "$GCC" = yes; then
7866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7867 /* end confdefs.h. */
7870 main ()
7872 #ifdef __FAST_MATH__
7873 choke me
7874 #endif
7876 return 0;
7878 _ACEOF
7879 if ac_fn_c_try_compile "$LINENO"; then :
7881 else
7882 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7887 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7888 # versions of clang do not understand -fexcess-precision=standard, the use of
7889 # x87 floating point operations leads to problems like isinf possibly returning
7890 # false for a value that is infinite when converted from the 80bit register to
7891 # the 8byte memory representation.
7893 # Only perform the test if the compiler doesn't understand
7894 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7895 # automatically.
7896 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7898 /* end confdefs.h. */
7901 main ()
7904 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7905 choke me
7906 #endif
7909 return 0;
7911 _ACEOF
7912 if ac_fn_c_try_compile "$LINENO"; then :
7914 else
7915 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7920 ac_ext=c
7921 ac_cpp='$CPP $CPPFLAGS'
7922 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7923 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7924 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7926 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7927 # On Suns, sometimes $CPP names a directory.
7928 if test -n "$CPP" && test -d "$CPP"; then
7929 CPP=
7931 if test -z "$CPP"; then
7932 if ${ac_cv_prog_CPP+:} false; then :
7933 $as_echo_n "(cached) " >&6
7934 else
7935 # Double quotes because CPP needs to be expanded
7936 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7938 ac_preproc_ok=false
7939 for ac_c_preproc_warn_flag in '' yes
7941 # Use a header file that comes with gcc, so configuring glibc
7942 # with a fresh cross-compiler works.
7943 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7944 # <limits.h> exists even on freestanding compilers.
7945 # On the NeXT, cc -E runs the code through the compiler's parser,
7946 # not just through cpp. "Syntax error" is here to catch this case.
7947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7948 /* end confdefs.h. */
7949 #ifdef __STDC__
7950 # include <limits.h>
7951 #else
7952 # include <assert.h>
7953 #endif
7954 Syntax error
7955 _ACEOF
7956 if ac_fn_c_try_cpp "$LINENO"; then :
7958 else
7959 # Broken: fails on valid input.
7960 continue
7962 rm -f conftest.err conftest.i conftest.$ac_ext
7964 # OK, works on sane cases. Now check whether nonexistent headers
7965 # can be detected and how.
7966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7967 /* end confdefs.h. */
7968 #include <ac_nonexistent.h>
7969 _ACEOF
7970 if ac_fn_c_try_cpp "$LINENO"; then :
7971 # Broken: success on invalid input.
7972 continue
7973 else
7974 # Passes both tests.
7975 ac_preproc_ok=:
7976 break
7978 rm -f conftest.err conftest.i conftest.$ac_ext
7980 done
7981 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7982 rm -f conftest.i conftest.err conftest.$ac_ext
7983 if $ac_preproc_ok; then :
7984 break
7987 done
7988 ac_cv_prog_CPP=$CPP
7991 CPP=$ac_cv_prog_CPP
7992 else
7993 ac_cv_prog_CPP=$CPP
7995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7996 $as_echo "$CPP" >&6; }
7997 ac_preproc_ok=false
7998 for ac_c_preproc_warn_flag in '' yes
8000 # Use a header file that comes with gcc, so configuring glibc
8001 # with a fresh cross-compiler works.
8002 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8003 # <limits.h> exists even on freestanding compilers.
8004 # On the NeXT, cc -E runs the code through the compiler's parser,
8005 # not just through cpp. "Syntax error" is here to catch this case.
8006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8007 /* end confdefs.h. */
8008 #ifdef __STDC__
8009 # include <limits.h>
8010 #else
8011 # include <assert.h>
8012 #endif
8013 Syntax error
8014 _ACEOF
8015 if ac_fn_c_try_cpp "$LINENO"; then :
8017 else
8018 # Broken: fails on valid input.
8019 continue
8021 rm -f conftest.err conftest.i conftest.$ac_ext
8023 # OK, works on sane cases. Now check whether nonexistent headers
8024 # can be detected and how.
8025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8026 /* end confdefs.h. */
8027 #include <ac_nonexistent.h>
8028 _ACEOF
8029 if ac_fn_c_try_cpp "$LINENO"; then :
8030 # Broken: success on invalid input.
8031 continue
8032 else
8033 # Passes both tests.
8034 ac_preproc_ok=:
8035 break
8037 rm -f conftest.err conftest.i conftest.$ac_ext
8039 done
8040 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8041 rm -f conftest.i conftest.err conftest.$ac_ext
8042 if $ac_preproc_ok; then :
8044 else
8045 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8046 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8047 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
8048 See \`config.log' for more details" "$LINENO" 5; }
8051 ac_ext=c
8052 ac_cpp='$CPP $CPPFLAGS'
8053 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8054 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8055 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8061 # Set up TAS assembly code if needed; the template file has now had its
8062 # chance to request this.
8064 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
8067 if test "$need_tas" = yes ; then
8068 TAS=tas.o
8069 else
8070 TAS=""
8075 cat >>confdefs.h <<_ACEOF
8076 #define DLSUFFIX "$DLSUFFIX"
8077 _ACEOF
8081 # Set up pkg_config in case we need it below
8090 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8091 if test -n "$ac_tool_prefix"; then
8092 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8093 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
8094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8095 $as_echo_n "checking for $ac_word... " >&6; }
8096 if ${ac_cv_path_PKG_CONFIG+:} false; then :
8097 $as_echo_n "(cached) " >&6
8098 else
8099 case $PKG_CONFIG in
8100 [\\/]* | ?:[\\/]*)
8101 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8104 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8105 for as_dir in $PATH
8107 IFS=$as_save_IFS
8108 test -z "$as_dir" && as_dir=.
8109 for ac_exec_ext in '' $ac_executable_extensions; do
8110 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8111 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8112 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8113 break 2
8115 done
8116 done
8117 IFS=$as_save_IFS
8120 esac
8122 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8123 if test -n "$PKG_CONFIG"; then
8124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8125 $as_echo "$PKG_CONFIG" >&6; }
8126 else
8127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8128 $as_echo "no" >&6; }
8133 if test -z "$ac_cv_path_PKG_CONFIG"; then
8134 ac_pt_PKG_CONFIG=$PKG_CONFIG
8135 # Extract the first word of "pkg-config", so it can be a program name with args.
8136 set dummy pkg-config; ac_word=$2
8137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8138 $as_echo_n "checking for $ac_word... " >&6; }
8139 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
8140 $as_echo_n "(cached) " >&6
8141 else
8142 case $ac_pt_PKG_CONFIG in
8143 [\\/]* | ?:[\\/]*)
8144 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8147 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8148 for as_dir in $PATH
8150 IFS=$as_save_IFS
8151 test -z "$as_dir" && as_dir=.
8152 for ac_exec_ext in '' $ac_executable_extensions; do
8153 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8154 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8155 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8156 break 2
8158 done
8159 done
8160 IFS=$as_save_IFS
8163 esac
8165 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8166 if test -n "$ac_pt_PKG_CONFIG"; then
8167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8168 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
8169 else
8170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8171 $as_echo "no" >&6; }
8174 if test "x$ac_pt_PKG_CONFIG" = x; then
8175 PKG_CONFIG=""
8176 else
8177 case $cross_compiling:$ac_tool_warned in
8178 yes:)
8179 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8180 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8181 ac_tool_warned=yes ;;
8182 esac
8183 PKG_CONFIG=$ac_pt_PKG_CONFIG
8185 else
8186 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8190 if test -n "$PKG_CONFIG"; then
8191 _pkg_min_version=0.9.0
8192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
8193 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
8194 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8196 $as_echo "yes" >&6; }
8197 else
8198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8199 $as_echo "no" >&6; }
8200 PKG_CONFIG=""
8205 # Automatic dependency tracking
8209 # Check whether --enable-depend was given.
8210 if test "${enable_depend+set}" = set; then :
8211 enableval=$enable_depend;
8212 case $enableval in
8213 yes)
8214 autodepend=yes
8220 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
8222 esac
8224 else
8225 enable_depend=no
8234 # Enable assert checks
8238 # Check whether --enable-cassert was given.
8239 if test "${enable_cassert+set}" = set; then :
8240 enableval=$enable_cassert;
8241 case $enableval in
8242 yes)
8244 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
8251 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
8253 esac
8255 else
8256 enable_cassert=no
8264 # Include directories
8266 ac_save_IFS=$IFS
8267 IFS="${IFS}${PATH_SEPARATOR}"
8268 # SRCH_INC comes from the template file
8269 for dir in $with_includes $SRCH_INC; do
8270 if test -d "$dir"; then
8271 INCLUDES="$INCLUDES -I$dir"
8272 else
8273 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
8274 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
8276 done
8277 IFS=$ac_save_IFS
8282 # Library directories
8284 ac_save_IFS=$IFS
8285 IFS="${IFS}${PATH_SEPARATOR}"
8286 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
8287 for dir in $LIBRARY_DIRS $SRCH_LIB; do
8288 if test -d "$dir"; then
8289 LIBDIRS="$LIBDIRS -L$dir"
8290 else
8291 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
8292 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
8294 done
8295 IFS=$ac_save_IFS
8298 # Enable thread-safe client libraries
8300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
8301 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
8304 # Check whether --enable-thread-safety was given.
8305 if test "${enable_thread_safety+set}" = set; then :
8306 enableval=$enable_thread_safety;
8307 case $enableval in
8308 yes)
8315 as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
8317 esac
8319 else
8320 enable_thread_safety=yes
8325 if test "$enable_thread_safety" = yes; then
8327 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
8330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
8331 $as_echo "$enable_thread_safety" >&6; }
8335 # ICU
8337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
8338 $as_echo_n "checking whether to build with ICU support... " >&6; }
8342 # Check whether --with-icu was given.
8343 if test "${with_icu+set}" = set; then :
8344 withval=$with_icu;
8345 case $withval in
8346 yes)
8348 $as_echo "#define USE_ICU 1" >>confdefs.h
8355 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
8357 esac
8359 else
8360 with_icu=no
8365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
8366 $as_echo "$with_icu" >&6; }
8369 if test "$with_icu" = yes; then
8371 pkg_failed=no
8372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
8373 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
8375 if test -n "$ICU_CFLAGS"; then
8376 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
8377 elif test -n "$PKG_CONFIG"; then
8378 if test -n "$PKG_CONFIG" && \
8379 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8380 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8381 ac_status=$?
8382 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8383 test $ac_status = 0; }; then
8384 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
8385 test "x$?" != "x0" && pkg_failed=yes
8386 else
8387 pkg_failed=yes
8389 else
8390 pkg_failed=untried
8392 if test -n "$ICU_LIBS"; then
8393 pkg_cv_ICU_LIBS="$ICU_LIBS"
8394 elif test -n "$PKG_CONFIG"; then
8395 if test -n "$PKG_CONFIG" && \
8396 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8397 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8398 ac_status=$?
8399 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8400 test $ac_status = 0; }; then
8401 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
8402 test "x$?" != "x0" && pkg_failed=yes
8403 else
8404 pkg_failed=yes
8406 else
8407 pkg_failed=untried
8412 if test $pkg_failed = yes; then
8413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8414 $as_echo "no" >&6; }
8416 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8417 _pkg_short_errors_supported=yes
8418 else
8419 _pkg_short_errors_supported=no
8421 if test $_pkg_short_errors_supported = yes; then
8422 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8423 else
8424 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8426 # Put the nasty error message in config.log where it belongs
8427 echo "$ICU_PKG_ERRORS" >&5
8429 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
8431 $ICU_PKG_ERRORS
8433 Consider adjusting the PKG_CONFIG_PATH environment variable if you
8434 installed software in a non-standard prefix.
8436 Alternatively, you may set the environment variables ICU_CFLAGS
8437 and ICU_LIBS to avoid the need to call pkg-config.
8438 See the pkg-config man page for more details." "$LINENO" 5
8439 elif test $pkg_failed = untried; then
8440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8441 $as_echo "no" >&6; }
8442 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8443 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8444 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
8445 is in your PATH or set the PKG_CONFIG environment variable to the full
8446 path to pkg-config.
8448 Alternatively, you may set the environment variables ICU_CFLAGS
8449 and ICU_LIBS to avoid the need to call pkg-config.
8450 See the pkg-config man page for more details.
8452 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
8453 See \`config.log' for more details" "$LINENO" 5; }
8454 else
8455 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
8456 ICU_LIBS=$pkg_cv_ICU_LIBS
8457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8458 $as_echo "yes" >&6; }
8464 # Optionally build Tcl modules (PL/Tcl)
8466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
8467 $as_echo_n "checking whether to build with Tcl... " >&6; }
8471 # Check whether --with-tcl was given.
8472 if test "${with_tcl+set}" = set; then :
8473 withval=$with_tcl;
8474 case $withval in
8475 yes)
8482 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
8484 esac
8486 else
8487 with_tcl=no
8492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
8493 $as_echo "$with_tcl" >&6; }
8496 # We see if the path to the Tcl/Tk configuration scripts is specified.
8497 # This will override the use of tclsh to find the paths to search.
8502 # Check whether --with-tclconfig was given.
8503 if test "${with_tclconfig+set}" = set; then :
8504 withval=$with_tclconfig;
8505 case $withval in
8506 yes)
8507 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8510 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8515 esac
8522 # Optionally build Perl modules (PL/Perl)
8524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
8525 $as_echo_n "checking whether to build Perl modules... " >&6; }
8529 # Check whether --with-perl was given.
8530 if test "${with_perl+set}" = set; then :
8531 withval=$with_perl;
8532 case $withval in
8533 yes)
8540 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
8542 esac
8544 else
8545 with_perl=no
8550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
8551 $as_echo "$with_perl" >&6; }
8555 # Optionally build Python modules (PL/Python)
8557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
8558 $as_echo_n "checking whether to build Python modules... " >&6; }
8562 # Check whether --with-python was given.
8563 if test "${with_python+set}" = set; then :
8564 withval=$with_python;
8565 case $withval in
8566 yes)
8573 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
8575 esac
8577 else
8578 with_python=no
8583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8584 $as_echo "$with_python" >&6; }
8588 # GSSAPI
8590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
8591 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
8595 # Check whether --with-gssapi was given.
8596 if test "${with_gssapi+set}" = set; then :
8597 withval=$with_gssapi;
8598 case $withval in
8599 yes)
8602 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
8604 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
8611 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
8613 esac
8615 else
8616 with_gssapi=no
8621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8622 $as_echo "$with_gssapi" >&6; }
8630 # Kerberos configuration parameters
8635 # Check whether --with-krb-srvnam was given.
8636 if test "${with_krb_srvnam+set}" = set; then :
8637 withval=$with_krb_srvnam;
8638 case $withval in
8639 yes)
8640 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8643 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8648 esac
8650 else
8651 with_krb_srvnam="postgres"
8657 cat >>confdefs.h <<_ACEOF
8658 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8659 _ACEOF
8664 # PAM
8666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8667 $as_echo_n "checking whether to build with PAM support... " >&6; }
8671 # Check whether --with-pam was given.
8672 if test "${with_pam+set}" = set; then :
8673 withval=$with_pam;
8674 case $withval in
8675 yes)
8677 $as_echo "#define USE_PAM 1" >>confdefs.h
8684 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8686 esac
8688 else
8689 with_pam=no
8694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8695 $as_echo "$with_pam" >&6; }
8699 # BSD AUTH
8701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8702 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8706 # Check whether --with-bsd-auth was given.
8707 if test "${with_bsd_auth+set}" = set; then :
8708 withval=$with_bsd_auth;
8709 case $withval in
8710 yes)
8712 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8719 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8721 esac
8723 else
8724 with_bsd_auth=no
8729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8730 $as_echo "$with_bsd_auth" >&6; }
8734 # LDAP
8736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8737 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8741 # Check whether --with-ldap was given.
8742 if test "${with_ldap+set}" = set; then :
8743 withval=$with_ldap;
8744 case $withval in
8745 yes)
8747 $as_echo "#define USE_LDAP 1" >>confdefs.h
8754 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8756 esac
8758 else
8759 with_ldap=no
8764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8765 $as_echo "$with_ldap" >&6; }
8770 # Bonjour
8772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8773 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8777 # Check whether --with-bonjour was given.
8778 if test "${with_bonjour+set}" = set; then :
8779 withval=$with_bonjour;
8780 case $withval in
8781 yes)
8783 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8790 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8792 esac
8794 else
8795 with_bonjour=no
8800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8801 $as_echo "$with_bonjour" >&6; }
8805 # SELinux
8807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8808 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8812 # Check whether --with-selinux was given.
8813 if test "${with_selinux+set}" = set; then :
8814 withval=$with_selinux;
8815 case $withval in
8816 yes)
8823 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8825 esac
8827 else
8828 with_selinux=no
8834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8835 $as_echo "$with_selinux" >&6; }
8838 # Systemd
8840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8841 $as_echo_n "checking whether to build with systemd support... " >&6; }
8845 # Check whether --with-systemd was given.
8846 if test "${with_systemd+set}" = set; then :
8847 withval=$with_systemd;
8848 case $withval in
8849 yes)
8851 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8858 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8860 esac
8862 else
8863 with_systemd=no
8869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8870 $as_echo "$with_systemd" >&6; }
8873 # Readline
8878 # Check whether --with-readline was given.
8879 if test "${with_readline+set}" = set; then :
8880 withval=$with_readline;
8881 case $withval in
8882 yes)
8889 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8891 esac
8893 else
8894 with_readline=yes
8899 # readline on MinGW has problems with backslashes in psql and other bugs.
8900 # This is particularly a problem with non-US code pages.
8901 # Therefore disable its use until we understand the cause. 2004-07-20
8902 if test "$PORTNAME" = "win32"; then
8903 if test "$with_readline" = yes; then
8904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8905 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8906 with_readline=no
8913 # Prefer libedit
8918 # Check whether --with-libedit-preferred was given.
8919 if test "${with_libedit_preferred+set}" = set; then :
8920 withval=$with_libedit_preferred;
8921 case $withval in
8922 yes)
8929 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8931 esac
8933 else
8934 with_libedit_preferred=no
8942 # UUID library
8944 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8945 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8946 # UUID library. More than one of these might be present on a given platform,
8947 # so we make the user say which one she wants.
8952 # Check whether --with-uuid was given.
8953 if test "${with_uuid+set}" = set; then :
8954 withval=$with_uuid;
8955 case $withval in
8956 yes)
8957 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8960 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8965 esac
8970 if test x"$with_uuid" = x"" ; then
8971 with_uuid=no
8976 # Check whether --with-ossp-uuid was given.
8977 if test "${with_ossp_uuid+set}" = set; then :
8978 withval=$with_ossp_uuid;
8979 case $withval in
8980 yes)
8987 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8989 esac
8991 else
8992 with_ossp_uuid=no
8997 if test "$with_ossp_uuid" = yes ; then
8998 with_uuid=ossp
9001 if test "$with_uuid" != no ; then
9002 if test "$with_uuid" = bsd ; then
9004 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
9006 elif test "$with_uuid" = e2fs ; then
9008 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
9010 elif test "$with_uuid" = ossp ; then
9012 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
9014 else
9015 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
9022 # XML
9024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
9025 $as_echo_n "checking whether to build with XML support... " >&6; }
9029 # Check whether --with-libxml was given.
9030 if test "${with_libxml+set}" = set; then :
9031 withval=$with_libxml;
9032 case $withval in
9033 yes)
9035 $as_echo "#define USE_LIBXML 1" >>confdefs.h
9042 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
9044 esac
9046 else
9047 with_libxml=no
9052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
9053 $as_echo "$with_libxml" >&6; }
9056 if test "$with_libxml" = yes ; then
9057 # Check pkg-config, then xml2-config. But for backwards compatibility,
9058 # setting XML2_CONFIG overrides pkg-config.
9059 have_libxml2_pkg_config=no
9060 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
9062 pkg_failed=no
9063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
9064 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
9066 if test -n "$XML2_CFLAGS"; then
9067 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
9068 elif test -n "$PKG_CONFIG"; then
9069 if test -n "$PKG_CONFIG" && \
9070 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
9071 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
9072 ac_status=$?
9073 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9074 test $ac_status = 0; }; then
9075 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
9076 test "x$?" != "x0" && pkg_failed=yes
9077 else
9078 pkg_failed=yes
9080 else
9081 pkg_failed=untried
9083 if test -n "$XML2_LIBS"; then
9084 pkg_cv_XML2_LIBS="$XML2_LIBS"
9085 elif test -n "$PKG_CONFIG"; then
9086 if test -n "$PKG_CONFIG" && \
9087 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
9088 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
9089 ac_status=$?
9090 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9091 test $ac_status = 0; }; then
9092 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
9093 test "x$?" != "x0" && pkg_failed=yes
9094 else
9095 pkg_failed=yes
9097 else
9098 pkg_failed=untried
9103 if test $pkg_failed = yes; then
9104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9105 $as_echo "no" >&6; }
9107 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9108 _pkg_short_errors_supported=yes
9109 else
9110 _pkg_short_errors_supported=no
9112 if test $_pkg_short_errors_supported = yes; then
9113 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
9114 else
9115 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
9117 # Put the nasty error message in config.log where it belongs
9118 echo "$XML2_PKG_ERRORS" >&5
9120 # do nothing
9121 elif test $pkg_failed = untried; then
9122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9123 $as_echo "no" >&6; }
9124 # do nothing
9125 else
9126 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
9127 XML2_LIBS=$pkg_cv_XML2_LIBS
9128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9129 $as_echo "yes" >&6; }
9130 have_libxml2_pkg_config=yes
9133 if test "$have_libxml2_pkg_config" = no ; then
9134 if test -z "$XML2_CONFIG"; then
9135 for ac_prog in xml2-config
9137 # Extract the first word of "$ac_prog", so it can be a program name with args.
9138 set dummy $ac_prog; ac_word=$2
9139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9140 $as_echo_n "checking for $ac_word... " >&6; }
9141 if ${ac_cv_path_XML2_CONFIG+:} false; then :
9142 $as_echo_n "(cached) " >&6
9143 else
9144 case $XML2_CONFIG in
9145 [\\/]* | ?:[\\/]*)
9146 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
9149 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9150 for as_dir in $PATH
9152 IFS=$as_save_IFS
9153 test -z "$as_dir" && as_dir=.
9154 for ac_exec_ext in '' $ac_executable_extensions; do
9155 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9156 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9157 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9158 break 2
9160 done
9161 done
9162 IFS=$as_save_IFS
9165 esac
9167 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
9168 if test -n "$XML2_CONFIG"; then
9169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
9170 $as_echo "$XML2_CONFIG" >&6; }
9171 else
9172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9173 $as_echo "no" >&6; }
9177 test -n "$XML2_CONFIG" && break
9178 done
9180 else
9181 # Report the value of XML2_CONFIG in configure's output in all cases.
9182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
9183 $as_echo_n "checking for XML2_CONFIG... " >&6; }
9184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
9185 $as_echo "$XML2_CONFIG" >&6; }
9188 if test -n "$XML2_CONFIG"; then
9189 XML2_CFLAGS=`$XML2_CONFIG --cflags`
9190 XML2_LIBS=`$XML2_CONFIG --libs`
9193 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
9194 for pgac_option in $XML2_CFLAGS; do
9195 case $pgac_option in
9196 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9197 esac
9198 done
9199 for pgac_option in $XML2_LIBS; do
9200 case $pgac_option in
9201 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9202 esac
9203 done
9208 # XSLT
9213 # Check whether --with-libxslt was given.
9214 if test "${with_libxslt+set}" = set; then :
9215 withval=$with_libxslt;
9216 case $withval in
9217 yes)
9219 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
9226 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
9228 esac
9230 else
9231 with_libxslt=no
9241 # tzdata
9246 # Check whether --with-system-tzdata was given.
9247 if test "${with_system_tzdata+set}" = set; then :
9248 withval=$with_system_tzdata;
9249 case $withval in
9250 yes)
9251 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
9254 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
9259 esac
9267 # Zlib
9272 # Check whether --with-zlib was given.
9273 if test "${with_zlib+set}" = set; then :
9274 withval=$with_zlib;
9275 case $withval in
9276 yes)
9283 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
9285 esac
9287 else
9288 with_zlib=yes
9296 # LZ4
9298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
9299 $as_echo_n "checking whether to build with LZ4 support... " >&6; }
9303 # Check whether --with-lz4 was given.
9304 if test "${with_lz4+set}" = set; then :
9305 withval=$with_lz4;
9306 case $withval in
9307 yes)
9309 $as_echo "#define USE_LZ4 1" >>confdefs.h
9316 as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
9318 esac
9320 else
9321 with_lz4=no
9326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
9327 $as_echo "$with_lz4" >&6; }
9330 if test "$with_lz4" = yes; then
9332 pkg_failed=no
9333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
9334 $as_echo_n "checking for liblz4... " >&6; }
9336 if test -n "$LZ4_CFLAGS"; then
9337 pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
9338 elif test -n "$PKG_CONFIG"; then
9339 if test -n "$PKG_CONFIG" && \
9340 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9341 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9342 ac_status=$?
9343 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9344 test $ac_status = 0; }; then
9345 pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
9346 test "x$?" != "x0" && pkg_failed=yes
9347 else
9348 pkg_failed=yes
9350 else
9351 pkg_failed=untried
9353 if test -n "$LZ4_LIBS"; then
9354 pkg_cv_LZ4_LIBS="$LZ4_LIBS"
9355 elif test -n "$PKG_CONFIG"; then
9356 if test -n "$PKG_CONFIG" && \
9357 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9358 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9359 ac_status=$?
9360 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9361 test $ac_status = 0; }; then
9362 pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
9363 test "x$?" != "x0" && pkg_failed=yes
9364 else
9365 pkg_failed=yes
9367 else
9368 pkg_failed=untried
9373 if test $pkg_failed = yes; then
9374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9375 $as_echo "no" >&6; }
9377 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9378 _pkg_short_errors_supported=yes
9379 else
9380 _pkg_short_errors_supported=no
9382 if test $_pkg_short_errors_supported = yes; then
9383 LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
9384 else
9385 LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
9387 # Put the nasty error message in config.log where it belongs
9388 echo "$LZ4_PKG_ERRORS" >&5
9390 as_fn_error $? "Package requirements (liblz4) were not met:
9392 $LZ4_PKG_ERRORS
9394 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9395 installed software in a non-standard prefix.
9397 Alternatively, you may set the environment variables LZ4_CFLAGS
9398 and LZ4_LIBS to avoid the need to call pkg-config.
9399 See the pkg-config man page for more details." "$LINENO" 5
9400 elif test $pkg_failed = untried; then
9401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9402 $as_echo "no" >&6; }
9403 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9404 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9405 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9406 is in your PATH or set the PKG_CONFIG environment variable to the full
9407 path to pkg-config.
9409 Alternatively, you may set the environment variables LZ4_CFLAGS
9410 and LZ4_LIBS to avoid the need to call pkg-config.
9411 See the pkg-config man page for more details.
9413 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9414 See \`config.log' for more details" "$LINENO" 5; }
9415 else
9416 LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
9417 LZ4_LIBS=$pkg_cv_LZ4_LIBS
9418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9419 $as_echo "yes" >&6; }
9422 # We only care about -I, -D, and -L switches;
9423 # note that -llz4 will be added by AC_CHECK_LIB below.
9424 for pgac_option in $LZ4_CFLAGS; do
9425 case $pgac_option in
9426 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9427 esac
9428 done
9429 for pgac_option in $LZ4_LIBS; do
9430 case $pgac_option in
9431 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9432 esac
9433 done
9437 # ZSTD
9439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ZSTD support" >&5
9440 $as_echo_n "checking whether to build with ZSTD support... " >&6; }
9444 # Check whether --with-zstd was given.
9445 if test "${with_zstd+set}" = set; then :
9446 withval=$with_zstd;
9447 case $withval in
9448 yes)
9450 $as_echo "#define USE_ZSTD 1" >>confdefs.h
9457 as_fn_error $? "no argument expected for --with-zstd option" "$LINENO" 5
9459 esac
9461 else
9462 with_zstd=no
9467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_zstd" >&5
9468 $as_echo "$with_zstd" >&6; }
9471 if test "$with_zstd" = yes; then
9473 pkg_failed=no
9474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd >= 1.4.0" >&5
9475 $as_echo_n "checking for libzstd >= 1.4.0... " >&6; }
9477 if test -n "$ZSTD_CFLAGS"; then
9478 pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
9479 elif test -n "$PKG_CONFIG"; then
9480 if test -n "$PKG_CONFIG" && \
9481 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9482 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9483 ac_status=$?
9484 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9485 test $ac_status = 0; }; then
9486 pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd >= 1.4.0" 2>/dev/null`
9487 test "x$?" != "x0" && pkg_failed=yes
9488 else
9489 pkg_failed=yes
9491 else
9492 pkg_failed=untried
9494 if test -n "$ZSTD_LIBS"; then
9495 pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
9496 elif test -n "$PKG_CONFIG"; then
9497 if test -n "$PKG_CONFIG" && \
9498 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9499 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9500 ac_status=$?
9501 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9502 test $ac_status = 0; }; then
9503 pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd >= 1.4.0" 2>/dev/null`
9504 test "x$?" != "x0" && pkg_failed=yes
9505 else
9506 pkg_failed=yes
9508 else
9509 pkg_failed=untried
9514 if test $pkg_failed = yes; then
9515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9516 $as_echo "no" >&6; }
9518 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9519 _pkg_short_errors_supported=yes
9520 else
9521 _pkg_short_errors_supported=no
9523 if test $_pkg_short_errors_supported = yes; then
9524 ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9525 else
9526 ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9528 # Put the nasty error message in config.log where it belongs
9529 echo "$ZSTD_PKG_ERRORS" >&5
9531 as_fn_error $? "Package requirements (libzstd >= 1.4.0) were not met:
9533 $ZSTD_PKG_ERRORS
9535 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9536 installed software in a non-standard prefix.
9538 Alternatively, you may set the environment variables ZSTD_CFLAGS
9539 and ZSTD_LIBS to avoid the need to call pkg-config.
9540 See the pkg-config man page for more details." "$LINENO" 5
9541 elif test $pkg_failed = untried; then
9542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9543 $as_echo "no" >&6; }
9544 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9545 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9546 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9547 is in your PATH or set the PKG_CONFIG environment variable to the full
9548 path to pkg-config.
9550 Alternatively, you may set the environment variables ZSTD_CFLAGS
9551 and ZSTD_LIBS to avoid the need to call pkg-config.
9552 See the pkg-config man page for more details.
9554 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9555 See \`config.log' for more details" "$LINENO" 5; }
9556 else
9557 ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
9558 ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
9559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9560 $as_echo "yes" >&6; }
9563 # We only care about -I, -D, and -L switches;
9564 # note that -lzstd will be added by AC_CHECK_LIB below.
9565 for pgac_option in $ZSTD_CFLAGS; do
9566 case $pgac_option in
9567 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9568 esac
9569 done
9570 for pgac_option in $ZSTD_LIBS; do
9571 case $pgac_option in
9572 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9573 esac
9574 done
9577 # Assignments
9580 CPPFLAGS="$CPPFLAGS $INCLUDES"
9581 LDFLAGS="$LDFLAGS $LIBDIRS"
9587 if test -n "$ac_tool_prefix"; then
9588 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9589 set dummy ${ac_tool_prefix}strip; ac_word=$2
9590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9591 $as_echo_n "checking for $ac_word... " >&6; }
9592 if ${ac_cv_prog_STRIP+:} false; then :
9593 $as_echo_n "(cached) " >&6
9594 else
9595 if test -n "$STRIP"; then
9596 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9597 else
9598 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9599 for as_dir in $PATH
9601 IFS=$as_save_IFS
9602 test -z "$as_dir" && as_dir=.
9603 for ac_exec_ext in '' $ac_executable_extensions; do
9604 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9605 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9606 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9607 break 2
9609 done
9610 done
9611 IFS=$as_save_IFS
9615 STRIP=$ac_cv_prog_STRIP
9616 if test -n "$STRIP"; then
9617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9618 $as_echo "$STRIP" >&6; }
9619 else
9620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9621 $as_echo "no" >&6; }
9626 if test -z "$ac_cv_prog_STRIP"; then
9627 ac_ct_STRIP=$STRIP
9628 # Extract the first word of "strip", so it can be a program name with args.
9629 set dummy strip; ac_word=$2
9630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9631 $as_echo_n "checking for $ac_word... " >&6; }
9632 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9633 $as_echo_n "(cached) " >&6
9634 else
9635 if test -n "$ac_ct_STRIP"; then
9636 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9637 else
9638 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9639 for as_dir in $PATH
9641 IFS=$as_save_IFS
9642 test -z "$as_dir" && as_dir=.
9643 for ac_exec_ext in '' $ac_executable_extensions; do
9644 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9645 ac_cv_prog_ac_ct_STRIP="strip"
9646 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9647 break 2
9649 done
9650 done
9651 IFS=$as_save_IFS
9655 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9656 if test -n "$ac_ct_STRIP"; then
9657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9658 $as_echo "$ac_ct_STRIP" >&6; }
9659 else
9660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9661 $as_echo "no" >&6; }
9664 if test "x$ac_ct_STRIP" = x; then
9665 STRIP=":"
9666 else
9667 case $cross_compiling:$ac_tool_warned in
9668 yes:)
9669 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9670 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9671 ac_tool_warned=yes ;;
9672 esac
9673 STRIP=$ac_ct_STRIP
9675 else
9676 STRIP="$ac_cv_prog_STRIP"
9680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9681 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9682 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9683 STRIP_STATIC_LIB="$STRIP -x"
9684 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9686 $as_echo "yes" >&6; }
9687 else
9688 case $host_os in
9689 darwin*)
9690 STRIP="$STRIP -x"
9691 STRIP_STATIC_LIB=$STRIP
9692 STRIP_SHARED_LIB=$STRIP
9693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9694 $as_echo "yes" >&6; }
9697 STRIP_STATIC_LIB=:
9698 STRIP_SHARED_LIB=:
9699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9700 $as_echo "no" >&6; }
9702 esac
9707 if test -n "$ac_tool_prefix"; then
9708 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9709 set dummy ${ac_tool_prefix}ar; ac_word=$2
9710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9711 $as_echo_n "checking for $ac_word... " >&6; }
9712 if ${ac_cv_prog_AR+:} false; then :
9713 $as_echo_n "(cached) " >&6
9714 else
9715 if test -n "$AR"; then
9716 ac_cv_prog_AR="$AR" # Let the user override the test.
9717 else
9718 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9719 for as_dir in $PATH
9721 IFS=$as_save_IFS
9722 test -z "$as_dir" && as_dir=.
9723 for ac_exec_ext in '' $ac_executable_extensions; do
9724 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9725 ac_cv_prog_AR="${ac_tool_prefix}ar"
9726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9727 break 2
9729 done
9730 done
9731 IFS=$as_save_IFS
9735 AR=$ac_cv_prog_AR
9736 if test -n "$AR"; then
9737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9738 $as_echo "$AR" >&6; }
9739 else
9740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9741 $as_echo "no" >&6; }
9746 if test -z "$ac_cv_prog_AR"; then
9747 ac_ct_AR=$AR
9748 # Extract the first word of "ar", so it can be a program name with args.
9749 set dummy ar; ac_word=$2
9750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9751 $as_echo_n "checking for $ac_word... " >&6; }
9752 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9753 $as_echo_n "(cached) " >&6
9754 else
9755 if test -n "$ac_ct_AR"; then
9756 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9757 else
9758 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9759 for as_dir in $PATH
9761 IFS=$as_save_IFS
9762 test -z "$as_dir" && as_dir=.
9763 for ac_exec_ext in '' $ac_executable_extensions; do
9764 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9765 ac_cv_prog_ac_ct_AR="ar"
9766 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9767 break 2
9769 done
9770 done
9771 IFS=$as_save_IFS
9775 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9776 if test -n "$ac_ct_AR"; then
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9778 $as_echo "$ac_ct_AR" >&6; }
9779 else
9780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9781 $as_echo "no" >&6; }
9784 if test "x$ac_ct_AR" = x; then
9785 AR="ar"
9786 else
9787 case $cross_compiling:$ac_tool_warned in
9788 yes:)
9789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9790 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9791 ac_tool_warned=yes ;;
9792 esac
9793 AR=$ac_ct_AR
9795 else
9796 AR="$ac_cv_prog_AR"
9799 if test "$PORTNAME" = "win32"; then
9800 if test -n "$ac_tool_prefix"; then
9801 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9802 set dummy ${ac_tool_prefix}windres; ac_word=$2
9803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9804 $as_echo_n "checking for $ac_word... " >&6; }
9805 if ${ac_cv_prog_WINDRES+:} false; then :
9806 $as_echo_n "(cached) " >&6
9807 else
9808 if test -n "$WINDRES"; then
9809 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9810 else
9811 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9812 for as_dir in $PATH
9814 IFS=$as_save_IFS
9815 test -z "$as_dir" && as_dir=.
9816 for ac_exec_ext in '' $ac_executable_extensions; do
9817 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9818 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9819 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9820 break 2
9822 done
9823 done
9824 IFS=$as_save_IFS
9828 WINDRES=$ac_cv_prog_WINDRES
9829 if test -n "$WINDRES"; then
9830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9831 $as_echo "$WINDRES" >&6; }
9832 else
9833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9834 $as_echo "no" >&6; }
9839 if test -z "$ac_cv_prog_WINDRES"; then
9840 ac_ct_WINDRES=$WINDRES
9841 # Extract the first word of "windres", so it can be a program name with args.
9842 set dummy windres; ac_word=$2
9843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9844 $as_echo_n "checking for $ac_word... " >&6; }
9845 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9846 $as_echo_n "(cached) " >&6
9847 else
9848 if test -n "$ac_ct_WINDRES"; then
9849 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9850 else
9851 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9852 for as_dir in $PATH
9854 IFS=$as_save_IFS
9855 test -z "$as_dir" && as_dir=.
9856 for ac_exec_ext in '' $ac_executable_extensions; do
9857 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9858 ac_cv_prog_ac_ct_WINDRES="windres"
9859 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9860 break 2
9862 done
9863 done
9864 IFS=$as_save_IFS
9868 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9869 if test -n "$ac_ct_WINDRES"; then
9870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9871 $as_echo "$ac_ct_WINDRES" >&6; }
9872 else
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9874 $as_echo "no" >&6; }
9877 if test "x$ac_ct_WINDRES" = x; then
9878 WINDRES="windres"
9879 else
9880 case $cross_compiling:$ac_tool_warned in
9881 yes:)
9882 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9883 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9884 ac_tool_warned=yes ;;
9885 esac
9886 WINDRES=$ac_ct_WINDRES
9888 else
9889 WINDRES="$ac_cv_prog_WINDRES"
9894 # Find a good install program. We prefer a C program (faster),
9895 # so one script is as good as another. But avoid the broken or
9896 # incompatible versions:
9897 # SysV /etc/install, /usr/sbin/install
9898 # SunOS /usr/etc/install
9899 # IRIX /sbin/install
9900 # AIX /bin/install
9901 # AmigaOS /C/install, which installs bootblocks on floppy discs
9902 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9903 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9904 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9905 # OS/2's system install, which has a completely different semantic
9906 # ./install, which can be erroneously created by make from ./install.sh.
9907 # Reject install programs that cannot install multiple files.
9908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9909 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9910 if test -z "$INSTALL"; then
9911 if ${ac_cv_path_install+:} false; then :
9912 $as_echo_n "(cached) " >&6
9913 else
9914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9915 for as_dir in $PATH
9917 IFS=$as_save_IFS
9918 test -z "$as_dir" && as_dir=.
9919 # Account for people who put trailing slashes in PATH elements.
9920 case $as_dir/ in #((
9921 ./ | .// | /[cC]/* | \
9922 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9923 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9924 /usr/ucb/* ) ;;
9926 # OSF1 and SCO ODT 3.0 have their own names for install.
9927 # Don't use installbsd from OSF since it installs stuff as root
9928 # by default.
9929 for ac_prog in ginstall scoinst install; do
9930 for ac_exec_ext in '' $ac_executable_extensions; do
9931 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9932 if test $ac_prog = install &&
9933 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9934 # AIX install. It has an incompatible calling convention.
9936 elif test $ac_prog = install &&
9937 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9938 # program-specific install script used by HP pwplus--don't use.
9940 else
9941 rm -rf conftest.one conftest.two conftest.dir
9942 echo one > conftest.one
9943 echo two > conftest.two
9944 mkdir conftest.dir
9945 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9946 test -s conftest.one && test -s conftest.two &&
9947 test -s conftest.dir/conftest.one &&
9948 test -s conftest.dir/conftest.two
9949 then
9950 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9951 break 3
9955 done
9956 done
9958 esac
9960 done
9961 IFS=$as_save_IFS
9963 rm -rf conftest.one conftest.two conftest.dir
9966 if test "${ac_cv_path_install+set}" = set; then
9967 INSTALL=$ac_cv_path_install
9968 else
9969 # As a last resort, use the slow shell script. Don't cache a
9970 # value for INSTALL within a source directory, because that will
9971 # break other packages using the cache if that directory is
9972 # removed, or if the value is a relative name.
9973 INSTALL=$ac_install_sh
9976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9977 $as_echo "$INSTALL" >&6; }
9979 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9980 # It thinks the first close brace ends the variable substitution.
9981 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9983 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9985 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9987 # When Autoconf chooses install-sh as install program it tries to generate
9988 # a relative path to it in each makefile where it substitutes it. This clashes
9989 # with our Makefile.global concept. This workaround helps.
9990 case $INSTALL in
9991 *install-sh*) install_bin='';;
9992 *) install_bin=$INSTALL;;
9993 esac
9996 if test -z "$TAR"; then
9997 for ac_prog in tar
9999 # Extract the first word of "$ac_prog", so it can be a program name with args.
10000 set dummy $ac_prog; ac_word=$2
10001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10002 $as_echo_n "checking for $ac_word... " >&6; }
10003 if ${ac_cv_path_TAR+:} false; then :
10004 $as_echo_n "(cached) " >&6
10005 else
10006 case $TAR in
10007 [\\/]* | ?:[\\/]*)
10008 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10011 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10012 for as_dir in $PATH
10014 IFS=$as_save_IFS
10015 test -z "$as_dir" && as_dir=.
10016 for ac_exec_ext in '' $ac_executable_extensions; do
10017 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10018 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10019 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10020 break 2
10022 done
10023 done
10024 IFS=$as_save_IFS
10027 esac
10029 TAR=$ac_cv_path_TAR
10030 if test -n "$TAR"; then
10031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10032 $as_echo "$TAR" >&6; }
10033 else
10034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10035 $as_echo "no" >&6; }
10039 test -n "$TAR" && break
10040 done
10042 else
10043 # Report the value of TAR in configure's output in all cases.
10044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10045 $as_echo_n "checking for TAR... " >&6; }
10046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10047 $as_echo "$TAR" >&6; }
10050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
10051 $as_echo_n "checking whether ln -s works... " >&6; }
10052 LN_S=$as_ln_s
10053 if test "$LN_S" = "ln -s"; then
10054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10055 $as_echo "yes" >&6; }
10056 else
10057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
10058 $as_echo "no, using $LN_S" >&6; }
10061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
10062 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
10063 if test -z "$MKDIR_P"; then
10064 if ${ac_cv_path_mkdir+:} false; then :
10065 $as_echo_n "(cached) " >&6
10066 else
10067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10068 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
10070 IFS=$as_save_IFS
10071 test -z "$as_dir" && as_dir=.
10072 for ac_prog in mkdir gmkdir; do
10073 for ac_exec_ext in '' $ac_executable_extensions; do
10074 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
10075 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
10076 'mkdir (GNU coreutils) '* | \
10077 'mkdir (coreutils) '* | \
10078 'mkdir (fileutils) '4.1*)
10079 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
10080 break 3;;
10081 esac
10082 done
10083 done
10084 done
10085 IFS=$as_save_IFS
10089 test -d ./--version && rmdir ./--version
10090 if test "${ac_cv_path_mkdir+set}" = set; then
10091 MKDIR_P="$ac_cv_path_mkdir -p"
10092 else
10093 # As a last resort, use the slow shell script. Don't cache a
10094 # value for MKDIR_P within a source directory, because that will
10095 # break other packages using the cache if that directory is
10096 # removed, or if the value is a relative name.
10097 MKDIR_P="$ac_install_sh -d"
10100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
10101 $as_echo "$MKDIR_P" >&6; }
10103 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
10104 # a relative path to it in each makefile where it substitutes it. This clashes
10105 # with our Makefile.global concept. This workaround helps.
10106 case $MKDIR_P in
10107 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
10108 esac
10110 if test -z "$BISON"; then
10111 for ac_prog in bison
10113 # Extract the first word of "$ac_prog", so it can be a program name with args.
10114 set dummy $ac_prog; ac_word=$2
10115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10116 $as_echo_n "checking for $ac_word... " >&6; }
10117 if ${ac_cv_path_BISON+:} false; then :
10118 $as_echo_n "(cached) " >&6
10119 else
10120 case $BISON in
10121 [\\/]* | ?:[\\/]*)
10122 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
10125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10126 for as_dir in $PATH
10128 IFS=$as_save_IFS
10129 test -z "$as_dir" && as_dir=.
10130 for ac_exec_ext in '' $ac_executable_extensions; do
10131 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10132 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
10133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10134 break 2
10136 done
10137 done
10138 IFS=$as_save_IFS
10141 esac
10143 BISON=$ac_cv_path_BISON
10144 if test -n "$BISON"; then
10145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10146 $as_echo "$BISON" >&6; }
10147 else
10148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10149 $as_echo "no" >&6; }
10153 test -n "$BISON" && break
10154 done
10156 else
10157 # Report the value of BISON in configure's output in all cases.
10158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
10159 $as_echo_n "checking for BISON... " >&6; }
10160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10161 $as_echo "$BISON" >&6; }
10165 if test "$BISON"; then
10166 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
10167 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
10168 $as_echo "$as_me: using $pgac_bison_version" >&6;}
10169 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 2.3) exit 0; else exit 1;}'
10170 then
10171 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10172 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10173 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." >&5
10174 $as_echo "$as_me: WARNING:
10175 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10176 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." >&2;}
10177 BISON=""
10179 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
10180 # of the now preferred %name-prefix "base_yy", but the latter
10181 # doesn't work with Bison 2.3 or less. So for now we silence the
10182 # deprecation warnings.
10183 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
10184 then
10185 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
10189 if test -z "$BISON"; then
10190 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10191 *** Without Bison you will not be able to build PostgreSQL from Git nor
10192 *** change any of the parser definition files. You can obtain Bison from
10193 *** a GNU mirror site. (If you are using the official distribution of
10194 *** PostgreSQL then you do not need to worry about this, because the Bison
10195 *** output is pre-generated.)" >&5
10196 $as_echo "$as_me: WARNING:
10197 *** Without Bison you will not be able to build PostgreSQL from Git nor
10198 *** change any of the parser definition files. You can obtain Bison from
10199 *** a GNU mirror site. (If you are using the official distribution of
10200 *** PostgreSQL then you do not need to worry about this, because the Bison
10201 *** output is pre-generated.)" >&2;}
10205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
10206 $as_echo_n "checking for flex... " >&6; }
10207 if ${pgac_cv_path_flex+:} false; then :
10208 $as_echo_n "(cached) " >&6
10209 else
10210 # Let the user override the test
10211 if test -n "$FLEX"; then
10212 pgac_cv_path_flex=$FLEX
10213 else
10214 pgac_save_IFS=$IFS
10215 IFS=$PATH_SEPARATOR
10216 for pgac_dir in $PATH; do
10217 IFS=$pgac_save_IFS
10218 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
10219 pgac_dir=`pwd`
10221 for pgac_prog in flex lex; do
10222 pgac_candidate="$pgac_dir/$pgac_prog"
10223 if test -f "$pgac_candidate" \
10224 && $pgac_candidate --version </dev/null >/dev/null 2>&1
10225 then
10226 echo '%%' > conftest.l
10227 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
10228 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
10229 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;}'
10230 then
10231 pgac_cv_path_flex=$pgac_candidate
10232 break 2
10233 else
10234 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10235 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10236 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." >&5
10237 $as_echo "$as_me: WARNING:
10238 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10239 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." >&2;}
10243 done
10244 done
10245 rm -f conftest.l lex.yy.c
10246 : ${pgac_cv_path_flex=no}
10250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
10251 $as_echo "$pgac_cv_path_flex" >&6; }
10252 if test x"$pgac_cv_path_flex" = x"no"; then
10253 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10254 *** Without Flex you will not be able to build PostgreSQL from Git nor
10255 *** change any of the scanner definition files. You can obtain Flex from
10256 *** a GNU mirror site. (If you are using the official distribution of
10257 *** PostgreSQL then you do not need to worry about this because the Flex
10258 *** output is pre-generated.)" >&5
10259 $as_echo "$as_me: WARNING:
10260 *** Without Flex you will not be able to build PostgreSQL from Git nor
10261 *** change any of the scanner definition files. You can obtain Flex from
10262 *** a GNU mirror site. (If you are using the official distribution of
10263 *** PostgreSQL then you do not need to worry about this because the Flex
10264 *** output is pre-generated.)" >&2;}
10266 FLEX=
10267 else
10268 FLEX=$pgac_cv_path_flex
10269 pgac_flex_version=`$FLEX --version 2>/dev/null`
10270 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
10271 $as_echo "$as_me: using $pgac_flex_version" >&6;}
10278 if test -z "$PERL"; then
10279 for ac_prog in perl
10281 # Extract the first word of "$ac_prog", so it can be a program name with args.
10282 set dummy $ac_prog; ac_word=$2
10283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10284 $as_echo_n "checking for $ac_word... " >&6; }
10285 if ${ac_cv_path_PERL+:} false; then :
10286 $as_echo_n "(cached) " >&6
10287 else
10288 case $PERL in
10289 [\\/]* | ?:[\\/]*)
10290 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
10293 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10294 for as_dir in $PATH
10296 IFS=$as_save_IFS
10297 test -z "$as_dir" && as_dir=.
10298 for ac_exec_ext in '' $ac_executable_extensions; do
10299 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10300 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
10301 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10302 break 2
10304 done
10305 done
10306 IFS=$as_save_IFS
10309 esac
10311 PERL=$ac_cv_path_PERL
10312 if test -n "$PERL"; then
10313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10314 $as_echo "$PERL" >&6; }
10315 else
10316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10317 $as_echo "no" >&6; }
10321 test -n "$PERL" && break
10322 done
10324 else
10325 # Report the value of PERL in configure's output in all cases.
10326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
10327 $as_echo_n "checking for PERL... " >&6; }
10328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10329 $as_echo "$PERL" >&6; }
10333 if test "$PERL"; then
10334 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'`
10335 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
10336 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
10337 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
10338 $AWK '{ if ($1 == 5 && ($2 >= 14)) exit 1; else exit 0;}'
10339 then
10340 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10341 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10342 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." >&5
10343 $as_echo "$as_me: WARNING:
10344 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10345 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." >&2;}
10346 PERL=""
10350 if test -z "$PERL"; then
10351 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10352 *** Without Perl you will not be able to build PostgreSQL from Git.
10353 *** You can obtain Perl from any CPAN mirror site.
10354 *** (If you are using the official distribution of PostgreSQL then you do not
10355 *** need to worry about this, because the Perl output is pre-generated.)" >&5
10356 $as_echo "$as_me: WARNING:
10357 *** Without Perl you will not be able to build PostgreSQL from Git.
10358 *** You can obtain Perl from any CPAN mirror site.
10359 *** (If you are using the official distribution of PostgreSQL then you do not
10360 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
10363 if test "$with_perl" = yes; then
10364 if test -z "$PERL"; then
10365 as_fn_error $? "Perl not found" "$LINENO" 5
10368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
10369 $as_echo_n "checking for Perl archlibexp... " >&6; }
10370 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
10371 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
10372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
10373 $as_echo "$perl_archlibexp" >&6; }
10374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
10375 $as_echo_n "checking for Perl privlibexp... " >&6; }
10376 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
10377 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
10378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
10379 $as_echo "$perl_privlibexp" >&6; }
10380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
10381 $as_echo_n "checking for Perl useshrplib... " >&6; }
10382 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
10383 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
10384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
10385 $as_echo "$perl_useshrplib" >&6; }
10386 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
10387 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
10388 You might have to rebuild your Perl installation. Refer to the
10389 documentation for details. Use --without-perl to disable building
10390 PL/Perl." "$LINENO" 5
10392 # On most platforms, archlibexp is also where the Perl include files live ...
10393 perl_includespec="-I$perl_archlibexp/CORE"
10394 # ... but on newer macOS versions, we must use -iwithsysroot to look
10395 # under $PG_SYSROOT
10396 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
10397 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
10398 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
10402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
10403 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
10404 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10406 $as_echo "$perl_ccflags" >&6; }
10407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10408 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10409 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10411 $as_echo "$perl_embed_ccflags" >&6; }
10414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10415 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10416 if test "$PORTNAME" = "win32" ; then
10417 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10418 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10419 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10420 else
10421 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10422 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10423 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10426 else
10427 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10428 pgac_tmp2=`$PERL -MConfig -e 'print "$Config{ccdlflags} $Config{ldflags}"'`
10429 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%"`
10431 if test -z "$perl_embed_ldflags" ; then
10432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10433 $as_echo "no" >&6; }
10434 as_fn_error $? "could not determine flags for linking embedded Perl.
10435 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10436 installed." "$LINENO" 5
10437 else
10438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10439 $as_echo "$perl_embed_ldflags" >&6; }
10444 if test "$with_python" = yes; then
10445 if test -z "$PYTHON"; then
10446 for ac_prog in python3 python
10448 # Extract the first word of "$ac_prog", so it can be a program name with args.
10449 set dummy $ac_prog; ac_word=$2
10450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10451 $as_echo_n "checking for $ac_word... " >&6; }
10452 if ${ac_cv_path_PYTHON+:} false; then :
10453 $as_echo_n "(cached) " >&6
10454 else
10455 case $PYTHON in
10456 [\\/]* | ?:[\\/]*)
10457 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10461 for as_dir in $PATH
10463 IFS=$as_save_IFS
10464 test -z "$as_dir" && as_dir=.
10465 for ac_exec_ext in '' $ac_executable_extensions; do
10466 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10467 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10468 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10469 break 2
10471 done
10472 done
10473 IFS=$as_save_IFS
10476 esac
10478 PYTHON=$ac_cv_path_PYTHON
10479 if test -n "$PYTHON"; then
10480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10481 $as_echo "$PYTHON" >&6; }
10482 else
10483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10484 $as_echo "no" >&6; }
10488 test -n "$PYTHON" && break
10489 done
10491 else
10492 # Report the value of PYTHON in configure's output in all cases.
10493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10494 $as_echo_n "checking for PYTHON... " >&6; }
10495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10496 $as_echo "$PYTHON" >&6; }
10499 if test x"$PYTHON" = x""; then
10500 as_fn_error $? "Python not found" "$LINENO" 5
10504 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10505 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10506 $as_echo "$as_me: using python $python_fullversion" >&6;}
10507 # python_fullversion is typically n.n.n plus some trailing junk
10508 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10509 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10510 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10511 # Reject unsupported Python versions as soon as practical.
10512 if test "$python_majorversion" -lt 3; then
10513 as_fn_error $? "Python version $python_version is too old (version 3 or later is required)" "$LINENO" 5
10516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
10517 $as_echo_n "checking for Python sysconfig module... " >&6; }
10518 if "${PYTHON}" -c 'import sysconfig' 2>&5
10519 then
10520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10521 $as_echo "yes" >&6; }
10522 else
10523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10524 $as_echo "no" >&6; }
10525 as_fn_error $? "sysconfig module not found" "$LINENO" 5
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10529 $as_echo_n "checking Python configuration directory... " >&6; }
10530 python_configdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBPL'))))"`
10531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10532 $as_echo "$python_configdir" >&6; }
10534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directory" >&5
10535 $as_echo_n "checking Python include directory... " >&6; }
10536 python_includespec=`${PYTHON} -c "import sysconfig; print('-I' + sysconfig.get_config_var('INCLUDEPY'))"`
10537 if test "$PORTNAME" = win32 ; then
10538 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10541 $as_echo "$python_includespec" >&6; }
10545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10546 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10548 python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10549 python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
10551 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10552 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10553 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10554 then
10555 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10556 found_shlib=1
10557 else
10558 # Otherwise, guess the base name of the shlib.
10559 # LDVERSION was added in Python 3.2, before that use VERSION,
10560 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10561 python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
10562 if test x"${python_ldversion}" != x""; then
10563 ldlibrary="python${python_ldversion}"
10564 else
10565 python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
10566 if test x"${python_version_var}" != x""; then
10567 ldlibrary="python${python_version_var}"
10568 else
10569 ldlibrary="python${python_version}"
10572 # Search for a likely-looking file.
10573 found_shlib=0
10574 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10576 if test -e "$d/lib${ldlibrary}${DLSUFFIX}"; then
10577 python_libdir="$d"
10578 found_shlib=1
10579 break 2
10581 done
10582 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10583 # (".so.n.n") as well. However, check this only after failing to find
10584 # ".so" anywhere, because yet other platforms (Debian) put the .so
10585 # symlink in a different directory from the underlying versioned shlib.
10586 if test "$found_shlib" != 1; then
10587 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10589 for f in "$d/lib${ldlibrary}.so."* ; do
10590 if test -e "$f"; then
10591 python_libdir="$d"
10592 found_shlib=1
10593 break 2
10595 done
10596 done
10598 # As usual, Windows has its own ideas. Possible default library
10599 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10600 # and the "lib" prefix might not be there.
10601 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10602 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10604 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10605 if test -e "$f"; then
10606 python_libdir="$d"
10607 found_shlib=1
10608 break 2
10610 done
10611 done
10614 if test "$found_shlib" != 1; then
10615 as_fn_error $? "could not find shared library for Python
10616 You might have to rebuild your Python installation. Refer to the
10617 documentation for details. Use --without-python to disable building
10618 PL/Python." "$LINENO" 5
10620 python_libspec="-L${python_libdir} -l${ldlibrary}"
10622 python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10625 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10631 if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then
10632 if test -z "$ZIC"; then
10633 for ac_prog in zic
10635 # Extract the first word of "$ac_prog", so it can be a program name with args.
10636 set dummy $ac_prog; ac_word=$2
10637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10638 $as_echo_n "checking for $ac_word... " >&6; }
10639 if ${ac_cv_path_ZIC+:} false; then :
10640 $as_echo_n "(cached) " >&6
10641 else
10642 case $ZIC in
10643 [\\/]* | ?:[\\/]*)
10644 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10647 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10648 for as_dir in $PATH
10650 IFS=$as_save_IFS
10651 test -z "$as_dir" && as_dir=.
10652 for ac_exec_ext in '' $ac_executable_extensions; do
10653 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10654 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10655 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10656 break 2
10658 done
10659 done
10660 IFS=$as_save_IFS
10663 esac
10665 ZIC=$ac_cv_path_ZIC
10666 if test -n "$ZIC"; then
10667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10668 $as_echo "$ZIC" >&6; }
10669 else
10670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10671 $as_echo "no" >&6; }
10675 test -n "$ZIC" && break
10676 done
10678 else
10679 # Report the value of ZIC in configure's output in all cases.
10680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10681 $as_echo_n "checking for ZIC... " >&6; }
10682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10683 $as_echo "$ZIC" >&6; }
10686 if test -z "$ZIC"; then
10687 as_fn_error $? "
10688 When cross-compiling, either use the option --with-system-tzdata to use
10689 existing time-zone data, or set the environment variable ZIC to a zic
10690 program to use during the build." "$LINENO" 5
10695 # Pthreads
10697 # For each platform, we need to know about any special compile and link
10698 # libraries, and whether the normal C function names are thread-safe.
10699 # See the comment at the top of src/port/thread.c for more information.
10700 # WIN32 doesn't need the pthread tests; it always uses threads
10702 # These tests are run before the library-tests, because linking with the
10703 # other libraries can pull in the pthread functions as a side-effect. We
10704 # want to use the -pthread or similar flags directly, and not rely on
10705 # the side-effects of linking with some other library.
10707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10708 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10709 if ${ac_cv_path_SED+:} false; then :
10710 $as_echo_n "(cached) " >&6
10711 else
10712 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10713 for ac_i in 1 2 3 4 5 6 7; do
10714 ac_script="$ac_script$as_nl$ac_script"
10715 done
10716 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10717 { ac_script=; unset ac_script;}
10718 if test -z "$SED"; then
10719 ac_path_SED_found=false
10720 # Loop through the user's path and test for each of PROGNAME-LIST
10721 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10722 for as_dir in $PATH
10724 IFS=$as_save_IFS
10725 test -z "$as_dir" && as_dir=.
10726 for ac_prog in sed gsed; do
10727 for ac_exec_ext in '' $ac_executable_extensions; do
10728 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10729 as_fn_executable_p "$ac_path_SED" || continue
10730 # Check for GNU ac_path_SED and select it if it is found.
10731 # Check for GNU $ac_path_SED
10732 case `"$ac_path_SED" --version 2>&1` in
10733 *GNU*)
10734 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10736 ac_count=0
10737 $as_echo_n 0123456789 >"conftest.in"
10738 while :
10740 cat "conftest.in" "conftest.in" >"conftest.tmp"
10741 mv "conftest.tmp" "conftest.in"
10742 cp "conftest.in" "conftest.nl"
10743 $as_echo '' >> "conftest.nl"
10744 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10745 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10746 as_fn_arith $ac_count + 1 && ac_count=$as_val
10747 if test $ac_count -gt ${ac_path_SED_max-0}; then
10748 # Best one so far, save it but keep looking for a better one
10749 ac_cv_path_SED="$ac_path_SED"
10750 ac_path_SED_max=$ac_count
10752 # 10*(2^10) chars as input seems more than enough
10753 test $ac_count -gt 10 && break
10754 done
10755 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10756 esac
10758 $ac_path_SED_found && break 3
10759 done
10760 done
10761 done
10762 IFS=$as_save_IFS
10763 if test -z "$ac_cv_path_SED"; then
10764 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10766 else
10767 ac_cv_path_SED=$SED
10771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10772 $as_echo "$ac_cv_path_SED" >&6; }
10773 SED="$ac_cv_path_SED"
10774 rm -f conftest.sed
10777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10778 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10779 if ${ac_cv_path_GREP+:} false; then :
10780 $as_echo_n "(cached) " >&6
10781 else
10782 if test -z "$GREP"; then
10783 ac_path_GREP_found=false
10784 # Loop through the user's path and test for each of PROGNAME-LIST
10785 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10786 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10788 IFS=$as_save_IFS
10789 test -z "$as_dir" && as_dir=.
10790 for ac_prog in grep ggrep; do
10791 for ac_exec_ext in '' $ac_executable_extensions; do
10792 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10793 as_fn_executable_p "$ac_path_GREP" || continue
10794 # Check for GNU ac_path_GREP and select it if it is found.
10795 # Check for GNU $ac_path_GREP
10796 case `"$ac_path_GREP" --version 2>&1` in
10797 *GNU*)
10798 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10800 ac_count=0
10801 $as_echo_n 0123456789 >"conftest.in"
10802 while :
10804 cat "conftest.in" "conftest.in" >"conftest.tmp"
10805 mv "conftest.tmp" "conftest.in"
10806 cp "conftest.in" "conftest.nl"
10807 $as_echo 'GREP' >> "conftest.nl"
10808 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10809 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10810 as_fn_arith $ac_count + 1 && ac_count=$as_val
10811 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10812 # Best one so far, save it but keep looking for a better one
10813 ac_cv_path_GREP="$ac_path_GREP"
10814 ac_path_GREP_max=$ac_count
10816 # 10*(2^10) chars as input seems more than enough
10817 test $ac_count -gt 10 && break
10818 done
10819 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10820 esac
10822 $ac_path_GREP_found && break 3
10823 done
10824 done
10825 done
10826 IFS=$as_save_IFS
10827 if test -z "$ac_cv_path_GREP"; then
10828 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10830 else
10831 ac_cv_path_GREP=$GREP
10835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10836 $as_echo "$ac_cv_path_GREP" >&6; }
10837 GREP="$ac_cv_path_GREP"
10840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10841 $as_echo_n "checking for egrep... " >&6; }
10842 if ${ac_cv_path_EGREP+:} false; then :
10843 $as_echo_n "(cached) " >&6
10844 else
10845 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10846 then ac_cv_path_EGREP="$GREP -E"
10847 else
10848 if test -z "$EGREP"; then
10849 ac_path_EGREP_found=false
10850 # Loop through the user's path and test for each of PROGNAME-LIST
10851 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10852 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10854 IFS=$as_save_IFS
10855 test -z "$as_dir" && as_dir=.
10856 for ac_prog in egrep; do
10857 for ac_exec_ext in '' $ac_executable_extensions; do
10858 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10859 as_fn_executable_p "$ac_path_EGREP" || continue
10860 # Check for GNU ac_path_EGREP and select it if it is found.
10861 # Check for GNU $ac_path_EGREP
10862 case `"$ac_path_EGREP" --version 2>&1` in
10863 *GNU*)
10864 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10866 ac_count=0
10867 $as_echo_n 0123456789 >"conftest.in"
10868 while :
10870 cat "conftest.in" "conftest.in" >"conftest.tmp"
10871 mv "conftest.tmp" "conftest.in"
10872 cp "conftest.in" "conftest.nl"
10873 $as_echo 'EGREP' >> "conftest.nl"
10874 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10875 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10876 as_fn_arith $ac_count + 1 && ac_count=$as_val
10877 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10878 # Best one so far, save it but keep looking for a better one
10879 ac_cv_path_EGREP="$ac_path_EGREP"
10880 ac_path_EGREP_max=$ac_count
10882 # 10*(2^10) chars as input seems more than enough
10883 test $ac_count -gt 10 && break
10884 done
10885 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10886 esac
10888 $ac_path_EGREP_found && break 3
10889 done
10890 done
10891 done
10892 IFS=$as_save_IFS
10893 if test -z "$ac_cv_path_EGREP"; then
10894 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10896 else
10897 ac_cv_path_EGREP=$EGREP
10902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10903 $as_echo "$ac_cv_path_EGREP" >&6; }
10904 EGREP="$ac_cv_path_EGREP"
10907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10908 $as_echo_n "checking for ANSI C header files... " >&6; }
10909 if ${ac_cv_header_stdc+:} false; then :
10910 $as_echo_n "(cached) " >&6
10911 else
10912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10913 /* end confdefs.h. */
10914 #include <stdlib.h>
10915 #include <stdarg.h>
10916 #include <string.h>
10917 #include <float.h>
10920 main ()
10924 return 0;
10926 _ACEOF
10927 if ac_fn_c_try_compile "$LINENO"; then :
10928 ac_cv_header_stdc=yes
10929 else
10930 ac_cv_header_stdc=no
10932 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10934 if test $ac_cv_header_stdc = yes; then
10935 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10937 /* end confdefs.h. */
10938 #include <string.h>
10940 _ACEOF
10941 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10942 $EGREP "memchr" >/dev/null 2>&1; then :
10944 else
10945 ac_cv_header_stdc=no
10947 rm -f conftest*
10951 if test $ac_cv_header_stdc = yes; then
10952 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10954 /* end confdefs.h. */
10955 #include <stdlib.h>
10957 _ACEOF
10958 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10959 $EGREP "free" >/dev/null 2>&1; then :
10961 else
10962 ac_cv_header_stdc=no
10964 rm -f conftest*
10968 if test $ac_cv_header_stdc = yes; then
10969 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10970 if test "$cross_compiling" = yes; then :
10972 else
10973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10974 /* end confdefs.h. */
10975 #include <ctype.h>
10976 #include <stdlib.h>
10977 #if ((' ' & 0x0FF) == 0x020)
10978 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10979 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10980 #else
10981 # define ISLOWER(c) \
10982 (('a' <= (c) && (c) <= 'i') \
10983 || ('j' <= (c) && (c) <= 'r') \
10984 || ('s' <= (c) && (c) <= 'z'))
10985 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10986 #endif
10988 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10990 main ()
10992 int i;
10993 for (i = 0; i < 256; i++)
10994 if (XOR (islower (i), ISLOWER (i))
10995 || toupper (i) != TOUPPER (i))
10996 return 2;
10997 return 0;
10999 _ACEOF
11000 if ac_fn_c_try_run "$LINENO"; then :
11002 else
11003 ac_cv_header_stdc=no
11005 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11006 conftest.$ac_objext conftest.beam conftest.$ac_ext
11011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11012 $as_echo "$ac_cv_header_stdc" >&6; }
11013 if test $ac_cv_header_stdc = yes; then
11015 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
11019 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11020 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11021 inttypes.h stdint.h unistd.h
11022 do :
11023 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11024 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
11026 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11027 cat >>confdefs.h <<_ACEOF
11028 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11029 _ACEOF
11033 done
11036 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
11037 # then
11042 ac_ext=c
11043 ac_cpp='$CPP $CPPFLAGS'
11044 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11045 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11046 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11048 ax_pthread_ok=no
11050 # We used to check for pthread.h first, but this fails if pthread.h
11051 # requires special compiler flags (e.g. on Tru64 or Sequent).
11052 # It gets checked for in the link test anyway.
11054 # First of all, check if the user has set any of the PTHREAD_LIBS,
11055 # etcetera environment variables, and if threads linking works using
11056 # them:
11057 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
11058 ax_pthread_save_CC="$CC"
11059 ax_pthread_save_CFLAGS="$CFLAGS"
11060 ax_pthread_save_LIBS="$LIBS"
11061 if test "x$PTHREAD_CC" != "x"; then :
11062 CC="$PTHREAD_CC"
11064 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11065 LIBS="$PTHREAD_LIBS $LIBS"
11066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
11067 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
11068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11069 /* end confdefs.h. */
11071 /* Override any GCC internal prototype to avoid an error.
11072 Use char because int might match the return type of a GCC
11073 builtin and then its argument prototype would still apply. */
11074 #ifdef __cplusplus
11075 extern "C"
11076 #endif
11077 char pthread_join ();
11079 main ()
11081 return pthread_join ();
11083 return 0;
11085 _ACEOF
11086 if ac_fn_c_try_link "$LINENO"; then :
11087 ax_pthread_ok=yes
11089 rm -f core conftest.err conftest.$ac_objext \
11090 conftest$ac_exeext conftest.$ac_ext
11091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11092 $as_echo "$ax_pthread_ok" >&6; }
11093 if test "x$ax_pthread_ok" = "xno"; then
11094 PTHREAD_LIBS=""
11095 PTHREAD_CFLAGS=""
11097 CC="$ax_pthread_save_CC"
11098 CFLAGS="$ax_pthread_save_CFLAGS"
11099 LIBS="$ax_pthread_save_LIBS"
11102 # We must check for the threads library under a number of different
11103 # names; the ordering is very important because some systems
11104 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
11105 # libraries is broken (non-POSIX).
11107 # Create a list of thread flags to try. Items starting with a "-" are
11108 # C compiler flags, and other items are library names, except for "none"
11109 # which indicates that we try without any flags at all, and "pthread-config"
11110 # which is a program returning the flags for the Pth emulation library.
11112 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
11114 # The ordering *is* (sometimes) important. Some notes on the
11115 # individual items follow:
11117 # pthreads: AIX (must check this before -lpthread)
11118 # none: in case threads are in libc; should be tried before -Kthread and
11119 # other compiler flags to prevent continual compiler warnings
11120 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
11121 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
11122 # (Note: HP C rejects this with "bad form for `-t' option")
11123 # -pthreads: Solaris/gcc (Note: HP C also rejects)
11124 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
11125 # doesn't hurt to check since this sometimes defines pthreads and
11126 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
11127 # is present but should not be used directly; and before -mthreads,
11128 # because the compiler interprets this as "-mt" + "-hreads")
11129 # -mthreads: Mingw32/gcc, Lynx/gcc
11130 # pthread: Linux, etcetera
11131 # --thread-safe: KAI C++
11132 # pthread-config: use pthread-config program (for GNU Pth library)
11134 case $host_os in
11136 freebsd*)
11138 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
11139 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
11141 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
11144 hpux*)
11146 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
11147 # multi-threading and also sets -lpthread."
11149 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
11152 openedition*)
11154 # IBM z/OS requires a feature-test macro to be defined in order to
11155 # enable POSIX threads at all, so give the user a hint if this is
11156 # not set. (We don't define these ourselves, as they can affect
11157 # other portions of the system API in unpredictable ways.)
11159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11160 /* end confdefs.h. */
11162 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
11163 AX_PTHREAD_ZOS_MISSING
11164 # endif
11166 _ACEOF
11167 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11168 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
11169 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
11170 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
11172 rm -f conftest*
11176 solaris*)
11178 # On Solaris (at least, for some versions), libc contains stubbed
11179 # (non-functional) versions of the pthreads routines, so link-based
11180 # tests will erroneously succeed. (N.B.: The stubs are missing
11181 # pthread_cleanup_push, or rather a function called by this macro,
11182 # so we could check for that, but who knows whether they'll stub
11183 # that too in a future libc.) So we'll check first for the
11184 # standard Solaris way of linking pthreads (-mt -lpthread).
11186 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
11188 esac
11190 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
11192 if test "x$GCC" = "xyes"; then :
11193 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
11196 # The presence of a feature test macro requesting re-entrant function
11197 # definitions is, on some systems, a strong hint that pthreads support is
11198 # correctly enabled
11200 case $host_os in
11201 darwin* | hpux* | linux* | osf* | solaris*)
11202 ax_pthread_check_macro="_REENTRANT"
11205 aix*)
11206 ax_pthread_check_macro="_THREAD_SAFE"
11210 ax_pthread_check_macro="--"
11212 esac
11213 if test "x$ax_pthread_check_macro" = "x--"; then :
11214 ax_pthread_check_cond=0
11215 else
11216 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
11219 # Are we compiling with Clang?
11221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
11222 $as_echo_n "checking whether $CC is Clang... " >&6; }
11223 if ${ax_cv_PTHREAD_CLANG+:} false; then :
11224 $as_echo_n "(cached) " >&6
11225 else
11226 ax_cv_PTHREAD_CLANG=no
11227 # Note that Autoconf sets GCC=yes for Clang as well as GCC
11228 if test "x$GCC" = "xyes"; then
11229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11230 /* end confdefs.h. */
11231 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
11232 # if defined(__clang__) && defined(__llvm__)
11233 AX_PTHREAD_CC_IS_CLANG
11234 # endif
11236 _ACEOF
11237 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11238 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
11239 ax_cv_PTHREAD_CLANG=yes
11241 rm -f conftest*
11246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
11247 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
11248 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
11250 ax_pthread_clang_warning=no
11252 # Clang needs special handling, because older versions handle the -pthread
11253 # option in a rather... idiosyncratic way
11255 if test "x$ax_pthread_clang" = "xyes"; then
11257 # Clang takes -pthread; it has never supported any other flag
11259 # (Note 1: This will need to be revisited if a system that Clang
11260 # supports has POSIX threads in a separate library. This tends not
11261 # to be the way of modern systems, but it's conceivable.)
11263 # (Note 2: On some systems, notably Darwin, -pthread is not needed
11264 # to get POSIX threads support; the API is always present and
11265 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
11266 # -pthread does define _REENTRANT, and while the Darwin headers
11267 # ignore this macro, third-party headers might not.)
11269 PTHREAD_CFLAGS="-pthread"
11270 PTHREAD_LIBS=
11272 ax_pthread_ok=yes
11274 # However, older versions of Clang make a point of warning the user
11275 # that, in an invocation where only linking and no compilation is
11276 # taking place, the -pthread option has no effect ("argument unused
11277 # during compilation"). They expect -pthread to be passed in only
11278 # when source code is being compiled.
11280 # Problem is, this is at odds with the way Automake and most other
11281 # C build frameworks function, which is that the same flags used in
11282 # compilation (CFLAGS) are also used in linking. Many systems
11283 # supported by AX_PTHREAD require exactly this for POSIX threads
11284 # support, and in fact it is often not straightforward to specify a
11285 # flag that is used only in the compilation phase and not in
11286 # linking. Such a scenario is extremely rare in practice.
11288 # Even though use of the -pthread flag in linking would only print
11289 # a warning, this can be a nuisance for well-run software projects
11290 # that build with -Werror. So if the active version of Clang has
11291 # this misfeature, we search for an option to squash it.
11293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
11294 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
11295 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
11296 $as_echo_n "(cached) " >&6
11297 else
11298 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
11299 # Create an alternate version of $ac_link that compiles and
11300 # links in two steps (.c -> .o, .o -> exe) instead of one
11301 # (.c -> exe), because the warning occurs only in the second
11302 # step
11303 ax_pthread_save_ac_link="$ac_link"
11304 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
11305 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
11306 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
11307 ax_pthread_save_CFLAGS="$CFLAGS"
11308 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
11309 if test "x$ax_pthread_try" = "xunknown"; then :
11310 break
11312 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
11313 ac_link="$ax_pthread_save_ac_link"
11314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11315 /* end confdefs.h. */
11316 int main(void){return 0;}
11317 _ACEOF
11318 if ac_fn_c_try_link "$LINENO"; then :
11319 ac_link="$ax_pthread_2step_ac_link"
11320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11321 /* end confdefs.h. */
11322 int main(void){return 0;}
11323 _ACEOF
11324 if ac_fn_c_try_link "$LINENO"; then :
11325 break
11327 rm -f core conftest.err conftest.$ac_objext \
11328 conftest$ac_exeext conftest.$ac_ext
11331 rm -f core conftest.err conftest.$ac_objext \
11332 conftest$ac_exeext conftest.$ac_ext
11333 done
11334 ac_link="$ax_pthread_save_ac_link"
11335 CFLAGS="$ax_pthread_save_CFLAGS"
11336 if test "x$ax_pthread_try" = "x"; then :
11337 ax_pthread_try=no
11339 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
11342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
11343 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
11345 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
11346 no | unknown) ;;
11347 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
11348 esac
11350 fi # $ax_pthread_clang = yes
11352 if test "x$ax_pthread_ok" = "xno"; then
11353 for ax_pthread_try_flag in $ax_pthread_flags; do
11355 case $ax_pthread_try_flag in
11356 none)
11357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
11358 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
11361 -mt,pthread)
11362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
11363 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
11364 PTHREAD_CFLAGS="-mt"
11365 PTHREAD_LIBS="-lpthread"
11369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
11370 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
11371 PTHREAD_CFLAGS="$ax_pthread_try_flag"
11374 pthread-config)
11375 # Extract the first word of "pthread-config", so it can be a program name with args.
11376 set dummy pthread-config; ac_word=$2
11377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11378 $as_echo_n "checking for $ac_word... " >&6; }
11379 if ${ac_cv_prog_ax_pthread_config+:} false; then :
11380 $as_echo_n "(cached) " >&6
11381 else
11382 if test -n "$ax_pthread_config"; then
11383 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
11384 else
11385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11386 for as_dir in $PATH
11388 IFS=$as_save_IFS
11389 test -z "$as_dir" && as_dir=.
11390 for ac_exec_ext in '' $ac_executable_extensions; do
11391 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11392 ac_cv_prog_ax_pthread_config="yes"
11393 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11394 break 2
11396 done
11397 done
11398 IFS=$as_save_IFS
11400 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
11403 ax_pthread_config=$ac_cv_prog_ax_pthread_config
11404 if test -n "$ax_pthread_config"; then
11405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11406 $as_echo "$ax_pthread_config" >&6; }
11407 else
11408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11409 $as_echo "no" >&6; }
11413 if test "x$ax_pthread_config" = "xno"; then :
11414 continue
11416 PTHREAD_CFLAGS="`pthread-config --cflags`"
11417 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11422 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11423 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11425 esac
11427 ax_pthread_save_CFLAGS="$CFLAGS"
11428 ax_pthread_save_LIBS="$LIBS"
11429 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11430 LIBS="$PTHREAD_LIBS $LIBS"
11432 # Check for various functions. We must include pthread.h,
11433 # since some functions may be macros. (On the Sequent, we
11434 # need a special flag -Kthread to make this header compile.)
11435 # We check for pthread_join because it is in -lpthread on IRIX
11436 # while pthread_create is in libc. We check for pthread_attr_init
11437 # due to DEC craziness with -lpthreads. We check for
11438 # pthread_cleanup_push because it is one of the few pthread
11439 # functions on Solaris that doesn't have a non-functional libc stub.
11440 # We try pthread_create on general principles.
11442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11443 /* end confdefs.h. */
11444 #include <pthread.h>
11445 # if $ax_pthread_check_cond
11446 # error "$ax_pthread_check_macro must be defined"
11447 # endif
11448 static void routine(void *a) { a = 0; }
11449 static void *start_routine(void *a) { return a; }
11451 main ()
11453 pthread_t th; pthread_attr_t attr;
11454 pthread_create(&th, 0, start_routine, 0);
11455 pthread_join(th, 0);
11456 pthread_attr_init(&attr);
11457 pthread_cleanup_push(routine, 0);
11458 pthread_cleanup_pop(0) /* ; */
11460 return 0;
11462 _ACEOF
11463 if ac_fn_c_try_link "$LINENO"; then :
11464 ax_pthread_ok=yes
11466 rm -f core conftest.err conftest.$ac_objext \
11467 conftest$ac_exeext conftest.$ac_ext
11469 CFLAGS="$ax_pthread_save_CFLAGS"
11470 LIBS="$ax_pthread_save_LIBS"
11472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11473 $as_echo "$ax_pthread_ok" >&6; }
11474 if test "x$ax_pthread_ok" = "xyes"; then :
11475 break
11478 PTHREAD_LIBS=""
11479 PTHREAD_CFLAGS=""
11480 done
11483 # Various other checks:
11484 if test "x$ax_pthread_ok" = "xyes"; then
11485 ax_pthread_save_CFLAGS="$CFLAGS"
11486 ax_pthread_save_LIBS="$LIBS"
11487 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11488 LIBS="$PTHREAD_LIBS $LIBS"
11490 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11492 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11493 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11494 $as_echo_n "(cached) " >&6
11495 else
11496 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11497 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11499 /* end confdefs.h. */
11500 #include <pthread.h>
11502 main ()
11504 int attr = $ax_pthread_attr; return attr /* ; */
11506 return 0;
11508 _ACEOF
11509 if ac_fn_c_try_link "$LINENO"; then :
11510 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11512 rm -f core conftest.err conftest.$ac_objext \
11513 conftest$ac_exeext conftest.$ac_ext
11514 done
11517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11518 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11519 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11520 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11521 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11523 cat >>confdefs.h <<_ACEOF
11524 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11525 _ACEOF
11527 ax_pthread_joinable_attr_defined=yes
11531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11532 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11533 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11534 $as_echo_n "(cached) " >&6
11535 else
11536 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11537 case $host_os in
11538 solaris*)
11539 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11541 esac
11544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11545 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11546 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11547 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11548 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11549 ax_pthread_special_flags_added=yes
11552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11553 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11554 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11555 $as_echo_n "(cached) " >&6
11556 else
11557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11558 /* end confdefs.h. */
11559 #include <pthread.h>
11561 main ()
11563 int i = PTHREAD_PRIO_INHERIT;
11565 return 0;
11567 _ACEOF
11568 if ac_fn_c_try_link "$LINENO"; then :
11569 ax_cv_PTHREAD_PRIO_INHERIT=yes
11570 else
11571 ax_cv_PTHREAD_PRIO_INHERIT=no
11573 rm -f core conftest.err conftest.$ac_objext \
11574 conftest$ac_exeext conftest.$ac_ext
11577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11578 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11579 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11580 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11582 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11584 ax_pthread_prio_inherit_defined=yes
11588 CFLAGS="$ax_pthread_save_CFLAGS"
11589 LIBS="$ax_pthread_save_LIBS"
11591 # More AIX lossage: compile with *_r variant
11592 if test "x$GCC" != "xyes"; then
11593 case $host_os in
11594 aix*)
11595 case "x/$CC" in #(
11596 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11597 #handle absolute path differently from PATH based program lookup
11598 case "x$CC" in #(
11599 x/*) :
11600 if as_fn_executable_p ${CC}_r; then :
11601 PTHREAD_CC="${CC}_r"
11602 fi ;; #(
11603 *) :
11604 for ac_prog in ${CC}_r
11606 # Extract the first word of "$ac_prog", so it can be a program name with args.
11607 set dummy $ac_prog; ac_word=$2
11608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11609 $as_echo_n "checking for $ac_word... " >&6; }
11610 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11611 $as_echo_n "(cached) " >&6
11612 else
11613 if test -n "$PTHREAD_CC"; then
11614 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11615 else
11616 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11617 for as_dir in $PATH
11619 IFS=$as_save_IFS
11620 test -z "$as_dir" && as_dir=.
11621 for ac_exec_ext in '' $ac_executable_extensions; do
11622 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11623 ac_cv_prog_PTHREAD_CC="$ac_prog"
11624 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11625 break 2
11627 done
11628 done
11629 IFS=$as_save_IFS
11633 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11634 if test -n "$PTHREAD_CC"; then
11635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11636 $as_echo "$PTHREAD_CC" >&6; }
11637 else
11638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11639 $as_echo "no" >&6; }
11643 test -n "$PTHREAD_CC" && break
11644 done
11645 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11647 esac ;; #(
11648 *) :
11650 esac
11652 esac
11656 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11662 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11663 if test "x$ax_pthread_ok" = "xyes"; then
11665 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11668 else
11669 ax_pthread_ok=no
11672 ac_ext=c
11673 ac_cpp='$CPP $CPPFLAGS'
11674 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11675 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11676 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11678 # set thread flags
11680 # Some platforms use these, so just define them. They can't hurt if they
11681 # are not supported.
11682 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE"
11684 # Check for *_r functions
11685 _CFLAGS="$CFLAGS"
11686 _LIBS="$LIBS"
11687 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11688 LIBS="$LIBS $PTHREAD_LIBS"
11690 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11691 if test "x$ac_cv_header_pthread_h" = xyes; then :
11693 else
11694 as_fn_error $? "
11695 pthread.h not found; use --disable-thread-safety to disable thread safety" "$LINENO" 5
11700 for ac_func in strerror_r
11701 do :
11702 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
11703 if test "x$ac_cv_func_strerror_r" = xyes; then :
11704 cat >>confdefs.h <<_ACEOF
11705 #define HAVE_STRERROR_R 1
11706 _ACEOF
11709 done
11712 # Do test here with the proper thread flags
11713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11714 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11715 if ${pgac_cv_func_strerror_r_int+:} false; then :
11716 $as_echo_n "(cached) " >&6
11717 else
11718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11719 /* end confdefs.h. */
11720 #include <string.h>
11722 main ()
11724 char buf[100];
11725 switch (strerror_r(1, buf, sizeof(buf)))
11726 { case 0: break; default: break; }
11729 return 0;
11731 _ACEOF
11732 if ac_fn_c_try_compile "$LINENO"; then :
11733 pgac_cv_func_strerror_r_int=yes
11734 else
11735 pgac_cv_func_strerror_r_int=no
11737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11740 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11741 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11743 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11748 CFLAGS="$_CFLAGS"
11749 LIBS="$_LIBS"
11752 else
11753 # else
11754 # do not use values from template file
11755 PTHREAD_CFLAGS=
11756 PTHREAD_LIBS=
11758 fi # fi
11765 ## Libraries
11767 ## Most libraries are included only if they demonstrably provide a function
11768 ## we need, but libm is an exception: always include it, because there are
11769 ## too many compilers that play cute optimization games that will break
11770 ## probes for standard functions such as pow().
11773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11774 $as_echo_n "checking for main in -lm... " >&6; }
11775 if ${ac_cv_lib_m_main+:} false; then :
11776 $as_echo_n "(cached) " >&6
11777 else
11778 ac_check_lib_save_LIBS=$LIBS
11779 LIBS="-lm $LIBS"
11780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11781 /* end confdefs.h. */
11785 main ()
11787 return main ();
11789 return 0;
11791 _ACEOF
11792 if ac_fn_c_try_link "$LINENO"; then :
11793 ac_cv_lib_m_main=yes
11794 else
11795 ac_cv_lib_m_main=no
11797 rm -f core conftest.err conftest.$ac_objext \
11798 conftest$ac_exeext conftest.$ac_ext
11799 LIBS=$ac_check_lib_save_LIBS
11801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11802 $as_echo "$ac_cv_lib_m_main" >&6; }
11803 if test "x$ac_cv_lib_m_main" = xyes; then :
11804 cat >>confdefs.h <<_ACEOF
11805 #define HAVE_LIBM 1
11806 _ACEOF
11808 LIBS="-lm $LIBS"
11812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11813 $as_echo_n "checking for library containing setproctitle... " >&6; }
11814 if ${ac_cv_search_setproctitle+:} false; then :
11815 $as_echo_n "(cached) " >&6
11816 else
11817 ac_func_search_save_LIBS=$LIBS
11818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11819 /* end confdefs.h. */
11821 /* Override any GCC internal prototype to avoid an error.
11822 Use char because int might match the return type of a GCC
11823 builtin and then its argument prototype would still apply. */
11824 #ifdef __cplusplus
11825 extern "C"
11826 #endif
11827 char setproctitle ();
11829 main ()
11831 return setproctitle ();
11833 return 0;
11835 _ACEOF
11836 for ac_lib in '' util; do
11837 if test -z "$ac_lib"; then
11838 ac_res="none required"
11839 else
11840 ac_res=-l$ac_lib
11841 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11843 if ac_fn_c_try_link "$LINENO"; then :
11844 ac_cv_search_setproctitle=$ac_res
11846 rm -f core conftest.err conftest.$ac_objext \
11847 conftest$ac_exeext
11848 if ${ac_cv_search_setproctitle+:} false; then :
11849 break
11851 done
11852 if ${ac_cv_search_setproctitle+:} false; then :
11854 else
11855 ac_cv_search_setproctitle=no
11857 rm conftest.$ac_ext
11858 LIBS=$ac_func_search_save_LIBS
11860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11861 $as_echo "$ac_cv_search_setproctitle" >&6; }
11862 ac_res=$ac_cv_search_setproctitle
11863 if test "$ac_res" != no; then :
11864 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11868 # gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
11869 # when enabling asan the dlopen check doesn't notice that -ldl is actually
11870 # required. Just checking for dlsym() ought to suffice.
11871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
11872 $as_echo_n "checking for library containing dlsym... " >&6; }
11873 if ${ac_cv_search_dlsym+:} false; then :
11874 $as_echo_n "(cached) " >&6
11875 else
11876 ac_func_search_save_LIBS=$LIBS
11877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11878 /* end confdefs.h. */
11880 /* Override any GCC internal prototype to avoid an error.
11881 Use char because int might match the return type of a GCC
11882 builtin and then its argument prototype would still apply. */
11883 #ifdef __cplusplus
11884 extern "C"
11885 #endif
11886 char dlsym ();
11888 main ()
11890 return dlsym ();
11892 return 0;
11894 _ACEOF
11895 for ac_lib in '' dl; do
11896 if test -z "$ac_lib"; then
11897 ac_res="none required"
11898 else
11899 ac_res=-l$ac_lib
11900 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11902 if ac_fn_c_try_link "$LINENO"; then :
11903 ac_cv_search_dlsym=$ac_res
11905 rm -f core conftest.err conftest.$ac_objext \
11906 conftest$ac_exeext
11907 if ${ac_cv_search_dlsym+:} false; then :
11908 break
11910 done
11911 if ${ac_cv_search_dlsym+:} false; then :
11913 else
11914 ac_cv_search_dlsym=no
11916 rm conftest.$ac_ext
11917 LIBS=$ac_func_search_save_LIBS
11919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
11920 $as_echo "$ac_cv_search_dlsym" >&6; }
11921 ac_res=$ac_cv_search_dlsym
11922 if test "$ac_res" != no; then :
11923 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11928 $as_echo_n "checking for library containing socket... " >&6; }
11929 if ${ac_cv_search_socket+:} false; then :
11930 $as_echo_n "(cached) " >&6
11931 else
11932 ac_func_search_save_LIBS=$LIBS
11933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11934 /* end confdefs.h. */
11936 /* Override any GCC internal prototype to avoid an error.
11937 Use char because int might match the return type of a GCC
11938 builtin and then its argument prototype would still apply. */
11939 #ifdef __cplusplus
11940 extern "C"
11941 #endif
11942 char socket ();
11944 main ()
11946 return socket ();
11948 return 0;
11950 _ACEOF
11951 for ac_lib in '' socket ws2_32; do
11952 if test -z "$ac_lib"; then
11953 ac_res="none required"
11954 else
11955 ac_res=-l$ac_lib
11956 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11958 if ac_fn_c_try_link "$LINENO"; then :
11959 ac_cv_search_socket=$ac_res
11961 rm -f core conftest.err conftest.$ac_objext \
11962 conftest$ac_exeext
11963 if ${ac_cv_search_socket+:} false; then :
11964 break
11966 done
11967 if ${ac_cv_search_socket+:} false; then :
11969 else
11970 ac_cv_search_socket=no
11972 rm conftest.$ac_ext
11973 LIBS=$ac_func_search_save_LIBS
11975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11976 $as_echo "$ac_cv_search_socket" >&6; }
11977 ac_res=$ac_cv_search_socket
11978 if test "$ac_res" != no; then :
11979 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11984 $as_echo_n "checking for library containing getopt_long... " >&6; }
11985 if ${ac_cv_search_getopt_long+:} false; then :
11986 $as_echo_n "(cached) " >&6
11987 else
11988 ac_func_search_save_LIBS=$LIBS
11989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11990 /* end confdefs.h. */
11992 /* Override any GCC internal prototype to avoid an error.
11993 Use char because int might match the return type of a GCC
11994 builtin and then its argument prototype would still apply. */
11995 #ifdef __cplusplus
11996 extern "C"
11997 #endif
11998 char getopt_long ();
12000 main ()
12002 return getopt_long ();
12004 return 0;
12006 _ACEOF
12007 for ac_lib in '' getopt gnugetopt; do
12008 if test -z "$ac_lib"; then
12009 ac_res="none required"
12010 else
12011 ac_res=-l$ac_lib
12012 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12014 if ac_fn_c_try_link "$LINENO"; then :
12015 ac_cv_search_getopt_long=$ac_res
12017 rm -f core conftest.err conftest.$ac_objext \
12018 conftest$ac_exeext
12019 if ${ac_cv_search_getopt_long+:} false; then :
12020 break
12022 done
12023 if ${ac_cv_search_getopt_long+:} false; then :
12025 else
12026 ac_cv_search_getopt_long=no
12028 rm conftest.$ac_ext
12029 LIBS=$ac_func_search_save_LIBS
12031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
12032 $as_echo "$ac_cv_search_getopt_long" >&6; }
12033 ac_res=$ac_cv_search_getopt_long
12034 if test "$ac_res" != no; then :
12035 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
12040 $as_echo_n "checking for library containing shm_open... " >&6; }
12041 if ${ac_cv_search_shm_open+:} false; then :
12042 $as_echo_n "(cached) " >&6
12043 else
12044 ac_func_search_save_LIBS=$LIBS
12045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12046 /* end confdefs.h. */
12048 /* Override any GCC internal prototype to avoid an error.
12049 Use char because int might match the return type of a GCC
12050 builtin and then its argument prototype would still apply. */
12051 #ifdef __cplusplus
12052 extern "C"
12053 #endif
12054 char shm_open ();
12056 main ()
12058 return shm_open ();
12060 return 0;
12062 _ACEOF
12063 for ac_lib in '' rt; do
12064 if test -z "$ac_lib"; then
12065 ac_res="none required"
12066 else
12067 ac_res=-l$ac_lib
12068 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12070 if ac_fn_c_try_link "$LINENO"; then :
12071 ac_cv_search_shm_open=$ac_res
12073 rm -f core conftest.err conftest.$ac_objext \
12074 conftest$ac_exeext
12075 if ${ac_cv_search_shm_open+:} false; then :
12076 break
12078 done
12079 if ${ac_cv_search_shm_open+:} false; then :
12081 else
12082 ac_cv_search_shm_open=no
12084 rm conftest.$ac_ext
12085 LIBS=$ac_func_search_save_LIBS
12087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
12088 $as_echo "$ac_cv_search_shm_open" >&6; }
12089 ac_res=$ac_cv_search_shm_open
12090 if test "$ac_res" != no; then :
12091 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
12096 $as_echo_n "checking for library containing shm_unlink... " >&6; }
12097 if ${ac_cv_search_shm_unlink+:} false; then :
12098 $as_echo_n "(cached) " >&6
12099 else
12100 ac_func_search_save_LIBS=$LIBS
12101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12102 /* end confdefs.h. */
12104 /* Override any GCC internal prototype to avoid an error.
12105 Use char because int might match the return type of a GCC
12106 builtin and then its argument prototype would still apply. */
12107 #ifdef __cplusplus
12108 extern "C"
12109 #endif
12110 char shm_unlink ();
12112 main ()
12114 return shm_unlink ();
12116 return 0;
12118 _ACEOF
12119 for ac_lib in '' rt; do
12120 if test -z "$ac_lib"; then
12121 ac_res="none required"
12122 else
12123 ac_res=-l$ac_lib
12124 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12126 if ac_fn_c_try_link "$LINENO"; then :
12127 ac_cv_search_shm_unlink=$ac_res
12129 rm -f core conftest.err conftest.$ac_objext \
12130 conftest$ac_exeext
12131 if ${ac_cv_search_shm_unlink+:} false; then :
12132 break
12134 done
12135 if ${ac_cv_search_shm_unlink+:} false; then :
12137 else
12138 ac_cv_search_shm_unlink=no
12140 rm conftest.$ac_ext
12141 LIBS=$ac_func_search_save_LIBS
12143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
12144 $as_echo "$ac_cv_search_shm_unlink" >&6; }
12145 ac_res=$ac_cv_search_shm_unlink
12146 if test "$ac_res" != no; then :
12147 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
12152 $as_echo_n "checking for library containing clock_gettime... " >&6; }
12153 if ${ac_cv_search_clock_gettime+:} false; then :
12154 $as_echo_n "(cached) " >&6
12155 else
12156 ac_func_search_save_LIBS=$LIBS
12157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12158 /* end confdefs.h. */
12160 /* Override any GCC internal prototype to avoid an error.
12161 Use char because int might match the return type of a GCC
12162 builtin and then its argument prototype would still apply. */
12163 #ifdef __cplusplus
12164 extern "C"
12165 #endif
12166 char clock_gettime ();
12168 main ()
12170 return clock_gettime ();
12172 return 0;
12174 _ACEOF
12175 for ac_lib in '' rt posix4; do
12176 if test -z "$ac_lib"; then
12177 ac_res="none required"
12178 else
12179 ac_res=-l$ac_lib
12180 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12182 if ac_fn_c_try_link "$LINENO"; then :
12183 ac_cv_search_clock_gettime=$ac_res
12185 rm -f core conftest.err conftest.$ac_objext \
12186 conftest$ac_exeext
12187 if ${ac_cv_search_clock_gettime+:} false; then :
12188 break
12190 done
12191 if ${ac_cv_search_clock_gettime+:} false; then :
12193 else
12194 ac_cv_search_clock_gettime=no
12196 rm conftest.$ac_ext
12197 LIBS=$ac_func_search_save_LIBS
12199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
12200 $as_echo "$ac_cv_search_clock_gettime" >&6; }
12201 ac_res=$ac_cv_search_clock_gettime
12202 if test "$ac_res" != no; then :
12203 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12207 # Solaris:
12208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
12209 $as_echo_n "checking for library containing fdatasync... " >&6; }
12210 if ${ac_cv_search_fdatasync+:} false; then :
12211 $as_echo_n "(cached) " >&6
12212 else
12213 ac_func_search_save_LIBS=$LIBS
12214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12215 /* end confdefs.h. */
12217 /* Override any GCC internal prototype to avoid an error.
12218 Use char because int might match the return type of a GCC
12219 builtin and then its argument prototype would still apply. */
12220 #ifdef __cplusplus
12221 extern "C"
12222 #endif
12223 char fdatasync ();
12225 main ()
12227 return fdatasync ();
12229 return 0;
12231 _ACEOF
12232 for ac_lib in '' rt posix4; do
12233 if test -z "$ac_lib"; then
12234 ac_res="none required"
12235 else
12236 ac_res=-l$ac_lib
12237 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12239 if ac_fn_c_try_link "$LINENO"; then :
12240 ac_cv_search_fdatasync=$ac_res
12242 rm -f core conftest.err conftest.$ac_objext \
12243 conftest$ac_exeext
12244 if ${ac_cv_search_fdatasync+:} false; then :
12245 break
12247 done
12248 if ${ac_cv_search_fdatasync+:} false; then :
12250 else
12251 ac_cv_search_fdatasync=no
12253 rm conftest.$ac_ext
12254 LIBS=$ac_func_search_save_LIBS
12256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
12257 $as_echo "$ac_cv_search_fdatasync" >&6; }
12258 ac_res=$ac_cv_search_fdatasync
12259 if test "$ac_res" != no; then :
12260 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12264 # Cygwin:
12265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
12266 $as_echo_n "checking for library containing shmget... " >&6; }
12267 if ${ac_cv_search_shmget+:} false; then :
12268 $as_echo_n "(cached) " >&6
12269 else
12270 ac_func_search_save_LIBS=$LIBS
12271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12272 /* end confdefs.h. */
12274 /* Override any GCC internal prototype to avoid an error.
12275 Use char because int might match the return type of a GCC
12276 builtin and then its argument prototype would still apply. */
12277 #ifdef __cplusplus
12278 extern "C"
12279 #endif
12280 char shmget ();
12282 main ()
12284 return shmget ();
12286 return 0;
12288 _ACEOF
12289 for ac_lib in '' cygipc; do
12290 if test -z "$ac_lib"; then
12291 ac_res="none required"
12292 else
12293 ac_res=-l$ac_lib
12294 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12296 if ac_fn_c_try_link "$LINENO"; then :
12297 ac_cv_search_shmget=$ac_res
12299 rm -f core conftest.err conftest.$ac_objext \
12300 conftest$ac_exeext
12301 if ${ac_cv_search_shmget+:} false; then :
12302 break
12304 done
12305 if ${ac_cv_search_shmget+:} false; then :
12307 else
12308 ac_cv_search_shmget=no
12310 rm conftest.$ac_ext
12311 LIBS=$ac_func_search_save_LIBS
12313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
12314 $as_echo "$ac_cv_search_shmget" >&6; }
12315 ac_res=$ac_cv_search_shmget
12316 if test "$ac_res" != no; then :
12317 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12321 # *BSD:
12322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
12323 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
12324 if ${ac_cv_search_backtrace_symbols+:} false; then :
12325 $as_echo_n "(cached) " >&6
12326 else
12327 ac_func_search_save_LIBS=$LIBS
12328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12329 /* end confdefs.h. */
12331 /* Override any GCC internal prototype to avoid an error.
12332 Use char because int might match the return type of a GCC
12333 builtin and then its argument prototype would still apply. */
12334 #ifdef __cplusplus
12335 extern "C"
12336 #endif
12337 char backtrace_symbols ();
12339 main ()
12341 return backtrace_symbols ();
12343 return 0;
12345 _ACEOF
12346 for ac_lib in '' execinfo; do
12347 if test -z "$ac_lib"; then
12348 ac_res="none required"
12349 else
12350 ac_res=-l$ac_lib
12351 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12353 if ac_fn_c_try_link "$LINENO"; then :
12354 ac_cv_search_backtrace_symbols=$ac_res
12356 rm -f core conftest.err conftest.$ac_objext \
12357 conftest$ac_exeext
12358 if ${ac_cv_search_backtrace_symbols+:} false; then :
12359 break
12361 done
12362 if ${ac_cv_search_backtrace_symbols+:} false; then :
12364 else
12365 ac_cv_search_backtrace_symbols=no
12367 rm conftest.$ac_ext
12368 LIBS=$ac_func_search_save_LIBS
12370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
12371 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
12372 ac_res=$ac_cv_search_backtrace_symbols
12373 if test "$ac_res" != no; then :
12374 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12379 if test "$enable_thread_safety" = yes; then
12380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
12381 $as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
12382 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12383 $as_echo_n "(cached) " >&6
12384 else
12385 ac_func_search_save_LIBS=$LIBS
12386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12387 /* end confdefs.h. */
12389 /* Override any GCC internal prototype to avoid an error.
12390 Use char because int might match the return type of a GCC
12391 builtin and then its argument prototype would still apply. */
12392 #ifdef __cplusplus
12393 extern "C"
12394 #endif
12395 char pthread_barrier_wait ();
12397 main ()
12399 return pthread_barrier_wait ();
12401 return 0;
12403 _ACEOF
12404 for ac_lib in '' pthread; do
12405 if test -z "$ac_lib"; then
12406 ac_res="none required"
12407 else
12408 ac_res=-l$ac_lib
12409 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12411 if ac_fn_c_try_link "$LINENO"; then :
12412 ac_cv_search_pthread_barrier_wait=$ac_res
12414 rm -f core conftest.err conftest.$ac_objext \
12415 conftest$ac_exeext
12416 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12417 break
12419 done
12420 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12422 else
12423 ac_cv_search_pthread_barrier_wait=no
12425 rm conftest.$ac_ext
12426 LIBS=$ac_func_search_save_LIBS
12428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_barrier_wait" >&5
12429 $as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
12430 ac_res=$ac_cv_search_pthread_barrier_wait
12431 if test "$ac_res" != no; then :
12432 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12438 if test "$with_readline" = yes; then
12441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
12442 $as_echo_n "checking for library containing readline... " >&6; }
12443 if ${pgac_cv_check_readline+:} false; then :
12444 $as_echo_n "(cached) " >&6
12445 else
12446 pgac_cv_check_readline=no
12447 pgac_save_LIBS=$LIBS
12448 if test x"$with_libedit_preferred" != x"yes"
12449 then READLINE_ORDER="-lreadline -ledit"
12450 else READLINE_ORDER="-ledit -lreadline"
12452 for pgac_rllib in $READLINE_ORDER ; do
12453 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
12454 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
12455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12456 /* end confdefs.h. */
12458 /* Override any GCC internal prototype to avoid an error.
12459 Use char because int might match the return type of a GCC
12460 builtin and then its argument prototype would still apply. */
12461 #ifdef __cplusplus
12462 extern "C"
12463 #endif
12464 char readline ();
12466 main ()
12468 return readline ();
12470 return 0;
12472 _ACEOF
12473 if ac_fn_c_try_link "$LINENO"; then :
12475 # Older NetBSD and OpenBSD have a broken linker that does not
12476 # recognize dependent libraries; assume curses is needed if we didn't
12477 # find any dependency.
12478 case $host_os in
12479 netbsd* | openbsd*)
12480 if test x"$pgac_lib" = x"" ; then
12481 pgac_lib=" -lcurses"
12482 fi ;;
12483 esac
12485 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12486 break
12489 rm -f core conftest.err conftest.$ac_objext \
12490 conftest$ac_exeext conftest.$ac_ext
12491 done
12492 if test "$pgac_cv_check_readline" != no ; then
12493 break
12495 done
12496 LIBS=$pgac_save_LIBS
12499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12500 $as_echo "$pgac_cv_check_readline" >&6; }
12501 if test "$pgac_cv_check_readline" != no ; then
12502 LIBS="$pgac_cv_check_readline $LIBS"
12504 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12509 if test x"$pgac_cv_check_readline" = x"no"; then
12510 as_fn_error $? "readline library not found
12511 If you have readline already installed, see config.log for details on the
12512 failure. It is possible the compiler isn't looking in the proper directory.
12513 Use --without-readline to disable readline support." "$LINENO" 5
12517 if test "$with_zlib" = yes; then
12518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12519 $as_echo_n "checking for inflate in -lz... " >&6; }
12520 if ${ac_cv_lib_z_inflate+:} false; then :
12521 $as_echo_n "(cached) " >&6
12522 else
12523 ac_check_lib_save_LIBS=$LIBS
12524 LIBS="-lz $LIBS"
12525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12526 /* end confdefs.h. */
12528 /* Override any GCC internal prototype to avoid an error.
12529 Use char because int might match the return type of a GCC
12530 builtin and then its argument prototype would still apply. */
12531 #ifdef __cplusplus
12532 extern "C"
12533 #endif
12534 char inflate ();
12536 main ()
12538 return inflate ();
12540 return 0;
12542 _ACEOF
12543 if ac_fn_c_try_link "$LINENO"; then :
12544 ac_cv_lib_z_inflate=yes
12545 else
12546 ac_cv_lib_z_inflate=no
12548 rm -f core conftest.err conftest.$ac_objext \
12549 conftest$ac_exeext conftest.$ac_ext
12550 LIBS=$ac_check_lib_save_LIBS
12552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12553 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12554 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12555 cat >>confdefs.h <<_ACEOF
12556 #define HAVE_LIBZ 1
12557 _ACEOF
12559 LIBS="-lz $LIBS"
12561 else
12562 as_fn_error $? "zlib library not found
12563 If you have zlib already installed, see config.log for details on the
12564 failure. It is possible the compiler isn't looking in the proper directory.
12565 Use --without-zlib to disable zlib support." "$LINENO" 5
12570 if test "$enable_spinlocks" = yes; then
12572 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
12574 else
12575 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12576 *** Not using spinlocks will cause poor performance." >&5
12577 $as_echo "$as_me: WARNING:
12578 *** Not using spinlocks will cause poor performance." >&2;}
12581 if test "$enable_atomics" = yes; then
12583 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
12585 else
12586 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12587 *** Not using atomic operations will cause poor performance." >&5
12588 $as_echo "$as_me: WARNING:
12589 *** Not using atomic operations will cause poor performance." >&2;}
12592 if test "$with_gssapi" = yes ; then
12593 if test "$PORTNAME" != "win32"; then
12594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
12595 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
12596 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12597 $as_echo_n "(cached) " >&6
12598 else
12599 ac_func_search_save_LIBS=$LIBS
12600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12601 /* end confdefs.h. */
12603 /* Override any GCC internal prototype to avoid an error.
12604 Use char because int might match the return type of a GCC
12605 builtin and then its argument prototype would still apply. */
12606 #ifdef __cplusplus
12607 extern "C"
12608 #endif
12609 char gss_init_sec_context ();
12611 main ()
12613 return gss_init_sec_context ();
12615 return 0;
12617 _ACEOF
12618 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12619 if test -z "$ac_lib"; then
12620 ac_res="none required"
12621 else
12622 ac_res=-l$ac_lib
12623 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12625 if ac_fn_c_try_link "$LINENO"; then :
12626 ac_cv_search_gss_init_sec_context=$ac_res
12628 rm -f core conftest.err conftest.$ac_objext \
12629 conftest$ac_exeext
12630 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12631 break
12633 done
12634 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12636 else
12637 ac_cv_search_gss_init_sec_context=no
12639 rm conftest.$ac_ext
12640 LIBS=$ac_func_search_save_LIBS
12642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
12643 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
12644 ac_res=$ac_cv_search_gss_init_sec_context
12645 if test "$ac_res" != no; then :
12646 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12648 else
12649 as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
12652 else
12653 LIBS="$LIBS -lgssapi32"
12658 # SSL Library
12660 # There is currently only one supported SSL/TLS library: OpenSSL.
12665 # Check whether --with-ssl was given.
12666 if test "${with_ssl+set}" = set; then :
12667 withval=$with_ssl;
12668 case $withval in
12669 yes)
12670 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12673 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12678 esac
12683 if test x"$with_ssl" = x"" ; then
12684 with_ssl=no
12689 # Check whether --with-openssl was given.
12690 if test "${with_openssl+set}" = set; then :
12691 withval=$with_openssl;
12692 case $withval in
12693 yes)
12700 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12702 esac
12704 else
12705 with_openssl=no
12710 if test "$with_openssl" = yes ; then
12711 with_ssl=openssl
12714 if test "$with_ssl" = openssl ; then
12715 # Minimum required OpenSSL version is 1.0.1
12717 $as_echo "#define OPENSSL_API_COMPAT 0x10001000L" >>confdefs.h
12719 if test "$PORTNAME" != "win32"; then
12720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12721 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12722 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12723 $as_echo_n "(cached) " >&6
12724 else
12725 ac_check_lib_save_LIBS=$LIBS
12726 LIBS="-lcrypto $LIBS"
12727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12728 /* end confdefs.h. */
12730 /* Override any GCC internal prototype to avoid an error.
12731 Use char because int might match the return type of a GCC
12732 builtin and then its argument prototype would still apply. */
12733 #ifdef __cplusplus
12734 extern "C"
12735 #endif
12736 char CRYPTO_new_ex_data ();
12738 main ()
12740 return CRYPTO_new_ex_data ();
12742 return 0;
12744 _ACEOF
12745 if ac_fn_c_try_link "$LINENO"; then :
12746 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12747 else
12748 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12750 rm -f core conftest.err conftest.$ac_objext \
12751 conftest$ac_exeext conftest.$ac_ext
12752 LIBS=$ac_check_lib_save_LIBS
12754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12755 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12756 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12757 cat >>confdefs.h <<_ACEOF
12758 #define HAVE_LIBCRYPTO 1
12759 _ACEOF
12761 LIBS="-lcrypto $LIBS"
12763 else
12764 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12768 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12769 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12770 $as_echo_n "(cached) " >&6
12771 else
12772 ac_check_lib_save_LIBS=$LIBS
12773 LIBS="-lssl $LIBS"
12774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12775 /* end confdefs.h. */
12777 /* Override any GCC internal prototype to avoid an error.
12778 Use char because int might match the return type of a GCC
12779 builtin and then its argument prototype would still apply. */
12780 #ifdef __cplusplus
12781 extern "C"
12782 #endif
12783 char SSL_new ();
12785 main ()
12787 return SSL_new ();
12789 return 0;
12791 _ACEOF
12792 if ac_fn_c_try_link "$LINENO"; then :
12793 ac_cv_lib_ssl_SSL_new=yes
12794 else
12795 ac_cv_lib_ssl_SSL_new=no
12797 rm -f core conftest.err conftest.$ac_objext \
12798 conftest$ac_exeext conftest.$ac_ext
12799 LIBS=$ac_check_lib_save_LIBS
12801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12802 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12803 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12804 cat >>confdefs.h <<_ACEOF
12805 #define HAVE_LIBSSL 1
12806 _ACEOF
12808 LIBS="-lssl $LIBS"
12810 else
12811 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12814 else
12815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12816 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12817 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12818 $as_echo_n "(cached) " >&6
12819 else
12820 ac_func_search_save_LIBS=$LIBS
12821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12822 /* end confdefs.h. */
12824 /* Override any GCC internal prototype to avoid an error.
12825 Use char because int might match the return type of a GCC
12826 builtin and then its argument prototype would still apply. */
12827 #ifdef __cplusplus
12828 extern "C"
12829 #endif
12830 char CRYPTO_new_ex_data ();
12832 main ()
12834 return CRYPTO_new_ex_data ();
12836 return 0;
12838 _ACEOF
12839 for ac_lib in '' eay32 crypto; do
12840 if test -z "$ac_lib"; then
12841 ac_res="none required"
12842 else
12843 ac_res=-l$ac_lib
12844 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12846 if ac_fn_c_try_link "$LINENO"; then :
12847 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12849 rm -f core conftest.err conftest.$ac_objext \
12850 conftest$ac_exeext
12851 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12852 break
12854 done
12855 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12857 else
12858 ac_cv_search_CRYPTO_new_ex_data=no
12860 rm conftest.$ac_ext
12861 LIBS=$ac_func_search_save_LIBS
12863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12864 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12865 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12866 if test "$ac_res" != no; then :
12867 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12869 else
12870 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12874 $as_echo_n "checking for library containing SSL_new... " >&6; }
12875 if ${ac_cv_search_SSL_new+:} false; then :
12876 $as_echo_n "(cached) " >&6
12877 else
12878 ac_func_search_save_LIBS=$LIBS
12879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12880 /* end confdefs.h. */
12882 /* Override any GCC internal prototype to avoid an error.
12883 Use char because int might match the return type of a GCC
12884 builtin and then its argument prototype would still apply. */
12885 #ifdef __cplusplus
12886 extern "C"
12887 #endif
12888 char SSL_new ();
12890 main ()
12892 return SSL_new ();
12894 return 0;
12896 _ACEOF
12897 for ac_lib in '' ssleay32 ssl; do
12898 if test -z "$ac_lib"; then
12899 ac_res="none required"
12900 else
12901 ac_res=-l$ac_lib
12902 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12904 if ac_fn_c_try_link "$LINENO"; then :
12905 ac_cv_search_SSL_new=$ac_res
12907 rm -f core conftest.err conftest.$ac_objext \
12908 conftest$ac_exeext
12909 if ${ac_cv_search_SSL_new+:} false; then :
12910 break
12912 done
12913 if ${ac_cv_search_SSL_new+:} false; then :
12915 else
12916 ac_cv_search_SSL_new=no
12918 rm conftest.$ac_ext
12919 LIBS=$ac_func_search_save_LIBS
12921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12922 $as_echo "$ac_cv_search_SSL_new" >&6; }
12923 ac_res=$ac_cv_search_SSL_new
12924 if test "$ac_res" != no; then :
12925 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12927 else
12928 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12932 # Function introduced in OpenSSL 1.0.2.
12933 for ac_func in X509_get_signature_nid
12934 do :
12935 ac_fn_c_check_func "$LINENO" "X509_get_signature_nid" "ac_cv_func_X509_get_signature_nid"
12936 if test "x$ac_cv_func_X509_get_signature_nid" = xyes; then :
12937 cat >>confdefs.h <<_ACEOF
12938 #define HAVE_X509_GET_SIGNATURE_NID 1
12939 _ACEOF
12942 done
12944 # Functions introduced in OpenSSL 1.1.0. We used to check for
12945 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12946 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12947 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12948 # functions.
12949 for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free
12950 do :
12951 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12952 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12953 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12954 cat >>confdefs.h <<_ACEOF
12955 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12956 _ACEOF
12959 done
12961 # OpenSSL versions before 1.1.0 required setting callback functions, for
12962 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12963 # function was removed.
12964 for ac_func in CRYPTO_lock
12965 do :
12966 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12967 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12968 cat >>confdefs.h <<_ACEOF
12969 #define HAVE_CRYPTO_LOCK 1
12970 _ACEOF
12973 done
12976 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
12978 elif test "$with_ssl" != no ; then
12979 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
12983 if test "$with_pam" = yes ; then
12984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12985 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12986 if ${ac_cv_lib_pam_pam_start+:} false; then :
12987 $as_echo_n "(cached) " >&6
12988 else
12989 ac_check_lib_save_LIBS=$LIBS
12990 LIBS="-lpam $LIBS"
12991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12992 /* end confdefs.h. */
12994 /* Override any GCC internal prototype to avoid an error.
12995 Use char because int might match the return type of a GCC
12996 builtin and then its argument prototype would still apply. */
12997 #ifdef __cplusplus
12998 extern "C"
12999 #endif
13000 char pam_start ();
13002 main ()
13004 return pam_start ();
13006 return 0;
13008 _ACEOF
13009 if ac_fn_c_try_link "$LINENO"; then :
13010 ac_cv_lib_pam_pam_start=yes
13011 else
13012 ac_cv_lib_pam_pam_start=no
13014 rm -f core conftest.err conftest.$ac_objext \
13015 conftest$ac_exeext conftest.$ac_ext
13016 LIBS=$ac_check_lib_save_LIBS
13018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
13019 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
13020 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
13021 cat >>confdefs.h <<_ACEOF
13022 #define HAVE_LIBPAM 1
13023 _ACEOF
13025 LIBS="-lpam $LIBS"
13027 else
13028 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
13033 if test "$with_libxml" = yes ; then
13034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
13035 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
13036 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
13037 $as_echo_n "(cached) " >&6
13038 else
13039 ac_check_lib_save_LIBS=$LIBS
13040 LIBS="-lxml2 $LIBS"
13041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13042 /* end confdefs.h. */
13044 /* Override any GCC internal prototype to avoid an error.
13045 Use char because int might match the return type of a GCC
13046 builtin and then its argument prototype would still apply. */
13047 #ifdef __cplusplus
13048 extern "C"
13049 #endif
13050 char xmlSaveToBuffer ();
13052 main ()
13054 return xmlSaveToBuffer ();
13056 return 0;
13058 _ACEOF
13059 if ac_fn_c_try_link "$LINENO"; then :
13060 ac_cv_lib_xml2_xmlSaveToBuffer=yes
13061 else
13062 ac_cv_lib_xml2_xmlSaveToBuffer=no
13064 rm -f core conftest.err conftest.$ac_objext \
13065 conftest$ac_exeext conftest.$ac_ext
13066 LIBS=$ac_check_lib_save_LIBS
13068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
13069 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
13070 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
13071 cat >>confdefs.h <<_ACEOF
13072 #define HAVE_LIBXML2 1
13073 _ACEOF
13075 LIBS="-lxml2 $LIBS"
13077 else
13078 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
13083 if test "$with_libxslt" = yes ; then
13084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
13085 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
13086 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
13087 $as_echo_n "(cached) " >&6
13088 else
13089 ac_check_lib_save_LIBS=$LIBS
13090 LIBS="-lxslt $LIBS"
13091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13092 /* end confdefs.h. */
13094 /* Override any GCC internal prototype to avoid an error.
13095 Use char because int might match the return type of a GCC
13096 builtin and then its argument prototype would still apply. */
13097 #ifdef __cplusplus
13098 extern "C"
13099 #endif
13100 char xsltCleanupGlobals ();
13102 main ()
13104 return xsltCleanupGlobals ();
13106 return 0;
13108 _ACEOF
13109 if ac_fn_c_try_link "$LINENO"; then :
13110 ac_cv_lib_xslt_xsltCleanupGlobals=yes
13111 else
13112 ac_cv_lib_xslt_xsltCleanupGlobals=no
13114 rm -f core conftest.err conftest.$ac_objext \
13115 conftest$ac_exeext conftest.$ac_ext
13116 LIBS=$ac_check_lib_save_LIBS
13118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
13119 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
13120 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
13121 cat >>confdefs.h <<_ACEOF
13122 #define HAVE_LIBXSLT 1
13123 _ACEOF
13125 LIBS="-lxslt $LIBS"
13127 else
13128 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
13133 if test "$with_lz4" = yes ; then
13134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
13135 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
13136 if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
13137 $as_echo_n "(cached) " >&6
13138 else
13139 ac_check_lib_save_LIBS=$LIBS
13140 LIBS="-llz4 $LIBS"
13141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13142 /* end confdefs.h. */
13144 /* Override any GCC internal prototype to avoid an error.
13145 Use char because int might match the return type of a GCC
13146 builtin and then its argument prototype would still apply. */
13147 #ifdef __cplusplus
13148 extern "C"
13149 #endif
13150 char LZ4_compress_default ();
13152 main ()
13154 return LZ4_compress_default ();
13156 return 0;
13158 _ACEOF
13159 if ac_fn_c_try_link "$LINENO"; then :
13160 ac_cv_lib_lz4_LZ4_compress_default=yes
13161 else
13162 ac_cv_lib_lz4_LZ4_compress_default=no
13164 rm -f core conftest.err conftest.$ac_objext \
13165 conftest$ac_exeext conftest.$ac_ext
13166 LIBS=$ac_check_lib_save_LIBS
13168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5
13169 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
13170 if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
13171 cat >>confdefs.h <<_ACEOF
13172 #define HAVE_LIBLZ4 1
13173 _ACEOF
13175 LIBS="-llz4 $LIBS"
13177 else
13178 as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
13183 if test "$with_zstd" = yes ; then
13184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5
13185 $as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; }
13186 if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then :
13187 $as_echo_n "(cached) " >&6
13188 else
13189 ac_check_lib_save_LIBS=$LIBS
13190 LIBS="-lzstd $LIBS"
13191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13192 /* end confdefs.h. */
13194 /* Override any GCC internal prototype to avoid an error.
13195 Use char because int might match the return type of a GCC
13196 builtin and then its argument prototype would still apply. */
13197 #ifdef __cplusplus
13198 extern "C"
13199 #endif
13200 char ZSTD_compress ();
13202 main ()
13204 return ZSTD_compress ();
13206 return 0;
13208 _ACEOF
13209 if ac_fn_c_try_link "$LINENO"; then :
13210 ac_cv_lib_zstd_ZSTD_compress=yes
13211 else
13212 ac_cv_lib_zstd_ZSTD_compress=no
13214 rm -f core conftest.err conftest.$ac_objext \
13215 conftest$ac_exeext conftest.$ac_ext
13216 LIBS=$ac_check_lib_save_LIBS
13218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5
13219 $as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; }
13220 if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then :
13221 cat >>confdefs.h <<_ACEOF
13222 #define HAVE_LIBZSTD 1
13223 _ACEOF
13225 LIBS="-lzstd $LIBS"
13227 else
13228 as_fn_error $? "library 'zstd' is required for ZSTD support" "$LINENO" 5
13233 # Note: We can test for libldap_r only after we know PTHREAD_LIBS;
13234 # also, on AIX, we may need to have openssl in LIBS for this step.
13235 if test "$with_ldap" = yes ; then
13236 _LIBS="$LIBS"
13237 if test "$PORTNAME" != "win32"; then
13238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
13239 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
13240 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
13241 $as_echo_n "(cached) " >&6
13242 else
13243 ac_check_lib_save_LIBS=$LIBS
13244 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
13245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13246 /* end confdefs.h. */
13248 /* Override any GCC internal prototype to avoid an error.
13249 Use char because int might match the return type of a GCC
13250 builtin and then its argument prototype would still apply. */
13251 #ifdef __cplusplus
13252 extern "C"
13253 #endif
13254 char ldap_bind ();
13256 main ()
13258 return ldap_bind ();
13260 return 0;
13262 _ACEOF
13263 if ac_fn_c_try_link "$LINENO"; then :
13264 ac_cv_lib_ldap_ldap_bind=yes
13265 else
13266 ac_cv_lib_ldap_ldap_bind=no
13268 rm -f core conftest.err conftest.$ac_objext \
13269 conftest$ac_exeext conftest.$ac_ext
13270 LIBS=$ac_check_lib_save_LIBS
13272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
13273 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
13274 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
13275 cat >>confdefs.h <<_ACEOF
13276 #define HAVE_LIBLDAP 1
13277 _ACEOF
13279 LIBS="-lldap $LIBS"
13281 else
13282 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
13285 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
13286 # This test is carried out against libldap.
13287 for ac_func in ldap_initialize
13288 do :
13289 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
13290 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
13291 cat >>confdefs.h <<_ACEOF
13292 #define HAVE_LDAP_INITIALIZE 1
13293 _ACEOF
13296 done
13298 # The separate ldap_r library only exists in OpenLDAP < 2.5, and if we
13299 # have 2.5 or later, we shouldn't even probe for ldap_r (we might find a
13300 # library from a separate OpenLDAP installation). The most reliable
13301 # way to check that is to check for a function introduced in 2.5.
13302 ac_fn_c_check_func "$LINENO" "ldap_verify_credentials" "ac_cv_func_ldap_verify_credentials"
13303 if test "x$ac_cv_func_ldap_verify_credentials" = xyes; then :
13304 thread_safe_libldap=yes
13305 else
13306 thread_safe_libldap=no
13309 if test "$enable_thread_safety" = yes -a "$thread_safe_libldap" = no; then
13310 # Use ldap_r for FE if available, else assume ldap is thread-safe.
13311 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
13312 LIBS="$_LIBS"
13313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
13314 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
13315 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
13316 $as_echo_n "(cached) " >&6
13317 else
13318 ac_check_lib_save_LIBS=$LIBS
13319 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
13320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13321 /* end confdefs.h. */
13323 /* Override any GCC internal prototype to avoid an error.
13324 Use char because int might match the return type of a GCC
13325 builtin and then its argument prototype would still apply. */
13326 #ifdef __cplusplus
13327 extern "C"
13328 #endif
13329 char ldap_bind ();
13331 main ()
13333 return ldap_bind ();
13335 return 0;
13337 _ACEOF
13338 if ac_fn_c_try_link "$LINENO"; then :
13339 ac_cv_lib_ldap_r_ldap_bind=yes
13340 else
13341 ac_cv_lib_ldap_r_ldap_bind=no
13343 rm -f core conftest.err conftest.$ac_objext \
13344 conftest$ac_exeext conftest.$ac_ext
13345 LIBS=$ac_check_lib_save_LIBS
13347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
13348 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
13349 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
13350 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
13351 else
13352 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13355 else
13356 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13358 else
13359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
13360 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
13361 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
13362 $as_echo_n "(cached) " >&6
13363 else
13364 ac_check_lib_save_LIBS=$LIBS
13365 LIBS="-lwldap32 $LIBS"
13366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13367 /* end confdefs.h. */
13369 /* Override any GCC internal prototype to avoid an error.
13370 Use char because int might match the return type of a GCC
13371 builtin and then its argument prototype would still apply. */
13372 #ifdef __cplusplus
13373 extern "C"
13374 #endif
13375 char ldap_bind ();
13377 main ()
13379 return ldap_bind ();
13381 return 0;
13383 _ACEOF
13384 if ac_fn_c_try_link "$LINENO"; then :
13385 ac_cv_lib_wldap32_ldap_bind=yes
13386 else
13387 ac_cv_lib_wldap32_ldap_bind=no
13389 rm -f core conftest.err conftest.$ac_objext \
13390 conftest$ac_exeext conftest.$ac_ext
13391 LIBS=$ac_check_lib_save_LIBS
13393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
13394 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
13395 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
13396 cat >>confdefs.h <<_ACEOF
13397 #define HAVE_LIBWLDAP32 1
13398 _ACEOF
13400 LIBS="-lwldap32 $LIBS"
13402 else
13403 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13406 LDAP_LIBS_FE="-lwldap32"
13407 LDAP_LIBS_BE="-lwldap32"
13409 LIBS="$_LIBS"
13414 # for contrib/sepgsql
13415 if test "$with_selinux" = yes; then
13416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
13417 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
13418 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
13419 $as_echo_n "(cached) " >&6
13420 else
13421 ac_check_lib_save_LIBS=$LIBS
13422 LIBS="-lselinux $LIBS"
13423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13424 /* end confdefs.h. */
13426 /* Override any GCC internal prototype to avoid an error.
13427 Use char because int might match the return type of a GCC
13428 builtin and then its argument prototype would still apply. */
13429 #ifdef __cplusplus
13430 extern "C"
13431 #endif
13432 char security_compute_create_name ();
13434 main ()
13436 return security_compute_create_name ();
13438 return 0;
13440 _ACEOF
13441 if ac_fn_c_try_link "$LINENO"; then :
13442 ac_cv_lib_selinux_security_compute_create_name=yes
13443 else
13444 ac_cv_lib_selinux_security_compute_create_name=no
13446 rm -f core conftest.err conftest.$ac_objext \
13447 conftest$ac_exeext conftest.$ac_ext
13448 LIBS=$ac_check_lib_save_LIBS
13450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
13451 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
13452 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
13453 cat >>confdefs.h <<_ACEOF
13454 #define HAVE_LIBSELINUX 1
13455 _ACEOF
13457 LIBS="-lselinux $LIBS"
13459 else
13460 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
13465 # for contrib/uuid-ossp
13466 if test "$with_uuid" = bsd ; then
13467 # On BSD, the UUID functions are in libc
13468 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
13469 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
13470 UUID_LIBS=""
13471 else
13472 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
13475 elif test "$with_uuid" = e2fs ; then
13476 # On macOS, the UUID functions are in libc
13477 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
13478 if test "x$ac_cv_func_uuid_generate" = xyes; then :
13479 UUID_LIBS=""
13480 else
13481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
13482 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
13483 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
13484 $as_echo_n "(cached) " >&6
13485 else
13486 ac_check_lib_save_LIBS=$LIBS
13487 LIBS="-luuid $LIBS"
13488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13489 /* end confdefs.h. */
13491 /* Override any GCC internal prototype to avoid an error.
13492 Use char because int might match the return type of a GCC
13493 builtin and then its argument prototype would still apply. */
13494 #ifdef __cplusplus
13495 extern "C"
13496 #endif
13497 char uuid_generate ();
13499 main ()
13501 return uuid_generate ();
13503 return 0;
13505 _ACEOF
13506 if ac_fn_c_try_link "$LINENO"; then :
13507 ac_cv_lib_uuid_uuid_generate=yes
13508 else
13509 ac_cv_lib_uuid_uuid_generate=no
13511 rm -f core conftest.err conftest.$ac_objext \
13512 conftest$ac_exeext conftest.$ac_ext
13513 LIBS=$ac_check_lib_save_LIBS
13515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13516 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13517 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13518 UUID_LIBS="-luuid"
13519 else
13520 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13525 elif test "$with_uuid" = ossp ; then
13526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13527 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13528 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13529 $as_echo_n "(cached) " >&6
13530 else
13531 ac_check_lib_save_LIBS=$LIBS
13532 LIBS="-lossp-uuid $LIBS"
13533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13534 /* end confdefs.h. */
13536 /* Override any GCC internal prototype to avoid an error.
13537 Use char because int might match the return type of a GCC
13538 builtin and then its argument prototype would still apply. */
13539 #ifdef __cplusplus
13540 extern "C"
13541 #endif
13542 char uuid_export ();
13544 main ()
13546 return uuid_export ();
13548 return 0;
13550 _ACEOF
13551 if ac_fn_c_try_link "$LINENO"; then :
13552 ac_cv_lib_ossp_uuid_uuid_export=yes
13553 else
13554 ac_cv_lib_ossp_uuid_uuid_export=no
13556 rm -f core conftest.err conftest.$ac_objext \
13557 conftest$ac_exeext conftest.$ac_ext
13558 LIBS=$ac_check_lib_save_LIBS
13560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13561 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13562 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13563 UUID_LIBS="-lossp-uuid"
13564 else
13565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13566 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13567 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13568 $as_echo_n "(cached) " >&6
13569 else
13570 ac_check_lib_save_LIBS=$LIBS
13571 LIBS="-luuid $LIBS"
13572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13573 /* end confdefs.h. */
13575 /* Override any GCC internal prototype to avoid an error.
13576 Use char because int might match the return type of a GCC
13577 builtin and then its argument prototype would still apply. */
13578 #ifdef __cplusplus
13579 extern "C"
13580 #endif
13581 char uuid_export ();
13583 main ()
13585 return uuid_export ();
13587 return 0;
13589 _ACEOF
13590 if ac_fn_c_try_link "$LINENO"; then :
13591 ac_cv_lib_uuid_uuid_export=yes
13592 else
13593 ac_cv_lib_uuid_uuid_export=no
13595 rm -f core conftest.err conftest.$ac_objext \
13596 conftest$ac_exeext conftest.$ac_ext
13597 LIBS=$ac_check_lib_save_LIBS
13599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13600 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13601 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13602 UUID_LIBS="-luuid"
13603 else
13604 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13614 ## Header files
13617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13618 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13619 if ${ac_cv_header_stdbool_h+:} false; then :
13620 $as_echo_n "(cached) " >&6
13621 else
13622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13623 /* end confdefs.h. */
13625 #include <stdbool.h>
13626 #ifndef bool
13627 "error: bool is not defined"
13628 #endif
13629 #ifndef false
13630 "error: false is not defined"
13631 #endif
13632 #if false
13633 "error: false is not 0"
13634 #endif
13635 #ifndef true
13636 "error: true is not defined"
13637 #endif
13638 #if true != 1
13639 "error: true is not 1"
13640 #endif
13641 #ifndef __bool_true_false_are_defined
13642 "error: __bool_true_false_are_defined is not defined"
13643 #endif
13645 struct s { _Bool s: 1; _Bool t; } s;
13647 char a[true == 1 ? 1 : -1];
13648 char b[false == 0 ? 1 : -1];
13649 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13650 char d[(bool) 0.5 == true ? 1 : -1];
13651 /* See body of main program for 'e'. */
13652 char f[(_Bool) 0.0 == false ? 1 : -1];
13653 char g[true];
13654 char h[sizeof (_Bool)];
13655 char i[sizeof s.t];
13656 enum { j = false, k = true, l = false * true, m = true * 256 };
13657 /* The following fails for
13658 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13659 _Bool n[m];
13660 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13661 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13662 /* Catch a bug in an HP-UX C compiler. See
13663 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13664 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13666 _Bool q = true;
13667 _Bool *pq = &q;
13670 main ()
13673 bool e = &s;
13674 *pq |= q;
13675 *pq |= ! q;
13676 /* Refer to every declared value, to avoid compiler optimizations. */
13677 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13678 + !m + !n + !o + !p + !q + !pq);
13681 return 0;
13683 _ACEOF
13684 if ac_fn_c_try_compile "$LINENO"; then :
13685 ac_cv_header_stdbool_h=yes
13686 else
13687 ac_cv_header_stdbool_h=no
13689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13692 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13693 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13694 if test "x$ac_cv_type__Bool" = xyes; then :
13696 cat >>confdefs.h <<_ACEOF
13697 #define HAVE__BOOL 1
13698 _ACEOF
13704 if test $ac_cv_header_stdbool_h = yes; then
13706 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13711 for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h sys/epoll.h sys/event.h sys/personality.h sys/prctl.h sys/procctl.h sys/signalfd.h sys/ucred.h termios.h ucred.h
13712 do :
13713 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13714 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13715 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13716 cat >>confdefs.h <<_ACEOF
13717 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13718 _ACEOF
13722 done
13725 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13726 for ac_header in readline/readline.h
13727 do :
13728 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13729 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13730 cat >>confdefs.h <<_ACEOF
13731 #define HAVE_READLINE_READLINE_H 1
13732 _ACEOF
13734 else
13735 for ac_header in readline.h
13736 do :
13737 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13738 if test "x$ac_cv_header_readline_h" = xyes; then :
13739 cat >>confdefs.h <<_ACEOF
13740 #define HAVE_READLINE_H 1
13741 _ACEOF
13743 else
13744 as_fn_error $? "readline header not found
13745 If you have readline already installed, see config.log for details on the
13746 failure. It is possible the compiler isn't looking in the proper directory.
13747 Use --without-readline to disable readline support." "$LINENO" 5
13750 done
13754 done
13756 for ac_header in readline/history.h
13757 do :
13758 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13759 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13760 cat >>confdefs.h <<_ACEOF
13761 #define HAVE_READLINE_HISTORY_H 1
13762 _ACEOF
13764 else
13765 for ac_header in history.h
13766 do :
13767 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13768 if test "x$ac_cv_header_history_h" = xyes; then :
13769 cat >>confdefs.h <<_ACEOF
13770 #define HAVE_HISTORY_H 1
13771 _ACEOF
13773 else
13774 as_fn_error $? "history header not found
13775 If you have readline already installed, see config.log for details on the
13776 failure. It is possible the compiler isn't looking in the proper directory.
13777 Use --without-readline to disable readline support." "$LINENO" 5
13780 done
13784 done
13788 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13789 # Some installations of libedit usurp /usr/include/readline/, which seems
13790 # bad practice, since in combined installations readline will have its headers
13791 # there. We might have to resort to AC_EGREP checks to make sure we found
13792 # the proper header...
13793 for ac_header in editline/readline.h
13794 do :
13795 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13796 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13797 cat >>confdefs.h <<_ACEOF
13798 #define HAVE_EDITLINE_READLINE_H 1
13799 _ACEOF
13801 else
13802 for ac_header in readline.h
13803 do :
13804 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13805 if test "x$ac_cv_header_readline_h" = xyes; then :
13806 cat >>confdefs.h <<_ACEOF
13807 #define HAVE_READLINE_H 1
13808 _ACEOF
13810 else
13811 for ac_header in readline/readline.h
13812 do :
13813 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13814 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13815 cat >>confdefs.h <<_ACEOF
13816 #define HAVE_READLINE_READLINE_H 1
13817 _ACEOF
13819 else
13820 as_fn_error $? "readline header not found
13821 If you have libedit already installed, see config.log for details on the
13822 failure. It is possible the compiler isn't looking in the proper directory.
13823 Use --without-readline to disable libedit support." "$LINENO" 5
13826 done
13830 done
13834 done
13836 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13837 # not be there at all. Hence, don't complain if not found. We must check
13838 # though, since in yet other versions it is an independent header.
13839 for ac_header in editline/history.h
13840 do :
13841 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13842 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13843 cat >>confdefs.h <<_ACEOF
13844 #define HAVE_EDITLINE_HISTORY_H 1
13845 _ACEOF
13847 else
13848 for ac_header in history.h
13849 do :
13850 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13851 if test "x$ac_cv_header_history_h" = xyes; then :
13852 cat >>confdefs.h <<_ACEOF
13853 #define HAVE_HISTORY_H 1
13854 _ACEOF
13856 else
13857 for ac_header in readline/history.h
13858 do :
13859 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13860 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13861 cat >>confdefs.h <<_ACEOF
13862 #define HAVE_READLINE_HISTORY_H 1
13863 _ACEOF
13867 done
13871 done
13875 done
13879 if test "$with_zlib" = yes; then
13880 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13881 if test "x$ac_cv_header_zlib_h" = xyes; then :
13883 else
13884 as_fn_error $? "zlib header not found
13885 If you have zlib already installed, see config.log for details on the
13886 failure. It is possible the compiler isn't looking in the proper directory.
13887 Use --without-zlib to disable zlib support." "$LINENO" 5
13893 if test -z "$LZ4"; then
13894 for ac_prog in lz4
13896 # Extract the first word of "$ac_prog", so it can be a program name with args.
13897 set dummy $ac_prog; ac_word=$2
13898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13899 $as_echo_n "checking for $ac_word... " >&6; }
13900 if ${ac_cv_path_LZ4+:} false; then :
13901 $as_echo_n "(cached) " >&6
13902 else
13903 case $LZ4 in
13904 [\\/]* | ?:[\\/]*)
13905 ac_cv_path_LZ4="$LZ4" # Let the user override the test with a path.
13908 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13909 for as_dir in $PATH
13911 IFS=$as_save_IFS
13912 test -z "$as_dir" && as_dir=.
13913 for ac_exec_ext in '' $ac_executable_extensions; do
13914 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13915 ac_cv_path_LZ4="$as_dir/$ac_word$ac_exec_ext"
13916 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13917 break 2
13919 done
13920 done
13921 IFS=$as_save_IFS
13924 esac
13926 LZ4=$ac_cv_path_LZ4
13927 if test -n "$LZ4"; then
13928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13929 $as_echo "$LZ4" >&6; }
13930 else
13931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13932 $as_echo "no" >&6; }
13936 test -n "$LZ4" && break
13937 done
13939 else
13940 # Report the value of LZ4 in configure's output in all cases.
13941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4" >&5
13942 $as_echo_n "checking for LZ4... " >&6; }
13943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13944 $as_echo "$LZ4" >&6; }
13947 if test "$with_lz4" = yes; then
13948 ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
13949 if test "x$ac_cv_header_lz4_h" = xyes; then :
13951 else
13952 as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
13958 if test -z "$ZSTD"; then
13959 for ac_prog in zstd
13961 # Extract the first word of "$ac_prog", so it can be a program name with args.
13962 set dummy $ac_prog; ac_word=$2
13963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13964 $as_echo_n "checking for $ac_word... " >&6; }
13965 if ${ac_cv_path_ZSTD+:} false; then :
13966 $as_echo_n "(cached) " >&6
13967 else
13968 case $ZSTD in
13969 [\\/]* | ?:[\\/]*)
13970 ac_cv_path_ZSTD="$ZSTD" # Let the user override the test with a path.
13973 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13974 for as_dir in $PATH
13976 IFS=$as_save_IFS
13977 test -z "$as_dir" && as_dir=.
13978 for ac_exec_ext in '' $ac_executable_extensions; do
13979 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13980 ac_cv_path_ZSTD="$as_dir/$ac_word$ac_exec_ext"
13981 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13982 break 2
13984 done
13985 done
13986 IFS=$as_save_IFS
13989 esac
13991 ZSTD=$ac_cv_path_ZSTD
13992 if test -n "$ZSTD"; then
13993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13994 $as_echo "$ZSTD" >&6; }
13995 else
13996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13997 $as_echo "no" >&6; }
14001 test -n "$ZSTD" && break
14002 done
14004 else
14005 # Report the value of ZSTD in configure's output in all cases.
14006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD" >&5
14007 $as_echo_n "checking for ZSTD... " >&6; }
14008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
14009 $as_echo "$ZSTD" >&6; }
14012 if test "$with_zstd" = yes; then
14013 ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default"
14014 if test "x$ac_cv_header_zstd_h" = xyes; then :
14016 else
14017 as_fn_error $? "zstd.h header file is required for ZSTD" "$LINENO" 5
14023 if test "$with_gssapi" = yes ; then
14024 for ac_header in gssapi/gssapi.h
14025 do :
14026 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
14027 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
14028 cat >>confdefs.h <<_ACEOF
14029 #define HAVE_GSSAPI_GSSAPI_H 1
14030 _ACEOF
14032 else
14033 for ac_header in gssapi.h
14034 do :
14035 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
14036 if test "x$ac_cv_header_gssapi_h" = xyes; then :
14037 cat >>confdefs.h <<_ACEOF
14038 #define HAVE_GSSAPI_H 1
14039 _ACEOF
14041 else
14042 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
14045 done
14049 done
14053 if test -z "$OPENSSL"; then
14054 for ac_prog in openssl
14056 # Extract the first word of "$ac_prog", so it can be a program name with args.
14057 set dummy $ac_prog; ac_word=$2
14058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14059 $as_echo_n "checking for $ac_word... " >&6; }
14060 if ${ac_cv_path_OPENSSL+:} false; then :
14061 $as_echo_n "(cached) " >&6
14062 else
14063 case $OPENSSL in
14064 [\\/]* | ?:[\\/]*)
14065 ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a path.
14068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14069 for as_dir in $PATH
14071 IFS=$as_save_IFS
14072 test -z "$as_dir" && as_dir=.
14073 for ac_exec_ext in '' $ac_executable_extensions; do
14074 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14075 ac_cv_path_OPENSSL="$as_dir/$ac_word$ac_exec_ext"
14076 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14077 break 2
14079 done
14080 done
14081 IFS=$as_save_IFS
14084 esac
14086 OPENSSL=$ac_cv_path_OPENSSL
14087 if test -n "$OPENSSL"; then
14088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
14089 $as_echo "$OPENSSL" >&6; }
14090 else
14091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14092 $as_echo "no" >&6; }
14096 test -n "$OPENSSL" && break
14097 done
14099 else
14100 # Report the value of OPENSSL in configure's output in all cases.
14101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
14102 $as_echo_n "checking for OPENSSL... " >&6; }
14103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
14104 $as_echo "$OPENSSL" >&6; }
14107 if test "$with_ssl" = openssl ; then
14108 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
14109 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
14111 else
14112 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
14116 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
14117 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
14119 else
14120 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
14126 if test "$with_pam" = yes ; then
14127 for ac_header in security/pam_appl.h
14128 do :
14129 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
14130 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
14131 cat >>confdefs.h <<_ACEOF
14132 #define HAVE_SECURITY_PAM_APPL_H 1
14133 _ACEOF
14135 else
14136 for ac_header in pam/pam_appl.h
14137 do :
14138 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
14139 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
14140 cat >>confdefs.h <<_ACEOF
14141 #define HAVE_PAM_PAM_APPL_H 1
14142 _ACEOF
14144 else
14145 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
14148 done
14152 done
14156 if test "$with_bsd_auth" = yes ; then
14157 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
14158 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
14160 else
14161 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
14167 if test "$with_systemd" = yes ; then
14168 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
14169 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
14171 else
14172 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
14178 if test "$with_libxml" = yes ; then
14179 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
14180 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
14182 else
14183 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
14189 if test "$with_libxslt" = yes ; then
14190 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
14191 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
14193 else
14194 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
14200 if test "$with_ldap" = yes ; then
14201 if test "$PORTNAME" != "win32"; then
14202 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
14203 if test "x$ac_cv_header_ldap_h" = xyes; then :
14205 else
14206 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
14210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
14211 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
14212 if ${pgac_cv_ldap_safe+:} false; then :
14213 $as_echo_n "(cached) " >&6
14214 else
14215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14216 /* end confdefs.h. */
14217 #include <ldap.h>
14218 #if !defined(LDAP_VENDOR_VERSION) || \
14219 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
14220 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
14221 choke me
14222 #endif
14224 main ()
14228 return 0;
14230 _ACEOF
14231 if ac_fn_c_try_compile "$LINENO"; then :
14232 pgac_cv_ldap_safe=yes
14233 else
14234 pgac_cv_ldap_safe=no
14236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
14239 $as_echo "$pgac_cv_ldap_safe" >&6; }
14241 if test "$pgac_cv_ldap_safe" != yes; then
14242 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14243 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14244 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14245 *** also uses LDAP will crash on exit." >&5
14246 $as_echo "$as_me: WARNING:
14247 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14248 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14249 *** also uses LDAP will crash on exit." >&2;}
14251 else
14252 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
14253 #include <windows.h>
14256 if test "x$ac_cv_header_winldap_h" = xyes; then :
14258 else
14259 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
14266 if test "$with_bonjour" = yes ; then
14267 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
14268 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
14270 else
14271 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
14277 # for contrib/uuid-ossp
14278 if test "$with_uuid" = bsd ; then
14279 for ac_header in uuid.h
14280 do :
14281 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14282 if test "x$ac_cv_header_uuid_h" = xyes; then :
14283 cat >>confdefs.h <<_ACEOF
14284 #define HAVE_UUID_H 1
14285 _ACEOF
14286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14287 /* end confdefs.h. */
14288 #include <uuid.h>
14290 _ACEOF
14291 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14292 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
14294 else
14295 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
14297 rm -f conftest*
14299 else
14300 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
14303 done
14305 elif test "$with_uuid" = e2fs ; then
14306 for ac_header in uuid/uuid.h
14307 do :
14308 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
14309 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
14310 cat >>confdefs.h <<_ACEOF
14311 #define HAVE_UUID_UUID_H 1
14312 _ACEOF
14313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14314 /* end confdefs.h. */
14315 #include <uuid/uuid.h>
14317 _ACEOF
14318 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14319 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14321 else
14322 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
14324 rm -f conftest*
14326 else
14327 for ac_header in uuid.h
14328 do :
14329 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14330 if test "x$ac_cv_header_uuid_h" = xyes; then :
14331 cat >>confdefs.h <<_ACEOF
14332 #define HAVE_UUID_H 1
14333 _ACEOF
14334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14335 /* end confdefs.h. */
14336 #include <uuid.h>
14338 _ACEOF
14339 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14340 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14342 else
14343 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
14345 rm -f conftest*
14347 else
14348 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
14351 done
14355 done
14357 elif test "$with_uuid" = ossp ; then
14358 for ac_header in ossp/uuid.h
14359 do :
14360 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
14361 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
14362 cat >>confdefs.h <<_ACEOF
14363 #define HAVE_OSSP_UUID_H 1
14364 _ACEOF
14365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14366 /* end confdefs.h. */
14367 #include <ossp/uuid.h>
14369 _ACEOF
14370 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14371 $EGREP "uuid_export" >/dev/null 2>&1; then :
14373 else
14374 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
14376 rm -f conftest*
14378 else
14379 for ac_header in uuid.h
14380 do :
14381 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14382 if test "x$ac_cv_header_uuid_h" = xyes; then :
14383 cat >>confdefs.h <<_ACEOF
14384 #define HAVE_UUID_H 1
14385 _ACEOF
14386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14387 /* end confdefs.h. */
14388 #include <uuid.h>
14390 _ACEOF
14391 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14392 $EGREP "uuid_export" >/dev/null 2>&1; then :
14394 else
14395 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
14397 rm -f conftest*
14399 else
14400 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
14403 done
14407 done
14411 if test "$PORTNAME" = "win32" ; then
14412 for ac_header in crtdefs.h
14413 do :
14414 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
14415 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
14416 cat >>confdefs.h <<_ACEOF
14417 #define HAVE_CRTDEFS_H 1
14418 _ACEOF
14422 done
14427 ## Types, structures, compiler characteristics
14430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14431 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14432 if ${ac_cv_c_bigendian+:} false; then :
14433 $as_echo_n "(cached) " >&6
14434 else
14435 ac_cv_c_bigendian=unknown
14436 # See if we're dealing with a universal compiler.
14437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14438 /* end confdefs.h. */
14439 #ifndef __APPLE_CC__
14440 not a universal capable compiler
14441 #endif
14442 typedef int dummy;
14444 _ACEOF
14445 if ac_fn_c_try_compile "$LINENO"; then :
14447 # Check for potential -arch flags. It is not universal unless
14448 # there are at least two -arch flags with different values.
14449 ac_arch=
14450 ac_prev=
14451 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14452 if test -n "$ac_prev"; then
14453 case $ac_word in
14454 i?86 | x86_64 | ppc | ppc64)
14455 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14456 ac_arch=$ac_word
14457 else
14458 ac_cv_c_bigendian=universal
14459 break
14462 esac
14463 ac_prev=
14464 elif test "x$ac_word" = "x-arch"; then
14465 ac_prev=arch
14467 done
14469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14470 if test $ac_cv_c_bigendian = unknown; then
14471 # See if sys/param.h defines the BYTE_ORDER macro.
14472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14473 /* end confdefs.h. */
14474 #include <sys/types.h>
14475 #include <sys/param.h>
14478 main ()
14480 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14481 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14482 && LITTLE_ENDIAN)
14483 bogus endian macros
14484 #endif
14487 return 0;
14489 _ACEOF
14490 if ac_fn_c_try_compile "$LINENO"; then :
14491 # It does; now see whether it defined to BIG_ENDIAN or not.
14492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14493 /* end confdefs.h. */
14494 #include <sys/types.h>
14495 #include <sys/param.h>
14498 main ()
14500 #if BYTE_ORDER != BIG_ENDIAN
14501 not big endian
14502 #endif
14505 return 0;
14507 _ACEOF
14508 if ac_fn_c_try_compile "$LINENO"; then :
14509 ac_cv_c_bigendian=yes
14510 else
14511 ac_cv_c_bigendian=no
14513 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14517 if test $ac_cv_c_bigendian = unknown; then
14518 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14520 /* end confdefs.h. */
14521 #include <limits.h>
14524 main ()
14526 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14527 bogus endian macros
14528 #endif
14531 return 0;
14533 _ACEOF
14534 if ac_fn_c_try_compile "$LINENO"; then :
14535 # It does; now see whether it defined to _BIG_ENDIAN or not.
14536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14537 /* end confdefs.h. */
14538 #include <limits.h>
14541 main ()
14543 #ifndef _BIG_ENDIAN
14544 not big endian
14545 #endif
14548 return 0;
14550 _ACEOF
14551 if ac_fn_c_try_compile "$LINENO"; then :
14552 ac_cv_c_bigendian=yes
14553 else
14554 ac_cv_c_bigendian=no
14556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14560 if test $ac_cv_c_bigendian = unknown; then
14561 # Compile a test program.
14562 if test "$cross_compiling" = yes; then :
14563 # Try to guess by grepping values from an object file.
14564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14565 /* end confdefs.h. */
14566 short int ascii_mm[] =
14567 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14568 short int ascii_ii[] =
14569 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14570 int use_ascii (int i) {
14571 return ascii_mm[i] + ascii_ii[i];
14573 short int ebcdic_ii[] =
14574 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14575 short int ebcdic_mm[] =
14576 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14577 int use_ebcdic (int i) {
14578 return ebcdic_mm[i] + ebcdic_ii[i];
14580 extern int foo;
14583 main ()
14585 return use_ascii (foo) == use_ebcdic (foo);
14587 return 0;
14589 _ACEOF
14590 if ac_fn_c_try_compile "$LINENO"; then :
14591 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14592 ac_cv_c_bigendian=yes
14594 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14595 if test "$ac_cv_c_bigendian" = unknown; then
14596 ac_cv_c_bigendian=no
14597 else
14598 # finding both strings is unlikely to happen, but who knows?
14599 ac_cv_c_bigendian=unknown
14603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14604 else
14605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14606 /* end confdefs.h. */
14607 $ac_includes_default
14609 main ()
14612 /* Are we little or big endian? From Harbison&Steele. */
14613 union
14615 long int l;
14616 char c[sizeof (long int)];
14617 } u;
14618 u.l = 1;
14619 return u.c[sizeof (long int) - 1] == 1;
14622 return 0;
14624 _ACEOF
14625 if ac_fn_c_try_run "$LINENO"; then :
14626 ac_cv_c_bigendian=no
14627 else
14628 ac_cv_c_bigendian=yes
14630 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14631 conftest.$ac_objext conftest.beam conftest.$ac_ext
14636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14637 $as_echo "$ac_cv_c_bigendian" >&6; }
14638 case $ac_cv_c_bigendian in #(
14639 yes)
14640 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14641 ;; #(
14643 ;; #(
14644 universal)
14646 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14648 ;; #(
14650 as_fn_error $? "unknown endianness
14651 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14652 esac
14654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14655 $as_echo_n "checking for inline... " >&6; }
14656 if ${ac_cv_c_inline+:} false; then :
14657 $as_echo_n "(cached) " >&6
14658 else
14659 ac_cv_c_inline=no
14660 for ac_kw in inline __inline__ __inline; do
14661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14662 /* end confdefs.h. */
14663 #ifndef __cplusplus
14664 typedef int foo_t;
14665 static $ac_kw foo_t static_foo () {return 0; }
14666 $ac_kw foo_t foo () {return 0; }
14667 #endif
14669 _ACEOF
14670 if ac_fn_c_try_compile "$LINENO"; then :
14671 ac_cv_c_inline=$ac_kw
14673 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14674 test "$ac_cv_c_inline" != no && break
14675 done
14678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14679 $as_echo "$ac_cv_c_inline" >&6; }
14681 case $ac_cv_c_inline in
14682 inline | yes) ;;
14684 case $ac_cv_c_inline in
14685 no) ac_val=;;
14686 *) ac_val=$ac_cv_c_inline;;
14687 esac
14688 cat >>confdefs.h <<_ACEOF
14689 #ifndef __cplusplus
14690 #define inline $ac_val
14691 #endif
14692 _ACEOF
14694 esac
14696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14697 $as_echo_n "checking for printf format archetype... " >&6; }
14698 if ${pgac_cv_printf_archetype+:} false; then :
14699 $as_echo_n "(cached) " >&6
14700 else
14701 pgac_cv_printf_archetype=gnu_printf
14702 ac_save_c_werror_flag=$ac_c_werror_flag
14703 ac_c_werror_flag=yes
14704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14705 /* end confdefs.h. */
14706 extern void pgac_write(int ignore, const char *fmt,...)
14707 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14709 main ()
14711 pgac_write(0, "error %s: %m", "foo");
14713 return 0;
14715 _ACEOF
14716 if ac_fn_c_try_compile "$LINENO"; then :
14717 ac_archetype_ok=yes
14718 else
14719 ac_archetype_ok=no
14721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14722 ac_c_werror_flag=$ac_save_c_werror_flag
14724 if [ "$ac_archetype_ok" = no ]; then
14725 pgac_cv_printf_archetype=__syslog__
14726 ac_save_c_werror_flag=$ac_c_werror_flag
14727 ac_c_werror_flag=yes
14728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14729 /* end confdefs.h. */
14730 extern void pgac_write(int ignore, const char *fmt,...)
14731 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14733 main ()
14735 pgac_write(0, "error %s: %m", "foo");
14737 return 0;
14739 _ACEOF
14740 if ac_fn_c_try_compile "$LINENO"; then :
14741 ac_archetype_ok=yes
14742 else
14743 ac_archetype_ok=no
14745 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14746 ac_c_werror_flag=$ac_save_c_werror_flag
14748 if [ "$ac_archetype_ok" = no ]; then
14749 pgac_cv_printf_archetype=printf
14753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14754 $as_echo "$pgac_cv_printf_archetype" >&6; }
14756 cat >>confdefs.h <<_ACEOF
14757 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14758 _ACEOF
14761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14762 $as_echo_n "checking for _Static_assert... " >&6; }
14763 if ${pgac_cv__static_assert+:} false; then :
14764 $as_echo_n "(cached) " >&6
14765 else
14766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14767 /* end confdefs.h. */
14770 main ()
14772 ({ _Static_assert(1, "foo"); })
14774 return 0;
14776 _ACEOF
14777 if ac_fn_c_try_link "$LINENO"; then :
14778 pgac_cv__static_assert=yes
14779 else
14780 pgac_cv__static_assert=no
14782 rm -f core conftest.err conftest.$ac_objext \
14783 conftest$ac_exeext conftest.$ac_ext
14785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14786 $as_echo "$pgac_cv__static_assert" >&6; }
14787 if test x"$pgac_cv__static_assert" = xyes ; then
14789 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14793 $as_echo_n "checking for typeof... " >&6; }
14794 if ${pgac_cv_c_typeof+:} false; then :
14795 $as_echo_n "(cached) " >&6
14796 else
14797 pgac_cv_c_typeof=no
14798 for pgac_kw in typeof __typeof__ decltype; do
14799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14800 /* end confdefs.h. */
14803 main ()
14805 int x = 0;
14806 $pgac_kw(x) y;
14807 y = x;
14808 return y;
14810 return 0;
14812 _ACEOF
14813 if ac_fn_c_try_compile "$LINENO"; then :
14814 pgac_cv_c_typeof=$pgac_kw
14816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14817 test "$pgac_cv_c_typeof" != no && break
14818 done
14820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14821 $as_echo "$pgac_cv_c_typeof" >&6; }
14822 if test "$pgac_cv_c_typeof" != no; then
14824 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14826 if test "$pgac_cv_c_typeof" != typeof; then
14828 cat >>confdefs.h <<_ACEOF
14829 #define typeof $pgac_cv_c_typeof
14830 _ACEOF
14834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14835 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14836 if ${pgac_cv__types_compatible+:} false; then :
14837 $as_echo_n "(cached) " >&6
14838 else
14839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14840 /* end confdefs.h. */
14843 main ()
14845 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14847 return 0;
14849 _ACEOF
14850 if ac_fn_c_try_compile "$LINENO"; then :
14851 pgac_cv__types_compatible=yes
14852 else
14853 pgac_cv__types_compatible=no
14855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14858 $as_echo "$pgac_cv__types_compatible" >&6; }
14859 if test x"$pgac_cv__types_compatible" = xyes ; then
14861 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14865 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14866 if ${pgac_cv__builtin_constant_p+:} false; then :
14867 $as_echo_n "(cached) " >&6
14868 else
14869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14870 /* end confdefs.h. */
14871 static int x;
14872 static int y[__builtin_constant_p(x) ? x : 1];
14873 static int z[__builtin_constant_p("string literal") ? 1 : x];
14876 _ACEOF
14877 if ac_fn_c_try_compile "$LINENO"; then :
14878 pgac_cv__builtin_constant_p=yes
14879 else
14880 pgac_cv__builtin_constant_p=no
14882 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14885 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14886 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14888 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14892 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14893 if ${pgac_cv__builtin_unreachable+:} false; then :
14894 $as_echo_n "(cached) " >&6
14895 else
14896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14897 /* end confdefs.h. */
14900 main ()
14902 __builtin_unreachable();
14904 return 0;
14906 _ACEOF
14907 if ac_fn_c_try_link "$LINENO"; then :
14908 pgac_cv__builtin_unreachable=yes
14909 else
14910 pgac_cv__builtin_unreachable=no
14912 rm -f core conftest.err conftest.$ac_objext \
14913 conftest$ac_exeext conftest.$ac_ext
14915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14916 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14917 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14919 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14923 $as_echo_n "checking for computed goto support... " >&6; }
14924 if ${pgac_cv_computed_goto+:} false; then :
14925 $as_echo_n "(cached) " >&6
14926 else
14927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14928 /* end confdefs.h. */
14931 main ()
14933 void *labeladdrs[] = {&&my_label};
14934 goto *labeladdrs[0];
14935 my_label:
14936 return 1;
14939 return 0;
14941 _ACEOF
14942 if ac_fn_c_try_compile "$LINENO"; then :
14943 pgac_cv_computed_goto=yes
14944 else
14945 pgac_cv_computed_goto=no
14947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14950 $as_echo "$pgac_cv_computed_goto" >&6; }
14951 if test x"$pgac_cv_computed_goto" = xyes ; then
14953 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14956 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14957 #include <time.h>
14960 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14962 cat >>confdefs.h <<_ACEOF
14963 #define HAVE_STRUCT_TM_TM_ZONE 1
14964 _ACEOF
14970 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14971 #include <sys/ipc.h>
14972 #include <sys/sem.h>
14975 if test "x$ac_cv_type_union_semun" = xyes; then :
14977 cat >>confdefs.h <<_ACEOF
14978 #define HAVE_UNION_SEMUN 1
14979 _ACEOF
14984 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/socket.h>
14986 if test "x$ac_cv_type_socklen_t" = xyes; then :
14988 cat >>confdefs.h <<_ACEOF
14989 #define HAVE_SOCKLEN_T 1
14990 _ACEOF
14995 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14996 #include <sys/socket.h>
14999 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
15001 cat >>confdefs.h <<_ACEOF
15002 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
15003 _ACEOF
15009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
15010 $as_echo_n "checking for locale_t... " >&6; }
15011 if ${pgac_cv_type_locale_t+:} false; then :
15012 $as_echo_n "(cached) " >&6
15013 else
15014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15015 /* end confdefs.h. */
15016 #include <locale.h>
15017 locale_t x;
15019 main ()
15023 return 0;
15025 _ACEOF
15026 if ac_fn_c_try_compile "$LINENO"; then :
15027 pgac_cv_type_locale_t=yes
15028 else
15029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15030 /* end confdefs.h. */
15031 #include <xlocale.h>
15032 locale_t x;
15034 main ()
15038 return 0;
15040 _ACEOF
15041 if ac_fn_c_try_compile "$LINENO"; then :
15042 pgac_cv_type_locale_t='yes (in xlocale.h)'
15043 else
15044 pgac_cv_type_locale_t=no
15046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
15051 $as_echo "$pgac_cv_type_locale_t" >&6; }
15052 if test "$pgac_cv_type_locale_t" != no; then
15054 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
15057 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
15059 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
15063 # MSVC doesn't cope well with defining restrict to __restrict, the
15064 # spelling it understands, because it conflicts with
15065 # __declspec(restrict). Therefore we define pg_restrict to the
15066 # appropriate definition, which presumably won't conflict.
15068 # Allow platforms with buggy compilers to force restrict to not be
15069 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
15070 # template.
15071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
15072 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
15073 if ${ac_cv_c_restrict+:} false; then :
15074 $as_echo_n "(cached) " >&6
15075 else
15076 ac_cv_c_restrict=no
15077 # The order here caters to the fact that C++ does not require restrict.
15078 for ac_kw in __restrict __restrict__ _Restrict restrict; do
15079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15080 /* end confdefs.h. */
15081 typedef int * int_ptr;
15082 int foo (int_ptr $ac_kw ip) {
15083 return ip[0];
15086 main ()
15088 int s[1];
15089 int * $ac_kw t = s;
15090 t[0] = 0;
15091 return foo(t)
15093 return 0;
15095 _ACEOF
15096 if ac_fn_c_try_compile "$LINENO"; then :
15097 ac_cv_c_restrict=$ac_kw
15099 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15100 test "$ac_cv_c_restrict" != no && break
15101 done
15104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
15105 $as_echo "$ac_cv_c_restrict" >&6; }
15107 case $ac_cv_c_restrict in
15108 restrict) ;;
15109 no) $as_echo "#define restrict /**/" >>confdefs.h
15111 *) cat >>confdefs.h <<_ACEOF
15112 #define restrict $ac_cv_c_restrict
15113 _ACEOF
15115 esac
15117 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
15118 pg_restrict=""
15119 else
15120 pg_restrict="$ac_cv_c_restrict"
15123 cat >>confdefs.h <<_ACEOF
15124 #define pg_restrict $pg_restrict
15125 _ACEOF
15128 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
15129 #include <sys/param.h>
15130 #ifdef HAVE_SYS_UCRED_H
15131 #include <sys/ucred.h>
15132 #endif
15134 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
15136 cat >>confdefs.h <<_ACEOF
15137 #define HAVE_STRUCT_CMSGCRED 1
15138 _ACEOF
15144 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
15145 #include <getopt.h>
15146 #endif
15148 if test "x$ac_cv_type_struct_option" = xyes; then :
15150 cat >>confdefs.h <<_ACEOF
15151 #define HAVE_STRUCT_OPTION 1
15152 _ACEOF
15158 if test "$with_zlib" = yes; then
15159 # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
15160 # did not). While we could work around the lack of z_streamp, it
15161 # seems unwise to encourage people to use such old zlib versions...
15162 ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
15164 if test "x$ac_cv_type_z_streamp" = xyes; then :
15166 else
15167 as_fn_error $? "zlib version is too old
15168 Use --without-zlib to disable zlib support." "$LINENO" 5
15173 case $host_cpu in
15174 x86_64)
15175 # On x86_64, check if we can compile a popcntq instruction
15176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
15177 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
15178 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
15179 $as_echo_n "(cached) " >&6
15180 else
15181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15182 /* end confdefs.h. */
15185 main ()
15187 long long x = 1; long long r;
15188 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
15190 return 0;
15192 _ACEOF
15193 if ac_fn_c_try_compile "$LINENO"; then :
15194 pgac_cv_have_x86_64_popcntq=yes
15195 else
15196 pgac_cv_have_x86_64_popcntq=no
15198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
15201 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
15202 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
15204 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
15208 ppc*|powerpc*)
15209 # On PPC, check if compiler accepts "i"(x) when __builtin_constant_p(x).
15210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
15211 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
15212 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
15213 $as_echo_n "(cached) " >&6
15214 else
15215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15216 /* end confdefs.h. */
15217 static inline int
15218 addi(int ra, int si)
15220 int res = 0;
15221 if (__builtin_constant_p(si))
15222 __asm__ __volatile__(
15223 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
15224 return res;
15226 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
15228 main ()
15232 return 0;
15234 _ACEOF
15235 if ac_fn_c_try_compile "$LINENO"; then :
15236 pgac_cv_have_i_constraint__builtin_constant_p=yes
15237 else
15238 pgac_cv_have_i_constraint__builtin_constant_p=no
15240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
15243 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
15244 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
15246 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
15250 esac
15252 # Check largefile support. You might think this is a system service not a
15253 # compiler characteristic, but you'd be wrong. We must check this before
15254 # probing existence of related functions such as fseeko, since the largefile
15255 # defines can affect what is generated for that.
15256 if test "$PORTNAME" != "win32"; then
15257 # Check whether --enable-largefile was given.
15258 if test "${enable_largefile+set}" = set; then :
15259 enableval=$enable_largefile;
15262 if test "$enable_largefile" != no; then
15264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15265 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15266 if ${ac_cv_sys_largefile_CC+:} false; then :
15267 $as_echo_n "(cached) " >&6
15268 else
15269 ac_cv_sys_largefile_CC=no
15270 if test "$GCC" != yes; then
15271 ac_save_CC=$CC
15272 while :; do
15273 # IRIX 6.2 and later do not support large files by default,
15274 # so use the C compiler's -n32 option if that helps.
15275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15276 /* end confdefs.h. */
15277 #include <sys/types.h>
15278 /* Check that off_t can represent 2**63 - 1 correctly.
15279 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15280 since some C++ compilers masquerading as C compilers
15281 incorrectly reject 9223372036854775807. */
15282 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15283 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15284 && LARGE_OFF_T % 2147483647 == 1)
15285 ? 1 : -1];
15287 main ()
15291 return 0;
15293 _ACEOF
15294 if ac_fn_c_try_compile "$LINENO"; then :
15295 break
15297 rm -f core conftest.err conftest.$ac_objext
15298 CC="$CC -n32"
15299 if ac_fn_c_try_compile "$LINENO"; then :
15300 ac_cv_sys_largefile_CC=' -n32'; break
15302 rm -f core conftest.err conftest.$ac_objext
15303 break
15304 done
15305 CC=$ac_save_CC
15306 rm -f conftest.$ac_ext
15309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15310 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15311 if test "$ac_cv_sys_largefile_CC" != no; then
15312 CC=$CC$ac_cv_sys_largefile_CC
15315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15316 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15317 if ${ac_cv_sys_file_offset_bits+:} false; then :
15318 $as_echo_n "(cached) " >&6
15319 else
15320 while :; do
15321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15322 /* end confdefs.h. */
15323 #include <sys/types.h>
15324 /* Check that off_t can represent 2**63 - 1 correctly.
15325 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15326 since some C++ compilers masquerading as C compilers
15327 incorrectly reject 9223372036854775807. */
15328 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15329 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15330 && LARGE_OFF_T % 2147483647 == 1)
15331 ? 1 : -1];
15333 main ()
15337 return 0;
15339 _ACEOF
15340 if ac_fn_c_try_compile "$LINENO"; then :
15341 ac_cv_sys_file_offset_bits=no; break
15343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15345 /* end confdefs.h. */
15346 #define _FILE_OFFSET_BITS 64
15347 #include <sys/types.h>
15348 /* Check that off_t can represent 2**63 - 1 correctly.
15349 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15350 since some C++ compilers masquerading as C compilers
15351 incorrectly reject 9223372036854775807. */
15352 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15353 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15354 && LARGE_OFF_T % 2147483647 == 1)
15355 ? 1 : -1];
15357 main ()
15361 return 0;
15363 _ACEOF
15364 if ac_fn_c_try_compile "$LINENO"; then :
15365 ac_cv_sys_file_offset_bits=64; break
15367 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15368 ac_cv_sys_file_offset_bits=unknown
15369 break
15370 done
15372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15373 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15374 case $ac_cv_sys_file_offset_bits in #(
15375 no | unknown) ;;
15377 cat >>confdefs.h <<_ACEOF
15378 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15379 _ACEOF
15381 esac
15382 rm -rf conftest*
15383 if test $ac_cv_sys_file_offset_bits = unknown; then
15384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15385 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15386 if ${ac_cv_sys_large_files+:} false; then :
15387 $as_echo_n "(cached) " >&6
15388 else
15389 while :; do
15390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15391 /* end confdefs.h. */
15392 #include <sys/types.h>
15393 /* Check that off_t can represent 2**63 - 1 correctly.
15394 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15395 since some C++ compilers masquerading as C compilers
15396 incorrectly reject 9223372036854775807. */
15397 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15398 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15399 && LARGE_OFF_T % 2147483647 == 1)
15400 ? 1 : -1];
15402 main ()
15406 return 0;
15408 _ACEOF
15409 if ac_fn_c_try_compile "$LINENO"; then :
15410 ac_cv_sys_large_files=no; break
15412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15414 /* end confdefs.h. */
15415 #define _LARGE_FILES 1
15416 #include <sys/types.h>
15417 /* Check that off_t can represent 2**63 - 1 correctly.
15418 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15419 since some C++ compilers masquerading as C compilers
15420 incorrectly reject 9223372036854775807. */
15421 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15422 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15423 && LARGE_OFF_T % 2147483647 == 1)
15424 ? 1 : -1];
15426 main ()
15430 return 0;
15432 _ACEOF
15433 if ac_fn_c_try_compile "$LINENO"; then :
15434 ac_cv_sys_large_files=1; break
15436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15437 ac_cv_sys_large_files=unknown
15438 break
15439 done
15441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15442 $as_echo "$ac_cv_sys_large_files" >&6; }
15443 case $ac_cv_sys_large_files in #(
15444 no | unknown) ;;
15446 cat >>confdefs.h <<_ACEOF
15447 #define _LARGE_FILES $ac_cv_sys_large_files
15448 _ACEOF
15450 esac
15451 rm -rf conftest*
15460 # The cast to long int works around a bug in the HP C Compiler
15461 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15462 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15463 # This bug is HP SR number 8606223364.
15464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15465 $as_echo_n "checking size of off_t... " >&6; }
15466 if ${ac_cv_sizeof_off_t+:} false; then :
15467 $as_echo_n "(cached) " >&6
15468 else
15469 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
15471 else
15472 if test "$ac_cv_type_off_t" = yes; then
15473 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15474 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15475 as_fn_error 77 "cannot compute sizeof (off_t)
15476 See \`config.log' for more details" "$LINENO" 5; }
15477 else
15478 ac_cv_sizeof_off_t=0
15483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15484 $as_echo "$ac_cv_sizeof_off_t" >&6; }
15488 cat >>confdefs.h <<_ACEOF
15489 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15490 _ACEOF
15494 # If we don't have largefile support, can't handle segment size >= 2GB.
15495 if test "$ac_cv_sizeof_off_t" -lt 8; then
15496 if expr $RELSEG_SIZE '*' $blocksize '>=' 2 '*' 1024 '*' 1024; then
15497 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15501 # The cast to long int works around a bug in the HP C Compiler
15502 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15503 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15504 # This bug is HP SR number 8606223364.
15505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
15506 $as_echo_n "checking size of bool... " >&6; }
15507 if ${ac_cv_sizeof_bool+:} false; then :
15508 $as_echo_n "(cached) " >&6
15509 else
15510 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
15511 #include <stdbool.h>
15512 #endif
15513 "; then :
15515 else
15516 if test "$ac_cv_type_bool" = yes; then
15517 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15518 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15519 as_fn_error 77 "cannot compute sizeof (bool)
15520 See \`config.log' for more details" "$LINENO" 5; }
15521 else
15522 ac_cv_sizeof_bool=0
15527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15528 $as_echo "$ac_cv_sizeof_bool" >&6; }
15532 cat >>confdefs.h <<_ACEOF
15533 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15534 _ACEOF
15538 if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
15540 $as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
15546 ## Functions, global variables
15549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15550 $as_echo_n "checking for int timezone... " >&6; }
15551 if ${pgac_cv_var_int_timezone+:} false; then :
15552 $as_echo_n "(cached) " >&6
15553 else
15554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15555 /* end confdefs.h. */
15556 #include <time.h>
15557 int res;
15559 main ()
15561 #ifndef __CYGWIN__
15562 res = timezone / 60;
15563 #else
15564 res = _timezone / 60;
15565 #endif
15567 return 0;
15569 _ACEOF
15570 if ac_fn_c_try_link "$LINENO"; then :
15571 pgac_cv_var_int_timezone=yes
15572 else
15573 pgac_cv_var_int_timezone=no
15575 rm -f core conftest.err conftest.$ac_objext \
15576 conftest$ac_exeext conftest.$ac_ext
15578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15579 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15580 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15582 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15586 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15587 if ${pgac_cv_func_wcstombs_l+:} false; then :
15588 $as_echo_n "(cached) " >&6
15589 else
15590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15591 /* end confdefs.h. */
15592 #include <stdlib.h>
15593 #include <locale.h>
15595 main ()
15597 #ifndef wcstombs_l
15598 (void) wcstombs_l;
15599 #endif
15601 return 0;
15603 _ACEOF
15604 if ac_fn_c_try_compile "$LINENO"; then :
15605 pgac_cv_func_wcstombs_l='yes'
15606 else
15607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15608 /* end confdefs.h. */
15609 #include <stdlib.h>
15610 #include <locale.h>
15611 #include <xlocale.h>
15613 main ()
15615 #ifndef wcstombs_l
15616 (void) wcstombs_l;
15617 #endif
15619 return 0;
15621 _ACEOF
15622 if ac_fn_c_try_compile "$LINENO"; then :
15623 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15624 else
15625 pgac_cv_func_wcstombs_l='no'
15627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15629 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15632 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15633 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15635 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15639 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15640 # symbols that that library has no business exposing to the world. Pending
15641 # acquisition of a clue by those developers, ignore libedit (including its
15642 # possible alias of libreadline) while checking for everything else.
15643 LIBS_including_readline="$LIBS"
15644 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15646 for ac_func in backtrace_symbols copyfile getifaddrs getpeerucred inet_pton kqueue mbstowcs_l memset_s posix_fallocate ppoll pthread_is_threaded_np setproctitle setproctitle_fast strchrnul strsignal syncfs sync_file_range uselocale wcstombs_l
15647 do :
15648 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15649 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15650 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15651 cat >>confdefs.h <<_ACEOF
15652 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15653 _ACEOF
15656 done
15659 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15661 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15662 if ${pgac_cv__builtin_bswap16+:} false; then :
15663 $as_echo_n "(cached) " >&6
15664 else
15665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15666 /* end confdefs.h. */
15669 call__builtin_bswap16(int x)
15671 return __builtin_bswap16(x);
15674 main ()
15678 return 0;
15680 _ACEOF
15681 if ac_fn_c_try_link "$LINENO"; then :
15682 pgac_cv__builtin_bswap16=yes
15683 else
15684 pgac_cv__builtin_bswap16=no
15686 rm -f core conftest.err conftest.$ac_objext \
15687 conftest$ac_exeext conftest.$ac_ext
15689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15690 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15691 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15693 cat >>confdefs.h <<_ACEOF
15694 #define HAVE__BUILTIN_BSWAP16 1
15695 _ACEOF
15698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15699 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15700 if ${pgac_cv__builtin_bswap32+:} false; then :
15701 $as_echo_n "(cached) " >&6
15702 else
15703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15704 /* end confdefs.h. */
15707 call__builtin_bswap32(int x)
15709 return __builtin_bswap32(x);
15712 main ()
15716 return 0;
15718 _ACEOF
15719 if ac_fn_c_try_link "$LINENO"; then :
15720 pgac_cv__builtin_bswap32=yes
15721 else
15722 pgac_cv__builtin_bswap32=no
15724 rm -f core conftest.err conftest.$ac_objext \
15725 conftest$ac_exeext conftest.$ac_ext
15727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15728 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15729 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15731 cat >>confdefs.h <<_ACEOF
15732 #define HAVE__BUILTIN_BSWAP32 1
15733 _ACEOF
15736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15737 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15738 if ${pgac_cv__builtin_bswap64+:} false; then :
15739 $as_echo_n "(cached) " >&6
15740 else
15741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15742 /* end confdefs.h. */
15745 call__builtin_bswap64(long int x)
15747 return __builtin_bswap64(x);
15750 main ()
15754 return 0;
15756 _ACEOF
15757 if ac_fn_c_try_link "$LINENO"; then :
15758 pgac_cv__builtin_bswap64=yes
15759 else
15760 pgac_cv__builtin_bswap64=no
15762 rm -f core conftest.err conftest.$ac_objext \
15763 conftest$ac_exeext conftest.$ac_ext
15765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15766 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15767 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15769 cat >>confdefs.h <<_ACEOF
15770 #define HAVE__BUILTIN_BSWAP64 1
15771 _ACEOF
15774 # We assume that we needn't test all widths of these explicitly:
15775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15776 $as_echo_n "checking for __builtin_clz... " >&6; }
15777 if ${pgac_cv__builtin_clz+:} false; then :
15778 $as_echo_n "(cached) " >&6
15779 else
15780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15781 /* end confdefs.h. */
15784 call__builtin_clz(unsigned int x)
15786 return __builtin_clz(x);
15789 main ()
15793 return 0;
15795 _ACEOF
15796 if ac_fn_c_try_link "$LINENO"; then :
15797 pgac_cv__builtin_clz=yes
15798 else
15799 pgac_cv__builtin_clz=no
15801 rm -f core conftest.err conftest.$ac_objext \
15802 conftest$ac_exeext conftest.$ac_ext
15804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15805 $as_echo "$pgac_cv__builtin_clz" >&6; }
15806 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15808 cat >>confdefs.h <<_ACEOF
15809 #define HAVE__BUILTIN_CLZ 1
15810 _ACEOF
15813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15814 $as_echo_n "checking for __builtin_ctz... " >&6; }
15815 if ${pgac_cv__builtin_ctz+:} false; then :
15816 $as_echo_n "(cached) " >&6
15817 else
15818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15819 /* end confdefs.h. */
15822 call__builtin_ctz(unsigned int x)
15824 return __builtin_ctz(x);
15827 main ()
15831 return 0;
15833 _ACEOF
15834 if ac_fn_c_try_link "$LINENO"; then :
15835 pgac_cv__builtin_ctz=yes
15836 else
15837 pgac_cv__builtin_ctz=no
15839 rm -f core conftest.err conftest.$ac_objext \
15840 conftest$ac_exeext conftest.$ac_ext
15842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15843 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15844 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15846 cat >>confdefs.h <<_ACEOF
15847 #define HAVE__BUILTIN_CTZ 1
15848 _ACEOF
15851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15852 $as_echo_n "checking for __builtin_popcount... " >&6; }
15853 if ${pgac_cv__builtin_popcount+:} false; then :
15854 $as_echo_n "(cached) " >&6
15855 else
15856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15857 /* end confdefs.h. */
15860 call__builtin_popcount(unsigned int x)
15862 return __builtin_popcount(x);
15865 main ()
15869 return 0;
15871 _ACEOF
15872 if ac_fn_c_try_link "$LINENO"; then :
15873 pgac_cv__builtin_popcount=yes
15874 else
15875 pgac_cv__builtin_popcount=no
15877 rm -f core conftest.err conftest.$ac_objext \
15878 conftest$ac_exeext conftest.$ac_ext
15880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15881 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15882 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15884 cat >>confdefs.h <<_ACEOF
15885 #define HAVE__BUILTIN_POPCOUNT 1
15886 _ACEOF
15889 # __builtin_frame_address may draw a diagnostic for non-constant argument,
15890 # so it needs a different test function.
15891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
15892 $as_echo_n "checking for __builtin_frame_address... " >&6; }
15893 if ${pgac_cv__builtin_frame_address+:} false; then :
15894 $as_echo_n "(cached) " >&6
15895 else
15896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15897 /* end confdefs.h. */
15899 void *
15900 call__builtin_frame_address(void)
15902 return __builtin_frame_address(0);
15905 main ()
15909 return 0;
15911 _ACEOF
15912 if ac_fn_c_try_link "$LINENO"; then :
15913 pgac_cv__builtin_frame_address=yes
15914 else
15915 pgac_cv__builtin_frame_address=no
15917 rm -f core conftest.err conftest.$ac_objext \
15918 conftest$ac_exeext conftest.$ac_ext
15920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5
15921 $as_echo "$pgac_cv__builtin_frame_address" >&6; }
15922 if test x"${pgac_cv__builtin_frame_address}" = xyes ; then
15924 cat >>confdefs.h <<_ACEOF
15925 #define HAVE__BUILTIN_FRAME_ADDRESS 1
15926 _ACEOF
15930 # We require 64-bit fseeko() to be available, but run this check anyway
15931 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
15932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15933 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15934 if ${ac_cv_sys_largefile_source+:} false; then :
15935 $as_echo_n "(cached) " >&6
15936 else
15937 while :; do
15938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15939 /* end confdefs.h. */
15940 #include <sys/types.h> /* for off_t */
15941 #include <stdio.h>
15943 main ()
15945 int (*fp) (FILE *, off_t, int) = fseeko;
15946 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15948 return 0;
15950 _ACEOF
15951 if ac_fn_c_try_link "$LINENO"; then :
15952 ac_cv_sys_largefile_source=no; break
15954 rm -f core conftest.err conftest.$ac_objext \
15955 conftest$ac_exeext conftest.$ac_ext
15956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15957 /* end confdefs.h. */
15958 #define _LARGEFILE_SOURCE 1
15959 #include <sys/types.h> /* for off_t */
15960 #include <stdio.h>
15962 main ()
15964 int (*fp) (FILE *, off_t, int) = fseeko;
15965 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15967 return 0;
15969 _ACEOF
15970 if ac_fn_c_try_link "$LINENO"; then :
15971 ac_cv_sys_largefile_source=1; break
15973 rm -f core conftest.err conftest.$ac_objext \
15974 conftest$ac_exeext conftest.$ac_ext
15975 ac_cv_sys_largefile_source=unknown
15976 break
15977 done
15979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15980 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15981 case $ac_cv_sys_largefile_source in #(
15982 no | unknown) ;;
15984 cat >>confdefs.h <<_ACEOF
15985 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15986 _ACEOF
15988 esac
15989 rm -rf conftest*
15991 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15992 # in glibc 2.1.3, but that breaks too many other things.
15993 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15994 if test $ac_cv_sys_largefile_source != unknown; then
15996 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
16001 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
16002 # by calling it, 2009-04-02
16003 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
16004 # The Clang compiler raises a warning for an undeclared identifier that matches
16005 # a compiler builtin function. All extant Clang versions are affected, as of
16006 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
16007 # C and Objective C languages, but Clang does report an error under C++ and
16008 # Objective C++.
16010 # Passing -fno-builtin to the compiler would suppress this problem. That
16011 # strategy would have the advantage of being insensitive to stray warnings, but
16012 # it would make tests less realistic.
16013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
16014 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
16015 if ${ac_cv_c_decl_report+:} false; then :
16016 $as_echo_n "(cached) " >&6
16017 else
16018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16019 /* end confdefs.h. */
16022 main ()
16024 (void) strchr;
16026 return 0;
16028 _ACEOF
16029 if ac_fn_c_try_compile "$LINENO"; then :
16030 if test -s conftest.err; then :
16031 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
16032 # valid AC_CHECK_DECL input. No library function is consistently available
16033 # on freestanding implementations, so test against a dummy declaration.
16034 # Include always-available headers on the off chance that they somehow
16035 # elicit warnings.
16036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16037 /* end confdefs.h. */
16038 #include <float.h>
16039 #include <limits.h>
16040 #include <stdarg.h>
16041 #include <stddef.h>
16042 extern void ac_decl (int, char *);
16044 main ()
16046 #ifdef __cplusplus
16047 (void) ac_decl ((int) 0, (char *) 0);
16048 (void) ac_decl;
16049 #else
16050 (void) ac_decl;
16051 #endif
16054 return 0;
16056 _ACEOF
16057 if ac_fn_c_try_compile "$LINENO"; then :
16058 if test -s conftest.err; then :
16059 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16060 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16061 as_fn_error $? "cannot detect from compiler exit status or warnings
16062 See \`config.log' for more details" "$LINENO" 5; }
16063 else
16064 ac_cv_c_decl_report=warning
16066 else
16067 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16068 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16069 as_fn_error $? "cannot compile a simple declaration test
16070 See \`config.log' for more details" "$LINENO" 5; }
16072 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16073 else
16074 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16075 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16076 as_fn_error $? "compiler does not report undeclared identifiers
16077 See \`config.log' for more details" "$LINENO" 5; }
16079 else
16080 ac_cv_c_decl_report=error
16082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
16085 $as_echo "$ac_cv_c_decl_report" >&6; }
16087 case $ac_cv_c_decl_report in
16088 warning) ac_c_decl_warn_flag=yes ;;
16089 *) ac_c_decl_warn_flag= ;;
16090 esac
16092 if test "$PORTNAME" != "solaris"; then :
16094 for ac_func in posix_fadvise
16095 do :
16096 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
16097 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
16098 cat >>confdefs.h <<_ACEOF
16099 #define HAVE_POSIX_FADVISE 1
16100 _ACEOF
16103 done
16105 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
16107 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
16108 ac_have_decl=1
16109 else
16110 ac_have_decl=0
16113 cat >>confdefs.h <<_ACEOF
16114 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
16115 _ACEOF
16118 fi # fi
16120 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
16122 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
16123 ac_have_decl=1
16124 else
16125 ac_have_decl=0
16128 cat >>confdefs.h <<_ACEOF
16129 #define HAVE_DECL_FDATASYNC $ac_have_decl
16130 _ACEOF
16132 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
16133 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
16134 ac_have_decl=1
16135 else
16136 ac_have_decl=0
16139 cat >>confdefs.h <<_ACEOF
16140 #define HAVE_DECL_STRLCAT $ac_have_decl
16141 _ACEOF
16142 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
16143 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
16144 ac_have_decl=1
16145 else
16146 ac_have_decl=0
16149 cat >>confdefs.h <<_ACEOF
16150 #define HAVE_DECL_STRLCPY $ac_have_decl
16151 _ACEOF
16152 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
16153 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
16154 ac_have_decl=1
16155 else
16156 ac_have_decl=0
16159 cat >>confdefs.h <<_ACEOF
16160 #define HAVE_DECL_STRNLEN $ac_have_decl
16161 _ACEOF
16164 # We can't use AC_REPLACE_FUNCS to replace these functions, because it
16165 # won't handle deployment target restrictions on macOS
16166 ac_fn_c_check_decl "$LINENO" "preadv" "ac_cv_have_decl_preadv" "#include <sys/uio.h>
16168 if test "x$ac_cv_have_decl_preadv" = xyes; then :
16169 ac_have_decl=1
16170 else
16171 ac_have_decl=0
16174 cat >>confdefs.h <<_ACEOF
16175 #define HAVE_DECL_PREADV $ac_have_decl
16176 _ACEOF
16177 if test $ac_have_decl = 1; then :
16179 else
16180 case " $LIBOBJS " in
16181 *" preadv.$ac_objext "* ) ;;
16182 *) LIBOBJS="$LIBOBJS preadv.$ac_objext"
16184 esac
16188 ac_fn_c_check_decl "$LINENO" "pwritev" "ac_cv_have_decl_pwritev" "#include <sys/uio.h>
16190 if test "x$ac_cv_have_decl_pwritev" = xyes; then :
16191 ac_have_decl=1
16192 else
16193 ac_have_decl=0
16196 cat >>confdefs.h <<_ACEOF
16197 #define HAVE_DECL_PWRITEV $ac_have_decl
16198 _ACEOF
16199 if test $ac_have_decl = 1; then :
16201 else
16202 case " $LIBOBJS " in
16203 *" pwritev.$ac_objext "* ) ;;
16204 *) LIBOBJS="$LIBOBJS pwritev.$ac_objext"
16206 esac
16211 # This is probably only present on macOS, but may as well check always
16212 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
16214 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
16215 ac_have_decl=1
16216 else
16217 ac_have_decl=0
16220 cat >>confdefs.h <<_ACEOF
16221 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
16222 _ACEOF
16225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
16226 $as_echo_n "checking for PS_STRINGS... " >&6; }
16227 if ${pgac_cv_var_PS_STRINGS+:} false; then :
16228 $as_echo_n "(cached) " >&6
16229 else
16230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16231 /* end confdefs.h. */
16232 #include <machine/vmparam.h>
16233 #include <sys/exec.h>
16236 main ()
16238 PS_STRINGS->ps_nargvstr = 1;
16239 PS_STRINGS->ps_argvstr = "foo";
16241 return 0;
16243 _ACEOF
16244 if ac_fn_c_try_link "$LINENO"; then :
16245 pgac_cv_var_PS_STRINGS=yes
16246 else
16247 pgac_cv_var_PS_STRINGS=no
16249 rm -f core conftest.err conftest.$ac_objext \
16250 conftest$ac_exeext conftest.$ac_ext
16252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
16253 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
16254 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
16256 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
16260 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
16261 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
16262 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
16264 else
16265 case " $LIBOBJS " in
16266 *" explicit_bzero.$ac_objext "* ) ;;
16267 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
16269 esac
16273 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
16274 if test "x$ac_cv_func_getopt" = xyes; then :
16275 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
16277 else
16278 case " $LIBOBJS " in
16279 *" getopt.$ac_objext "* ) ;;
16280 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16282 esac
16286 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
16287 if test "x$ac_cv_func_getpeereid" = xyes; then :
16288 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16290 else
16291 case " $LIBOBJS " in
16292 *" getpeereid.$ac_objext "* ) ;;
16293 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
16295 esac
16299 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
16300 if test "x$ac_cv_func_inet_aton" = xyes; then :
16301 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
16303 else
16304 case " $LIBOBJS " in
16305 *" inet_aton.$ac_objext "* ) ;;
16306 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
16308 esac
16312 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
16313 if test "x$ac_cv_func_mkdtemp" = xyes; then :
16314 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
16316 else
16317 case " $LIBOBJS " in
16318 *" mkdtemp.$ac_objext "* ) ;;
16319 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
16321 esac
16325 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
16326 if test "x$ac_cv_func_strlcat" = xyes; then :
16327 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
16329 else
16330 case " $LIBOBJS " in
16331 *" strlcat.$ac_objext "* ) ;;
16332 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
16334 esac
16338 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
16339 if test "x$ac_cv_func_strlcpy" = xyes; then :
16340 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
16342 else
16343 case " $LIBOBJS " in
16344 *" strlcpy.$ac_objext "* ) ;;
16345 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
16347 esac
16351 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
16352 if test "x$ac_cv_func_strnlen" = xyes; then :
16353 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
16355 else
16356 case " $LIBOBJS " in
16357 *" strnlen.$ac_objext "* ) ;;
16358 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
16360 esac
16366 if test "$enable_thread_safety" = yes; then
16367 ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
16368 if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
16369 $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
16371 else
16372 case " $LIBOBJS " in
16373 *" pthread_barrier_wait.$ac_objext "* ) ;;
16374 *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
16376 esac
16383 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
16384 # Cygwin and (apparently, based on test results) Mingw both
16385 # have a broken strtof(), so substitute its implementation.
16386 # That's not a perfect fix, since it doesn't avoid double-rounding,
16387 # but we have no better options.
16388 case " $LIBOBJS " in
16389 *" strtof.$ac_objext "* ) ;;
16390 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16392 esac
16394 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
16395 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
16398 # Similarly, use system's getopt_long() only if system provides struct option.
16399 if test x"$ac_cv_type_struct_option" = xyes ; then
16400 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
16401 if test "x$ac_cv_func_getopt_long" = xyes; then :
16402 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
16404 else
16405 case " $LIBOBJS " in
16406 *" getopt_long.$ac_objext "* ) ;;
16407 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16409 esac
16414 else
16415 case " $LIBOBJS " in
16416 *" getopt_long.$ac_objext "* ) ;;
16417 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16419 esac
16423 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
16424 # (i.e., allow '-' as a flag character), so use our version on those platforms.
16425 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
16426 case " $LIBOBJS " in
16427 *" getopt.$ac_objext "* ) ;;
16428 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16430 esac
16434 # mingw has adopted a GNU-centric interpretation of optind/optreset,
16435 # so always use our version on Windows.
16436 if test "$PORTNAME" = "win32"; then
16437 case " $LIBOBJS " in
16438 *" getopt.$ac_objext "* ) ;;
16439 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16441 esac
16443 case " $LIBOBJS " in
16444 *" getopt_long.$ac_objext "* ) ;;
16445 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16447 esac
16451 # Win32 (really MinGW) support
16452 if test "$PORTNAME" = "win32"; then
16453 for ac_func in _configthreadlocale
16454 do :
16455 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16456 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16457 cat >>confdefs.h <<_ACEOF
16458 #define HAVE__CONFIGTHREADLOCALE 1
16459 _ACEOF
16462 done
16464 case " $LIBOBJS " in
16465 *" dirmod.$ac_objext "* ) ;;
16466 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16468 esac
16470 case " $LIBOBJS " in
16471 *" kill.$ac_objext "* ) ;;
16472 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16474 esac
16476 case " $LIBOBJS " in
16477 *" open.$ac_objext "* ) ;;
16478 *) LIBOBJS="$LIBOBJS open.$ac_objext"
16480 esac
16482 case " $LIBOBJS " in
16483 *" system.$ac_objext "* ) ;;
16484 *) LIBOBJS="$LIBOBJS system.$ac_objext"
16486 esac
16488 case " $LIBOBJS " in
16489 *" win32dlopen.$ac_objext "* ) ;;
16490 *) LIBOBJS="$LIBOBJS win32dlopen.$ac_objext"
16492 esac
16494 case " $LIBOBJS " in
16495 *" win32env.$ac_objext "* ) ;;
16496 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16498 esac
16500 case " $LIBOBJS " in
16501 *" win32error.$ac_objext "* ) ;;
16502 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16504 esac
16506 case " $LIBOBJS " in
16507 *" win32fdatasync.$ac_objext "* ) ;;
16508 *) LIBOBJS="$LIBOBJS win32fdatasync.$ac_objext"
16510 esac
16512 case " $LIBOBJS " in
16513 *" win32getrusage.$ac_objext "* ) ;;
16514 *) LIBOBJS="$LIBOBJS win32getrusage.$ac_objext"
16516 esac
16518 case " $LIBOBJS " in
16519 *" win32link.$ac_objext "* ) ;;
16520 *) LIBOBJS="$LIBOBJS win32link.$ac_objext"
16522 esac
16524 case " $LIBOBJS " in
16525 *" win32ntdll.$ac_objext "* ) ;;
16526 *) LIBOBJS="$LIBOBJS win32ntdll.$ac_objext"
16528 esac
16530 case " $LIBOBJS " in
16531 *" win32pread.$ac_objext "* ) ;;
16532 *) LIBOBJS="$LIBOBJS win32pread.$ac_objext"
16534 esac
16536 case " $LIBOBJS " in
16537 *" win32pwrite.$ac_objext "* ) ;;
16538 *) LIBOBJS="$LIBOBJS win32pwrite.$ac_objext"
16540 esac
16542 case " $LIBOBJS " in
16543 *" win32security.$ac_objext "* ) ;;
16544 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16546 esac
16548 case " $LIBOBJS " in
16549 *" win32setlocale.$ac_objext "* ) ;;
16550 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16552 esac
16554 case " $LIBOBJS " in
16555 *" win32stat.$ac_objext "* ) ;;
16556 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
16558 esac
16561 # Cygwin needs only a bit of that
16562 if test "$PORTNAME" = "cygwin"; then
16563 case " $LIBOBJS " in
16564 *" dirmod.$ac_objext "* ) ;;
16565 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16567 esac
16571 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16572 if test "x$ac_cv_func_syslog" = xyes; then :
16573 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16574 if test "x$ac_cv_header_syslog_h" = xyes; then :
16576 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16585 $as_echo_n "checking for opterr... " >&6; }
16586 if ${pgac_cv_var_int_opterr+:} false; then :
16587 $as_echo_n "(cached) " >&6
16588 else
16589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16590 /* end confdefs.h. */
16591 #include <unistd.h>
16593 main ()
16595 extern int opterr; opterr = 1;
16597 return 0;
16599 _ACEOF
16600 if ac_fn_c_try_link "$LINENO"; then :
16601 pgac_cv_var_int_opterr=yes
16602 else
16603 pgac_cv_var_int_opterr=no
16605 rm -f core conftest.err conftest.$ac_objext \
16606 conftest$ac_exeext conftest.$ac_ext
16608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16609 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16610 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16612 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16617 $as_echo_n "checking for optreset... " >&6; }
16618 if ${pgac_cv_var_int_optreset+:} false; then :
16619 $as_echo_n "(cached) " >&6
16620 else
16621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16622 /* end confdefs.h. */
16623 #include <unistd.h>
16625 main ()
16627 extern int optreset; optreset = 1;
16629 return 0;
16631 _ACEOF
16632 if ac_fn_c_try_link "$LINENO"; then :
16633 pgac_cv_var_int_optreset=yes
16634 else
16635 pgac_cv_var_int_optreset=no
16637 rm -f core conftest.err conftest.$ac_objext \
16638 conftest$ac_exeext conftest.$ac_ext
16640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16641 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16642 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16644 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16648 if test "$with_icu" = yes; then
16649 ac_save_CPPFLAGS=$CPPFLAGS
16650 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16652 # Verify we have ICU's header files
16653 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16654 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16656 else
16657 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16662 CPPFLAGS=$ac_save_CPPFLAGS
16665 if test "$with_llvm" = yes; then
16667 # Check which functionality is present
16668 SAVE_CPPFLAGS="$CPPFLAGS"
16669 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16670 ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16672 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16673 ac_have_decl=1
16674 else
16675 ac_have_decl=0
16678 cat >>confdefs.h <<_ACEOF
16679 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16680 _ACEOF
16682 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16684 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16685 ac_have_decl=1
16686 else
16687 ac_have_decl=0
16690 cat >>confdefs.h <<_ACEOF
16691 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16692 _ACEOF
16693 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16695 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16696 ac_have_decl=1
16697 else
16698 ac_have_decl=0
16701 cat >>confdefs.h <<_ACEOF
16702 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16703 _ACEOF
16705 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16707 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16708 ac_have_decl=1
16709 else
16710 ac_have_decl=0
16713 cat >>confdefs.h <<_ACEOF
16714 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16715 _ACEOF
16716 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16718 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16719 ac_have_decl=1
16720 else
16721 ac_have_decl=0
16724 cat >>confdefs.h <<_ACEOF
16725 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16726 _ACEOF
16728 CPPFLAGS="$SAVE_CPPFLAGS"
16732 # Lastly, restore full LIBS list and check for readline/libedit symbols
16733 LIBS="$LIBS_including_readline"
16735 if test "$with_readline" = yes; then
16736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
16737 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
16738 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
16739 $as_echo_n "(cached) " >&6
16740 else
16741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16742 /* end confdefs.h. */
16743 #include <stdio.h>
16744 #if defined(HAVE_READLINE_READLINE_H)
16745 #include <readline/readline.h>
16746 #elif defined(HAVE_EDITLINE_READLINE_H)
16747 #include <editline/readline.h>
16748 #elif defined(HAVE_READLINE_H)
16749 #include <readline.h>
16750 #endif
16753 main ()
16755 rl_completion_suppress_quote = 1;
16757 return 0;
16759 _ACEOF
16760 if ac_fn_c_try_link "$LINENO"; then :
16761 pgac_cv_var_rl_completion_suppress_quote=yes
16762 else
16763 pgac_cv_var_rl_completion_suppress_quote=no
16765 rm -f core conftest.err conftest.$ac_objext \
16766 conftest$ac_exeext conftest.$ac_ext
16768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
16769 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
16770 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
16772 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
16775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
16776 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
16777 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
16778 $as_echo_n "(cached) " >&6
16779 else
16780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16781 /* end confdefs.h. */
16782 #include <stdio.h>
16783 #if defined(HAVE_READLINE_READLINE_H)
16784 #include <readline/readline.h>
16785 #elif defined(HAVE_EDITLINE_READLINE_H)
16786 #include <editline/readline.h>
16787 #elif defined(HAVE_READLINE_H)
16788 #include <readline.h>
16789 #endif
16792 main ()
16794 rl_filename_quote_characters = "x";
16796 return 0;
16798 _ACEOF
16799 if ac_fn_c_try_link "$LINENO"; then :
16800 pgac_cv_var_rl_filename_quote_characters=yes
16801 else
16802 pgac_cv_var_rl_filename_quote_characters=no
16804 rm -f core conftest.err conftest.$ac_objext \
16805 conftest$ac_exeext conftest.$ac_ext
16807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
16808 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
16809 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
16811 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
16814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
16815 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
16816 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
16817 $as_echo_n "(cached) " >&6
16818 else
16819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16820 /* end confdefs.h. */
16821 #include <stdio.h>
16822 #if defined(HAVE_READLINE_READLINE_H)
16823 #include <readline/readline.h>
16824 #elif defined(HAVE_EDITLINE_READLINE_H)
16825 #include <editline/readline.h>
16826 #elif defined(HAVE_READLINE_H)
16827 #include <readline.h>
16828 #endif
16831 main ()
16833 rl_filename_quoting_function = 0;
16835 return 0;
16837 _ACEOF
16838 if ac_fn_c_try_link "$LINENO"; then :
16839 pgac_cv_var_rl_filename_quoting_function=yes
16840 else
16841 pgac_cv_var_rl_filename_quoting_function=no
16843 rm -f core conftest.err conftest.$ac_objext \
16844 conftest$ac_exeext conftest.$ac_ext
16846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
16847 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
16848 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
16850 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
16854 for ac_func in append_history history_truncate_file rl_completion_matches rl_filename_completion_function rl_reset_screen_size rl_variable_bind
16855 do :
16856 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16857 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16858 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16859 cat >>confdefs.h <<_ACEOF
16860 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16861 _ACEOF
16864 done
16869 # This test makes sure that run tests work at all. Sometimes a shared
16870 # library is found by the linker, but the runtime linker can't find it.
16871 # This check should come after all modifications of compiler or linker
16872 # variables, and before any other run tests.
16873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16874 $as_echo_n "checking test program... " >&6; }
16875 if test "$cross_compiling" = yes; then :
16876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16877 $as_echo "cross-compiling" >&6; }
16878 else
16879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16880 /* end confdefs.h. */
16881 int main() { return 0; }
16882 _ACEOF
16883 if ac_fn_c_try_run "$LINENO"; then :
16884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16885 $as_echo "ok" >&6; }
16886 else
16887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16888 $as_echo "failed" >&6; }
16889 as_fn_error $? "
16890 Could not execute a simple test program. This may be a problem
16891 related to locating shared libraries. Check the file 'config.log'
16892 for the exact reason." "$LINENO" 5
16894 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16895 conftest.$ac_objext conftest.beam conftest.$ac_ext
16899 # --------------------
16900 # Run tests below here
16901 # --------------------
16904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16905 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16906 if ${pgac_cv_type_long_int_64+:} false; then :
16907 $as_echo_n "(cached) " >&6
16908 else
16909 if test "$cross_compiling" = yes; then :
16910 # If cross-compiling, check the size reported by the compiler and
16911 # trust that the arithmetic works.
16912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16913 /* end confdefs.h. */
16916 main ()
16918 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16919 test_array [0] = 0;
16920 return test_array [0];
16923 return 0;
16925 _ACEOF
16926 if ac_fn_c_try_compile "$LINENO"; then :
16927 pgac_cv_type_long_int_64=yes
16928 else
16929 pgac_cv_type_long_int_64=no
16931 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16932 else
16933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16934 /* end confdefs.h. */
16935 typedef long int ac_int64;
16938 * These are globals to discourage the compiler from folding all the
16939 * arithmetic tests down to compile-time constants.
16941 ac_int64 a = 20000001;
16942 ac_int64 b = 40000005;
16944 int does_int64_work()
16946 ac_int64 c,d;
16948 if (sizeof(ac_int64) != 8)
16949 return 0; /* definitely not the right size */
16951 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16952 c = a * b;
16953 d = (c + b) / b;
16954 if (d != a+1)
16955 return 0;
16956 return 1;
16960 main() {
16961 return (! does_int64_work());
16963 _ACEOF
16964 if ac_fn_c_try_run "$LINENO"; then :
16965 pgac_cv_type_long_int_64=yes
16966 else
16967 pgac_cv_type_long_int_64=no
16969 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16970 conftest.$ac_objext conftest.beam conftest.$ac_ext
16974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16975 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16977 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16978 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16980 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16985 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16986 pg_int64_type="long int"
16987 else
16988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16989 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16990 if ${pgac_cv_type_long_long_int_64+:} false; then :
16991 $as_echo_n "(cached) " >&6
16992 else
16993 if test "$cross_compiling" = yes; then :
16994 # If cross-compiling, check the size reported by the compiler and
16995 # trust that the arithmetic works.
16996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16997 /* end confdefs.h. */
17000 main ()
17002 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17003 test_array [0] = 0;
17004 return test_array [0];
17007 return 0;
17009 _ACEOF
17010 if ac_fn_c_try_compile "$LINENO"; then :
17011 pgac_cv_type_long_long_int_64=yes
17012 else
17013 pgac_cv_type_long_long_int_64=no
17015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17016 else
17017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17018 /* end confdefs.h. */
17019 typedef long long int ac_int64;
17022 * These are globals to discourage the compiler from folding all the
17023 * arithmetic tests down to compile-time constants.
17025 ac_int64 a = 20000001;
17026 ac_int64 b = 40000005;
17028 int does_int64_work()
17030 ac_int64 c,d;
17032 if (sizeof(ac_int64) != 8)
17033 return 0; /* definitely not the right size */
17035 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17036 c = a * b;
17037 d = (c + b) / b;
17038 if (d != a+1)
17039 return 0;
17040 return 1;
17044 main() {
17045 return (! does_int64_work());
17047 _ACEOF
17048 if ac_fn_c_try_run "$LINENO"; then :
17049 pgac_cv_type_long_long_int_64=yes
17050 else
17051 pgac_cv_type_long_long_int_64=no
17053 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17054 conftest.$ac_objext conftest.beam conftest.$ac_ext
17058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
17059 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
17061 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17062 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17064 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
17068 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17069 pg_int64_type="long long int"
17070 else
17071 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
17076 cat >>confdefs.h <<_ACEOF
17077 #define PG_INT64_TYPE $pg_int64_type
17078 _ACEOF
17081 # Select the printf length modifier that goes with that, too.
17082 if test x"$pg_int64_type" = x"long long int" ; then
17083 INT64_MODIFIER='"ll"'
17084 else
17085 INT64_MODIFIER='"l"'
17089 cat >>confdefs.h <<_ACEOF
17090 #define INT64_MODIFIER $INT64_MODIFIER
17091 _ACEOF
17094 # has to be down here, rather than with the other builtins, because
17095 # the test uses PG_INT64_TYPE.
17096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
17097 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
17098 if ${pgac_cv__builtin_op_overflow+:} false; then :
17099 $as_echo_n "(cached) " >&6
17100 else
17101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17102 /* end confdefs.h. */
17104 PG_INT64_TYPE a = 1;
17105 PG_INT64_TYPE b = 1;
17106 PG_INT64_TYPE result;
17107 int oflo;
17110 main ()
17112 oflo = __builtin_mul_overflow(a, b, &result);
17114 return 0;
17116 _ACEOF
17117 if ac_fn_c_try_link "$LINENO"; then :
17118 pgac_cv__builtin_op_overflow=yes
17119 else
17120 pgac_cv__builtin_op_overflow=no
17122 rm -f core conftest.err conftest.$ac_objext \
17123 conftest$ac_exeext conftest.$ac_ext
17125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
17126 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
17127 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
17129 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
17133 # Check size of void *, size_t (enables tweaks for > 32bit address space)
17134 # The cast to long int works around a bug in the HP C Compiler
17135 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17136 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17137 # This bug is HP SR number 8606223364.
17138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
17139 $as_echo_n "checking size of void *... " >&6; }
17140 if ${ac_cv_sizeof_void_p+:} false; then :
17141 $as_echo_n "(cached) " >&6
17142 else
17143 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
17145 else
17146 if test "$ac_cv_type_void_p" = yes; then
17147 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17148 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17149 as_fn_error 77 "cannot compute sizeof (void *)
17150 See \`config.log' for more details" "$LINENO" 5; }
17151 else
17152 ac_cv_sizeof_void_p=0
17157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
17158 $as_echo "$ac_cv_sizeof_void_p" >&6; }
17162 cat >>confdefs.h <<_ACEOF
17163 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
17164 _ACEOF
17167 # The cast to long int works around a bug in the HP C Compiler
17168 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17169 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17170 # This bug is HP SR number 8606223364.
17171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
17172 $as_echo_n "checking size of size_t... " >&6; }
17173 if ${ac_cv_sizeof_size_t+:} false; then :
17174 $as_echo_n "(cached) " >&6
17175 else
17176 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
17178 else
17179 if test "$ac_cv_type_size_t" = yes; then
17180 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17181 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17182 as_fn_error 77 "cannot compute sizeof (size_t)
17183 See \`config.log' for more details" "$LINENO" 5; }
17184 else
17185 ac_cv_sizeof_size_t=0
17190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
17191 $as_echo "$ac_cv_sizeof_size_t" >&6; }
17195 cat >>confdefs.h <<_ACEOF
17196 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
17197 _ACEOF
17200 # The cast to long int works around a bug in the HP C Compiler
17201 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17202 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17203 # This bug is HP SR number 8606223364.
17204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
17205 $as_echo_n "checking size of long... " >&6; }
17206 if ${ac_cv_sizeof_long+:} false; then :
17207 $as_echo_n "(cached) " >&6
17208 else
17209 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
17211 else
17212 if test "$ac_cv_type_long" = yes; then
17213 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17214 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17215 as_fn_error 77 "cannot compute sizeof (long)
17216 See \`config.log' for more details" "$LINENO" 5; }
17217 else
17218 ac_cv_sizeof_long=0
17223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
17224 $as_echo "$ac_cv_sizeof_long" >&6; }
17228 cat >>confdefs.h <<_ACEOF
17229 #define SIZEOF_LONG $ac_cv_sizeof_long
17230 _ACEOF
17234 # Determine memory alignment requirements for the basic C data types.
17236 # The cast to long int works around a bug in the HP C Compiler,
17237 # see AC_CHECK_SIZEOF for more information.
17238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
17239 $as_echo_n "checking alignment of short... " >&6; }
17240 if ${ac_cv_alignof_short+:} false; then :
17241 $as_echo_n "(cached) " >&6
17242 else
17243 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
17244 #ifndef offsetof
17245 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17246 #endif
17247 typedef struct { char x; short y; } ac__type_alignof_;"; then :
17249 else
17250 if test "$ac_cv_type_short" = yes; then
17251 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17252 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17253 as_fn_error 77 "cannot compute alignment of short
17254 See \`config.log' for more details" "$LINENO" 5; }
17255 else
17256 ac_cv_alignof_short=0
17261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
17262 $as_echo "$ac_cv_alignof_short" >&6; }
17266 cat >>confdefs.h <<_ACEOF
17267 #define ALIGNOF_SHORT $ac_cv_alignof_short
17268 _ACEOF
17271 # The cast to long int works around a bug in the HP C Compiler,
17272 # see AC_CHECK_SIZEOF for more information.
17273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
17274 $as_echo_n "checking alignment of int... " >&6; }
17275 if ${ac_cv_alignof_int+:} false; then :
17276 $as_echo_n "(cached) " >&6
17277 else
17278 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
17279 #ifndef offsetof
17280 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17281 #endif
17282 typedef struct { char x; int y; } ac__type_alignof_;"; then :
17284 else
17285 if test "$ac_cv_type_int" = yes; then
17286 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17287 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17288 as_fn_error 77 "cannot compute alignment of int
17289 See \`config.log' for more details" "$LINENO" 5; }
17290 else
17291 ac_cv_alignof_int=0
17296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
17297 $as_echo "$ac_cv_alignof_int" >&6; }
17301 cat >>confdefs.h <<_ACEOF
17302 #define ALIGNOF_INT $ac_cv_alignof_int
17303 _ACEOF
17306 # The cast to long int works around a bug in the HP C Compiler,
17307 # see AC_CHECK_SIZEOF for more information.
17308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17309 $as_echo_n "checking alignment of long... " >&6; }
17310 if ${ac_cv_alignof_long+:} false; then :
17311 $as_echo_n "(cached) " >&6
17312 else
17313 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
17314 #ifndef offsetof
17315 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17316 #endif
17317 typedef struct { char x; long y; } ac__type_alignof_;"; then :
17319 else
17320 if test "$ac_cv_type_long" = yes; then
17321 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17322 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17323 as_fn_error 77 "cannot compute alignment of long
17324 See \`config.log' for more details" "$LINENO" 5; }
17325 else
17326 ac_cv_alignof_long=0
17331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17332 $as_echo "$ac_cv_alignof_long" >&6; }
17336 cat >>confdefs.h <<_ACEOF
17337 #define ALIGNOF_LONG $ac_cv_alignof_long
17338 _ACEOF
17341 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17342 # The cast to long int works around a bug in the HP C Compiler,
17343 # see AC_CHECK_SIZEOF for more information.
17344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
17345 $as_echo_n "checking alignment of long long int... " >&6; }
17346 if ${ac_cv_alignof_long_long_int+:} false; then :
17347 $as_echo_n "(cached) " >&6
17348 else
17349 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
17350 #ifndef offsetof
17351 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17352 #endif
17353 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
17355 else
17356 if test "$ac_cv_type_long_long_int" = yes; then
17357 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17358 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17359 as_fn_error 77 "cannot compute alignment of long long int
17360 See \`config.log' for more details" "$LINENO" 5; }
17361 else
17362 ac_cv_alignof_long_long_int=0
17367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
17368 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
17372 cat >>confdefs.h <<_ACEOF
17373 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
17374 _ACEOF
17378 # The cast to long int works around a bug in the HP C Compiler,
17379 # see AC_CHECK_SIZEOF for more information.
17380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
17381 $as_echo_n "checking alignment of double... " >&6; }
17382 if ${ac_cv_alignof_double+:} false; then :
17383 $as_echo_n "(cached) " >&6
17384 else
17385 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
17386 #ifndef offsetof
17387 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17388 #endif
17389 typedef struct { char x; double y; } ac__type_alignof_;"; then :
17391 else
17392 if test "$ac_cv_type_double" = yes; then
17393 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17394 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17395 as_fn_error 77 "cannot compute alignment of double
17396 See \`config.log' for more details" "$LINENO" 5; }
17397 else
17398 ac_cv_alignof_double=0
17403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17404 $as_echo "$ac_cv_alignof_double" >&6; }
17408 cat >>confdefs.h <<_ACEOF
17409 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
17410 _ACEOF
17414 # Compute maximum alignment of any basic type.
17415 # We assume long's alignment is at least as strong as char, short, or int;
17416 # but we must check long long (if it is being used for int64) and double.
17417 # Note that we intentionally do not consider any types wider than 64 bits,
17418 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17419 # for disk and memory space.
17421 MAX_ALIGNOF=$ac_cv_alignof_long
17422 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17423 MAX_ALIGNOF=$ac_cv_alignof_double
17425 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17426 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17429 cat >>confdefs.h <<_ACEOF
17430 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17431 _ACEOF
17435 # Some platforms predefine the types int8, int16, etc. Only check
17436 # a (hopefully) representative subset.
17437 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17439 if test "x$ac_cv_type_int8" = xyes; then :
17441 cat >>confdefs.h <<_ACEOF
17442 #define HAVE_INT8 1
17443 _ACEOF
17447 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17449 if test "x$ac_cv_type_uint8" = xyes; then :
17451 cat >>confdefs.h <<_ACEOF
17452 #define HAVE_UINT8 1
17453 _ACEOF
17457 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17459 if test "x$ac_cv_type_int64" = xyes; then :
17461 cat >>confdefs.h <<_ACEOF
17462 #define HAVE_INT64 1
17463 _ACEOF
17467 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17469 if test "x$ac_cv_type_uint64" = xyes; then :
17471 cat >>confdefs.h <<_ACEOF
17472 #define HAVE_UINT64 1
17473 _ACEOF
17479 # Some compilers offer a 128-bit integer scalar type.
17480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17481 $as_echo_n "checking for __int128... " >&6; }
17482 if ${pgac_cv__128bit_int+:} false; then :
17483 $as_echo_n "(cached) " >&6
17484 else
17485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17486 /* end confdefs.h. */
17489 * We don't actually run this test, just link it to verify that any support
17490 * functions needed for __int128 are present.
17492 * These are globals to discourage the compiler from folding all the
17493 * arithmetic tests down to compile-time constants. We do not have
17494 * convenient support for 128bit literals at this point...
17496 __int128 a = 48828125;
17497 __int128 b = 97656250;
17500 main ()
17503 __int128 c,d;
17504 a = (a << 12) + 1; /* 200000000001 */
17505 b = (b << 12) + 5; /* 400000000005 */
17506 /* try the most relevant arithmetic ops */
17507 c = a * b;
17508 d = (c + b) / b;
17509 /* must use the results, else compiler may optimize arithmetic away */
17510 if (d != a+1)
17511 return 1;
17514 return 0;
17516 _ACEOF
17517 if ac_fn_c_try_link "$LINENO"; then :
17518 pgac_cv__128bit_int=yes
17519 else
17520 pgac_cv__128bit_int=no
17522 rm -f core conftest.err conftest.$ac_objext \
17523 conftest$ac_exeext conftest.$ac_ext
17525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17526 $as_echo "$pgac_cv__128bit_int" >&6; }
17527 if test x"$pgac_cv__128bit_int" = xyes ; then
17528 # Use of non-default alignment with __int128 tickles bugs in some compilers.
17529 # If not cross-compiling, we can test for bugs and disable use of __int128
17530 # with buggy compilers. If cross-compiling, hope for the best.
17531 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17533 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17534 if ${pgac_cv__128bit_int_bug+:} false; then :
17535 $as_echo_n "(cached) " >&6
17536 else
17537 if test "$cross_compiling" = yes; then :
17538 pgac_cv__128bit_int_bug="assuming ok"
17539 else
17540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17541 /* end confdefs.h. */
17543 /* This must match the corresponding code in c.h: */
17544 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17545 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17546 #elif defined(_MSC_VER)
17547 #define pg_attribute_aligned(a) __declspec(align(a))
17548 #endif
17549 typedef __int128 int128a
17550 #if defined(pg_attribute_aligned)
17551 pg_attribute_aligned(8)
17552 #endif
17554 int128a holder;
17555 void pass_by_val(void *buffer, int128a par) { holder = par; }
17558 main ()
17561 long int i64 = 97656225L << 12;
17562 int128a q;
17563 pass_by_val(main, (int128a) i64);
17564 q = (int128a) i64;
17565 if (q != holder)
17566 return 1;
17569 return 0;
17571 _ACEOF
17572 if ac_fn_c_try_run "$LINENO"; then :
17573 pgac_cv__128bit_int_bug=ok
17574 else
17575 pgac_cv__128bit_int_bug=broken
17577 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17578 conftest.$ac_objext conftest.beam conftest.$ac_ext
17582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17583 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17584 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17586 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17588 # The cast to long int works around a bug in the HP C Compiler,
17589 # see AC_CHECK_SIZEOF for more information.
17590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17591 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17592 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17593 $as_echo_n "(cached) " >&6
17594 else
17595 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
17596 #ifndef offsetof
17597 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17598 #endif
17599 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17601 else
17602 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17603 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17604 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17605 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17606 See \`config.log' for more details" "$LINENO" 5; }
17607 else
17608 ac_cv_alignof_PG_INT128_TYPE=0
17613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17614 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17618 cat >>confdefs.h <<_ACEOF
17619 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17620 _ACEOF
17626 # Check for various atomic operations now that we have checked how to declare
17627 # 64bit integers.
17628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17629 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17630 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17631 $as_echo_n "(cached) " >&6
17632 else
17633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17634 /* end confdefs.h. */
17637 main ()
17639 char lock = 0;
17640 __sync_lock_test_and_set(&lock, 1);
17641 __sync_lock_release(&lock);
17643 return 0;
17645 _ACEOF
17646 if ac_fn_c_try_link "$LINENO"; then :
17647 pgac_cv_gcc_sync_char_tas="yes"
17648 else
17649 pgac_cv_gcc_sync_char_tas="no"
17651 rm -f core conftest.err conftest.$ac_objext \
17652 conftest$ac_exeext conftest.$ac_ext
17654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17655 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17656 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17658 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17662 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17663 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17664 $as_echo_n "(cached) " >&6
17665 else
17666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17667 /* end confdefs.h. */
17670 main ()
17672 int lock = 0;
17673 __sync_lock_test_and_set(&lock, 1);
17674 __sync_lock_release(&lock);
17676 return 0;
17678 _ACEOF
17679 if ac_fn_c_try_link "$LINENO"; then :
17680 pgac_cv_gcc_sync_int32_tas="yes"
17681 else
17682 pgac_cv_gcc_sync_int32_tas="no"
17684 rm -f core conftest.err conftest.$ac_objext \
17685 conftest$ac_exeext conftest.$ac_ext
17687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17688 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17689 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17691 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17695 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17696 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17697 $as_echo_n "(cached) " >&6
17698 else
17699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17700 /* end confdefs.h. */
17703 main ()
17705 int val = 0;
17706 __sync_val_compare_and_swap(&val, 0, 37);
17708 return 0;
17710 _ACEOF
17711 if ac_fn_c_try_link "$LINENO"; then :
17712 pgac_cv_gcc_sync_int32_cas="yes"
17713 else
17714 pgac_cv_gcc_sync_int32_cas="no"
17716 rm -f core conftest.err conftest.$ac_objext \
17717 conftest$ac_exeext conftest.$ac_ext
17719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17720 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17721 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17723 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17727 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17728 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17729 $as_echo_n "(cached) " >&6
17730 else
17731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17732 /* end confdefs.h. */
17735 main ()
17737 PG_INT64_TYPE lock = 0;
17738 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17740 return 0;
17742 _ACEOF
17743 if ac_fn_c_try_link "$LINENO"; then :
17744 pgac_cv_gcc_sync_int64_cas="yes"
17745 else
17746 pgac_cv_gcc_sync_int64_cas="no"
17748 rm -f core conftest.err conftest.$ac_objext \
17749 conftest$ac_exeext conftest.$ac_ext
17751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17752 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17753 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17755 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17759 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17760 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17761 $as_echo_n "(cached) " >&6
17762 else
17763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17764 /* end confdefs.h. */
17767 main ()
17769 int val = 0;
17770 int expect = 0;
17771 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17773 return 0;
17775 _ACEOF
17776 if ac_fn_c_try_link "$LINENO"; then :
17777 pgac_cv_gcc_atomic_int32_cas="yes"
17778 else
17779 pgac_cv_gcc_atomic_int32_cas="no"
17781 rm -f core conftest.err conftest.$ac_objext \
17782 conftest$ac_exeext conftest.$ac_ext
17784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17785 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17786 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17788 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17792 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17793 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17794 $as_echo_n "(cached) " >&6
17795 else
17796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17797 /* end confdefs.h. */
17800 main ()
17802 PG_INT64_TYPE val = 0;
17803 PG_INT64_TYPE expect = 0;
17804 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17806 return 0;
17808 _ACEOF
17809 if ac_fn_c_try_link "$LINENO"; then :
17810 pgac_cv_gcc_atomic_int64_cas="yes"
17811 else
17812 pgac_cv_gcc_atomic_int64_cas="no"
17814 rm -f core conftest.err conftest.$ac_objext \
17815 conftest$ac_exeext conftest.$ac_ext
17817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17818 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17819 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17821 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17826 # Check for x86 cpuid instruction
17827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17828 $as_echo_n "checking for __get_cpuid... " >&6; }
17829 if ${pgac_cv__get_cpuid+:} false; then :
17830 $as_echo_n "(cached) " >&6
17831 else
17832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17833 /* end confdefs.h. */
17834 #include <cpuid.h>
17836 main ()
17838 unsigned int exx[4] = {0, 0, 0, 0};
17839 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17842 return 0;
17844 _ACEOF
17845 if ac_fn_c_try_link "$LINENO"; then :
17846 pgac_cv__get_cpuid="yes"
17847 else
17848 pgac_cv__get_cpuid="no"
17850 rm -f core conftest.err conftest.$ac_objext \
17851 conftest$ac_exeext conftest.$ac_ext
17853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17854 $as_echo "$pgac_cv__get_cpuid" >&6; }
17855 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17857 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17862 $as_echo_n "checking for __cpuid... " >&6; }
17863 if ${pgac_cv__cpuid+:} false; then :
17864 $as_echo_n "(cached) " >&6
17865 else
17866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17867 /* end confdefs.h. */
17868 #include <intrin.h>
17870 main ()
17872 unsigned int exx[4] = {0, 0, 0, 0};
17873 __get_cpuid(exx[0], 1);
17876 return 0;
17878 _ACEOF
17879 if ac_fn_c_try_link "$LINENO"; then :
17880 pgac_cv__cpuid="yes"
17881 else
17882 pgac_cv__cpuid="no"
17884 rm -f core conftest.err conftest.$ac_objext \
17885 conftest$ac_exeext conftest.$ac_ext
17887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17888 $as_echo "$pgac_cv__cpuid" >&6; }
17889 if test x"$pgac_cv__cpuid" = x"yes"; then
17891 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17895 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17897 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17898 # with the default compiler flags. If not, check if adding the -msse4.2
17899 # flag helps. CFLAGS_CRC is set to -msse4.2 if that's required.
17900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17901 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17902 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17903 $as_echo_n "(cached) " >&6
17904 else
17905 pgac_save_CFLAGS=$CFLAGS
17906 CFLAGS="$pgac_save_CFLAGS "
17907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17908 /* end confdefs.h. */
17909 #include <nmmintrin.h>
17911 main ()
17913 unsigned int crc = 0;
17914 crc = _mm_crc32_u8(crc, 0);
17915 crc = _mm_crc32_u32(crc, 0);
17916 /* return computed value, to prevent the above being optimized away */
17917 return crc == 0;
17919 return 0;
17921 _ACEOF
17922 if ac_fn_c_try_link "$LINENO"; then :
17923 pgac_cv_sse42_crc32_intrinsics_=yes
17924 else
17925 pgac_cv_sse42_crc32_intrinsics_=no
17927 rm -f core conftest.err conftest.$ac_objext \
17928 conftest$ac_exeext conftest.$ac_ext
17929 CFLAGS="$pgac_save_CFLAGS"
17931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17932 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17933 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17934 CFLAGS_CRC=""
17935 pgac_sse42_crc32_intrinsics=yes
17938 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17940 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17941 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17942 $as_echo_n "(cached) " >&6
17943 else
17944 pgac_save_CFLAGS=$CFLAGS
17945 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17947 /* end confdefs.h. */
17948 #include <nmmintrin.h>
17950 main ()
17952 unsigned int crc = 0;
17953 crc = _mm_crc32_u8(crc, 0);
17954 crc = _mm_crc32_u32(crc, 0);
17955 /* return computed value, to prevent the above being optimized away */
17956 return crc == 0;
17958 return 0;
17960 _ACEOF
17961 if ac_fn_c_try_link "$LINENO"; then :
17962 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17963 else
17964 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17966 rm -f core conftest.err conftest.$ac_objext \
17967 conftest$ac_exeext conftest.$ac_ext
17968 CFLAGS="$pgac_save_CFLAGS"
17970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17971 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17972 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17973 CFLAGS_CRC="-msse4.2"
17974 pgac_sse42_crc32_intrinsics=yes
17979 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17980 # define __SSE4_2__ in that case.
17981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17982 /* end confdefs.h. */
17985 main ()
17988 #ifndef __SSE4_2__
17989 #error __SSE4_2__ not defined
17990 #endif
17993 return 0;
17995 _ACEOF
17996 if ac_fn_c_try_compile "$LINENO"; then :
17997 SSE4_2_TARGETED=1
17999 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18001 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
18003 # First check if __crc32c* intrinsics can be used with the default compiler
18004 # flags. If not, check if adding -march=armv8-a+crc flag helps.
18005 # CFLAGS_CRC is set if the extra flag is required.
18006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
18007 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
18008 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
18009 $as_echo_n "(cached) " >&6
18010 else
18011 pgac_save_CFLAGS=$CFLAGS
18012 CFLAGS="$pgac_save_CFLAGS "
18013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18014 /* end confdefs.h. */
18015 #include <arm_acle.h>
18017 main ()
18019 unsigned int crc = 0;
18020 crc = __crc32cb(crc, 0);
18021 crc = __crc32ch(crc, 0);
18022 crc = __crc32cw(crc, 0);
18023 crc = __crc32cd(crc, 0);
18024 /* return computed value, to prevent the above being optimized away */
18025 return crc == 0;
18027 return 0;
18029 _ACEOF
18030 if ac_fn_c_try_link "$LINENO"; then :
18031 pgac_cv_armv8_crc32c_intrinsics_=yes
18032 else
18033 pgac_cv_armv8_crc32c_intrinsics_=no
18035 rm -f core conftest.err conftest.$ac_objext \
18036 conftest$ac_exeext conftest.$ac_ext
18037 CFLAGS="$pgac_save_CFLAGS"
18039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
18040 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
18041 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
18042 CFLAGS_CRC=""
18043 pgac_armv8_crc32c_intrinsics=yes
18046 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
18047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
18048 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
18049 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
18050 $as_echo_n "(cached) " >&6
18051 else
18052 pgac_save_CFLAGS=$CFLAGS
18053 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
18054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18055 /* end confdefs.h. */
18056 #include <arm_acle.h>
18058 main ()
18060 unsigned int crc = 0;
18061 crc = __crc32cb(crc, 0);
18062 crc = __crc32ch(crc, 0);
18063 crc = __crc32cw(crc, 0);
18064 crc = __crc32cd(crc, 0);
18065 /* return computed value, to prevent the above being optimized away */
18066 return crc == 0;
18068 return 0;
18070 _ACEOF
18071 if ac_fn_c_try_link "$LINENO"; then :
18072 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
18073 else
18074 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
18076 rm -f core conftest.err conftest.$ac_objext \
18077 conftest$ac_exeext conftest.$ac_ext
18078 CFLAGS="$pgac_save_CFLAGS"
18080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
18081 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
18082 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
18083 CFLAGS_CRC="-march=armv8-a+crc"
18084 pgac_armv8_crc32c_intrinsics=yes
18091 # Select CRC-32C implementation.
18093 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
18094 # use the special CRC instructions for calculating CRC-32C. If we're not
18095 # targeting such a processor, but we can nevertheless produce code that uses
18096 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
18097 # implementations and select which one to use at runtime, depending on whether
18098 # SSE 4.2 is supported by the processor we're running on.
18100 # Similarly, if we are targeting an ARM processor that has the CRC
18101 # instructions that are part of the ARMv8 CRC Extension, use them. And if
18102 # we're not targeting such a processor, but can nevertheless produce code that
18103 # uses the CRC instructions, compile both, and select at runtime.
18105 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
18106 # in the template or configure command line.
18107 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""; then
18108 # Use Intel SSE 4.2 if available.
18109 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
18110 USE_SSE42_CRC32C=1
18111 else
18112 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
18113 # the runtime check.
18114 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
18115 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
18116 else
18117 # Use ARM CRC Extension if available.
18118 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_CRC" = x""; then
18119 USE_ARMV8_CRC32C=1
18120 else
18121 # ARM CRC Extension, with runtime check?
18122 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
18123 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
18124 else
18125 # fall back to slicing-by-8 algorithm, which doesn't require any
18126 # special CPU support.
18127 USE_SLICING_BY_8_CRC32C=1
18134 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
18135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
18136 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
18137 if test x"$USE_SSE42_CRC32C" = x"1"; then
18139 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
18141 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
18142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
18143 $as_echo "SSE 4.2" >&6; }
18144 else
18145 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18147 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18149 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
18150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
18151 $as_echo "SSE 4.2 with runtime check" >&6; }
18152 else
18153 if test x"$USE_ARMV8_CRC32C" = x"1"; then
18155 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
18157 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
18158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
18159 $as_echo "ARMv8 CRC instructions" >&6; }
18160 else
18161 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18163 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18165 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
18166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
18167 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
18168 else
18170 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
18172 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
18173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
18174 $as_echo "slicing-by-8" >&6; }
18182 # Select semaphore implementation type.
18183 if test "$PORTNAME" != "win32"; then
18184 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
18185 # Need sem_open for this
18186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
18187 $as_echo_n "checking for library containing sem_open... " >&6; }
18188 if ${ac_cv_search_sem_open+:} false; then :
18189 $as_echo_n "(cached) " >&6
18190 else
18191 ac_func_search_save_LIBS=$LIBS
18192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18193 /* end confdefs.h. */
18195 /* Override any GCC internal prototype to avoid an error.
18196 Use char because int might match the return type of a GCC
18197 builtin and then its argument prototype would still apply. */
18198 #ifdef __cplusplus
18199 extern "C"
18200 #endif
18201 char sem_open ();
18203 main ()
18205 return sem_open ();
18207 return 0;
18209 _ACEOF
18210 for ac_lib in '' rt pthread; do
18211 if test -z "$ac_lib"; then
18212 ac_res="none required"
18213 else
18214 ac_res=-l$ac_lib
18215 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18217 if ac_fn_c_try_link "$LINENO"; then :
18218 ac_cv_search_sem_open=$ac_res
18220 rm -f core conftest.err conftest.$ac_objext \
18221 conftest$ac_exeext
18222 if ${ac_cv_search_sem_open+:} false; then :
18223 break
18225 done
18226 if ${ac_cv_search_sem_open+:} false; then :
18228 else
18229 ac_cv_search_sem_open=no
18231 rm conftest.$ac_ext
18232 LIBS=$ac_func_search_save_LIBS
18234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18235 $as_echo "$ac_cv_search_sem_open" >&6; }
18236 ac_res=$ac_cv_search_sem_open
18237 if test "$ac_res" != no; then :
18238 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18239 USE_NAMED_POSIX_SEMAPHORES=1
18243 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18244 # Need sem_init for this
18245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18246 $as_echo_n "checking for library containing sem_init... " >&6; }
18247 if ${ac_cv_search_sem_init+:} false; then :
18248 $as_echo_n "(cached) " >&6
18249 else
18250 ac_func_search_save_LIBS=$LIBS
18251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18252 /* end confdefs.h. */
18254 /* Override any GCC internal prototype to avoid an error.
18255 Use char because int might match the return type of a GCC
18256 builtin and then its argument prototype would still apply. */
18257 #ifdef __cplusplus
18258 extern "C"
18259 #endif
18260 char sem_init ();
18262 main ()
18264 return sem_init ();
18266 return 0;
18268 _ACEOF
18269 for ac_lib in '' rt pthread; do
18270 if test -z "$ac_lib"; then
18271 ac_res="none required"
18272 else
18273 ac_res=-l$ac_lib
18274 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18276 if ac_fn_c_try_link "$LINENO"; then :
18277 ac_cv_search_sem_init=$ac_res
18279 rm -f core conftest.err conftest.$ac_objext \
18280 conftest$ac_exeext
18281 if ${ac_cv_search_sem_init+:} false; then :
18282 break
18284 done
18285 if ${ac_cv_search_sem_init+:} false; then :
18287 else
18288 ac_cv_search_sem_init=no
18290 rm conftest.$ac_ext
18291 LIBS=$ac_func_search_save_LIBS
18293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18294 $as_echo "$ac_cv_search_sem_init" >&6; }
18295 ac_res=$ac_cv_search_sem_init
18296 if test "$ac_res" != no; then :
18297 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18298 USE_UNNAMED_POSIX_SEMAPHORES=1
18302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18303 $as_echo_n "checking which semaphore API to use... " >&6; }
18304 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18306 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18308 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18309 sematype="named POSIX"
18310 else
18311 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18313 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18315 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18316 sematype="unnamed POSIX"
18317 else
18319 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18321 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18322 sematype="System V"
18325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18326 $as_echo "$sematype" >&6; }
18327 else
18329 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18331 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18335 # Select shared-memory implementation type.
18336 if test "$PORTNAME" != "win32"; then
18338 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18340 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18341 else
18343 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18345 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18348 # Select random number source. If a TLS library is used then it will be the
18349 # first choice, else the native platform sources (Windows API or /dev/urandom)
18350 # will be used.
18351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18352 $as_echo_n "checking which random number source to use... " >&6; }
18353 if test x"$with_ssl" = x"openssl" ; then
18354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18355 $as_echo "OpenSSL" >&6; }
18356 elif test x"$PORTNAME" = x"win32" ; then
18357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18358 $as_echo "Windows native" >&6; }
18359 elif test x"$cross_compiling" = x"yes"; then
18360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming /dev/urandom" >&5
18361 $as_echo "assuming /dev/urandom" >&6; }
18362 else
18363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18364 $as_echo "/dev/urandom" >&6; }
18365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18366 $as_echo_n "checking for /dev/urandom... " >&6; }
18367 if ${ac_cv_file__dev_urandom+:} false; then :
18368 $as_echo_n "(cached) " >&6
18369 else
18370 test "$cross_compiling" = yes &&
18371 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18372 if test -r "/dev/urandom"; then
18373 ac_cv_file__dev_urandom=yes
18374 else
18375 ac_cv_file__dev_urandom=no
18378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18379 $as_echo "$ac_cv_file__dev_urandom" >&6; }
18380 if test "x$ac_cv_file__dev_urandom" = xyes; then :
18385 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
18386 as_fn_error $? "
18387 no source of strong random numbers was found
18388 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
18392 # If not set in template file, set bytes to use libc memset()
18393 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18394 MEMSET_LOOP_LIMIT=1024
18397 cat >>confdefs.h <<_ACEOF
18398 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18399 _ACEOF
18403 if test "$enable_nls" = yes ; then
18405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18406 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18407 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18408 $as_echo_n "(cached) " >&6
18409 else
18410 ac_func_search_save_LIBS=$LIBS
18411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18412 /* end confdefs.h. */
18414 /* Override any GCC internal prototype to avoid an error.
18415 Use char because int might match the return type of a GCC
18416 builtin and then its argument prototype would still apply. */
18417 #ifdef __cplusplus
18418 extern "C"
18419 #endif
18420 char bind_textdomain_codeset ();
18422 main ()
18424 return bind_textdomain_codeset ();
18426 return 0;
18428 _ACEOF
18429 for ac_lib in '' intl; do
18430 if test -z "$ac_lib"; then
18431 ac_res="none required"
18432 else
18433 ac_res=-l$ac_lib
18434 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18436 if ac_fn_c_try_link "$LINENO"; then :
18437 ac_cv_search_bind_textdomain_codeset=$ac_res
18439 rm -f core conftest.err conftest.$ac_objext \
18440 conftest$ac_exeext
18441 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18442 break
18444 done
18445 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18447 else
18448 ac_cv_search_bind_textdomain_codeset=no
18450 rm conftest.$ac_ext
18451 LIBS=$ac_func_search_save_LIBS
18453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18454 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18455 ac_res=$ac_cv_search_bind_textdomain_codeset
18456 if test "$ac_res" != no; then :
18457 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18459 else
18460 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18463 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18464 if test "x$ac_cv_header_libintl_h" = xyes; then :
18466 else
18467 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18471 if test -z "$MSGFMT"; then
18472 for ac_prog in msgfmt
18474 # Extract the first word of "$ac_prog", so it can be a program name with args.
18475 set dummy $ac_prog; ac_word=$2
18476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18477 $as_echo_n "checking for $ac_word... " >&6; }
18478 if ${ac_cv_path_MSGFMT+:} false; then :
18479 $as_echo_n "(cached) " >&6
18480 else
18481 case $MSGFMT in
18482 [\\/]* | ?:[\\/]*)
18483 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18486 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18487 for as_dir in $PATH
18489 IFS=$as_save_IFS
18490 test -z "$as_dir" && as_dir=.
18491 for ac_exec_ext in '' $ac_executable_extensions; do
18492 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18493 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18494 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18495 break 2
18497 done
18498 done
18499 IFS=$as_save_IFS
18502 esac
18504 MSGFMT=$ac_cv_path_MSGFMT
18505 if test -n "$MSGFMT"; then
18506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18507 $as_echo "$MSGFMT" >&6; }
18508 else
18509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18510 $as_echo "no" >&6; }
18514 test -n "$MSGFMT" && break
18515 done
18517 else
18518 # Report the value of MSGFMT in configure's output in all cases.
18519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18520 $as_echo_n "checking for MSGFMT... " >&6; }
18521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18522 $as_echo "$MSGFMT" >&6; }
18525 if test -z "$MSGFMT"; then
18526 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18529 $as_echo_n "checking for msgfmt flags... " >&6; }
18530 if ${pgac_cv_msgfmt_flags+:} false; then :
18531 $as_echo_n "(cached) " >&6
18532 else
18533 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18534 pgac_cv_msgfmt_flags=-c
18537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18538 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18539 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18541 if test -z "$MSGMERGE"; then
18542 for ac_prog in msgmerge
18544 # Extract the first word of "$ac_prog", so it can be a program name with args.
18545 set dummy $ac_prog; ac_word=$2
18546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18547 $as_echo_n "checking for $ac_word... " >&6; }
18548 if ${ac_cv_path_MSGMERGE+:} false; then :
18549 $as_echo_n "(cached) " >&6
18550 else
18551 case $MSGMERGE in
18552 [\\/]* | ?:[\\/]*)
18553 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18556 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18557 for as_dir in $PATH
18559 IFS=$as_save_IFS
18560 test -z "$as_dir" && as_dir=.
18561 for ac_exec_ext in '' $ac_executable_extensions; do
18562 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18563 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18564 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18565 break 2
18567 done
18568 done
18569 IFS=$as_save_IFS
18572 esac
18574 MSGMERGE=$ac_cv_path_MSGMERGE
18575 if test -n "$MSGMERGE"; then
18576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18577 $as_echo "$MSGMERGE" >&6; }
18578 else
18579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18580 $as_echo "no" >&6; }
18584 test -n "$MSGMERGE" && break
18585 done
18587 else
18588 # Report the value of MSGMERGE in configure's output in all cases.
18589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18590 $as_echo_n "checking for MSGMERGE... " >&6; }
18591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18592 $as_echo "$MSGMERGE" >&6; }
18595 if test -z "$XGETTEXT"; then
18596 for ac_prog in xgettext
18598 # Extract the first word of "$ac_prog", so it can be a program name with args.
18599 set dummy $ac_prog; ac_word=$2
18600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18601 $as_echo_n "checking for $ac_word... " >&6; }
18602 if ${ac_cv_path_XGETTEXT+:} false; then :
18603 $as_echo_n "(cached) " >&6
18604 else
18605 case $XGETTEXT in
18606 [\\/]* | ?:[\\/]*)
18607 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18610 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18611 for as_dir in $PATH
18613 IFS=$as_save_IFS
18614 test -z "$as_dir" && as_dir=.
18615 for ac_exec_ext in '' $ac_executable_extensions; do
18616 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18617 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18618 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18619 break 2
18621 done
18622 done
18623 IFS=$as_save_IFS
18626 esac
18628 XGETTEXT=$ac_cv_path_XGETTEXT
18629 if test -n "$XGETTEXT"; then
18630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18631 $as_echo "$XGETTEXT" >&6; }
18632 else
18633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18634 $as_echo "no" >&6; }
18638 test -n "$XGETTEXT" && break
18639 done
18641 else
18642 # Report the value of XGETTEXT in configure's output in all cases.
18643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18644 $as_echo_n "checking for XGETTEXT... " >&6; }
18645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18646 $as_echo "$XGETTEXT" >&6; }
18652 # Check for Tcl configuration script tclConfig.sh
18653 if test "$with_tcl" = yes; then
18654 if test -z "$TCLSH"; then
18655 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18657 # Extract the first word of "$ac_prog", so it can be a program name with args.
18658 set dummy $ac_prog; ac_word=$2
18659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18660 $as_echo_n "checking for $ac_word... " >&6; }
18661 if ${ac_cv_path_TCLSH+:} false; then :
18662 $as_echo_n "(cached) " >&6
18663 else
18664 case $TCLSH in
18665 [\\/]* | ?:[\\/]*)
18666 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18669 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18670 for as_dir in $PATH
18672 IFS=$as_save_IFS
18673 test -z "$as_dir" && as_dir=.
18674 for ac_exec_ext in '' $ac_executable_extensions; do
18675 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18676 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18677 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18678 break 2
18680 done
18681 done
18682 IFS=$as_save_IFS
18685 esac
18687 TCLSH=$ac_cv_path_TCLSH
18688 if test -n "$TCLSH"; then
18689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18690 $as_echo "$TCLSH" >&6; }
18691 else
18692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18693 $as_echo "no" >&6; }
18697 test -n "$TCLSH" && break
18698 done
18700 else
18701 # Report the value of TCLSH in configure's output in all cases.
18702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18703 $as_echo_n "checking for TCLSH... " >&6; }
18704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18705 $as_echo "$TCLSH" >&6; }
18708 if test x"$TCLSH" = x""; then
18709 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18713 $as_echo_n "checking for tclConfig.sh... " >&6; }
18714 # Let user override test
18715 if test -z "$TCL_CONFIG_SH"; then
18716 pgac_test_dirs="$with_tclconfig"
18718 set X $pgac_test_dirs; shift
18719 if test $# -eq 0; then
18720 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18721 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18722 # On newer macOS, $auto_path frequently doesn't include the place
18723 # where tclConfig.sh actually lives. Append that to the end, so as not
18724 # to break cases where a non-default Tcl installation is being used.
18725 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18726 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18728 set X $pgac_test_dirs; shift
18731 for pgac_dir do
18732 if test -r "$pgac_dir/tclConfig.sh"; then
18733 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18734 break
18736 done
18739 if test -z "$TCL_CONFIG_SH"; then
18740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18741 $as_echo "no" >&6; }
18742 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18743 else
18744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18745 $as_echo "$TCL_CONFIG_SH" >&6; }
18750 . "$TCL_CONFIG_SH"
18751 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18752 eval TCL_LIBS=\"$TCL_LIBS\"
18753 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18754 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18756 if test "$TCL_SHARED_BUILD" != 1; then
18757 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18758 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18760 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18761 ac_save_CPPFLAGS=$CPPFLAGS
18762 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18763 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18764 if test "x$ac_cv_header_tcl_h" = xyes; then :
18766 else
18767 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18771 CPPFLAGS=$ac_save_CPPFLAGS
18774 # check for <perl.h>
18775 if test "$with_perl" = yes; then
18776 ac_save_CPPFLAGS=$CPPFLAGS
18777 CPPFLAGS="$CPPFLAGS $perl_includespec"
18778 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18780 if test "x$ac_cv_header_perl_h" = xyes; then :
18782 else
18783 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18787 # While we're at it, check that we can link to libperl.
18788 # On most platforms, if perl.h is there then libperl.so will be too, but at
18789 # this writing Debian packages them separately. There is no known reason to
18790 # waste cycles on separate probes for the Tcl or Python libraries, though.
18791 # On some Red Hat platforms, the link attempt can fail if we don't use
18792 # CFLAGS_SL while building the test program.
18793 ac_save_CFLAGS=$CFLAGS
18794 CFLAGS="$CFLAGS $CFLAGS_SL"
18795 pgac_save_LIBS=$LIBS
18796 LIBS="$perl_embed_ldflags"
18797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18798 $as_echo_n "checking for libperl... " >&6; }
18799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18800 /* end confdefs.h. */
18802 #include <EXTERN.h>
18803 #include <perl.h>
18806 main ()
18808 perl_alloc();
18810 return 0;
18812 _ACEOF
18813 if ac_fn_c_try_link "$LINENO"; then :
18814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18815 $as_echo "yes" >&6; }
18816 else
18817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18818 $as_echo "no" >&6; }
18819 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18821 rm -f core conftest.err conftest.$ac_objext \
18822 conftest$ac_exeext conftest.$ac_ext
18823 LIBS=$pgac_save_LIBS
18824 CFLAGS=$ac_save_CFLAGS
18825 CPPFLAGS=$ac_save_CPPFLAGS
18828 # check for <Python.h>
18829 if test "$with_python" = yes; then
18830 ac_save_CPPFLAGS=$CPPFLAGS
18831 CPPFLAGS="$python_includespec $CPPFLAGS"
18832 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18833 if test "x$ac_cv_header_Python_h" = xyes; then :
18835 else
18836 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18840 CPPFLAGS=$ac_save_CPPFLAGS
18844 # Check for documentation-building tools
18846 if test -z "$XMLLINT"; then
18847 for ac_prog in xmllint
18849 # Extract the first word of "$ac_prog", so it can be a program name with args.
18850 set dummy $ac_prog; ac_word=$2
18851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18852 $as_echo_n "checking for $ac_word... " >&6; }
18853 if ${ac_cv_path_XMLLINT+:} false; then :
18854 $as_echo_n "(cached) " >&6
18855 else
18856 case $XMLLINT in
18857 [\\/]* | ?:[\\/]*)
18858 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18861 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18862 for as_dir in $PATH
18864 IFS=$as_save_IFS
18865 test -z "$as_dir" && as_dir=.
18866 for ac_exec_ext in '' $ac_executable_extensions; do
18867 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18868 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18869 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18870 break 2
18872 done
18873 done
18874 IFS=$as_save_IFS
18877 esac
18879 XMLLINT=$ac_cv_path_XMLLINT
18880 if test -n "$XMLLINT"; then
18881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18882 $as_echo "$XMLLINT" >&6; }
18883 else
18884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18885 $as_echo "no" >&6; }
18889 test -n "$XMLLINT" && break
18890 done
18892 else
18893 # Report the value of XMLLINT in configure's output in all cases.
18894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18895 $as_echo_n "checking for XMLLINT... " >&6; }
18896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18897 $as_echo "$XMLLINT" >&6; }
18900 if test -z "$XSLTPROC"; then
18901 for ac_prog in xsltproc
18903 # Extract the first word of "$ac_prog", so it can be a program name with args.
18904 set dummy $ac_prog; ac_word=$2
18905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18906 $as_echo_n "checking for $ac_word... " >&6; }
18907 if ${ac_cv_path_XSLTPROC+:} false; then :
18908 $as_echo_n "(cached) " >&6
18909 else
18910 case $XSLTPROC in
18911 [\\/]* | ?:[\\/]*)
18912 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18915 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18916 for as_dir in $PATH
18918 IFS=$as_save_IFS
18919 test -z "$as_dir" && as_dir=.
18920 for ac_exec_ext in '' $ac_executable_extensions; do
18921 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18922 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18923 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18924 break 2
18926 done
18927 done
18928 IFS=$as_save_IFS
18931 esac
18933 XSLTPROC=$ac_cv_path_XSLTPROC
18934 if test -n "$XSLTPROC"; then
18935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18936 $as_echo "$XSLTPROC" >&6; }
18937 else
18938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18939 $as_echo "no" >&6; }
18943 test -n "$XSLTPROC" && break
18944 done
18946 else
18947 # Report the value of XSLTPROC in configure's output in all cases.
18948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18949 $as_echo_n "checking for XSLTPROC... " >&6; }
18950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18951 $as_echo "$XSLTPROC" >&6; }
18954 if test -z "$FOP"; then
18955 for ac_prog in fop
18957 # Extract the first word of "$ac_prog", so it can be a program name with args.
18958 set dummy $ac_prog; ac_word=$2
18959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18960 $as_echo_n "checking for $ac_word... " >&6; }
18961 if ${ac_cv_path_FOP+:} false; then :
18962 $as_echo_n "(cached) " >&6
18963 else
18964 case $FOP in
18965 [\\/]* | ?:[\\/]*)
18966 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18969 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18970 for as_dir in $PATH
18972 IFS=$as_save_IFS
18973 test -z "$as_dir" && as_dir=.
18974 for ac_exec_ext in '' $ac_executable_extensions; do
18975 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18976 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18977 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18978 break 2
18980 done
18981 done
18982 IFS=$as_save_IFS
18985 esac
18987 FOP=$ac_cv_path_FOP
18988 if test -n "$FOP"; then
18989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18990 $as_echo "$FOP" >&6; }
18991 else
18992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18993 $as_echo "no" >&6; }
18997 test -n "$FOP" && break
18998 done
19000 else
19001 # Report the value of FOP in configure's output in all cases.
19002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
19003 $as_echo_n "checking for FOP... " >&6; }
19004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19005 $as_echo "$FOP" >&6; }
19008 if test -z "$DBTOEPUB"; then
19009 for ac_prog in dbtoepub
19011 # Extract the first word of "$ac_prog", so it can be a program name with args.
19012 set dummy $ac_prog; ac_word=$2
19013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19014 $as_echo_n "checking for $ac_word... " >&6; }
19015 if ${ac_cv_path_DBTOEPUB+:} false; then :
19016 $as_echo_n "(cached) " >&6
19017 else
19018 case $DBTOEPUB in
19019 [\\/]* | ?:[\\/]*)
19020 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
19023 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19024 for as_dir in $PATH
19026 IFS=$as_save_IFS
19027 test -z "$as_dir" && as_dir=.
19028 for ac_exec_ext in '' $ac_executable_extensions; do
19029 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19030 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
19031 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19032 break 2
19034 done
19035 done
19036 IFS=$as_save_IFS
19039 esac
19041 DBTOEPUB=$ac_cv_path_DBTOEPUB
19042 if test -n "$DBTOEPUB"; then
19043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19044 $as_echo "$DBTOEPUB" >&6; }
19045 else
19046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19047 $as_echo "no" >&6; }
19051 test -n "$DBTOEPUB" && break
19052 done
19054 else
19055 # Report the value of DBTOEPUB in configure's output in all cases.
19056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
19057 $as_echo_n "checking for DBTOEPUB... " >&6; }
19058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19059 $as_echo "$DBTOEPUB" >&6; }
19064 # Check for test tools
19066 if test "$enable_tap_tests" = yes; then
19067 # Make sure we know where prove is.
19068 if test -z "$PROVE"; then
19069 for ac_prog in prove
19071 # Extract the first word of "$ac_prog", so it can be a program name with args.
19072 set dummy $ac_prog; ac_word=$2
19073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19074 $as_echo_n "checking for $ac_word... " >&6; }
19075 if ${ac_cv_path_PROVE+:} false; then :
19076 $as_echo_n "(cached) " >&6
19077 else
19078 case $PROVE in
19079 [\\/]* | ?:[\\/]*)
19080 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
19083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19084 for as_dir in $PATH
19086 IFS=$as_save_IFS
19087 test -z "$as_dir" && as_dir=.
19088 for ac_exec_ext in '' $ac_executable_extensions; do
19089 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19090 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
19091 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19092 break 2
19094 done
19095 done
19096 IFS=$as_save_IFS
19099 esac
19101 PROVE=$ac_cv_path_PROVE
19102 if test -n "$PROVE"; then
19103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19104 $as_echo "$PROVE" >&6; }
19105 else
19106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19107 $as_echo "no" >&6; }
19111 test -n "$PROVE" && break
19112 done
19114 else
19115 # Report the value of PROVE in configure's output in all cases.
19116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
19117 $as_echo_n "checking for PROVE... " >&6; }
19118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19119 $as_echo "$PROVE" >&6; }
19122 if test -z "$PROVE"; then
19123 as_fn_error $? "prove not found" "$LINENO" 5
19125 # Check for necessary Perl modules. You might think we should use
19126 # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
19127 # installation than perl, eg on MSys, so we have to check using prove.
19128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
19129 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
19130 __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__
19131 modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
19132 if test $? -eq 0; then
19133 # log the module version details, but don't show them interactively
19134 echo "$modulestderr" >&5
19135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19136 $as_echo "yes" >&6; }
19137 else
19138 # on failure, though, show the results to the user
19139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modulestderr" >&5
19140 $as_echo "$modulestderr" >&6; }
19141 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
19145 # If compiler will take -Wl,--as-needed (or various platform-specific
19146 # spellings thereof) then add that to LDFLAGS. This is much easier than
19147 # trying to filter LIBS to the minimum for each executable.
19148 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
19149 # libreadline; therefore we postpone testing it until we know what library
19150 # dependencies readline has. The test code will try to link with $LIBS.
19151 if test "$with_readline" = yes; then
19152 link_test_func=readline
19153 else
19154 link_test_func=exit
19157 if test "$PORTNAME" = "darwin"; then
19158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS" >&5
19159 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS... " >&6; }
19160 if ${pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs+:} false; then :
19161 $as_echo_n "(cached) " >&6
19162 else
19163 pgac_save_LDFLAGS=$LDFLAGS
19164 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19165 if test "$cross_compiling" = yes; then :
19166 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs="assuming no"
19167 else
19168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19169 /* end confdefs.h. */
19170 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19172 main ()
19176 return 0;
19178 _ACEOF
19179 if ac_fn_c_try_run "$LINENO"; then :
19180 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=yes
19181 else
19182 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=no
19184 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19185 conftest.$ac_objext conftest.beam conftest.$ac_ext
19188 LDFLAGS="$pgac_save_LDFLAGS"
19190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&5
19191 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&6; }
19192 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" = x"yes"; then
19193 LDFLAGS="${LDFLAGS} -Wl,-dead_strip_dylibs"
19197 elif test "$PORTNAME" = "openbsd"; then
19198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS" >&5
19199 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS... " >&6; }
19200 if ${pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic+:} false; then :
19201 $as_echo_n "(cached) " >&6
19202 else
19203 pgac_save_LDFLAGS=$LDFLAGS
19204 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19205 if test "$cross_compiling" = yes; then :
19206 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic="assuming no"
19207 else
19208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19209 /* end confdefs.h. */
19210 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19212 main ()
19216 return 0;
19218 _ACEOF
19219 if ac_fn_c_try_run "$LINENO"; then :
19220 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=yes
19221 else
19222 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=no
19224 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19225 conftest.$ac_objext conftest.beam conftest.$ac_ext
19228 LDFLAGS="$pgac_save_LDFLAGS"
19230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&5
19231 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&6; }
19232 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" = x"yes"; then
19233 LDFLAGS="${LDFLAGS} -Wl,-Bdynamic"
19237 else
19238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed, for LDFLAGS" >&5
19239 $as_echo_n "checking whether $CC supports -Wl,--as-needed, for LDFLAGS... " >&6; }
19240 if ${pgac_cv_prog_cc_LDFLAGS__Wl___as_needed+:} false; then :
19241 $as_echo_n "(cached) " >&6
19242 else
19243 pgac_save_LDFLAGS=$LDFLAGS
19244 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19245 if test "$cross_compiling" = yes; then :
19246 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed="assuming no"
19247 else
19248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19249 /* end confdefs.h. */
19250 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19252 main ()
19256 return 0;
19258 _ACEOF
19259 if ac_fn_c_try_run "$LINENO"; then :
19260 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=yes
19261 else
19262 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=no
19264 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19265 conftest.$ac_objext conftest.beam conftest.$ac_ext
19268 LDFLAGS="$pgac_save_LDFLAGS"
19270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&5
19271 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&6; }
19272 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" = x"yes"; then
19273 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
19279 # For linkers that understand --export-dynamic, add that to the LDFLAGS_EX_BE
19280 # (backend specific ldflags). One some platforms this will always fail (e.g.,
19281 # windows), but on others it depends on the choice of linker (e.g., solaris).
19282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE" >&5
19283 $as_echo_n "checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE... " >&6; }
19284 if ${pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic+:} false; then :
19285 $as_echo_n "(cached) " >&6
19286 else
19287 pgac_save_LDFLAGS=$LDFLAGS
19288 LDFLAGS="$pgac_save_LDFLAGS -Wl,--export-dynamic"
19289 if test "$cross_compiling" = yes; then :
19290 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic="assuming no"
19291 else
19292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19293 /* end confdefs.h. */
19294 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19296 main ()
19300 return 0;
19302 _ACEOF
19303 if ac_fn_c_try_run "$LINENO"; then :
19304 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=yes
19305 else
19306 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=no
19308 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19309 conftest.$ac_objext conftest.beam conftest.$ac_ext
19312 LDFLAGS="$pgac_save_LDFLAGS"
19314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&5
19315 $as_echo "$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&6; }
19316 if test x"$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" = x"yes"; then
19317 LDFLAGS_EX_BE="${LDFLAGS_EX_BE} -Wl,--export-dynamic"
19322 # Create compiler version string
19323 if test x"$GCC" = x"yes" ; then
19324 cc_string=`${CC} --version | sed q`
19325 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19326 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19327 cc_string=`${CC} -V 2>&1 | sed q`
19328 else
19329 cc_string=$CC
19333 cat >>confdefs.h <<_ACEOF
19334 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19335 _ACEOF
19338 # Supply a numeric version string for use by 3rd party add-ons
19339 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19340 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
19341 $AWK '{printf "%d%04d", $1, $2}'`"
19343 cat >>confdefs.h <<_ACEOF
19344 #define PG_VERSION_NUM $PG_VERSION_NUM
19345 _ACEOF
19349 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19350 # literally, so that it's possible to override it at build time using
19351 # a command like "make ... PG_SYSROOT=path". This has to be done after
19352 # we've finished all configure checks that depend on CPPFLAGS.
19353 # The same for LDFLAGS, too.
19354 if test x"$PG_SYSROOT" != x; then
19355 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19356 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19361 # Begin output steps
19363 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19364 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19365 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19366 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19367 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19368 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19369 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19370 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19371 # Currently only used when LLVM is used
19372 if test "$with_llvm" = yes ; then
19373 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19374 $as_echo "$as_me: using CXX=$CXX" >&6;}
19375 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19376 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19377 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19378 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19379 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19380 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19381 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19382 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19385 # prepare build tree if outside source tree
19386 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19387 # Note 2: /bin/pwd might be better than shell's built-in at getting
19388 # a symlink-free name.
19389 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19390 vpath_build=no
19391 else
19392 vpath_build=yes
19393 if test "$no_create" != yes; then
19394 $as_echo_n "preparing build tree... " >&6
19395 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19396 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19397 || as_fn_error $? "failed" "$LINENO" 5
19398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19399 $as_echo "done" >&6; }
19405 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19408 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}"
19411 if test "$PORTNAME" = "win32"; then
19412 ac_config_commands="$ac_config_commands check_win32_symlinks"
19416 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19419 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19422 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19425 cat >confcache <<\_ACEOF
19426 # This file is a shell script that caches the results of configure
19427 # tests run on this system so they can be shared between configure
19428 # scripts and configure runs, see configure's option --config-cache.
19429 # It is not useful on other systems. If it contains results you don't
19430 # want to keep, you may remove or edit it.
19432 # config.status only pays attention to the cache file if you give it
19433 # the --recheck option to rerun configure.
19435 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19436 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19437 # following values.
19439 _ACEOF
19441 # The following way of writing the cache mishandles newlines in values,
19442 # but we know of no workaround that is simple, portable, and efficient.
19443 # So, we kill variables containing newlines.
19444 # Ultrix sh set writes to stderr and can't be redirected directly,
19445 # and sets the high bit in the cache file unless we assign to the vars.
19447 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19448 eval ac_val=\$$ac_var
19449 case $ac_val in #(
19450 *${as_nl}*)
19451 case $ac_var in #(
19452 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19453 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19454 esac
19455 case $ac_var in #(
19456 _ | IFS | as_nl) ;; #(
19457 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19458 *) { eval $ac_var=; unset $ac_var;} ;;
19459 esac ;;
19460 esac
19461 done
19463 (set) 2>&1 |
19464 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19465 *${as_nl}ac_space=\ *)
19466 # `set' does not quote correctly, so add quotes: double-quote
19467 # substitution turns \\\\ into \\, and sed turns \\ into \.
19468 sed -n \
19469 "s/'/'\\\\''/g;
19470 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19471 ;; #(
19473 # `set' quotes correctly as required by POSIX, so do not add quotes.
19474 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19476 esac |
19477 sort
19479 sed '
19480 /^ac_cv_env_/b end
19481 t clear
19482 :clear
19483 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19484 t end
19485 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19486 :end' >>confcache
19487 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19488 if test -w "$cache_file"; then
19489 if test "x$cache_file" != "x/dev/null"; then
19490 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19491 $as_echo "$as_me: updating cache $cache_file" >&6;}
19492 if test ! -f "$cache_file" || test -h "$cache_file"; then
19493 cat confcache >"$cache_file"
19494 else
19495 case $cache_file in #(
19496 */* | ?:*)
19497 mv -f confcache "$cache_file"$$ &&
19498 mv -f "$cache_file"$$ "$cache_file" ;; #(
19500 mv -f confcache "$cache_file" ;;
19501 esac
19504 else
19505 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19506 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19509 rm -f confcache
19511 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19512 # Let make expand exec_prefix.
19513 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19515 DEFS=-DHAVE_CONFIG_H
19517 ac_libobjs=
19518 ac_ltlibobjs=
19520 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19521 # 1. Remove the extension, and $U if already installed.
19522 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19523 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19524 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19525 # will be set to the directory where LIBOBJS objects are built.
19526 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19527 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19528 done
19529 LIBOBJS=$ac_libobjs
19531 LTLIBOBJS=$ac_ltlibobjs
19536 : "${CONFIG_STATUS=./config.status}"
19537 ac_write_fail=0
19538 ac_clean_files_save=$ac_clean_files
19539 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19540 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19541 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19542 as_write_fail=0
19543 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19544 #! $SHELL
19545 # Generated by $as_me.
19546 # Run this file to recreate the current configuration.
19547 # Compiler output produced by configure, useful for debugging
19548 # configure, is in config.log if it exists.
19550 debug=false
19551 ac_cs_recheck=false
19552 ac_cs_silent=false
19554 SHELL=\${CONFIG_SHELL-$SHELL}
19555 export SHELL
19556 _ASEOF
19557 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19558 ## -------------------- ##
19559 ## M4sh Initialization. ##
19560 ## -------------------- ##
19562 # Be more Bourne compatible
19563 DUALCASE=1; export DUALCASE # for MKS sh
19564 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19565 emulate sh
19566 NULLCMD=:
19567 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19568 # is contrary to our usage. Disable this feature.
19569 alias -g '${1+"$@"}'='"$@"'
19570 setopt NO_GLOB_SUBST
19571 else
19572 case `(set -o) 2>/dev/null` in #(
19573 *posix*) :
19574 set -o posix ;; #(
19575 *) :
19577 esac
19581 as_nl='
19583 export as_nl
19584 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19585 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19586 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19587 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19588 # Prefer a ksh shell builtin over an external printf program on Solaris,
19589 # but without wasting forks for bash or zsh.
19590 if test -z "$BASH_VERSION$ZSH_VERSION" \
19591 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19592 as_echo='print -r --'
19593 as_echo_n='print -rn --'
19594 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19595 as_echo='printf %s\n'
19596 as_echo_n='printf %s'
19597 else
19598 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19599 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19600 as_echo_n='/usr/ucb/echo -n'
19601 else
19602 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19603 as_echo_n_body='eval
19604 arg=$1;
19605 case $arg in #(
19606 *"$as_nl"*)
19607 expr "X$arg" : "X\\(.*\\)$as_nl";
19608 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19609 esac;
19610 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19612 export as_echo_n_body
19613 as_echo_n='sh -c $as_echo_n_body as_echo'
19615 export as_echo_body
19616 as_echo='sh -c $as_echo_body as_echo'
19619 # The user is always right.
19620 if test "${PATH_SEPARATOR+set}" != set; then
19621 PATH_SEPARATOR=:
19622 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19623 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19624 PATH_SEPARATOR=';'
19629 # IFS
19630 # We need space, tab and new line, in precisely that order. Quoting is
19631 # there to prevent editors from complaining about space-tab.
19632 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19633 # splitting by setting IFS to empty value.)
19634 IFS=" "" $as_nl"
19636 # Find who we are. Look in the path if we contain no directory separator.
19637 as_myself=
19638 case $0 in #((
19639 *[\\/]* ) as_myself=$0 ;;
19640 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19641 for as_dir in $PATH
19643 IFS=$as_save_IFS
19644 test -z "$as_dir" && as_dir=.
19645 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19646 done
19647 IFS=$as_save_IFS
19650 esac
19651 # We did not find ourselves, most probably we were run as `sh COMMAND'
19652 # in which case we are not to be found in the path.
19653 if test "x$as_myself" = x; then
19654 as_myself=$0
19656 if test ! -f "$as_myself"; then
19657 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19658 exit 1
19661 # Unset variables that we do not need and which cause bugs (e.g. in
19662 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19663 # suppresses any "Segmentation fault" message there. '((' could
19664 # trigger a bug in pdksh 5.2.14.
19665 for as_var in BASH_ENV ENV MAIL MAILPATH
19666 do eval test x\${$as_var+set} = xset \
19667 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19668 done
19669 PS1='$ '
19670 PS2='> '
19671 PS4='+ '
19673 # NLS nuisances.
19674 LC_ALL=C
19675 export LC_ALL
19676 LANGUAGE=C
19677 export LANGUAGE
19679 # CDPATH.
19680 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19683 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19684 # ----------------------------------------
19685 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19686 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19687 # script with STATUS, using 1 if that was 0.
19688 as_fn_error ()
19690 as_status=$1; test $as_status -eq 0 && as_status=1
19691 if test "$4"; then
19692 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19693 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19695 $as_echo "$as_me: error: $2" >&2
19696 as_fn_exit $as_status
19697 } # as_fn_error
19700 # as_fn_set_status STATUS
19701 # -----------------------
19702 # Set $? to STATUS, without forking.
19703 as_fn_set_status ()
19705 return $1
19706 } # as_fn_set_status
19708 # as_fn_exit STATUS
19709 # -----------------
19710 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19711 as_fn_exit ()
19713 set +e
19714 as_fn_set_status $1
19715 exit $1
19716 } # as_fn_exit
19718 # as_fn_unset VAR
19719 # ---------------
19720 # Portably unset VAR.
19721 as_fn_unset ()
19723 { eval $1=; unset $1;}
19725 as_unset=as_fn_unset
19726 # as_fn_append VAR VALUE
19727 # ----------------------
19728 # Append the text in VALUE to the end of the definition contained in VAR. Take
19729 # advantage of any shell optimizations that allow amortized linear growth over
19730 # repeated appends, instead of the typical quadratic growth present in naive
19731 # implementations.
19732 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19733 eval 'as_fn_append ()
19735 eval $1+=\$2
19737 else
19738 as_fn_append ()
19740 eval $1=\$$1\$2
19742 fi # as_fn_append
19744 # as_fn_arith ARG...
19745 # ------------------
19746 # Perform arithmetic evaluation on the ARGs, and store the result in the
19747 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19748 # must be portable across $(()) and expr.
19749 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19750 eval 'as_fn_arith ()
19752 as_val=$(( $* ))
19754 else
19755 as_fn_arith ()
19757 as_val=`expr "$@" || test $? -eq 1`
19759 fi # as_fn_arith
19762 if expr a : '\(a\)' >/dev/null 2>&1 &&
19763 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19764 as_expr=expr
19765 else
19766 as_expr=false
19769 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19770 as_basename=basename
19771 else
19772 as_basename=false
19775 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19776 as_dirname=dirname
19777 else
19778 as_dirname=false
19781 as_me=`$as_basename -- "$0" ||
19782 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19783 X"$0" : 'X\(//\)$' \| \
19784 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19785 $as_echo X/"$0" |
19786 sed '/^.*\/\([^/][^/]*\)\/*$/{
19787 s//\1/
19790 /^X\/\(\/\/\)$/{
19791 s//\1/
19794 /^X\/\(\/\).*/{
19795 s//\1/
19798 s/.*/./; q'`
19800 # Avoid depending upon Character Ranges.
19801 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19802 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19803 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19804 as_cr_digits='0123456789'
19805 as_cr_alnum=$as_cr_Letters$as_cr_digits
19807 ECHO_C= ECHO_N= ECHO_T=
19808 case `echo -n x` in #(((((
19809 -n*)
19810 case `echo 'xy\c'` in
19811 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19812 xy) ECHO_C='\c';;
19813 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19814 ECHO_T=' ';;
19815 esac;;
19817 ECHO_N='-n';;
19818 esac
19820 rm -f conf$$ conf$$.exe conf$$.file
19821 if test -d conf$$.dir; then
19822 rm -f conf$$.dir/conf$$.file
19823 else
19824 rm -f conf$$.dir
19825 mkdir conf$$.dir 2>/dev/null
19827 if (echo >conf$$.file) 2>/dev/null; then
19828 if ln -s conf$$.file conf$$ 2>/dev/null; then
19829 as_ln_s='ln -s'
19830 # ... but there are two gotchas:
19831 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19832 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19833 # In both cases, we have to default to `cp -pR'.
19834 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19835 as_ln_s='cp -pR'
19836 elif ln conf$$.file conf$$ 2>/dev/null; then
19837 as_ln_s=ln
19838 else
19839 as_ln_s='cp -pR'
19841 else
19842 as_ln_s='cp -pR'
19844 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19845 rmdir conf$$.dir 2>/dev/null
19848 # as_fn_mkdir_p
19849 # -------------
19850 # Create "$as_dir" as a directory, including parents if necessary.
19851 as_fn_mkdir_p ()
19854 case $as_dir in #(
19855 -*) as_dir=./$as_dir;;
19856 esac
19857 test -d "$as_dir" || eval $as_mkdir_p || {
19858 as_dirs=
19859 while :; do
19860 case $as_dir in #(
19861 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19862 *) as_qdir=$as_dir;;
19863 esac
19864 as_dirs="'$as_qdir' $as_dirs"
19865 as_dir=`$as_dirname -- "$as_dir" ||
19866 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19867 X"$as_dir" : 'X\(//\)[^/]' \| \
19868 X"$as_dir" : 'X\(//\)$' \| \
19869 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19870 $as_echo X"$as_dir" |
19871 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19872 s//\1/
19875 /^X\(\/\/\)[^/].*/{
19876 s//\1/
19879 /^X\(\/\/\)$/{
19880 s//\1/
19883 /^X\(\/\).*/{
19884 s//\1/
19887 s/.*/./; q'`
19888 test -d "$as_dir" && break
19889 done
19890 test -z "$as_dirs" || eval "mkdir $as_dirs"
19891 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19894 } # as_fn_mkdir_p
19895 if mkdir -p . 2>/dev/null; then
19896 as_mkdir_p='mkdir -p "$as_dir"'
19897 else
19898 test -d ./-p && rmdir ./-p
19899 as_mkdir_p=false
19903 # as_fn_executable_p FILE
19904 # -----------------------
19905 # Test if FILE is an executable regular file.
19906 as_fn_executable_p ()
19908 test -f "$1" && test -x "$1"
19909 } # as_fn_executable_p
19910 as_test_x='test -x'
19911 as_executable_p=as_fn_executable_p
19913 # Sed expression to map a string onto a valid CPP name.
19914 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19916 # Sed expression to map a string onto a valid variable name.
19917 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19920 exec 6>&1
19921 ## ----------------------------------- ##
19922 ## Main body of $CONFIG_STATUS script. ##
19923 ## ----------------------------------- ##
19924 _ASEOF
19925 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19927 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19928 # Save the log message, to keep $0 and so on meaningful, and to
19929 # report actual input values of CONFIG_FILES etc. instead of their
19930 # values after options handling.
19931 ac_log="
19932 This file was extended by PostgreSQL $as_me 16devel, which was
19933 generated by GNU Autoconf 2.69. Invocation command line was
19935 CONFIG_FILES = $CONFIG_FILES
19936 CONFIG_HEADERS = $CONFIG_HEADERS
19937 CONFIG_LINKS = $CONFIG_LINKS
19938 CONFIG_COMMANDS = $CONFIG_COMMANDS
19939 $ $0 $@
19941 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19944 _ACEOF
19946 case $ac_config_files in *"
19947 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19948 esac
19950 case $ac_config_headers in *"
19951 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19952 esac
19955 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19956 # Files that config.status was made for.
19957 config_files="$ac_config_files"
19958 config_headers="$ac_config_headers"
19959 config_links="$ac_config_links"
19960 config_commands="$ac_config_commands"
19962 _ACEOF
19964 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19965 ac_cs_usage="\
19966 \`$as_me' instantiates files and other configuration actions
19967 from templates according to the current configuration. Unless the files
19968 and actions are specified as TAGs, all are instantiated by default.
19970 Usage: $0 [OPTION]... [TAG]...
19972 -h, --help print this help, then exit
19973 -V, --version print version number and configuration settings, then exit
19974 --config print configuration, then exit
19975 -q, --quiet, --silent
19976 do not print progress messages
19977 -d, --debug don't remove temporary files
19978 --recheck update $as_me by reconfiguring in the same conditions
19979 --file=FILE[:TEMPLATE]
19980 instantiate the configuration file FILE
19981 --header=FILE[:TEMPLATE]
19982 instantiate the configuration header FILE
19984 Configuration files:
19985 $config_files
19987 Configuration headers:
19988 $config_headers
19990 Configuration links:
19991 $config_links
19993 Configuration commands:
19994 $config_commands
19996 Report bugs to <pgsql-bugs@lists.postgresql.org>.
19997 PostgreSQL home page: <https://www.postgresql.org/>."
19999 _ACEOF
20000 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20001 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20002 ac_cs_version="\\
20003 PostgreSQL config.status 16devel
20004 configured by $0, generated by GNU Autoconf 2.69,
20005 with options \\"\$ac_cs_config\\"
20007 Copyright (C) 2012 Free Software Foundation, Inc.
20008 This config.status script is free software; the Free Software Foundation
20009 gives unlimited permission to copy, distribute and modify it."
20011 ac_pwd='$ac_pwd'
20012 srcdir='$srcdir'
20013 INSTALL='$INSTALL'
20014 MKDIR_P='$MKDIR_P'
20015 AWK='$AWK'
20016 test -n "\$AWK" || AWK=awk
20017 _ACEOF
20019 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20020 # The default lists apply if the user does not specify any file.
20021 ac_need_defaults=:
20022 while test $# != 0
20024 case $1 in
20025 --*=?*)
20026 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20027 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20028 ac_shift=:
20030 --*=)
20031 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20032 ac_optarg=
20033 ac_shift=:
20036 ac_option=$1
20037 ac_optarg=$2
20038 ac_shift=shift
20040 esac
20042 case $ac_option in
20043 # Handling of the options.
20044 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20045 ac_cs_recheck=: ;;
20046 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20047 $as_echo "$ac_cs_version"; exit ;;
20048 --config | --confi | --conf | --con | --co | --c )
20049 $as_echo "$ac_cs_config"; exit ;;
20050 --debug | --debu | --deb | --de | --d | -d )
20051 debug=: ;;
20052 --file | --fil | --fi | --f )
20053 $ac_shift
20054 case $ac_optarg in
20055 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20056 '') as_fn_error $? "missing file argument" ;;
20057 esac
20058 as_fn_append CONFIG_FILES " '$ac_optarg'"
20059 ac_need_defaults=false;;
20060 --header | --heade | --head | --hea )
20061 $ac_shift
20062 case $ac_optarg in
20063 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20064 esac
20065 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20066 ac_need_defaults=false;;
20067 --he | --h)
20068 # Conflict between --help and --header
20069 as_fn_error $? "ambiguous option: \`$1'
20070 Try \`$0 --help' for more information.";;
20071 --help | --hel | -h )
20072 $as_echo "$ac_cs_usage"; exit ;;
20073 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20074 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20075 ac_cs_silent=: ;;
20077 # This is an error.
20078 -*) as_fn_error $? "unrecognized option: \`$1'
20079 Try \`$0 --help' for more information." ;;
20081 *) as_fn_append ac_config_targets " $1"
20082 ac_need_defaults=false ;;
20084 esac
20085 shift
20086 done
20088 ac_configure_extra_args=
20090 if $ac_cs_silent; then
20091 exec 6>/dev/null
20092 ac_configure_extra_args="$ac_configure_extra_args --silent"
20095 _ACEOF
20096 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20097 if \$ac_cs_recheck; then
20098 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20099 shift
20100 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20101 CONFIG_SHELL='$SHELL'
20102 export CONFIG_SHELL
20103 exec "\$@"
20106 _ACEOF
20107 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20108 exec 5>>config.log
20110 echo
20111 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20112 ## Running $as_me. ##
20113 _ASBOX
20114 $as_echo "$ac_log"
20115 } >&5
20117 _ACEOF
20118 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20119 _ACEOF
20121 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20123 # Handling of arguments.
20124 for ac_config_target in $ac_config_targets
20126 case $ac_config_target in
20127 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
20128 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
20129 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
20130 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
20131 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
20132 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
20133 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
20134 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
20135 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
20136 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
20137 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
20139 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20140 esac
20141 done
20144 # If the user did not use the arguments to specify the items to instantiate,
20145 # then the envvar interface is used. Set only those that are not.
20146 # We use the long form for the default assignment because of an extremely
20147 # bizarre bug on SunOS 4.1.3.
20148 if $ac_need_defaults; then
20149 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20150 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20151 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20152 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20155 # Have a temporary directory for convenience. Make it in the build tree
20156 # simply because there is no reason against having it here, and in addition,
20157 # creating and moving files from /tmp can sometimes cause problems.
20158 # Hook for its removal unless debugging.
20159 # Note that there is a small window in which the directory will not be cleaned:
20160 # after its creation but before its name has been assigned to `$tmp'.
20161 $debug ||
20163 tmp= ac_tmp=
20164 trap 'exit_status=$?
20165 : "${ac_tmp:=$tmp}"
20166 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20168 trap 'as_fn_exit 1' 1 2 13 15
20170 # Create a (secure) tmp directory for tmp files.
20173 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20174 test -d "$tmp"
20175 } ||
20177 tmp=./conf$$-$RANDOM
20178 (umask 077 && mkdir "$tmp")
20179 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20180 ac_tmp=$tmp
20182 # Set up the scripts for CONFIG_FILES section.
20183 # No need to generate them if there are no CONFIG_FILES.
20184 # This happens for instance with `./config.status config.h'.
20185 if test -n "$CONFIG_FILES"; then
20188 ac_cr=`echo X | tr X '\015'`
20189 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20190 # But we know of no other shell where ac_cr would be empty at this
20191 # point, so we can use a bashism as a fallback.
20192 if test "x$ac_cr" = x; then
20193 eval ac_cr=\$\'\\r\'
20195 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20196 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20197 ac_cs_awk_cr='\\r'
20198 else
20199 ac_cs_awk_cr=$ac_cr
20202 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20203 _ACEOF
20207 echo "cat >conf$$subs.awk <<_ACEOF" &&
20208 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20209 echo "_ACEOF"
20210 } >conf$$subs.sh ||
20211 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20212 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20213 ac_delim='%!_!# '
20214 for ac_last_try in false false false false false :; do
20215 . ./conf$$subs.sh ||
20216 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20218 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20219 if test $ac_delim_n = $ac_delim_num; then
20220 break
20221 elif $ac_last_try; then
20222 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20223 else
20224 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20226 done
20227 rm -f conf$$subs.sh
20229 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20230 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20231 _ACEOF
20232 sed -n '
20234 s/^/S["/; s/!.*/"]=/
20237 s/^[^!]*!//
20238 :repl
20239 t repl
20240 s/'"$ac_delim"'$//
20241 t delim
20244 s/\(.\{148\}\)..*/\1/
20245 t more1
20246 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20249 b repl
20250 :more1
20251 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20254 s/.\{148\}//
20255 t nl
20256 :delim
20258 s/\(.\{148\}\)..*/\1/
20259 t more2
20260 s/["\\]/\\&/g; s/^/"/; s/$/"/
20263 :more2
20264 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20267 s/.\{148\}//
20268 t delim
20269 ' <conf$$subs.awk | sed '
20270 /^[^""]/{
20272 s/\n//
20274 ' >>$CONFIG_STATUS || ac_write_fail=1
20275 rm -f conf$$subs.awk
20276 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20277 _ACAWK
20278 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20279 for (key in S) S_is_set[key] = 1
20280 FS = "\a"
20284 line = $ 0
20285 nfields = split(line, field, "@")
20286 substed = 0
20287 len = length(field[1])
20288 for (i = 2; i < nfields; i++) {
20289 key = field[i]
20290 keylen = length(key)
20291 if (S_is_set[key]) {
20292 value = S[key]
20293 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20294 len += length(value) + length(field[++i])
20295 substed = 1
20296 } else
20297 len += 1 + keylen
20300 print line
20303 _ACAWK
20304 _ACEOF
20305 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20306 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20307 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20308 else
20310 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20311 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20312 _ACEOF
20314 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20315 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20316 # trailing colons and then remove the whole line if VPATH becomes empty
20317 # (actually we leave an empty line to preserve line numbers).
20318 if test "x$srcdir" = x.; then
20319 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20321 s///
20322 s/^/:/
20323 s/[ ]*$/:/
20324 s/:\$(srcdir):/:/g
20325 s/:\${srcdir}:/:/g
20326 s/:@srcdir@:/:/g
20327 s/^:*//
20328 s/:*$//
20330 s/\(=[ ]*\).*/\1/
20332 s/\n//
20333 s/^[^=]*=[ ]*$//
20337 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20338 fi # test -n "$CONFIG_FILES"
20340 # Set up the scripts for CONFIG_HEADERS section.
20341 # No need to generate them if there are no CONFIG_HEADERS.
20342 # This happens for instance with `./config.status Makefile'.
20343 if test -n "$CONFIG_HEADERS"; then
20344 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20345 BEGIN {
20346 _ACEOF
20348 # Transform confdefs.h into an awk script `defines.awk', embedded as
20349 # here-document in config.status, that substitutes the proper values into
20350 # config.h.in to produce config.h.
20352 # Create a delimiter string that does not exist in confdefs.h, to ease
20353 # handling of long lines.
20354 ac_delim='%!_!# '
20355 for ac_last_try in false false :; do
20356 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20357 if test -z "$ac_tt"; then
20358 break
20359 elif $ac_last_try; then
20360 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20361 else
20362 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20364 done
20366 # For the awk script, D is an array of macro values keyed by name,
20367 # likewise P contains macro parameters if any. Preserve backslash
20368 # newline sequences.
20370 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20371 sed -n '
20372 s/.\{148\}/&'"$ac_delim"'/g
20373 t rset
20374 :rset
20375 s/^[ ]*#[ ]*define[ ][ ]*/ /
20376 t def
20378 :def
20379 s/\\$//
20380 t bsnl
20381 s/["\\]/\\&/g
20382 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20383 D["\1"]=" \3"/p
20384 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20386 :bsnl
20387 s/["\\]/\\&/g
20388 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20389 D["\1"]=" \3\\\\\\n"\\/p
20390 t cont
20391 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20392 t cont
20394 :cont
20396 s/.\{148\}/&'"$ac_delim"'/g
20397 t clear
20398 :clear
20399 s/\\$//
20400 t bsnlc
20401 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20403 :bsnlc
20404 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20405 b cont
20406 ' <confdefs.h | sed '
20407 s/'"$ac_delim"'/"\\\
20408 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20410 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20411 for (key in D) D_is_set[key] = 1
20412 FS = "\a"
20414 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20415 line = \$ 0
20416 split(line, arg, " ")
20417 if (arg[1] == "#") {
20418 defundef = arg[2]
20419 mac1 = arg[3]
20420 } else {
20421 defundef = substr(arg[1], 2)
20422 mac1 = arg[2]
20424 split(mac1, mac2, "(") #)
20425 macro = mac2[1]
20426 prefix = substr(line, 1, index(line, defundef) - 1)
20427 if (D_is_set[macro]) {
20428 # Preserve the white space surrounding the "#".
20429 print prefix "define", macro P[macro] D[macro]
20430 next
20431 } else {
20432 # Replace #undef with comments. This is necessary, for example,
20433 # in the case of _POSIX_SOURCE, which is predefined and required
20434 # on some systems where configure will not decide to define it.
20435 if (defundef == "undef") {
20436 print "/*", prefix defundef, macro, "*/"
20437 next
20441 { print }
20442 _ACAWK
20443 _ACEOF
20444 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20445 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20446 fi # test -n "$CONFIG_HEADERS"
20449 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20450 shift
20451 for ac_tag
20453 case $ac_tag in
20454 :[FHLC]) ac_mode=$ac_tag; continue;;
20455 esac
20456 case $ac_mode$ac_tag in
20457 :[FHL]*:*);;
20458 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20459 :[FH]-) ac_tag=-:-;;
20460 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20461 esac
20462 ac_save_IFS=$IFS
20463 IFS=:
20464 set x $ac_tag
20465 IFS=$ac_save_IFS
20466 shift
20467 ac_file=$1
20468 shift
20470 case $ac_mode in
20471 :L) ac_source=$1;;
20472 :[FH])
20473 ac_file_inputs=
20474 for ac_f
20476 case $ac_f in
20477 -) ac_f="$ac_tmp/stdin";;
20478 *) # Look for the file first in the build tree, then in the source tree
20479 # (if the path is not absolute). The absolute path cannot be DOS-style,
20480 # because $ac_f cannot contain `:'.
20481 test -f "$ac_f" ||
20482 case $ac_f in
20483 [\\/$]*) false;;
20484 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20485 esac ||
20486 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20487 esac
20488 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20489 as_fn_append ac_file_inputs " '$ac_f'"
20490 done
20492 # Let's still pretend it is `configure' which instantiates (i.e., don't
20493 # use $as_me), people would be surprised to read:
20494 # /* config.h. Generated by config.status. */
20495 configure_input='Generated from '`
20496 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20497 `' by configure.'
20498 if test x"$ac_file" != x-; then
20499 configure_input="$ac_file. $configure_input"
20500 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20501 $as_echo "$as_me: creating $ac_file" >&6;}
20503 # Neutralize special characters interpreted by sed in replacement strings.
20504 case $configure_input in #(
20505 *\&* | *\|* | *\\* )
20506 ac_sed_conf_input=`$as_echo "$configure_input" |
20507 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20508 *) ac_sed_conf_input=$configure_input;;
20509 esac
20511 case $ac_tag in
20512 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20513 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20514 esac
20516 esac
20518 ac_dir=`$as_dirname -- "$ac_file" ||
20519 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20520 X"$ac_file" : 'X\(//\)[^/]' \| \
20521 X"$ac_file" : 'X\(//\)$' \| \
20522 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20523 $as_echo X"$ac_file" |
20524 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20525 s//\1/
20528 /^X\(\/\/\)[^/].*/{
20529 s//\1/
20532 /^X\(\/\/\)$/{
20533 s//\1/
20536 /^X\(\/\).*/{
20537 s//\1/
20540 s/.*/./; q'`
20541 as_dir="$ac_dir"; as_fn_mkdir_p
20542 ac_builddir=.
20544 case "$ac_dir" in
20545 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20547 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20548 # A ".." for each directory in $ac_dir_suffix.
20549 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20550 case $ac_top_builddir_sub in
20551 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20552 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20553 esac ;;
20554 esac
20555 ac_abs_top_builddir=$ac_pwd
20556 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20557 # for backward compatibility:
20558 ac_top_builddir=$ac_top_build_prefix
20560 case $srcdir in
20561 .) # We are building in place.
20562 ac_srcdir=.
20563 ac_top_srcdir=$ac_top_builddir_sub
20564 ac_abs_top_srcdir=$ac_pwd ;;
20565 [\\/]* | ?:[\\/]* ) # Absolute name.
20566 ac_srcdir=$srcdir$ac_dir_suffix;
20567 ac_top_srcdir=$srcdir
20568 ac_abs_top_srcdir=$srcdir ;;
20569 *) # Relative name.
20570 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20571 ac_top_srcdir=$ac_top_build_prefix$srcdir
20572 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20573 esac
20574 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20577 case $ac_mode in
20580 # CONFIG_FILE
20583 case $INSTALL in
20584 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20585 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20586 esac
20587 ac_MKDIR_P=$MKDIR_P
20588 case $MKDIR_P in
20589 [\\/$]* | ?:[\\/]* ) ;;
20590 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20591 esac
20592 _ACEOF
20594 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20595 # If the template does not know about datarootdir, expand it.
20596 # FIXME: This hack should be removed a few years after 2.60.
20597 ac_datarootdir_hack=; ac_datarootdir_seen=
20598 ac_sed_dataroot='
20599 /datarootdir/ {
20603 /@datadir@/p
20604 /@docdir@/p
20605 /@infodir@/p
20606 /@localedir@/p
20607 /@mandir@/p'
20608 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20609 *datarootdir*) ac_datarootdir_seen=yes;;
20610 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20611 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20612 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20613 _ACEOF
20614 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20615 ac_datarootdir_hack='
20616 s&@datadir@&$datadir&g
20617 s&@docdir@&$docdir&g
20618 s&@infodir@&$infodir&g
20619 s&@localedir@&$localedir&g
20620 s&@mandir@&$mandir&g
20621 s&\\\${datarootdir}&$datarootdir&g' ;;
20622 esac
20623 _ACEOF
20625 # Neutralize VPATH when `$srcdir' = `.'.
20626 # Shell code in configure.ac might set extrasub.
20627 # FIXME: do we really want to maintain this feature?
20628 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20629 ac_sed_extra="$ac_vpsub
20630 $extrasub
20631 _ACEOF
20632 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20634 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20635 s|@configure_input@|$ac_sed_conf_input|;t t
20636 s&@top_builddir@&$ac_top_builddir_sub&;t t
20637 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20638 s&@srcdir@&$ac_srcdir&;t t
20639 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20640 s&@top_srcdir@&$ac_top_srcdir&;t t
20641 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20642 s&@builddir@&$ac_builddir&;t t
20643 s&@abs_builddir@&$ac_abs_builddir&;t t
20644 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20645 s&@INSTALL@&$ac_INSTALL&;t t
20646 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20647 $ac_datarootdir_hack
20649 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20650 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20652 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20653 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20654 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20655 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20657 which seems to be undefined. Please make sure it is defined" >&5
20658 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20659 which seems to be undefined. Please make sure it is defined" >&2;}
20661 rm -f "$ac_tmp/stdin"
20662 case $ac_file in
20663 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20664 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20665 esac \
20666 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20670 # CONFIG_HEADER
20672 if test x"$ac_file" != x-; then
20674 $as_echo "/* $configure_input */" \
20675 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20676 } >"$ac_tmp/config.h" \
20677 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20678 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20679 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20680 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20681 else
20682 rm -f "$ac_file"
20683 mv "$ac_tmp/config.h" "$ac_file" \
20684 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20686 else
20687 $as_echo "/* $configure_input */" \
20688 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20689 || as_fn_error $? "could not create -" "$LINENO" 5
20694 # CONFIG_LINK
20697 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20699 else
20700 # Prefer the file from the source tree if names are identical.
20701 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20702 ac_source=$srcdir/$ac_source
20705 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20706 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20708 if test ! -r "$ac_source"; then
20709 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20711 rm -f "$ac_file"
20713 # Try a relative symlink, then a hard link, then a copy.
20714 case $ac_source in
20715 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20716 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20717 esac
20718 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20719 ln "$ac_source" "$ac_file" 2>/dev/null ||
20720 cp -p "$ac_source" "$ac_file" ||
20721 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20724 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20725 $as_echo "$as_me: executing $ac_file commands" >&6;}
20727 esac
20730 case $ac_file$ac_mode in
20731 "check_win32_symlinks":C)
20732 # Links sometimes fail undetected on Mingw -
20733 # so here we detect it and warn the user
20734 for FILE in $CONFIG_LINKS
20736 # test -e works for symlinks in the MinGW console
20737 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20738 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20739 done
20741 "src/include/pg_config.h":H)
20742 # Update timestamp for pg_config.h (see Makefile.global)
20743 echo >src/include/stamp-h
20745 "src/include/pg_config_ext.h":H)
20746 # Update timestamp for pg_config_ext.h (see Makefile.global)
20747 echo >src/include/stamp-ext-h
20749 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20751 esac
20752 done # for ac_tag
20755 as_fn_exit 0
20756 _ACEOF
20757 ac_clean_files=$ac_clean_files_save
20759 test $ac_write_fail = 0 ||
20760 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20763 # configure is writing to config.log, and then calls config.status.
20764 # config.status does its own redirection, appending to config.log.
20765 # Unfortunately, on DOS this fails, as config.log is still kept open
20766 # by configure, so config.status won't be able to write to it; its
20767 # output is simply discarded. So we exec the FD to /dev/null,
20768 # effectively closing config.log, so it can be properly (re)opened and
20769 # appended to by config.status. When coming back to configure, we
20770 # need to make the FD available again.
20771 if test "$no_create" != yes; then
20772 ac_cs_success=:
20773 ac_config_status_args=
20774 test "$silent" = yes &&
20775 ac_config_status_args="$ac_config_status_args --quiet"
20776 exec 5>/dev/null
20777 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20778 exec 5>>config.log
20779 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20780 # would make configure fail if this is the last instruction.
20781 $ac_cs_success || as_fn_exit 1
20783 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20784 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20785 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20789 # Ensure that any meson build directories would reconfigure and see that
20790 # there's a conflicting in-tree build and can error out.
20791 if test "$vpath_build"="no"; then
20792 touch meson.build