Remove PHOT from our default timezone abbreviations list.
[pgsql.git] / configure
blobcfd968235f7737367c9d1daef0ac017abd8c3ba0
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 17devel.
5 # Report bugs to <pgsql-bugs@lists.postgresql.org>.
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
14 # Copyright (c) 1996-2023, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22 emulate sh
23 NULLCMD=:
24 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
27 setopt NO_GLOB_SUBST
28 else
29 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
34 esac
38 as_nl='
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54 else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
86 # IFS
87 # We need space, tab and new line, in precisely that order. Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" "" $as_nl"
93 # Find who we are. Look in the path if we contain no directory separator.
94 as_myself=
95 case $0 in #((
96 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
104 IFS=$as_save_IFS
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111 as_myself=$0
113 if test ! -f "$as_myself"; then
114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there. '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139 # Use a proper internal environment variable to ensure we don't fall
140 # into an infinite loop, continuously re-executing ourselves.
141 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
142 _as_can_reexec=no; export _as_can_reexec;
143 # We cannot yet assume a decent shell, so we have to provide a
144 # neutralization value for shells without unset; and this also
145 # works around shells that cannot unset nonexistent variables.
146 # Preserve -v and -x to the replacement shell.
147 BASH_ENV=/dev/null
148 ENV=/dev/null
149 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
150 case $- in # ((((
151 *v*x* | *x*v* ) as_opts=-vx ;;
152 *v* ) as_opts=-v ;;
153 *x* ) as_opts=-x ;;
154 * ) as_opts= ;;
155 esac
156 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
157 # Admittedly, this is quite paranoid, since all the known shells bail
158 # out after a failed `exec'.
159 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 as_fn_exit 255
162 # We don't want this to propagate to other subprocesses.
163 { _as_can_reexec=; unset _as_can_reexec;}
164 if test "x$CONFIG_SHELL" = x; then
165 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166 emulate sh
167 NULLCMD=:
168 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
169 # is contrary to our usage. Disable this feature.
170 alias -g '\${1+\"\$@\"}'='\"\$@\"'
171 setopt NO_GLOB_SUBST
172 else
173 case \`(set -o) 2>/dev/null\` in #(
174 *posix*) :
175 set -o posix ;; #(
176 *) :
178 esac
181 as_required="as_fn_return () { (exit \$1); }
182 as_fn_success () { as_fn_return 0; }
183 as_fn_failure () { as_fn_return 1; }
184 as_fn_ret_success () { return 0; }
185 as_fn_ret_failure () { return 1; }
187 exitcode=0
188 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
194 else
195 exitcode=1; echo positional parameters were not saved.
197 test x\$exitcode = x0 || exit 1
198 test -x / || exit 1"
199 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
200 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
201 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
202 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
203 test \$(( 1 + 1 )) = 2 || exit 1"
204 if (eval "$as_required") 2>/dev/null; then :
205 as_have_required=yes
206 else
207 as_have_required=no
209 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
211 else
212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
213 as_found=false
214 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
216 IFS=$as_save_IFS
217 test -z "$as_dir" && as_dir=.
218 as_found=:
219 case $as_dir in #(
221 for as_base in sh bash ksh sh5; do
222 # Try only shells that exist, to save several forks.
223 as_shell=$as_dir/$as_base
224 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
225 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 CONFIG_SHELL=$as_shell as_have_required=yes
227 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
228 break 2
231 done;;
232 esac
233 as_found=false
234 done
235 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
236 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
237 CONFIG_SHELL=$SHELL as_have_required=yes
238 fi; }
239 IFS=$as_save_IFS
242 if test "x$CONFIG_SHELL" != x; then :
243 export CONFIG_SHELL
244 # We cannot yet assume a decent shell, so we have to provide a
245 # neutralization value for shells without unset; and this also
246 # works around shells that cannot unset nonexistent variables.
247 # Preserve -v and -x to the replacement shell.
248 BASH_ENV=/dev/null
249 ENV=/dev/null
250 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
251 case $- in # ((((
252 *v*x* | *x*v* ) as_opts=-vx ;;
253 *v* ) as_opts=-v ;;
254 *x* ) as_opts=-x ;;
255 * ) as_opts= ;;
256 esac
257 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
258 # Admittedly, this is quite paranoid, since all the known shells bail
259 # out after a failed `exec'.
260 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
261 exit 255
264 if test x$as_have_required = xno; then :
265 $as_echo "$0: This script requires a shell more modern than all"
266 $as_echo "$0: the shells that I found on your system."
267 if test x${ZSH_VERSION+set} = xset ; then
268 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
270 else
271 $as_echo "$0: Please tell bug-autoconf@gnu.org and
272 $0: pgsql-bugs@lists.postgresql.org about your system,
273 $0: including any error possibly output before this
274 $0: message. Then install a modern shell, or manually run
275 $0: the script under such a shell if you do have one."
277 exit 1
281 SHELL=${CONFIG_SHELL-/bin/sh}
282 export SHELL
283 # Unset more variables known to interfere with behavior of common tools.
284 CLICOLOR_FORCE= GREP_OPTIONS=
285 unset CLICOLOR_FORCE GREP_OPTIONS
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
295 { eval $1=; unset $1;}
297 as_unset=as_fn_unset
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
304 return $1
305 } # as_fn_set_status
307 # as_fn_exit STATUS
308 # -----------------
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310 as_fn_exit ()
312 set +e
313 as_fn_set_status $1
314 exit $1
315 } # as_fn_exit
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
323 case $as_dir in #(
324 -*) as_dir=./$as_dir;;
325 esac
326 test -d "$as_dir" || eval $as_mkdir_p || {
327 as_dirs=
328 while :; do
329 case $as_dir in #(
330 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331 *) as_qdir=$as_dir;;
332 esac
333 as_dirs="'$as_qdir' $as_dirs"
334 as_dir=`$as_dirname -- "$as_dir" ||
335 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
336 X"$as_dir" : 'X\(//\)[^/]' \| \
337 X"$as_dir" : 'X\(//\)$' \| \
338 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
339 $as_echo X"$as_dir" |
340 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
341 s//\1/
344 /^X\(\/\/\)[^/].*/{
345 s//\1/
348 /^X\(\/\/\)$/{
349 s//\1/
352 /^X\(\/\).*/{
353 s//\1/
356 s/.*/./; q'`
357 test -d "$as_dir" && break
358 done
359 test -z "$as_dirs" || eval "mkdir $as_dirs"
360 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
363 } # as_fn_mkdir_p
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
370 test -f "$1" && test -x "$1"
371 } # as_fn_executable_p
372 # as_fn_append VAR VALUE
373 # ----------------------
374 # Append the text in VALUE to the end of the definition contained in VAR. Take
375 # advantage of any shell optimizations that allow amortized linear growth over
376 # repeated appends, instead of the typical quadratic growth present in naive
377 # implementations.
378 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379 eval 'as_fn_append ()
381 eval $1+=\$2
383 else
384 as_fn_append ()
386 eval $1=\$$1\$2
388 fi # as_fn_append
390 # as_fn_arith ARG...
391 # ------------------
392 # Perform arithmetic evaluation on the ARGs, and store the result in the
393 # global $as_val. Take advantage of shells that can avoid forks. The arguments
394 # must be portable across $(()) and expr.
395 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
396 eval 'as_fn_arith ()
398 as_val=$(( $* ))
400 else
401 as_fn_arith ()
403 as_val=`expr "$@" || test $? -eq 1`
405 fi # as_fn_arith
408 # as_fn_error STATUS ERROR [LINENO LOG_FD]
409 # ----------------------------------------
410 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
411 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
412 # script with STATUS, using 1 if that was 0.
413 as_fn_error ()
415 as_status=$1; test $as_status -eq 0 && as_status=1
416 if test "$4"; then
417 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
418 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
420 $as_echo "$as_me: error: $2" >&2
421 as_fn_exit $as_status
422 } # as_fn_error
424 if expr a : '\(a\)' >/dev/null 2>&1 &&
425 test "X`expr 00001 : '.*\(...\)'`" = X001; then
426 as_expr=expr
427 else
428 as_expr=false
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432 as_basename=basename
433 else
434 as_basename=false
437 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
438 as_dirname=dirname
439 else
440 as_dirname=false
443 as_me=`$as_basename -- "$0" ||
444 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445 X"$0" : 'X\(//\)$' \| \
446 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
447 $as_echo X/"$0" |
448 sed '/^.*\/\([^/][^/]*\)\/*$/{
449 s//\1/
452 /^X\/\(\/\/\)$/{
453 s//\1/
456 /^X\/\(\/\).*/{
457 s//\1/
460 s/.*/./; q'`
462 # Avoid depending upon Character Ranges.
463 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466 as_cr_digits='0123456789'
467 as_cr_alnum=$as_cr_Letters$as_cr_digits
470 as_lineno_1=$LINENO as_lineno_1a=$LINENO
471 as_lineno_2=$LINENO as_lineno_2a=$LINENO
472 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
473 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
474 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
475 sed -n '
477 /[$]LINENO/=
478 ' <$as_myself |
479 sed '
480 s/[$]LINENO.*/&-/
481 t lineno
483 :lineno
485 :loop
486 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
487 t loop
488 s/-\n.*//
489 ' >$as_me.lineno &&
490 chmod +x "$as_me.lineno" ||
491 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
493 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
494 # already done that, so ensure we don't try to do so again and fall
495 # in an infinite loop. This has already happened in practice.
496 _as_can_reexec=no; export _as_can_reexec
497 # Don't try to exec as it changes $[0], causing all sort of problems
498 # (the dirname of $[0] is not the place where we might find the
499 # original and so on. Autoconf is especially sensitive to this).
500 . "./$as_me.lineno"
501 # Exit status is that of the last command.
502 exit
505 ECHO_C= ECHO_N= ECHO_T=
506 case `echo -n x` in #(((((
507 -n*)
508 case `echo 'xy\c'` in
509 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
510 xy) ECHO_C='\c';;
511 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
512 ECHO_T=' ';;
513 esac;;
515 ECHO_N='-n';;
516 esac
518 rm -f conf$$ conf$$.exe conf$$.file
519 if test -d conf$$.dir; then
520 rm -f conf$$.dir/conf$$.file
521 else
522 rm -f conf$$.dir
523 mkdir conf$$.dir 2>/dev/null
525 if (echo >conf$$.file) 2>/dev/null; then
526 if ln -s conf$$.file conf$$ 2>/dev/null; then
527 as_ln_s='ln -s'
528 # ... but there are two gotchas:
529 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
530 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
531 # In both cases, we have to default to `cp -pR'.
532 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
533 as_ln_s='cp -pR'
534 elif ln conf$$.file conf$$ 2>/dev/null; then
535 as_ln_s=ln
536 else
537 as_ln_s='cp -pR'
539 else
540 as_ln_s='cp -pR'
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
545 if mkdir -p . 2>/dev/null; then
546 as_mkdir_p='mkdir -p "$as_dir"'
547 else
548 test -d ./-p && rmdir ./-p
549 as_mkdir_p=false
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
555 # Sed expression to map a string onto a valid CPP name.
556 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
558 # Sed expression to map a string onto a valid variable name.
559 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
562 test -n "$DJDIR" || exec 7<&0 </dev/null
563 exec 6>&1
565 # Name of the host.
566 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
567 # so uname gets run too.
568 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
571 # Initializations.
573 ac_default_prefix=/usr/local
574 ac_clean_files=
575 ac_config_libobj_dir=.
576 LIBOBJS=
577 cross_compiling=no
578 subdirs=
579 MFLAGS=
580 MAKEFLAGS=
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='17devel'
586 PACKAGE_STRING='PostgreSQL 17devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
588 PACKAGE_URL='https://www.postgresql.org/'
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 # include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 # include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_SYSROOT
631 PG_VERSION_NUM
632 LDFLAGS_EX_BE
633 PROVE
634 DBTOEPUB
636 XSLTPROC
637 XMLLINT
638 TCL_SHARED_BUILD
639 TCL_LIB_SPEC
640 TCL_LIBS
641 TCL_INCLUDE_SPEC
642 TCL_CONFIG_SH
643 TCLSH
644 XGETTEXT
645 MSGMERGE
646 MSGFMT_FLAGS
647 MSGFMT
648 PG_CRC32C_OBJS
649 CFLAGS_CRC
650 LIBOBJS
651 OPENSSL
652 ZSTD
654 UUID_LIBS
655 LDAP_LIBS_BE
656 LDAP_LIBS_FE
657 with_ssl
658 PTHREAD_CFLAGS
659 PTHREAD_LIBS
660 PTHREAD_CC
661 ax_pthread_config
662 EGREP
663 GREP
666 python_additional_libs
667 python_libspec
668 python_libdir
669 python_includespec
670 python_version
671 python_majorversion
672 PYTHON
673 perl_embed_ldflags
674 perl_embed_ccflags
675 perl_includespec
676 perl_useshrplib
677 perl_privlibexp
678 perl_archlibexp
679 PERL
680 FLEXFLAGS
681 FLEX
682 BISONFLAGS
683 BISON
684 MKDIR_P
685 LN_S
687 install_bin
688 INSTALL_DATA
689 INSTALL_SCRIPT
690 INSTALL_PROGRAM
691 WINDRES
693 STRIP_SHARED_LIB
694 STRIP_STATIC_LIB
695 STRIP
696 LDFLAGS_SL
697 LDFLAGS_EX
698 ZSTD_LIBS
699 ZSTD_CFLAGS
700 with_zstd
701 LZ4_LIBS
702 LZ4_CFLAGS
703 with_lz4
704 with_zlib
705 with_system_tzdata
706 with_libxslt
707 XML2_LIBS
708 XML2_CFLAGS
709 XML2_CONFIG
710 with_libxml
711 with_uuid
712 with_readline
713 with_systemd
714 with_selinux
715 with_ldap
716 with_krb_srvnam
717 krb_srvtab
718 with_gssapi
719 with_python
720 with_perl
721 with_tcl
722 ICU_LIBS
723 ICU_CFLAGS
724 with_icu
725 INCLUDES
726 autodepend
727 PKG_CONFIG_LIBDIR
728 PKG_CONFIG_PATH
729 PKG_CONFIG
730 DLSUFFIX
734 CFLAGS_SL
735 BITCODE_CXXFLAGS
736 BITCODE_CFLAGS
737 CXXFLAGS_SL_MODULE
738 CFLAGS_SL_MODULE
739 CFLAGS_VECTORIZE
740 CFLAGS_UNROLL_LOOPS
741 PERMIT_DECLARATION_AFTER_STATEMENT
742 LLVM_BINPATH
743 LLVM_CXXFLAGS
744 LLVM_CFLAGS
745 LLVM_CPPFLAGS
746 LLVM_LIBS
747 CLANG
748 LLVM_CONFIG
750 with_llvm
751 SUN_STUDIO_CC
752 ac_ct_CXX
753 CXXFLAGS
755 OBJEXT
756 EXEEXT
757 ac_ct_CC
758 CPPFLAGS
759 LDFLAGS
760 CFLAGS
762 enable_tap_tests
763 enable_dtrace
764 DTRACEFLAGS
765 DTRACE
766 enable_coverage
767 GENHTML
768 LCOV
769 GCOV
770 enable_debug
771 enable_rpath
772 default_port
773 WANTED_LANGUAGES
774 enable_nls
775 PORTNAME
776 host_os
777 host_vendor
778 host_cpu
779 host
780 build_os
781 build_vendor
782 build_cpu
783 build
784 PG_MAJORVERSION
785 target_alias
786 host_alias
787 build_alias
788 LIBS
789 ECHO_T
790 ECHO_N
791 ECHO_C
792 DEFS
793 mandir
794 localedir
795 libdir
796 psdir
797 pdfdir
798 dvidir
799 htmldir
800 infodir
801 docdir
802 oldincludedir
803 includedir
804 localstatedir
805 sharedstatedir
806 sysconfdir
807 datadir
808 datarootdir
809 libexecdir
810 sbindir
811 bindir
812 program_transform_name
813 prefix
814 exec_prefix
815 PACKAGE_URL
816 PACKAGE_BUGREPORT
817 PACKAGE_STRING
818 PACKAGE_VERSION
819 PACKAGE_TARNAME
820 PACKAGE_NAME
821 PATH_SEPARATOR
822 SHELL'
823 ac_subst_files=''
824 ac_user_opts='
825 enable_option_checking
826 with_extra_version
827 with_template
828 with_includes
829 with_libraries
830 with_libs
831 enable_integer_datetimes
832 enable_nls
833 with_pgport
834 enable_rpath
835 enable_spinlocks
836 enable_atomics
837 enable_debug
838 enable_profiling
839 enable_coverage
840 enable_dtrace
841 enable_tap_tests
842 with_blocksize
843 with_segsize
844 with_segsize_blocks
845 with_wal_blocksize
846 with_CC
847 with_llvm
848 enable_depend
849 enable_cassert
850 with_icu
851 with_tcl
852 with_tclconfig
853 with_perl
854 with_python
855 with_gssapi
856 with_krb_srvnam
857 with_pam
858 with_bsd_auth
859 with_ldap
860 with_bonjour
861 with_selinux
862 with_systemd
863 with_readline
864 with_libedit_preferred
865 with_uuid
866 with_ossp_uuid
867 with_libxml
868 with_libxslt
869 with_system_tzdata
870 with_zlib
871 with_lz4
872 with_zstd
873 with_ssl
874 with_openssl
875 enable_largefile
877 ac_precious_vars='build_alias
878 host_alias
879 target_alias
881 CFLAGS
882 LDFLAGS
883 LIBS
884 CPPFLAGS
886 CXXFLAGS
888 LLVM_CONFIG
889 CLANG
891 PKG_CONFIG
892 PKG_CONFIG_PATH
893 PKG_CONFIG_LIBDIR
894 ICU_CFLAGS
895 ICU_LIBS
896 XML2_CONFIG
897 XML2_CFLAGS
898 XML2_LIBS
899 LZ4_CFLAGS
900 LZ4_LIBS
901 ZSTD_CFLAGS
902 ZSTD_LIBS
903 LDFLAGS_EX
904 LDFLAGS_SL
905 PERL
906 PYTHON
907 MSGFMT
908 TCLSH'
911 # Initialize some variables set by options.
912 ac_init_help=
913 ac_init_version=false
914 ac_unrecognized_opts=
915 ac_unrecognized_sep=
916 # The variables have the same names as the options, with
917 # dashes changed to underlines.
918 cache_file=/dev/null
919 exec_prefix=NONE
920 no_create=
921 no_recursion=
922 prefix=NONE
923 program_prefix=NONE
924 program_suffix=NONE
925 program_transform_name=s,x,x,
926 silent=
927 site=
928 srcdir=
929 verbose=
930 x_includes=NONE
931 x_libraries=NONE
933 # Installation directory options.
934 # These are left unexpanded so users can "make install exec_prefix=/foo"
935 # and all the variables that are supposed to be based on exec_prefix
936 # by default will actually change.
937 # Use braces instead of parens because sh, perl, etc. also accept them.
938 # (The list follows the same order as the GNU Coding Standards.)
939 bindir='${exec_prefix}/bin'
940 sbindir='${exec_prefix}/sbin'
941 libexecdir='${exec_prefix}/libexec'
942 datarootdir='${prefix}/share'
943 datadir='${datarootdir}'
944 sysconfdir='${prefix}/etc'
945 sharedstatedir='${prefix}/com'
946 localstatedir='${prefix}/var'
947 includedir='${prefix}/include'
948 oldincludedir='/usr/include'
949 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
950 infodir='${datarootdir}/info'
951 htmldir='${docdir}'
952 dvidir='${docdir}'
953 pdfdir='${docdir}'
954 psdir='${docdir}'
955 libdir='${exec_prefix}/lib'
956 localedir='${datarootdir}/locale'
957 mandir='${datarootdir}/man'
959 ac_prev=
960 ac_dashdash=
961 for ac_option
963 # If the previous option needs an argument, assign it.
964 if test -n "$ac_prev"; then
965 eval $ac_prev=\$ac_option
966 ac_prev=
967 continue
970 case $ac_option in
971 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
972 *=) ac_optarg= ;;
973 *) ac_optarg=yes ;;
974 esac
976 # Accept the important Cygnus configure options, so we can diagnose typos.
978 case $ac_dashdash$ac_option in
980 ac_dashdash=yes ;;
982 -bindir | --bindir | --bindi | --bind | --bin | --bi)
983 ac_prev=bindir ;;
984 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
985 bindir=$ac_optarg ;;
987 -build | --build | --buil | --bui | --bu)
988 ac_prev=build_alias ;;
989 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
990 build_alias=$ac_optarg ;;
992 -cache-file | --cache-file | --cache-fil | --cache-fi \
993 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
994 ac_prev=cache_file ;;
995 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
996 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
997 cache_file=$ac_optarg ;;
999 --config-cache | -C)
1000 cache_file=config.cache ;;
1002 -datadir | --datadir | --datadi | --datad)
1003 ac_prev=datadir ;;
1004 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1005 datadir=$ac_optarg ;;
1007 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1008 | --dataroo | --dataro | --datar)
1009 ac_prev=datarootdir ;;
1010 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1011 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1012 datarootdir=$ac_optarg ;;
1014 -disable-* | --disable-*)
1015 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1016 # Reject names that are not valid shell variable names.
1017 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1018 as_fn_error $? "invalid feature name: $ac_useropt"
1019 ac_useropt_orig=$ac_useropt
1020 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1021 case $ac_user_opts in
1023 "enable_$ac_useropt"
1024 "*) ;;
1025 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1026 ac_unrecognized_sep=', ';;
1027 esac
1028 eval enable_$ac_useropt=no ;;
1030 -docdir | --docdir | --docdi | --doc | --do)
1031 ac_prev=docdir ;;
1032 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1033 docdir=$ac_optarg ;;
1035 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1036 ac_prev=dvidir ;;
1037 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1038 dvidir=$ac_optarg ;;
1040 -enable-* | --enable-*)
1041 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1042 # Reject names that are not valid shell variable names.
1043 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1044 as_fn_error $? "invalid feature name: $ac_useropt"
1045 ac_useropt_orig=$ac_useropt
1046 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1047 case $ac_user_opts in
1049 "enable_$ac_useropt"
1050 "*) ;;
1051 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1052 ac_unrecognized_sep=', ';;
1053 esac
1054 eval enable_$ac_useropt=\$ac_optarg ;;
1056 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1057 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1058 | --exec | --exe | --ex)
1059 ac_prev=exec_prefix ;;
1060 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1061 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1062 | --exec=* | --exe=* | --ex=*)
1063 exec_prefix=$ac_optarg ;;
1065 -gas | --gas | --ga | --g)
1066 # Obsolete; use --with-gas.
1067 with_gas=yes ;;
1069 -help | --help | --hel | --he | -h)
1070 ac_init_help=long ;;
1071 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1072 ac_init_help=recursive ;;
1073 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1074 ac_init_help=short ;;
1076 -host | --host | --hos | --ho)
1077 ac_prev=host_alias ;;
1078 -host=* | --host=* | --hos=* | --ho=*)
1079 host_alias=$ac_optarg ;;
1081 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1082 ac_prev=htmldir ;;
1083 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1084 | --ht=*)
1085 htmldir=$ac_optarg ;;
1087 -includedir | --includedir | --includedi | --included | --include \
1088 | --includ | --inclu | --incl | --inc)
1089 ac_prev=includedir ;;
1090 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1091 | --includ=* | --inclu=* | --incl=* | --inc=*)
1092 includedir=$ac_optarg ;;
1094 -infodir | --infodir | --infodi | --infod | --info | --inf)
1095 ac_prev=infodir ;;
1096 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1097 infodir=$ac_optarg ;;
1099 -libdir | --libdir | --libdi | --libd)
1100 ac_prev=libdir ;;
1101 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1102 libdir=$ac_optarg ;;
1104 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1105 | --libexe | --libex | --libe)
1106 ac_prev=libexecdir ;;
1107 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1108 | --libexe=* | --libex=* | --libe=*)
1109 libexecdir=$ac_optarg ;;
1111 -localedir | --localedir | --localedi | --localed | --locale)
1112 ac_prev=localedir ;;
1113 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1114 localedir=$ac_optarg ;;
1116 -localstatedir | --localstatedir | --localstatedi | --localstated \
1117 | --localstate | --localstat | --localsta | --localst | --locals)
1118 ac_prev=localstatedir ;;
1119 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1120 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1121 localstatedir=$ac_optarg ;;
1123 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1124 ac_prev=mandir ;;
1125 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1126 mandir=$ac_optarg ;;
1128 -nfp | --nfp | --nf)
1129 # Obsolete; use --without-fp.
1130 with_fp=no ;;
1132 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1133 | --no-cr | --no-c | -n)
1134 no_create=yes ;;
1136 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1137 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1138 no_recursion=yes ;;
1140 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1141 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1142 | --oldin | --oldi | --old | --ol | --o)
1143 ac_prev=oldincludedir ;;
1144 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1145 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1146 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1147 oldincludedir=$ac_optarg ;;
1149 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1150 ac_prev=prefix ;;
1151 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1152 prefix=$ac_optarg ;;
1154 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1155 | --program-pre | --program-pr | --program-p)
1156 ac_prev=program_prefix ;;
1157 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1158 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1159 program_prefix=$ac_optarg ;;
1161 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1162 | --program-suf | --program-su | --program-s)
1163 ac_prev=program_suffix ;;
1164 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1165 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1166 program_suffix=$ac_optarg ;;
1168 -program-transform-name | --program-transform-name \
1169 | --program-transform-nam | --program-transform-na \
1170 | --program-transform-n | --program-transform- \
1171 | --program-transform | --program-transfor \
1172 | --program-transfo | --program-transf \
1173 | --program-trans | --program-tran \
1174 | --progr-tra | --program-tr | --program-t)
1175 ac_prev=program_transform_name ;;
1176 -program-transform-name=* | --program-transform-name=* \
1177 | --program-transform-nam=* | --program-transform-na=* \
1178 | --program-transform-n=* | --program-transform-=* \
1179 | --program-transform=* | --program-transfor=* \
1180 | --program-transfo=* | --program-transf=* \
1181 | --program-trans=* | --program-tran=* \
1182 | --progr-tra=* | --program-tr=* | --program-t=*)
1183 program_transform_name=$ac_optarg ;;
1185 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1186 ac_prev=pdfdir ;;
1187 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1188 pdfdir=$ac_optarg ;;
1190 -psdir | --psdir | --psdi | --psd | --ps)
1191 ac_prev=psdir ;;
1192 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1193 psdir=$ac_optarg ;;
1195 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1196 | -silent | --silent | --silen | --sile | --sil)
1197 silent=yes ;;
1199 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1200 ac_prev=sbindir ;;
1201 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1202 | --sbi=* | --sb=*)
1203 sbindir=$ac_optarg ;;
1205 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1206 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1207 | --sharedst | --shareds | --shared | --share | --shar \
1208 | --sha | --sh)
1209 ac_prev=sharedstatedir ;;
1210 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1211 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1212 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1213 | --sha=* | --sh=*)
1214 sharedstatedir=$ac_optarg ;;
1216 -site | --site | --sit)
1217 ac_prev=site ;;
1218 -site=* | --site=* | --sit=*)
1219 site=$ac_optarg ;;
1221 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1222 ac_prev=srcdir ;;
1223 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1224 srcdir=$ac_optarg ;;
1226 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1227 | --syscon | --sysco | --sysc | --sys | --sy)
1228 ac_prev=sysconfdir ;;
1229 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1230 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1231 sysconfdir=$ac_optarg ;;
1233 -target | --target | --targe | --targ | --tar | --ta | --t)
1234 ac_prev=target_alias ;;
1235 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1236 target_alias=$ac_optarg ;;
1238 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1239 verbose=yes ;;
1241 -version | --version | --versio | --versi | --vers | -V)
1242 ac_init_version=: ;;
1244 -with-* | --with-*)
1245 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1246 # Reject names that are not valid shell variable names.
1247 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1248 as_fn_error $? "invalid package name: $ac_useropt"
1249 ac_useropt_orig=$ac_useropt
1250 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1251 case $ac_user_opts in
1253 "with_$ac_useropt"
1254 "*) ;;
1255 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1256 ac_unrecognized_sep=', ';;
1257 esac
1258 eval with_$ac_useropt=\$ac_optarg ;;
1260 -without-* | --without-*)
1261 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1262 # Reject names that are not valid shell variable names.
1263 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1264 as_fn_error $? "invalid package name: $ac_useropt"
1265 ac_useropt_orig=$ac_useropt
1266 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1267 case $ac_user_opts in
1269 "with_$ac_useropt"
1270 "*) ;;
1271 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1272 ac_unrecognized_sep=', ';;
1273 esac
1274 eval with_$ac_useropt=no ;;
1276 --x)
1277 # Obsolete; use --with-x.
1278 with_x=yes ;;
1280 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1281 | --x-incl | --x-inc | --x-in | --x-i)
1282 ac_prev=x_includes ;;
1283 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1284 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1285 x_includes=$ac_optarg ;;
1287 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1288 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1289 ac_prev=x_libraries ;;
1290 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1291 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1292 x_libraries=$ac_optarg ;;
1294 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1295 Try \`$0 --help' for more information"
1298 *=*)
1299 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1300 # Reject names that are not valid shell variable names.
1301 case $ac_envvar in #(
1302 '' | [0-9]* | *[!_$as_cr_alnum]* )
1303 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1304 esac
1305 eval $ac_envvar=\$ac_optarg
1306 export $ac_envvar ;;
1309 # FIXME: should be removed in autoconf 3.0.
1310 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1311 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1312 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1313 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1316 esac
1317 done
1319 if test -n "$ac_prev"; then
1320 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1321 as_fn_error $? "missing argument to $ac_option"
1324 if test -n "$ac_unrecognized_opts"; then
1325 case $enable_option_checking in
1326 no) ;;
1327 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1328 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1329 esac
1332 # Check all directory arguments for consistency.
1333 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1334 datadir sysconfdir sharedstatedir localstatedir includedir \
1335 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1336 libdir localedir mandir
1338 eval ac_val=\$$ac_var
1339 # Remove trailing slashes.
1340 case $ac_val in
1341 */ )
1342 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1343 eval $ac_var=\$ac_val;;
1344 esac
1345 # Be sure to have absolute directory names.
1346 case $ac_val in
1347 [\\/$]* | ?:[\\/]* ) continue;;
1348 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1349 esac
1350 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1351 done
1353 # There might be people who depend on the old broken behavior: `$host'
1354 # used to hold the argument of --host etc.
1355 # FIXME: To remove some day.
1356 build=$build_alias
1357 host=$host_alias
1358 target=$target_alias
1360 # FIXME: To remove some day.
1361 if test "x$host_alias" != x; then
1362 if test "x$build_alias" = x; then
1363 cross_compiling=maybe
1364 elif test "x$build_alias" != "x$host_alias"; then
1365 cross_compiling=yes
1369 ac_tool_prefix=
1370 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1372 test "$silent" = yes && exec 6>/dev/null
1375 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1376 ac_ls_di=`ls -di .` &&
1377 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1378 as_fn_error $? "working directory cannot be determined"
1379 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1380 as_fn_error $? "pwd does not report name of working directory"
1383 # Find the source files, if location was not specified.
1384 if test -z "$srcdir"; then
1385 ac_srcdir_defaulted=yes
1386 # Try the directory containing this script, then the parent directory.
1387 ac_confdir=`$as_dirname -- "$as_myself" ||
1388 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1389 X"$as_myself" : 'X\(//\)[^/]' \| \
1390 X"$as_myself" : 'X\(//\)$' \| \
1391 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1392 $as_echo X"$as_myself" |
1393 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1394 s//\1/
1397 /^X\(\/\/\)[^/].*/{
1398 s//\1/
1401 /^X\(\/\/\)$/{
1402 s//\1/
1405 /^X\(\/\).*/{
1406 s//\1/
1409 s/.*/./; q'`
1410 srcdir=$ac_confdir
1411 if test ! -r "$srcdir/$ac_unique_file"; then
1412 srcdir=..
1414 else
1415 ac_srcdir_defaulted=no
1417 if test ! -r "$srcdir/$ac_unique_file"; then
1418 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1419 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1421 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1422 ac_abs_confdir=`(
1423 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1424 pwd)`
1425 # When building in place, set srcdir=.
1426 if test "$ac_abs_confdir" = "$ac_pwd"; then
1427 srcdir=.
1429 # Remove unnecessary trailing slashes from srcdir.
1430 # Double slashes in file names in object file debugging info
1431 # mess up M-x gdb in Emacs.
1432 case $srcdir in
1433 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1434 esac
1435 for ac_var in $ac_precious_vars; do
1436 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1437 eval ac_env_${ac_var}_value=\$${ac_var}
1438 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1439 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1440 done
1443 # Report the --help message.
1445 if test "$ac_init_help" = "long"; then
1446 # Omit some internal or obsolete options to make the list less imposing.
1447 # This message is too long to be a string in the A/UX 3.1 sh.
1448 cat <<_ACEOF
1449 \`configure' configures PostgreSQL 17devel to adapt to many kinds of systems.
1451 Usage: $0 [OPTION]... [VAR=VALUE]...
1453 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1454 VAR=VALUE. See below for descriptions of some of the useful variables.
1456 Defaults for the options are specified in brackets.
1458 Configuration:
1459 -h, --help display this help and exit
1460 --help=short display options specific to this package
1461 --help=recursive display the short help of all the included packages
1462 -V, --version display version information and exit
1463 -q, --quiet, --silent do not print \`checking ...' messages
1464 --cache-file=FILE cache test results in FILE [disabled]
1465 -C, --config-cache alias for \`--cache-file=config.cache'
1466 -n, --no-create do not create output files
1467 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1469 Installation directories:
1470 --prefix=PREFIX install architecture-independent files in PREFIX
1471 [$ac_default_prefix]
1472 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1473 [PREFIX]
1475 By default, \`make install' will install all the files in
1476 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1477 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1478 for instance \`--prefix=\$HOME'.
1480 For better control, use the options below.
1482 Fine tuning of the installation directories:
1483 --bindir=DIR user executables [EPREFIX/bin]
1484 --sbindir=DIR system admin executables [EPREFIX/sbin]
1485 --libexecdir=DIR program executables [EPREFIX/libexec]
1486 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1487 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1488 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1489 --libdir=DIR object code libraries [EPREFIX/lib]
1490 --includedir=DIR C header files [PREFIX/include]
1491 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1492 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1493 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1494 --infodir=DIR info documentation [DATAROOTDIR/info]
1495 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1496 --mandir=DIR man documentation [DATAROOTDIR/man]
1497 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1498 --htmldir=DIR html documentation [DOCDIR]
1499 --dvidir=DIR dvi documentation [DOCDIR]
1500 --pdfdir=DIR pdf documentation [DOCDIR]
1501 --psdir=DIR ps documentation [DOCDIR]
1502 _ACEOF
1504 cat <<\_ACEOF
1506 System types:
1507 --build=BUILD configure for building on BUILD [guessed]
1508 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1509 _ACEOF
1512 if test -n "$ac_init_help"; then
1513 case $ac_init_help in
1514 short | recursive ) echo "Configuration of PostgreSQL 17devel:";;
1515 esac
1516 cat <<\_ACEOF
1518 Optional Features:
1519 --disable-option-checking ignore unrecognized --enable/--with options
1520 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1521 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1522 --disable-integer-datetimes
1523 obsolete option, no longer supported
1524 --enable-nls[=LANGUAGES]
1525 enable Native Language Support
1526 --disable-rpath do not embed shared library search path in
1527 executables
1528 --disable-spinlocks do not use spinlocks
1529 --disable-atomics do not use atomic operations
1530 --enable-debug build with debugging symbols (-g)
1531 --enable-profiling build with profiling enabled
1532 --enable-coverage build with coverage testing instrumentation
1533 --enable-dtrace build with DTrace support
1534 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1535 --enable-depend turn on automatic dependency tracking
1536 --enable-cassert enable assertion checks (for debugging)
1537 --disable-largefile omit support for large files
1539 Optional Packages:
1540 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1541 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1542 --with-extra-version=STRING
1543 append STRING to version
1544 --with-template=NAME override operating system template
1545 --with-includes=DIRS look for additional header files in DIRS
1546 --with-libraries=DIRS look for additional libraries in DIRS
1547 --with-libs=DIRS alternative spelling of --with-libraries
1548 --with-pgport=PORTNUM set default port number [5432]
1549 --with-blocksize=BLOCKSIZE
1550 set table block size in kB [8]
1551 --with-segsize=SEGSIZE set table segment size in GB [1]
1552 --with-segsize-blocks=SEGSIZE_BLOCKS
1553 set table segment size in blocks [0]
1554 --with-wal-blocksize=BLOCKSIZE
1555 set WAL block size in kB [8]
1556 --with-CC=CMD set compiler (deprecated)
1557 --with-llvm build with LLVM based JIT support
1558 --without-icu build without ICU support
1559 --with-tcl build Tcl modules (PL/Tcl)
1560 --with-tclconfig=DIR tclConfig.sh is in DIR
1561 --with-perl build Perl modules (PL/Perl)
1562 --with-python build Python modules (PL/Python)
1563 --with-gssapi build with GSSAPI support
1564 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1565 [postgres]
1566 --with-pam build with PAM support
1567 --with-bsd-auth build with BSD Authentication support
1568 --with-ldap build with LDAP support
1569 --with-bonjour build with Bonjour support
1570 --with-selinux build with SELinux support
1571 --with-systemd build with systemd support
1572 --without-readline do not use GNU Readline nor BSD Libedit for editing
1573 --with-libedit-preferred
1574 prefer BSD Libedit over GNU Readline
1575 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1576 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1577 --with-libxml build with XML support
1578 --with-libxslt use XSLT support when building contrib/xml2
1579 --with-system-tzdata=DIR
1580 use system time zone data in DIR
1581 --without-zlib do not use Zlib
1582 --with-lz4 build with LZ4 support
1583 --with-zstd build with ZSTD support
1584 --with-ssl=LIB use LIB for SSL/TLS support (openssl)
1585 --with-openssl obsolete spelling of --with-ssl=openssl
1587 Some influential environment variables:
1588 CC C compiler command
1589 CFLAGS C compiler flags
1590 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1591 nonstandard directory <lib dir>
1592 LIBS libraries to pass to the linker, e.g. -l<library>
1593 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1594 you have headers in a nonstandard directory <include dir>
1595 CXX C++ compiler command
1596 CXXFLAGS C++ compiler flags
1597 LLVM_CONFIG path to llvm-config command
1598 CLANG path to clang compiler to generate bitcode
1599 CPP C preprocessor
1600 PKG_CONFIG path to pkg-config utility
1601 PKG_CONFIG_PATH
1602 directories to add to pkg-config's search path
1603 PKG_CONFIG_LIBDIR
1604 path overriding pkg-config's built-in search path
1605 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1606 ICU_LIBS linker flags for ICU, overriding pkg-config
1607 XML2_CONFIG path to xml2-config utility
1608 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1609 XML2_LIBS linker flags for XML2, overriding pkg-config
1610 LZ4_CFLAGS C compiler flags for LZ4, overriding pkg-config
1611 LZ4_LIBS linker flags for LZ4, overriding pkg-config
1612 ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
1613 ZSTD_LIBS linker flags for ZSTD, overriding pkg-config
1614 LDFLAGS_EX extra linker flags for linking executables only
1615 LDFLAGS_SL extra linker flags for linking shared libraries only
1616 PERL Perl program
1617 PYTHON Python program
1618 MSGFMT msgfmt program for NLS
1619 TCLSH Tcl interpreter program (tclsh)
1621 Use these variables to override the choices made by `configure' or to help
1622 it to find libraries and programs with nonstandard names/locations.
1624 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1625 PostgreSQL home page: <https://www.postgresql.org/>.
1626 _ACEOF
1627 ac_status=$?
1630 if test "$ac_init_help" = "recursive"; then
1631 # If there are subdirs, report their specific --help.
1632 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1633 test -d "$ac_dir" ||
1634 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1635 continue
1636 ac_builddir=.
1638 case "$ac_dir" in
1639 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1641 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1642 # A ".." for each directory in $ac_dir_suffix.
1643 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1644 case $ac_top_builddir_sub in
1645 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1646 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1647 esac ;;
1648 esac
1649 ac_abs_top_builddir=$ac_pwd
1650 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1651 # for backward compatibility:
1652 ac_top_builddir=$ac_top_build_prefix
1654 case $srcdir in
1655 .) # We are building in place.
1656 ac_srcdir=.
1657 ac_top_srcdir=$ac_top_builddir_sub
1658 ac_abs_top_srcdir=$ac_pwd ;;
1659 [\\/]* | ?:[\\/]* ) # Absolute name.
1660 ac_srcdir=$srcdir$ac_dir_suffix;
1661 ac_top_srcdir=$srcdir
1662 ac_abs_top_srcdir=$srcdir ;;
1663 *) # Relative name.
1664 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1665 ac_top_srcdir=$ac_top_build_prefix$srcdir
1666 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1667 esac
1668 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1670 cd "$ac_dir" || { ac_status=$?; continue; }
1671 # Check for guested configure.
1672 if test -f "$ac_srcdir/configure.gnu"; then
1673 echo &&
1674 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1675 elif test -f "$ac_srcdir/configure"; then
1676 echo &&
1677 $SHELL "$ac_srcdir/configure" --help=recursive
1678 else
1679 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1680 fi || ac_status=$?
1681 cd "$ac_pwd" || { ac_status=$?; break; }
1682 done
1685 test -n "$ac_init_help" && exit $ac_status
1686 if $ac_init_version; then
1687 cat <<\_ACEOF
1688 PostgreSQL configure 17devel
1689 generated by GNU Autoconf 2.69
1691 Copyright (C) 2012 Free Software Foundation, Inc.
1692 This configure script is free software; the Free Software Foundation
1693 gives unlimited permission to copy, distribute and modify it.
1695 Copyright (c) 1996-2023, PostgreSQL Global Development Group
1696 _ACEOF
1697 exit
1700 ## ------------------------ ##
1701 ## Autoconf initialization. ##
1702 ## ------------------------ ##
1704 # ac_fn_c_try_compile LINENO
1705 # --------------------------
1706 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1707 ac_fn_c_try_compile ()
1709 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1710 rm -f conftest.$ac_objext
1711 if { { ac_try="$ac_compile"
1712 case "(($ac_try" in
1713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1714 *) ac_try_echo=$ac_try;;
1715 esac
1716 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1717 $as_echo "$ac_try_echo"; } >&5
1718 (eval "$ac_compile") 2>conftest.err
1719 ac_status=$?
1720 if test -s conftest.err; then
1721 grep -v '^ *+' conftest.err >conftest.er1
1722 cat conftest.er1 >&5
1723 mv -f conftest.er1 conftest.err
1725 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1726 test $ac_status = 0; } && {
1727 test -z "$ac_c_werror_flag" ||
1728 test ! -s conftest.err
1729 } && test -s conftest.$ac_objext; then :
1730 ac_retval=0
1731 else
1732 $as_echo "$as_me: failed program was:" >&5
1733 sed 's/^/| /' conftest.$ac_ext >&5
1735 ac_retval=1
1737 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1738 as_fn_set_status $ac_retval
1740 } # ac_fn_c_try_compile
1742 # ac_fn_cxx_try_compile LINENO
1743 # ----------------------------
1744 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1745 ac_fn_cxx_try_compile ()
1747 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1748 rm -f conftest.$ac_objext
1749 if { { ac_try="$ac_compile"
1750 case "(($ac_try" in
1751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1752 *) ac_try_echo=$ac_try;;
1753 esac
1754 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1755 $as_echo "$ac_try_echo"; } >&5
1756 (eval "$ac_compile") 2>conftest.err
1757 ac_status=$?
1758 if test -s conftest.err; then
1759 grep -v '^ *+' conftest.err >conftest.er1
1760 cat conftest.er1 >&5
1761 mv -f conftest.er1 conftest.err
1763 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1764 test $ac_status = 0; } && {
1765 test -z "$ac_cxx_werror_flag" ||
1766 test ! -s conftest.err
1767 } && test -s conftest.$ac_objext; then :
1768 ac_retval=0
1769 else
1770 $as_echo "$as_me: failed program was:" >&5
1771 sed 's/^/| /' conftest.$ac_ext >&5
1773 ac_retval=1
1775 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1776 as_fn_set_status $ac_retval
1778 } # ac_fn_cxx_try_compile
1780 # ac_fn_c_try_link LINENO
1781 # -----------------------
1782 # Try to link conftest.$ac_ext, and return whether this succeeded.
1783 ac_fn_c_try_link ()
1785 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1786 rm -f conftest.$ac_objext conftest$ac_exeext
1787 if { { ac_try="$ac_link"
1788 case "(($ac_try" in
1789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1790 *) ac_try_echo=$ac_try;;
1791 esac
1792 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1793 $as_echo "$ac_try_echo"; } >&5
1794 (eval "$ac_link") 2>conftest.err
1795 ac_status=$?
1796 if test -s conftest.err; then
1797 grep -v '^ *+' conftest.err >conftest.er1
1798 cat conftest.er1 >&5
1799 mv -f conftest.er1 conftest.err
1801 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1802 test $ac_status = 0; } && {
1803 test -z "$ac_c_werror_flag" ||
1804 test ! -s conftest.err
1805 } && test -s conftest$ac_exeext && {
1806 test "$cross_compiling" = yes ||
1807 test -x conftest$ac_exeext
1808 }; then :
1809 ac_retval=0
1810 else
1811 $as_echo "$as_me: failed program was:" >&5
1812 sed 's/^/| /' conftest.$ac_ext >&5
1814 ac_retval=1
1816 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1817 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1818 # interfere with the next link command; also delete a directory that is
1819 # left behind by Apple's compiler. We do this before executing the actions.
1820 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1821 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1822 as_fn_set_status $ac_retval
1824 } # ac_fn_c_try_link
1826 # ac_fn_c_try_cpp LINENO
1827 # ----------------------
1828 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1829 ac_fn_c_try_cpp ()
1831 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1832 if { { ac_try="$ac_cpp conftest.$ac_ext"
1833 case "(($ac_try" in
1834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1835 *) ac_try_echo=$ac_try;;
1836 esac
1837 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1838 $as_echo "$ac_try_echo"; } >&5
1839 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1840 ac_status=$?
1841 if test -s conftest.err; then
1842 grep -v '^ *+' conftest.err >conftest.er1
1843 cat conftest.er1 >&5
1844 mv -f conftest.er1 conftest.err
1846 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1847 test $ac_status = 0; } > conftest.i && {
1848 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1849 test ! -s conftest.err
1850 }; then :
1851 ac_retval=0
1852 else
1853 $as_echo "$as_me: failed program was:" >&5
1854 sed 's/^/| /' conftest.$ac_ext >&5
1856 ac_retval=1
1858 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1859 as_fn_set_status $ac_retval
1861 } # ac_fn_c_try_cpp
1863 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1864 # -------------------------------------------------------
1865 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1866 # the include files in INCLUDES and setting the cache variable VAR
1867 # accordingly.
1868 ac_fn_c_check_header_mongrel ()
1870 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1871 if eval \${$3+:} false; then :
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1873 $as_echo_n "checking for $2... " >&6; }
1874 if eval \${$3+:} false; then :
1875 $as_echo_n "(cached) " >&6
1877 eval ac_res=\$$3
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1879 $as_echo "$ac_res" >&6; }
1880 else
1881 # Is the header compilable?
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1883 $as_echo_n "checking $2 usability... " >&6; }
1884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1885 /* end confdefs.h. */
1887 #include <$2>
1888 _ACEOF
1889 if ac_fn_c_try_compile "$LINENO"; then :
1890 ac_header_compiler=yes
1891 else
1892 ac_header_compiler=no
1894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1896 $as_echo "$ac_header_compiler" >&6; }
1898 # Is the header present?
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1900 $as_echo_n "checking $2 presence... " >&6; }
1901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1902 /* end confdefs.h. */
1903 #include <$2>
1904 _ACEOF
1905 if ac_fn_c_try_cpp "$LINENO"; then :
1906 ac_header_preproc=yes
1907 else
1908 ac_header_preproc=no
1910 rm -f conftest.err conftest.i conftest.$ac_ext
1911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1912 $as_echo "$ac_header_preproc" >&6; }
1914 # So? What about this header?
1915 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1916 yes:no: )
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1918 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1920 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1922 no:yes:* )
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1924 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1926 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1928 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1930 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1932 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1933 ( $as_echo "## ---------------------------------------------- ##
1934 ## Report this to pgsql-bugs@lists.postgresql.org ##
1935 ## ---------------------------------------------- ##"
1936 ) | sed "s/^/$as_me: WARNING: /" >&2
1938 esac
1939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1940 $as_echo_n "checking for $2... " >&6; }
1941 if eval \${$3+:} false; then :
1942 $as_echo_n "(cached) " >&6
1943 else
1944 eval "$3=\$ac_header_compiler"
1946 eval ac_res=\$$3
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1948 $as_echo "$ac_res" >&6; }
1950 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1952 } # ac_fn_c_check_header_mongrel
1954 # ac_fn_c_try_run LINENO
1955 # ----------------------
1956 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1957 # that executables *can* be run.
1958 ac_fn_c_try_run ()
1960 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1961 if { { ac_try="$ac_link"
1962 case "(($ac_try" in
1963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1964 *) ac_try_echo=$ac_try;;
1965 esac
1966 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1967 $as_echo "$ac_try_echo"; } >&5
1968 (eval "$ac_link") 2>&5
1969 ac_status=$?
1970 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1971 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1972 { { case "(($ac_try" in
1973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1974 *) ac_try_echo=$ac_try;;
1975 esac
1976 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1977 $as_echo "$ac_try_echo"; } >&5
1978 (eval "$ac_try") 2>&5
1979 ac_status=$?
1980 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1981 test $ac_status = 0; }; }; then :
1982 ac_retval=0
1983 else
1984 $as_echo "$as_me: program exited with status $ac_status" >&5
1985 $as_echo "$as_me: failed program was:" >&5
1986 sed 's/^/| /' conftest.$ac_ext >&5
1988 ac_retval=$ac_status
1990 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1991 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1992 as_fn_set_status $ac_retval
1994 } # ac_fn_c_try_run
1996 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1997 # -------------------------------------------------------
1998 # Tests whether HEADER exists and can be compiled using the include files in
1999 # INCLUDES, setting the cache variable VAR accordingly.
2000 ac_fn_c_check_header_compile ()
2002 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2004 $as_echo_n "checking for $2... " >&6; }
2005 if eval \${$3+:} false; then :
2006 $as_echo_n "(cached) " >&6
2007 else
2008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2009 /* end confdefs.h. */
2011 #include <$2>
2012 _ACEOF
2013 if ac_fn_c_try_compile "$LINENO"; then :
2014 eval "$3=yes"
2015 else
2016 eval "$3=no"
2018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2020 eval ac_res=\$$3
2021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2022 $as_echo "$ac_res" >&6; }
2023 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2025 } # ac_fn_c_check_header_compile
2027 # ac_fn_c_check_func LINENO FUNC VAR
2028 # ----------------------------------
2029 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2030 ac_fn_c_check_func ()
2032 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2034 $as_echo_n "checking for $2... " >&6; }
2035 if eval \${$3+:} false; then :
2036 $as_echo_n "(cached) " >&6
2037 else
2038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2039 /* end confdefs.h. */
2040 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2041 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2042 #define $2 innocuous_$2
2044 /* System header to define __stub macros and hopefully few prototypes,
2045 which can conflict with char $2 (); below.
2046 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2047 <limits.h> exists even on freestanding compilers. */
2049 #ifdef __STDC__
2050 # include <limits.h>
2051 #else
2052 # include <assert.h>
2053 #endif
2055 #undef $2
2057 /* Override any GCC internal prototype to avoid an error.
2058 Use char because int might match the return type of a GCC
2059 builtin and then its argument prototype would still apply. */
2060 #ifdef __cplusplus
2061 extern "C"
2062 #endif
2063 char $2 ();
2064 /* The GNU C library defines this for functions which it implements
2065 to always fail with ENOSYS. Some functions are actually named
2066 something starting with __ and the normal name is an alias. */
2067 #if defined __stub_$2 || defined __stub___$2
2068 choke me
2069 #endif
2072 main ()
2074 return $2 ();
2076 return 0;
2078 _ACEOF
2079 if ac_fn_c_try_link "$LINENO"; then :
2080 eval "$3=yes"
2081 else
2082 eval "$3=no"
2084 rm -f core conftest.err conftest.$ac_objext \
2085 conftest$ac_exeext conftest.$ac_ext
2087 eval ac_res=\$$3
2088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2089 $as_echo "$ac_res" >&6; }
2090 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2092 } # ac_fn_c_check_func
2094 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2095 # -------------------------------------------
2096 # Tests whether TYPE exists after having included INCLUDES, setting cache
2097 # variable VAR accordingly.
2098 ac_fn_c_check_type ()
2100 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2102 $as_echo_n "checking for $2... " >&6; }
2103 if eval \${$3+:} false; then :
2104 $as_echo_n "(cached) " >&6
2105 else
2106 eval "$3=no"
2107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2108 /* end confdefs.h. */
2111 main ()
2113 if (sizeof ($2))
2114 return 0;
2116 return 0;
2118 _ACEOF
2119 if ac_fn_c_try_compile "$LINENO"; then :
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121 /* end confdefs.h. */
2124 main ()
2126 if (sizeof (($2)))
2127 return 0;
2129 return 0;
2131 _ACEOF
2132 if ac_fn_c_try_compile "$LINENO"; then :
2134 else
2135 eval "$3=yes"
2137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2141 eval ac_res=\$$3
2142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2143 $as_echo "$ac_res" >&6; }
2144 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2146 } # ac_fn_c_check_type
2148 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2149 # ----------------------------------------------------
2150 # Tries to find if the field MEMBER exists in type AGGR, after including
2151 # INCLUDES, setting cache variable VAR accordingly.
2152 ac_fn_c_check_member ()
2154 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2156 $as_echo_n "checking for $2.$3... " >&6; }
2157 if eval \${$4+:} false; then :
2158 $as_echo_n "(cached) " >&6
2159 else
2160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2161 /* end confdefs.h. */
2164 main ()
2166 static $2 ac_aggr;
2167 if (ac_aggr.$3)
2168 return 0;
2170 return 0;
2172 _ACEOF
2173 if ac_fn_c_try_compile "$LINENO"; then :
2174 eval "$4=yes"
2175 else
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177 /* end confdefs.h. */
2180 main ()
2182 static $2 ac_aggr;
2183 if (sizeof ac_aggr.$3)
2184 return 0;
2186 return 0;
2188 _ACEOF
2189 if ac_fn_c_try_compile "$LINENO"; then :
2190 eval "$4=yes"
2191 else
2192 eval "$4=no"
2194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2198 eval ac_res=\$$4
2199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2200 $as_echo "$ac_res" >&6; }
2201 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2203 } # ac_fn_c_check_member
2205 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2206 # --------------------------------------------
2207 # Tries to find the compile-time value of EXPR in a program that includes
2208 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2209 # computed
2210 ac_fn_c_compute_int ()
2212 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2213 if test "$cross_compiling" = yes; then
2214 # Depending upon the size, compute the lo and hi bounds.
2215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2216 /* end confdefs.h. */
2219 main ()
2221 static int test_array [1 - 2 * !(($2) >= 0)];
2222 test_array [0] = 0;
2223 return test_array [0];
2226 return 0;
2228 _ACEOF
2229 if ac_fn_c_try_compile "$LINENO"; then :
2230 ac_lo=0 ac_mid=0
2231 while :; do
2232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2233 /* end confdefs.h. */
2236 main ()
2238 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2239 test_array [0] = 0;
2240 return test_array [0];
2243 return 0;
2245 _ACEOF
2246 if ac_fn_c_try_compile "$LINENO"; then :
2247 ac_hi=$ac_mid; break
2248 else
2249 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2250 if test $ac_lo -le $ac_mid; then
2251 ac_lo= ac_hi=
2252 break
2254 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2257 done
2258 else
2259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260 /* end confdefs.h. */
2263 main ()
2265 static int test_array [1 - 2 * !(($2) < 0)];
2266 test_array [0] = 0;
2267 return test_array [0];
2270 return 0;
2272 _ACEOF
2273 if ac_fn_c_try_compile "$LINENO"; then :
2274 ac_hi=-1 ac_mid=-1
2275 while :; do
2276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2277 /* end confdefs.h. */
2280 main ()
2282 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2283 test_array [0] = 0;
2284 return test_array [0];
2287 return 0;
2289 _ACEOF
2290 if ac_fn_c_try_compile "$LINENO"; then :
2291 ac_lo=$ac_mid; break
2292 else
2293 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2294 if test $ac_mid -le $ac_hi; then
2295 ac_lo= ac_hi=
2296 break
2298 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2301 done
2302 else
2303 ac_lo= ac_hi=
2305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2308 # Binary search between lo and hi bounds.
2309 while test "x$ac_lo" != "x$ac_hi"; do
2310 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312 /* end confdefs.h. */
2315 main ()
2317 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2318 test_array [0] = 0;
2319 return test_array [0];
2322 return 0;
2324 _ACEOF
2325 if ac_fn_c_try_compile "$LINENO"; then :
2326 ac_hi=$ac_mid
2327 else
2328 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2331 done
2332 case $ac_lo in #((
2333 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2334 '') ac_retval=1 ;;
2335 esac
2336 else
2337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2338 /* end confdefs.h. */
2340 static long int longval () { return $2; }
2341 static unsigned long int ulongval () { return $2; }
2342 #include <stdio.h>
2343 #include <stdlib.h>
2345 main ()
2348 FILE *f = fopen ("conftest.val", "w");
2349 if (! f)
2350 return 1;
2351 if (($2) < 0)
2353 long int i = longval ();
2354 if (i != ($2))
2355 return 1;
2356 fprintf (f, "%ld", i);
2358 else
2360 unsigned long int i = ulongval ();
2361 if (i != ($2))
2362 return 1;
2363 fprintf (f, "%lu", i);
2365 /* Do not output a trailing newline, as this causes \r\n confusion
2366 on some platforms. */
2367 return ferror (f) || fclose (f) != 0;
2370 return 0;
2372 _ACEOF
2373 if ac_fn_c_try_run "$LINENO"; then :
2374 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2375 else
2376 ac_retval=1
2378 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2379 conftest.$ac_objext conftest.beam conftest.$ac_ext
2380 rm -f conftest.val
2383 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2384 as_fn_set_status $ac_retval
2386 } # ac_fn_c_compute_int
2388 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2389 # ---------------------------------------------
2390 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2391 # accordingly.
2392 ac_fn_c_check_decl ()
2394 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2395 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2396 as_decl_name=`echo $2|sed 's/ *(.*//'`
2397 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2399 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2400 if eval \${$3+:} false; then :
2401 $as_echo_n "(cached) " >&6
2402 else
2403 ac_save_werror_flag=$ac_c_werror_flag
2404 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2406 /* end confdefs.h. */
2409 main ()
2411 #ifndef $as_decl_name
2412 #ifdef __cplusplus
2413 (void) $as_decl_use;
2414 #else
2415 (void) $as_decl_name;
2416 #endif
2417 #endif
2420 return 0;
2422 _ACEOF
2423 if ac_fn_c_try_compile "$LINENO"; then :
2424 eval "$3=yes"
2425 else
2426 eval "$3=no"
2428 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2429 ac_c_werror_flag=$ac_save_werror_flag
2431 eval ac_res=\$$3
2432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2433 $as_echo "$ac_res" >&6; }
2434 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2436 } # ac_fn_c_check_decl
2437 cat >config.log <<_ACEOF
2438 This file contains any messages produced by compilers while
2439 running configure, to aid debugging if configure makes a mistake.
2441 It was created by PostgreSQL $as_me 17devel, which was
2442 generated by GNU Autoconf 2.69. Invocation command line was
2444 $ $0 $@
2446 _ACEOF
2447 exec 5>>config.log
2449 cat <<_ASUNAME
2450 ## --------- ##
2451 ## Platform. ##
2452 ## --------- ##
2454 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2455 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2456 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2457 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2458 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2460 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2461 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2463 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2464 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2465 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2466 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2467 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2468 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2469 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2471 _ASUNAME
2473 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2474 for as_dir in $PATH
2476 IFS=$as_save_IFS
2477 test -z "$as_dir" && as_dir=.
2478 $as_echo "PATH: $as_dir"
2479 done
2480 IFS=$as_save_IFS
2482 } >&5
2484 cat >&5 <<_ACEOF
2487 ## ----------- ##
2488 ## Core tests. ##
2489 ## ----------- ##
2491 _ACEOF
2494 # Keep a trace of the command line.
2495 # Strip out --no-create and --no-recursion so they do not pile up.
2496 # Strip out --silent because we don't want to record it for future runs.
2497 # Also quote any args containing shell meta-characters.
2498 # Make two passes to allow for proper duplicate-argument suppression.
2499 ac_configure_args=
2500 ac_configure_args0=
2501 ac_configure_args1=
2502 ac_must_keep_next=false
2503 for ac_pass in 1 2
2505 for ac_arg
2507 case $ac_arg in
2508 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2509 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2510 | -silent | --silent | --silen | --sile | --sil)
2511 continue ;;
2512 *\'*)
2513 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2514 esac
2515 case $ac_pass in
2516 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2518 as_fn_append ac_configure_args1 " '$ac_arg'"
2519 if test $ac_must_keep_next = true; then
2520 ac_must_keep_next=false # Got value, back to normal.
2521 else
2522 case $ac_arg in
2523 *=* | --config-cache | -C | -disable-* | --disable-* \
2524 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2525 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2526 | -with-* | --with-* | -without-* | --without-* | --x)
2527 case "$ac_configure_args0 " in
2528 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2529 esac
2531 -* ) ac_must_keep_next=true ;;
2532 esac
2534 as_fn_append ac_configure_args " '$ac_arg'"
2536 esac
2537 done
2538 done
2539 { ac_configure_args0=; unset ac_configure_args0;}
2540 { ac_configure_args1=; unset ac_configure_args1;}
2542 # When interrupted or exit'd, cleanup temporary files, and complete
2543 # config.log. We remove comments because anyway the quotes in there
2544 # would cause problems or look ugly.
2545 # WARNING: Use '\'' to represent an apostrophe within the trap.
2546 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2547 trap 'exit_status=$?
2548 # Save into config.log some information that might help in debugging.
2550 echo
2552 $as_echo "## ---------------- ##
2553 ## Cache variables. ##
2554 ## ---------------- ##"
2555 echo
2556 # The following way of writing the cache mishandles newlines in values,
2558 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2559 eval ac_val=\$$ac_var
2560 case $ac_val in #(
2561 *${as_nl}*)
2562 case $ac_var in #(
2563 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2564 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2565 esac
2566 case $ac_var in #(
2567 _ | IFS | as_nl) ;; #(
2568 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2569 *) { eval $ac_var=; unset $ac_var;} ;;
2570 esac ;;
2571 esac
2572 done
2573 (set) 2>&1 |
2574 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2575 *${as_nl}ac_space=\ *)
2576 sed -n \
2577 "s/'\''/'\''\\\\'\'''\''/g;
2578 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2579 ;; #(
2581 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2583 esac |
2584 sort
2586 echo
2588 $as_echo "## ----------------- ##
2589 ## Output variables. ##
2590 ## ----------------- ##"
2591 echo
2592 for ac_var in $ac_subst_vars
2594 eval ac_val=\$$ac_var
2595 case $ac_val in
2596 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2597 esac
2598 $as_echo "$ac_var='\''$ac_val'\''"
2599 done | sort
2600 echo
2602 if test -n "$ac_subst_files"; then
2603 $as_echo "## ------------------- ##
2604 ## File substitutions. ##
2605 ## ------------------- ##"
2606 echo
2607 for ac_var in $ac_subst_files
2609 eval ac_val=\$$ac_var
2610 case $ac_val in
2611 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2612 esac
2613 $as_echo "$ac_var='\''$ac_val'\''"
2614 done | sort
2615 echo
2618 if test -s confdefs.h; then
2619 $as_echo "## ----------- ##
2620 ## confdefs.h. ##
2621 ## ----------- ##"
2622 echo
2623 cat confdefs.h
2624 echo
2626 test "$ac_signal" != 0 &&
2627 $as_echo "$as_me: caught signal $ac_signal"
2628 $as_echo "$as_me: exit $exit_status"
2629 } >&5
2630 rm -f core *.core core.conftest.* &&
2631 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2632 exit $exit_status
2634 for ac_signal in 1 2 13 15; do
2635 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2636 done
2637 ac_signal=0
2639 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2640 rm -f -r conftest* confdefs.h
2642 $as_echo "/* confdefs.h */" > confdefs.h
2644 # Predefined preprocessor variables.
2646 cat >>confdefs.h <<_ACEOF
2647 #define PACKAGE_NAME "$PACKAGE_NAME"
2648 _ACEOF
2650 cat >>confdefs.h <<_ACEOF
2651 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2652 _ACEOF
2654 cat >>confdefs.h <<_ACEOF
2655 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2656 _ACEOF
2658 cat >>confdefs.h <<_ACEOF
2659 #define PACKAGE_STRING "$PACKAGE_STRING"
2660 _ACEOF
2662 cat >>confdefs.h <<_ACEOF
2663 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2664 _ACEOF
2666 cat >>confdefs.h <<_ACEOF
2667 #define PACKAGE_URL "$PACKAGE_URL"
2668 _ACEOF
2671 # Let the site file select an alternate cache file if it wants to.
2672 # Prefer an explicitly selected file to automatically selected ones.
2673 ac_site_file1=NONE
2674 ac_site_file2=NONE
2675 if test -n "$CONFIG_SITE"; then
2676 # We do not want a PATH search for config.site.
2677 case $CONFIG_SITE in #((
2678 -*) ac_site_file1=./$CONFIG_SITE;;
2679 */*) ac_site_file1=$CONFIG_SITE;;
2680 *) ac_site_file1=./$CONFIG_SITE;;
2681 esac
2682 elif test "x$prefix" != xNONE; then
2683 ac_site_file1=$prefix/share/config.site
2684 ac_site_file2=$prefix/etc/config.site
2685 else
2686 ac_site_file1=$ac_default_prefix/share/config.site
2687 ac_site_file2=$ac_default_prefix/etc/config.site
2689 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2691 test "x$ac_site_file" = xNONE && continue
2692 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2693 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2694 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2695 sed 's/^/| /' "$ac_site_file" >&5
2696 . "$ac_site_file" \
2697 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2698 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2699 as_fn_error $? "failed to load site script $ac_site_file
2700 See \`config.log' for more details" "$LINENO" 5; }
2702 done
2704 if test -r "$cache_file"; then
2705 # Some versions of bash will fail to source /dev/null (special files
2706 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2707 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2709 $as_echo "$as_me: loading cache $cache_file" >&6;}
2710 case $cache_file in
2711 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2712 *) . "./$cache_file";;
2713 esac
2715 else
2716 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2717 $as_echo "$as_me: creating cache $cache_file" >&6;}
2718 >$cache_file
2721 # Check that the precious variables saved in the cache have kept the same
2722 # value.
2723 ac_cache_corrupted=false
2724 for ac_var in $ac_precious_vars; do
2725 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2726 eval ac_new_set=\$ac_env_${ac_var}_set
2727 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2728 eval ac_new_val=\$ac_env_${ac_var}_value
2729 case $ac_old_set,$ac_new_set in
2730 set,)
2731 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2732 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2733 ac_cache_corrupted=: ;;
2734 ,set)
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2736 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2737 ac_cache_corrupted=: ;;
2738 ,);;
2740 if test "x$ac_old_val" != "x$ac_new_val"; then
2741 # differences in whitespace do not lead to failure.
2742 ac_old_val_w=`echo x $ac_old_val`
2743 ac_new_val_w=`echo x $ac_new_val`
2744 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2746 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2747 ac_cache_corrupted=:
2748 else
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2750 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2751 eval $ac_var=\$ac_old_val
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2754 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2756 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2757 fi;;
2758 esac
2759 # Pass precious variables to config.status.
2760 if test "$ac_new_set" = set; then
2761 case $ac_new_val in
2762 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2763 *) ac_arg=$ac_var=$ac_new_val ;;
2764 esac
2765 case " $ac_configure_args " in
2766 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2767 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2768 esac
2770 done
2771 if $ac_cache_corrupted; then
2772 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2773 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2774 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2775 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2776 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2778 ## -------------------- ##
2779 ## Main body of script. ##
2780 ## -------------------- ##
2782 ac_ext=c
2783 ac_cpp='$CPP $CPPFLAGS'
2784 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2785 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2786 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2793 ac_aux_dir=
2794 for ac_dir in config "$srcdir"/config; do
2795 if test -f "$ac_dir/install-sh"; then
2796 ac_aux_dir=$ac_dir
2797 ac_install_sh="$ac_aux_dir/install-sh -c"
2798 break
2799 elif test -f "$ac_dir/install.sh"; then
2800 ac_aux_dir=$ac_dir
2801 ac_install_sh="$ac_aux_dir/install.sh -c"
2802 break
2803 elif test -f "$ac_dir/shtool"; then
2804 ac_aux_dir=$ac_dir
2805 ac_install_sh="$ac_aux_dir/shtool install -c"
2806 break
2808 done
2809 if test -z "$ac_aux_dir"; then
2810 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2813 # These three variables are undocumented and unsupported,
2814 # and are intended to be withdrawn in a future Autoconf release.
2815 # They can cause serious problems if a builder's source tree is in a directory
2816 # whose full name contains unusual characters.
2817 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2818 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2819 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2824 cat >>confdefs.h <<_ACEOF
2825 #define CONFIGURE_ARGS "$ac_configure_args"
2826 _ACEOF
2829 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2830 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2831 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2834 cat >>confdefs.h <<_ACEOF
2835 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2836 _ACEOF
2839 cat >>confdefs.h <<_ACEOF
2840 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2841 _ACEOF
2844 cat >>confdefs.h <<_ACEOF
2845 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2846 _ACEOF
2852 # Check whether --with-extra-version was given.
2853 if test "${with_extra_version+set}" = set; then :
2854 withval=$with_extra_version;
2855 case $withval in
2856 yes)
2857 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2860 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2863 PG_VERSION="$PACKAGE_VERSION$withval"
2865 esac
2867 else
2868 PG_VERSION="$PACKAGE_VERSION"
2873 cat >>confdefs.h <<_ACEOF
2874 #define PG_VERSION "$PG_VERSION"
2875 _ACEOF
2878 # Make sure we can run config.sub.
2879 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2880 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2883 $as_echo_n "checking build system type... " >&6; }
2884 if ${ac_cv_build+:} false; then :
2885 $as_echo_n "(cached) " >&6
2886 else
2887 ac_build_alias=$build_alias
2888 test "x$ac_build_alias" = x &&
2889 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2890 test "x$ac_build_alias" = x &&
2891 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2892 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2893 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2897 $as_echo "$ac_cv_build" >&6; }
2898 case $ac_cv_build in
2899 *-*-*) ;;
2900 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2901 esac
2902 build=$ac_cv_build
2903 ac_save_IFS=$IFS; IFS='-'
2904 set x $ac_cv_build
2905 shift
2906 build_cpu=$1
2907 build_vendor=$2
2908 shift; shift
2909 # Remember, the first character of IFS is used to create $*,
2910 # except with old shells:
2911 build_os=$*
2912 IFS=$ac_save_IFS
2913 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2917 $as_echo_n "checking host system type... " >&6; }
2918 if ${ac_cv_host+:} false; then :
2919 $as_echo_n "(cached) " >&6
2920 else
2921 if test "x$host_alias" = x; then
2922 ac_cv_host=$ac_cv_build
2923 else
2924 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2925 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2930 $as_echo "$ac_cv_host" >&6; }
2931 case $ac_cv_host in
2932 *-*-*) ;;
2933 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2934 esac
2935 host=$ac_cv_host
2936 ac_save_IFS=$IFS; IFS='-'
2937 set x $ac_cv_host
2938 shift
2939 host_cpu=$1
2940 host_vendor=$2
2941 shift; shift
2942 # Remember, the first character of IFS is used to create $*,
2943 # except with old shells:
2944 host_os=$*
2945 IFS=$ac_save_IFS
2946 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2950 template=
2951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2952 $as_echo_n "checking which template to use... " >&6; }
2957 # Check whether --with-template was given.
2958 if test "${with_template+set}" = set; then :
2959 withval=$with_template;
2960 case $withval in
2961 yes)
2962 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2965 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2969 case $withval in
2970 list) echo; ls "$srcdir/src/template"; exit;;
2971 *) if test -f "$srcdir/src/template/$with_template" ; then
2972 template=$withval
2973 else
2974 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2975 fi;;
2976 esac
2979 esac
2981 else
2983 # --with-template not given
2985 case $host_os in
2986 aix*) template=aix ;;
2987 cygwin*|msys*) template=cygwin ;;
2988 darwin*) template=darwin ;;
2989 dragonfly*) template=netbsd ;;
2990 freebsd*) template=freebsd ;;
2991 linux*|gnu*|k*bsd*-gnu)
2992 template=linux ;;
2993 mingw*) template=win32 ;;
2994 netbsd*) template=netbsd ;;
2995 openbsd*) template=openbsd ;;
2996 solaris*) template=solaris ;;
2997 esac
2999 if test x"$template" = x"" ; then
3000 as_fn_error $? "
3001 *******************************************************************
3002 PostgreSQL has apparently not been ported to your platform yet.
3003 To try a manual configuration, look into the src/template directory
3004 for a similar platform and use the '--with-template=' option.
3006 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
3007 rectifying this. Include the above 'checking host system type...'
3008 line.
3009 *******************************************************************
3010 " "$LINENO" 5
3018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3019 $as_echo "$template" >&6; }
3021 PORTNAME=$template
3024 # Initialize default assumption that we do not need separate assembly code
3025 # for TAS (test-and-set). This can be overridden by the template file
3026 # when it's executed.
3027 need_tas=no
3028 tas_file=dummy.s
3030 # Default, works for most platforms, override in template file if needed
3031 DLSUFFIX=".so"
3036 ## Command line options
3040 # Add non-standard directories to the include path
3045 # Check whether --with-includes was given.
3046 if test "${with_includes+set}" = set; then :
3047 withval=$with_includes;
3048 case $withval in
3049 yes)
3050 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3053 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3058 esac
3066 # Add non-standard directories to the library search path
3071 # Check whether --with-libraries was given.
3072 if test "${with_libraries+set}" = set; then :
3073 withval=$with_libraries;
3074 case $withval in
3075 yes)
3076 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3079 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3082 LIBRARY_DIRS=$withval
3084 esac
3093 # Check whether --with-libs was given.
3094 if test "${with_libs+set}" = set; then :
3095 withval=$with_libs;
3096 case $withval in
3097 yes)
3098 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3101 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3104 LIBRARY_DIRS=$withval
3106 esac
3114 # 64-bit integer date/time storage is now the only option, but to avoid
3115 # unnecessary breakage of build scripts, continue to accept an explicit
3116 # "--enable-integer-datetimes" switch.
3120 # Check whether --enable-integer-datetimes was given.
3121 if test "${enable_integer_datetimes+set}" = set; then :
3122 enableval=$enable_integer_datetimes;
3123 case $enableval in
3124 yes)
3128 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3131 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3133 esac
3135 else
3136 enable_integer_datetimes=yes
3144 # NLS
3146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3147 $as_echo_n "checking whether NLS is wanted... " >&6; }
3150 # Check whether --enable-nls was given.
3151 if test "${enable_nls+set}" = set; then :
3152 enableval=$enable_nls;
3153 case $enableval in
3154 yes)
3161 enable_nls=yes
3162 WANTED_LANGUAGES=$enableval
3164 esac
3166 else
3167 enable_nls=no
3172 if test "$enable_nls" = yes; then
3174 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3179 $as_echo "$enable_nls" >&6; }
3184 # Default port number (--with-pgport), default 5432
3186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3187 $as_echo_n "checking for default port number... " >&6; }
3191 # Check whether --with-pgport was given.
3192 if test "${with_pgport+set}" = set; then :
3193 withval=$with_pgport;
3194 case $withval in
3195 yes)
3196 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3199 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3202 default_port=$withval
3204 esac
3206 else
3207 default_port=5432
3211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3212 $as_echo "$default_port" >&6; }
3213 # Need both of these because some places want an integer and some a string
3215 cat >>confdefs.h <<_ACEOF
3216 #define DEF_PGPORT ${default_port}
3217 _ACEOF
3220 cat >>confdefs.h <<_ACEOF
3221 #define DEF_PGPORT_STR "${default_port}"
3222 _ACEOF
3226 # It's worth validating port; you can get very confusing errors otherwise
3227 if test x"$default_port" = x""; then
3228 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3229 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3230 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3231 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3232 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3233 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3234 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3238 # '-rpath'-like feature can be disabled
3242 # Check whether --enable-rpath was given.
3243 if test "${enable_rpath+set}" = set; then :
3244 enableval=$enable_rpath;
3245 case $enableval in
3246 yes)
3253 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3255 esac
3257 else
3258 enable_rpath=yes
3266 # Spinlocks
3270 # Check whether --enable-spinlocks was given.
3271 if test "${enable_spinlocks+set}" = set; then :
3272 enableval=$enable_spinlocks;
3273 case $enableval in
3274 yes)
3281 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3283 esac
3285 else
3286 enable_spinlocks=yes
3293 # Atomic operations
3297 # Check whether --enable-atomics was given.
3298 if test "${enable_atomics+set}" = set; then :
3299 enableval=$enable_atomics;
3300 case $enableval in
3301 yes)
3308 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3310 esac
3312 else
3313 enable_atomics=yes
3320 # --enable-debug adds -g to compiler flags
3324 # Check whether --enable-debug was given.
3325 if test "${enable_debug+set}" = set; then :
3326 enableval=$enable_debug;
3327 case $enableval in
3328 yes)
3335 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3337 esac
3339 else
3340 enable_debug=no
3348 # --enable-profiling enables gcc profiling
3352 # Check whether --enable-profiling was given.
3353 if test "${enable_profiling+set}" = set; then :
3354 enableval=$enable_profiling;
3355 case $enableval in
3356 yes)
3363 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3365 esac
3367 else
3368 enable_profiling=no
3375 # --enable-coverage enables generation of code coverage metrics with gcov
3379 # Check whether --enable-coverage was given.
3380 if test "${enable_coverage+set}" = set; then :
3381 enableval=$enable_coverage;
3382 case $enableval in
3383 yes)
3384 if test -z "$GCOV"; then
3385 for ac_prog in gcov
3387 # Extract the first word of "$ac_prog", so it can be a program name with args.
3388 set dummy $ac_prog; ac_word=$2
3389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3390 $as_echo_n "checking for $ac_word... " >&6; }
3391 if ${ac_cv_path_GCOV+:} false; then :
3392 $as_echo_n "(cached) " >&6
3393 else
3394 case $GCOV in
3395 [\\/]* | ?:[\\/]*)
3396 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3399 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3400 for as_dir in $PATH
3402 IFS=$as_save_IFS
3403 test -z "$as_dir" && as_dir=.
3404 for ac_exec_ext in '' $ac_executable_extensions; do
3405 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3406 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3407 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3408 break 2
3410 done
3411 done
3412 IFS=$as_save_IFS
3415 esac
3417 GCOV=$ac_cv_path_GCOV
3418 if test -n "$GCOV"; then
3419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3420 $as_echo "$GCOV" >&6; }
3421 else
3422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3423 $as_echo "no" >&6; }
3427 test -n "$GCOV" && break
3428 done
3430 else
3431 # Report the value of GCOV in configure's output in all cases.
3432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3433 $as_echo_n "checking for GCOV... " >&6; }
3434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3435 $as_echo "$GCOV" >&6; }
3438 if test -z "$GCOV"; then
3439 as_fn_error $? "gcov not found" "$LINENO" 5
3441 if test -z "$LCOV"; then
3442 for ac_prog in lcov
3444 # Extract the first word of "$ac_prog", so it can be a program name with args.
3445 set dummy $ac_prog; ac_word=$2
3446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3447 $as_echo_n "checking for $ac_word... " >&6; }
3448 if ${ac_cv_path_LCOV+:} false; then :
3449 $as_echo_n "(cached) " >&6
3450 else
3451 case $LCOV in
3452 [\\/]* | ?:[\\/]*)
3453 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3456 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3457 for as_dir in $PATH
3459 IFS=$as_save_IFS
3460 test -z "$as_dir" && as_dir=.
3461 for ac_exec_ext in '' $ac_executable_extensions; do
3462 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3463 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3464 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3465 break 2
3467 done
3468 done
3469 IFS=$as_save_IFS
3472 esac
3474 LCOV=$ac_cv_path_LCOV
3475 if test -n "$LCOV"; then
3476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3477 $as_echo "$LCOV" >&6; }
3478 else
3479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3480 $as_echo "no" >&6; }
3484 test -n "$LCOV" && break
3485 done
3487 else
3488 # Report the value of LCOV in configure's output in all cases.
3489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3490 $as_echo_n "checking for LCOV... " >&6; }
3491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3492 $as_echo "$LCOV" >&6; }
3495 if test -z "$LCOV"; then
3496 as_fn_error $? "lcov not found" "$LINENO" 5
3498 if test -z "$GENHTML"; then
3499 for ac_prog in genhtml
3501 # Extract the first word of "$ac_prog", so it can be a program name with args.
3502 set dummy $ac_prog; ac_word=$2
3503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3504 $as_echo_n "checking for $ac_word... " >&6; }
3505 if ${ac_cv_path_GENHTML+:} false; then :
3506 $as_echo_n "(cached) " >&6
3507 else
3508 case $GENHTML in
3509 [\\/]* | ?:[\\/]*)
3510 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3513 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3514 for as_dir in $PATH
3516 IFS=$as_save_IFS
3517 test -z "$as_dir" && as_dir=.
3518 for ac_exec_ext in '' $ac_executable_extensions; do
3519 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3520 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3521 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3522 break 2
3524 done
3525 done
3526 IFS=$as_save_IFS
3529 esac
3531 GENHTML=$ac_cv_path_GENHTML
3532 if test -n "$GENHTML"; then
3533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3534 $as_echo "$GENHTML" >&6; }
3535 else
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3537 $as_echo "no" >&6; }
3541 test -n "$GENHTML" && break
3542 done
3544 else
3545 # Report the value of GENHTML in configure's output in all cases.
3546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3547 $as_echo_n "checking for GENHTML... " >&6; }
3548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3549 $as_echo "$GENHTML" >&6; }
3552 if test -z "$GENHTML"; then
3553 as_fn_error $? "genhtml not found" "$LINENO" 5
3560 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3562 esac
3564 else
3565 enable_coverage=no
3573 # DTrace
3577 # Check whether --enable-dtrace was given.
3578 if test "${enable_dtrace+set}" = set; then :
3579 enableval=$enable_dtrace;
3580 case $enableval in
3581 yes)
3582 if test -z "$DTRACE"; then
3583 for ac_prog in dtrace
3585 # Extract the first word of "$ac_prog", so it can be a program name with args.
3586 set dummy $ac_prog; ac_word=$2
3587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3588 $as_echo_n "checking for $ac_word... " >&6; }
3589 if ${ac_cv_path_DTRACE+:} false; then :
3590 $as_echo_n "(cached) " >&6
3591 else
3592 case $DTRACE in
3593 [\\/]* | ?:[\\/]*)
3594 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3597 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3598 for as_dir in $PATH
3600 IFS=$as_save_IFS
3601 test -z "$as_dir" && as_dir=.
3602 for ac_exec_ext in '' $ac_executable_extensions; do
3603 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3604 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3605 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3606 break 2
3608 done
3609 done
3610 IFS=$as_save_IFS
3613 esac
3615 DTRACE=$ac_cv_path_DTRACE
3616 if test -n "$DTRACE"; then
3617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3618 $as_echo "$DTRACE" >&6; }
3619 else
3620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3621 $as_echo "no" >&6; }
3625 test -n "$DTRACE" && break
3626 done
3628 else
3629 # Report the value of DTRACE in configure's output in all cases.
3630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3631 $as_echo_n "checking for DTRACE... " >&6; }
3632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3633 $as_echo "$DTRACE" >&6; }
3636 if test -z "$DTRACE"; then
3637 as_fn_error $? "dtrace not found" "$LINENO" 5
3645 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3647 esac
3649 else
3650 enable_dtrace=no
3658 # TAP tests
3662 # Check whether --enable-tap-tests was given.
3663 if test "${enable_tap_tests+set}" = set; then :
3664 enableval=$enable_tap_tests;
3665 case $enableval in
3666 yes)
3673 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3675 esac
3677 else
3678 enable_tap_tests=no
3686 # Block size
3688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3689 $as_echo_n "checking for block size... " >&6; }
3693 # Check whether --with-blocksize was given.
3694 if test "${with_blocksize+set}" = set; then :
3695 withval=$with_blocksize;
3696 case $withval in
3697 yes)
3698 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3701 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3704 blocksize=$withval
3706 esac
3708 else
3709 blocksize=8
3713 case ${blocksize} in
3714 1) BLCKSZ=1024;;
3715 2) BLCKSZ=2048;;
3716 4) BLCKSZ=4096;;
3717 8) BLCKSZ=8192;;
3718 16) BLCKSZ=16384;;
3719 32) BLCKSZ=32768;;
3720 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3721 esac
3722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3723 $as_echo "${blocksize}kB" >&6; }
3726 cat >>confdefs.h <<_ACEOF
3727 #define BLCKSZ ${BLCKSZ}
3728 _ACEOF
3732 # Relation segment size
3737 # Check whether --with-segsize was given.
3738 if test "${with_segsize+set}" = set; then :
3739 withval=$with_segsize;
3740 case $withval in
3741 yes)
3742 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3745 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3748 segsize=$withval
3750 esac
3752 else
3753 segsize=1
3760 # Check whether --with-segsize-blocks was given.
3761 if test "${with_segsize_blocks+set}" = set; then :
3762 withval=$with_segsize_blocks;
3763 case $withval in
3764 yes)
3765 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3768 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3771 segsize_blocks=$withval
3773 esac
3775 else
3776 segsize_blocks=0
3781 # If --with-segsize-blocks is non-zero, it is used, --with-segsize
3782 # otherwise. segsize-blocks is only really useful for developers wanting to
3783 # test segment related code. Warn if both are used.
3784 if test $segsize_blocks -ne 0 -a $segsize -ne 1; then
3785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&5
3786 $as_echo "$as_me: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&2;}
3789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3790 $as_echo_n "checking for segment size... " >&6; }
3791 if test $segsize_blocks -eq 0; then
3792 # this expression is set up to avoid unnecessary integer overflow
3793 # blocksize is already guaranteed to be a factor of 1024
3794 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3795 test $? -eq 0 || exit 1
3796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3797 $as_echo "${segsize}GB" >&6; }
3798 else
3799 RELSEG_SIZE=$segsize_blocks
3800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${RELSEG_SIZE} blocks" >&5
3801 $as_echo "${RELSEG_SIZE} blocks" >&6; }
3805 cat >>confdefs.h <<_ACEOF
3806 #define RELSEG_SIZE ${RELSEG_SIZE}
3807 _ACEOF
3811 # WAL block size
3813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3814 $as_echo_n "checking for WAL block size... " >&6; }
3818 # Check whether --with-wal-blocksize was given.
3819 if test "${with_wal_blocksize+set}" = set; then :
3820 withval=$with_wal_blocksize;
3821 case $withval in
3822 yes)
3823 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3826 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3829 wal_blocksize=$withval
3831 esac
3833 else
3834 wal_blocksize=8
3838 case ${wal_blocksize} in
3839 1) XLOG_BLCKSZ=1024;;
3840 2) XLOG_BLCKSZ=2048;;
3841 4) XLOG_BLCKSZ=4096;;
3842 8) XLOG_BLCKSZ=8192;;
3843 16) XLOG_BLCKSZ=16384;;
3844 32) XLOG_BLCKSZ=32768;;
3845 64) XLOG_BLCKSZ=65536;;
3846 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3847 esac
3848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3849 $as_echo "${wal_blocksize}kB" >&6; }
3852 cat >>confdefs.h <<_ACEOF
3853 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3854 _ACEOF
3858 # C compiler
3861 # For historical reasons you can also use --with-CC to specify the C compiler
3862 # to use, although the standard way to do this is to set the CC environment
3863 # variable.
3867 # Check whether --with-CC was given.
3868 if test "${with_CC+set}" = set; then :
3869 withval=$with_CC;
3870 case $withval in
3871 yes)
3872 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3875 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3878 CC=$with_CC
3880 esac
3886 case $template in
3887 aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3888 *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3889 esac
3891 ac_ext=c
3892 ac_cpp='$CPP $CPPFLAGS'
3893 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3894 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3895 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3896 if test -n "$ac_tool_prefix"; then
3897 for ac_prog in $pgac_cc_list
3899 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3900 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3902 $as_echo_n "checking for $ac_word... " >&6; }
3903 if ${ac_cv_prog_CC+:} false; then :
3904 $as_echo_n "(cached) " >&6
3905 else
3906 if test -n "$CC"; then
3907 ac_cv_prog_CC="$CC" # Let the user override the test.
3908 else
3909 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3910 for as_dir in $PATH
3912 IFS=$as_save_IFS
3913 test -z "$as_dir" && as_dir=.
3914 for ac_exec_ext in '' $ac_executable_extensions; do
3915 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3916 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3917 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3918 break 2
3920 done
3921 done
3922 IFS=$as_save_IFS
3926 CC=$ac_cv_prog_CC
3927 if test -n "$CC"; then
3928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3929 $as_echo "$CC" >&6; }
3930 else
3931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3932 $as_echo "no" >&6; }
3936 test -n "$CC" && break
3937 done
3939 if test -z "$CC"; then
3940 ac_ct_CC=$CC
3941 for ac_prog in $pgac_cc_list
3943 # Extract the first word of "$ac_prog", so it can be a program name with args.
3944 set dummy $ac_prog; ac_word=$2
3945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3946 $as_echo_n "checking for $ac_word... " >&6; }
3947 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3948 $as_echo_n "(cached) " >&6
3949 else
3950 if test -n "$ac_ct_CC"; then
3951 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3952 else
3953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3954 for as_dir in $PATH
3956 IFS=$as_save_IFS
3957 test -z "$as_dir" && as_dir=.
3958 for ac_exec_ext in '' $ac_executable_extensions; do
3959 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3960 ac_cv_prog_ac_ct_CC="$ac_prog"
3961 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3962 break 2
3964 done
3965 done
3966 IFS=$as_save_IFS
3970 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3971 if test -n "$ac_ct_CC"; then
3972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3973 $as_echo "$ac_ct_CC" >&6; }
3974 else
3975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3976 $as_echo "no" >&6; }
3980 test -n "$ac_ct_CC" && break
3981 done
3983 if test "x$ac_ct_CC" = x; then
3984 CC=""
3985 else
3986 case $cross_compiling:$ac_tool_warned in
3987 yes:)
3988 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3989 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3990 ac_tool_warned=yes ;;
3991 esac
3992 CC=$ac_ct_CC
3997 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3998 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3999 as_fn_error $? "no acceptable C compiler found in \$PATH
4000 See \`config.log' for more details" "$LINENO" 5; }
4002 # Provide some information about the compiler.
4003 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4004 set X $ac_compile
4005 ac_compiler=$2
4006 for ac_option in --version -v -V -qversion; do
4007 { { ac_try="$ac_compiler $ac_option >&5"
4008 case "(($ac_try" in
4009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4010 *) ac_try_echo=$ac_try;;
4011 esac
4012 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4013 $as_echo "$ac_try_echo"; } >&5
4014 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4015 ac_status=$?
4016 if test -s conftest.err; then
4017 sed '10a\
4018 ... rest of stderr output deleted ...
4019 10q' conftest.err >conftest.er1
4020 cat conftest.er1 >&5
4022 rm -f conftest.er1 conftest.err
4023 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4024 test $ac_status = 0; }
4025 done
4027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4028 /* end confdefs.h. */
4031 main ()
4035 return 0;
4037 _ACEOF
4038 ac_clean_files_save=$ac_clean_files
4039 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4040 # Try to create an executable without -o first, disregard a.out.
4041 # It will help us diagnose broken compilers, and finding out an intuition
4042 # of exeext.
4043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4044 $as_echo_n "checking whether the C compiler works... " >&6; }
4045 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4047 # The possible output files:
4048 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4050 ac_rmfiles=
4051 for ac_file in $ac_files
4053 case $ac_file in
4054 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4055 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4056 esac
4057 done
4058 rm -f $ac_rmfiles
4060 if { { ac_try="$ac_link_default"
4061 case "(($ac_try" in
4062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4063 *) ac_try_echo=$ac_try;;
4064 esac
4065 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4066 $as_echo "$ac_try_echo"; } >&5
4067 (eval "$ac_link_default") 2>&5
4068 ac_status=$?
4069 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4070 test $ac_status = 0; }; then :
4071 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4072 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4073 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4074 # so that the user can short-circuit this test for compilers unknown to
4075 # Autoconf.
4076 for ac_file in $ac_files ''
4078 test -f "$ac_file" || continue
4079 case $ac_file in
4080 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4082 [ab].out )
4083 # We found the default executable, but exeext='' is most
4084 # certainly right.
4085 break;;
4086 *.* )
4087 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4088 then :; else
4089 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4091 # We set ac_cv_exeext here because the later test for it is not
4092 # safe: cross compilers may not add the suffix if given an `-o'
4093 # argument, so we may need to know it at that point already.
4094 # Even if this section looks crufty: it has the advantage of
4095 # actually working.
4096 break;;
4098 break;;
4099 esac
4100 done
4101 test "$ac_cv_exeext" = no && ac_cv_exeext=
4103 else
4104 ac_file=''
4106 if test -z "$ac_file"; then :
4107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4108 $as_echo "no" >&6; }
4109 $as_echo "$as_me: failed program was:" >&5
4110 sed 's/^/| /' conftest.$ac_ext >&5
4112 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4113 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4114 as_fn_error 77 "C compiler cannot create executables
4115 See \`config.log' for more details" "$LINENO" 5; }
4116 else
4117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4118 $as_echo "yes" >&6; }
4120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4121 $as_echo_n "checking for C compiler default output file name... " >&6; }
4122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4123 $as_echo "$ac_file" >&6; }
4124 ac_exeext=$ac_cv_exeext
4126 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4127 ac_clean_files=$ac_clean_files_save
4128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4129 $as_echo_n "checking for suffix of executables... " >&6; }
4130 if { { ac_try="$ac_link"
4131 case "(($ac_try" in
4132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4133 *) ac_try_echo=$ac_try;;
4134 esac
4135 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4136 $as_echo "$ac_try_echo"; } >&5
4137 (eval "$ac_link") 2>&5
4138 ac_status=$?
4139 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4140 test $ac_status = 0; }; then :
4141 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4142 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4143 # work properly (i.e., refer to `conftest.exe'), while it won't with
4144 # `rm'.
4145 for ac_file in conftest.exe conftest conftest.*; do
4146 test -f "$ac_file" || continue
4147 case $ac_file in
4148 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4149 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4150 break;;
4151 * ) break;;
4152 esac
4153 done
4154 else
4155 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4156 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4157 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4158 See \`config.log' for more details" "$LINENO" 5; }
4160 rm -f conftest conftest$ac_cv_exeext
4161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4162 $as_echo "$ac_cv_exeext" >&6; }
4164 rm -f conftest.$ac_ext
4165 EXEEXT=$ac_cv_exeext
4166 ac_exeext=$EXEEXT
4167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4168 /* end confdefs.h. */
4169 #include <stdio.h>
4171 main ()
4173 FILE *f = fopen ("conftest.out", "w");
4174 return ferror (f) || fclose (f) != 0;
4177 return 0;
4179 _ACEOF
4180 ac_clean_files="$ac_clean_files conftest.out"
4181 # Check that the compiler produces executables we can run. If not, either
4182 # the compiler is broken, or we cross compile.
4183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4184 $as_echo_n "checking whether we are cross compiling... " >&6; }
4185 if test "$cross_compiling" != yes; then
4186 { { ac_try="$ac_link"
4187 case "(($ac_try" in
4188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4189 *) ac_try_echo=$ac_try;;
4190 esac
4191 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4192 $as_echo "$ac_try_echo"; } >&5
4193 (eval "$ac_link") 2>&5
4194 ac_status=$?
4195 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4196 test $ac_status = 0; }
4197 if { ac_try='./conftest$ac_cv_exeext'
4198 { { case "(($ac_try" in
4199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4200 *) ac_try_echo=$ac_try;;
4201 esac
4202 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4203 $as_echo "$ac_try_echo"; } >&5
4204 (eval "$ac_try") 2>&5
4205 ac_status=$?
4206 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4207 test $ac_status = 0; }; }; then
4208 cross_compiling=no
4209 else
4210 if test "$cross_compiling" = maybe; then
4211 cross_compiling=yes
4212 else
4213 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4214 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4215 as_fn_error $? "cannot run C compiled programs.
4216 If you meant to cross compile, use \`--host'.
4217 See \`config.log' for more details" "$LINENO" 5; }
4221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4222 $as_echo "$cross_compiling" >&6; }
4224 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4225 ac_clean_files=$ac_clean_files_save
4226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4227 $as_echo_n "checking for suffix of object files... " >&6; }
4228 if ${ac_cv_objext+:} false; then :
4229 $as_echo_n "(cached) " >&6
4230 else
4231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4232 /* end confdefs.h. */
4235 main ()
4239 return 0;
4241 _ACEOF
4242 rm -f conftest.o conftest.obj
4243 if { { ac_try="$ac_compile"
4244 case "(($ac_try" in
4245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4246 *) ac_try_echo=$ac_try;;
4247 esac
4248 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4249 $as_echo "$ac_try_echo"; } >&5
4250 (eval "$ac_compile") 2>&5
4251 ac_status=$?
4252 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4253 test $ac_status = 0; }; then :
4254 for ac_file in conftest.o conftest.obj conftest.*; do
4255 test -f "$ac_file" || continue;
4256 case $ac_file in
4257 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4258 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4259 break;;
4260 esac
4261 done
4262 else
4263 $as_echo "$as_me: failed program was:" >&5
4264 sed 's/^/| /' conftest.$ac_ext >&5
4266 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4267 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4268 as_fn_error $? "cannot compute suffix of object files: cannot compile
4269 See \`config.log' for more details" "$LINENO" 5; }
4271 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4274 $as_echo "$ac_cv_objext" >&6; }
4275 OBJEXT=$ac_cv_objext
4276 ac_objext=$OBJEXT
4277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4278 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4279 if ${ac_cv_c_compiler_gnu+:} false; then :
4280 $as_echo_n "(cached) " >&6
4281 else
4282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4283 /* end confdefs.h. */
4286 main ()
4288 #ifndef __GNUC__
4289 choke me
4290 #endif
4293 return 0;
4295 _ACEOF
4296 if ac_fn_c_try_compile "$LINENO"; then :
4297 ac_compiler_gnu=yes
4298 else
4299 ac_compiler_gnu=no
4301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4302 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4306 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4307 if test $ac_compiler_gnu = yes; then
4308 GCC=yes
4309 else
4310 GCC=
4312 ac_test_CFLAGS=${CFLAGS+set}
4313 ac_save_CFLAGS=$CFLAGS
4314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4315 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4316 if ${ac_cv_prog_cc_g+:} false; then :
4317 $as_echo_n "(cached) " >&6
4318 else
4319 ac_save_c_werror_flag=$ac_c_werror_flag
4320 ac_c_werror_flag=yes
4321 ac_cv_prog_cc_g=no
4322 CFLAGS="-g"
4323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4324 /* end confdefs.h. */
4327 main ()
4331 return 0;
4333 _ACEOF
4334 if ac_fn_c_try_compile "$LINENO"; then :
4335 ac_cv_prog_cc_g=yes
4336 else
4337 CFLAGS=""
4338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4339 /* end confdefs.h. */
4342 main ()
4346 return 0;
4348 _ACEOF
4349 if ac_fn_c_try_compile "$LINENO"; then :
4351 else
4352 ac_c_werror_flag=$ac_save_c_werror_flag
4353 CFLAGS="-g"
4354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4355 /* end confdefs.h. */
4358 main ()
4362 return 0;
4364 _ACEOF
4365 if ac_fn_c_try_compile "$LINENO"; then :
4366 ac_cv_prog_cc_g=yes
4368 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4372 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4373 ac_c_werror_flag=$ac_save_c_werror_flag
4375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4376 $as_echo "$ac_cv_prog_cc_g" >&6; }
4377 if test "$ac_test_CFLAGS" = set; then
4378 CFLAGS=$ac_save_CFLAGS
4379 elif test $ac_cv_prog_cc_g = yes; then
4380 if test "$GCC" = yes; then
4381 CFLAGS="-g -O2"
4382 else
4383 CFLAGS="-g"
4385 else
4386 if test "$GCC" = yes; then
4387 CFLAGS="-O2"
4388 else
4389 CFLAGS=
4392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4393 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4394 if ${ac_cv_prog_cc_c89+:} false; then :
4395 $as_echo_n "(cached) " >&6
4396 else
4397 ac_cv_prog_cc_c89=no
4398 ac_save_CC=$CC
4399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4400 /* end confdefs.h. */
4401 #include <stdarg.h>
4402 #include <stdio.h>
4403 struct stat;
4404 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4405 struct buf { int x; };
4406 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4407 static char *e (p, i)
4408 char **p;
4409 int i;
4411 return p[i];
4413 static char *f (char * (*g) (char **, int), char **p, ...)
4415 char *s;
4416 va_list v;
4417 va_start (v,p);
4418 s = g (p, va_arg (v,int));
4419 va_end (v);
4420 return s;
4423 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4424 function prototypes and stuff, but not '\xHH' hex character constants.
4425 These don't provoke an error unfortunately, instead are silently treated
4426 as 'x'. The following induces an error, until -std is added to get
4427 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4428 array size at least. It's necessary to write '\x00'==0 to get something
4429 that's true only with -std. */
4430 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4432 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4433 inside strings and character constants. */
4434 #define FOO(x) 'x'
4435 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4437 int test (int i, double x);
4438 struct s1 {int (*f) (int a);};
4439 struct s2 {int (*f) (double a);};
4440 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4441 int argc;
4442 char **argv;
4444 main ()
4446 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4448 return 0;
4450 _ACEOF
4451 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4452 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4454 CC="$ac_save_CC $ac_arg"
4455 if ac_fn_c_try_compile "$LINENO"; then :
4456 ac_cv_prog_cc_c89=$ac_arg
4458 rm -f core conftest.err conftest.$ac_objext
4459 test "x$ac_cv_prog_cc_c89" != "xno" && break
4460 done
4461 rm -f conftest.$ac_ext
4462 CC=$ac_save_CC
4465 # AC_CACHE_VAL
4466 case "x$ac_cv_prog_cc_c89" in
4468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4469 $as_echo "none needed" >&6; } ;;
4470 xno)
4471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4472 $as_echo "unsupported" >&6; } ;;
4474 CC="$CC $ac_cv_prog_cc_c89"
4475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4476 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4477 esac
4478 if test "x$ac_cv_prog_cc_c89" != xno; then :
4482 ac_ext=c
4483 ac_cpp='$CPP $CPPFLAGS'
4484 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4485 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4486 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4489 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4490 if ${ac_cv_prog_cc_c99+:} false; then :
4491 $as_echo_n "(cached) " >&6
4492 else
4493 ac_cv_prog_cc_c99=no
4494 ac_save_CC=$CC
4495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4496 /* end confdefs.h. */
4497 #include <stdarg.h>
4498 #include <stdbool.h>
4499 #include <stdlib.h>
4500 #include <wchar.h>
4501 #include <stdio.h>
4503 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4504 #define debug(...) fprintf (stderr, __VA_ARGS__)
4505 #define showlist(...) puts (#__VA_ARGS__)
4506 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4507 static void
4508 test_varargs_macros (void)
4510 int x = 1234;
4511 int y = 5678;
4512 debug ("Flag");
4513 debug ("X = %d\n", x);
4514 showlist (The first, second, and third items.);
4515 report (x>y, "x is %d but y is %d", x, y);
4518 // Check long long types.
4519 #define BIG64 18446744073709551615ull
4520 #define BIG32 4294967295ul
4521 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4522 #if !BIG_OK
4523 your preprocessor is broken;
4524 #endif
4525 #if BIG_OK
4526 #else
4527 your preprocessor is broken;
4528 #endif
4529 static long long int bignum = -9223372036854775807LL;
4530 static unsigned long long int ubignum = BIG64;
4532 struct incomplete_array
4534 int datasize;
4535 double data[];
4538 struct named_init {
4539 int number;
4540 const wchar_t *name;
4541 double average;
4544 typedef const char *ccp;
4546 static inline int
4547 test_restrict (ccp restrict text)
4549 // See if C++-style comments work.
4550 // Iterate through items via the restricted pointer.
4551 // Also check for declarations in for loops.
4552 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4553 continue;
4554 return 0;
4557 // Check varargs and va_copy.
4558 static void
4559 test_varargs (const char *format, ...)
4561 va_list args;
4562 va_start (args, format);
4563 va_list args_copy;
4564 va_copy (args_copy, args);
4566 const char *str;
4567 int number;
4568 float fnumber;
4570 while (*format)
4572 switch (*format++)
4574 case 's': // string
4575 str = va_arg (args_copy, const char *);
4576 break;
4577 case 'd': // int
4578 number = va_arg (args_copy, int);
4579 break;
4580 case 'f': // float
4581 fnumber = va_arg (args_copy, double);
4582 break;
4583 default:
4584 break;
4587 va_end (args_copy);
4588 va_end (args);
4592 main ()
4595 // Check bool.
4596 _Bool success = false;
4598 // Check restrict.
4599 if (test_restrict ("String literal") == 0)
4600 success = true;
4601 char *restrict newvar = "Another string";
4603 // Check varargs.
4604 test_varargs ("s, d' f .", "string", 65, 34.234);
4605 test_varargs_macros ();
4607 // Check flexible array members.
4608 struct incomplete_array *ia =
4609 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4610 ia->datasize = 10;
4611 for (int i = 0; i < ia->datasize; ++i)
4612 ia->data[i] = i * 1.234;
4614 // Check named initializers.
4615 struct named_init ni = {
4616 .number = 34,
4617 .name = L"Test wide string",
4618 .average = 543.34343,
4621 ni.number = 58;
4623 int dynamic_array[ni.number];
4624 dynamic_array[ni.number - 1] = 543;
4626 // work around unused variable warnings
4627 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4628 || dynamic_array[ni.number - 1] != 543);
4631 return 0;
4633 _ACEOF
4634 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4636 CC="$ac_save_CC $ac_arg"
4637 if ac_fn_c_try_compile "$LINENO"; then :
4638 ac_cv_prog_cc_c99=$ac_arg
4640 rm -f core conftest.err conftest.$ac_objext
4641 test "x$ac_cv_prog_cc_c99" != "xno" && break
4642 done
4643 rm -f conftest.$ac_ext
4644 CC=$ac_save_CC
4647 # AC_CACHE_VAL
4648 case "x$ac_cv_prog_cc_c99" in
4650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4651 $as_echo "none needed" >&6; } ;;
4652 xno)
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4654 $as_echo "unsupported" >&6; } ;;
4656 CC="$CC $ac_cv_prog_cc_c99"
4657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4658 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4659 esac
4660 if test "x$ac_cv_prog_cc_c99" != xno; then :
4666 # Error out if the compiler does not support C99, as the codebase
4667 # relies on that.
4668 if test "$ac_cv_prog_cc_c99" = no; then
4669 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4672 ac_ext=cpp
4673 ac_cpp='$CXXCPP $CPPFLAGS'
4674 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4675 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4676 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4677 if test -z "$CXX"; then
4678 if test -n "$CCC"; then
4679 CXX=$CCC
4680 else
4681 if test -n "$ac_tool_prefix"; then
4682 for ac_prog in $pgac_cxx_list
4684 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4685 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4687 $as_echo_n "checking for $ac_word... " >&6; }
4688 if ${ac_cv_prog_CXX+:} false; then :
4689 $as_echo_n "(cached) " >&6
4690 else
4691 if test -n "$CXX"; then
4692 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4693 else
4694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4695 for as_dir in $PATH
4697 IFS=$as_save_IFS
4698 test -z "$as_dir" && as_dir=.
4699 for ac_exec_ext in '' $ac_executable_extensions; do
4700 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4701 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4702 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4703 break 2
4705 done
4706 done
4707 IFS=$as_save_IFS
4711 CXX=$ac_cv_prog_CXX
4712 if test -n "$CXX"; then
4713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4714 $as_echo "$CXX" >&6; }
4715 else
4716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4717 $as_echo "no" >&6; }
4721 test -n "$CXX" && break
4722 done
4724 if test -z "$CXX"; then
4725 ac_ct_CXX=$CXX
4726 for ac_prog in $pgac_cxx_list
4728 # Extract the first word of "$ac_prog", so it can be a program name with args.
4729 set dummy $ac_prog; ac_word=$2
4730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4731 $as_echo_n "checking for $ac_word... " >&6; }
4732 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4733 $as_echo_n "(cached) " >&6
4734 else
4735 if test -n "$ac_ct_CXX"; then
4736 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4737 else
4738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4739 for as_dir in $PATH
4741 IFS=$as_save_IFS
4742 test -z "$as_dir" && as_dir=.
4743 for ac_exec_ext in '' $ac_executable_extensions; do
4744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4745 ac_cv_prog_ac_ct_CXX="$ac_prog"
4746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4747 break 2
4749 done
4750 done
4751 IFS=$as_save_IFS
4755 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4756 if test -n "$ac_ct_CXX"; then
4757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4758 $as_echo "$ac_ct_CXX" >&6; }
4759 else
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4761 $as_echo "no" >&6; }
4765 test -n "$ac_ct_CXX" && break
4766 done
4768 if test "x$ac_ct_CXX" = x; then
4769 CXX="g++"
4770 else
4771 case $cross_compiling:$ac_tool_warned in
4772 yes:)
4773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4774 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4775 ac_tool_warned=yes ;;
4776 esac
4777 CXX=$ac_ct_CXX
4783 # Provide some information about the compiler.
4784 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4785 set X $ac_compile
4786 ac_compiler=$2
4787 for ac_option in --version -v -V -qversion; do
4788 { { ac_try="$ac_compiler $ac_option >&5"
4789 case "(($ac_try" in
4790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4791 *) ac_try_echo=$ac_try;;
4792 esac
4793 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4794 $as_echo "$ac_try_echo"; } >&5
4795 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4796 ac_status=$?
4797 if test -s conftest.err; then
4798 sed '10a\
4799 ... rest of stderr output deleted ...
4800 10q' conftest.err >conftest.er1
4801 cat conftest.er1 >&5
4803 rm -f conftest.er1 conftest.err
4804 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4805 test $ac_status = 0; }
4806 done
4808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4809 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4810 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4811 $as_echo_n "(cached) " >&6
4812 else
4813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4814 /* end confdefs.h. */
4817 main ()
4819 #ifndef __GNUC__
4820 choke me
4821 #endif
4824 return 0;
4826 _ACEOF
4827 if ac_fn_cxx_try_compile "$LINENO"; then :
4828 ac_compiler_gnu=yes
4829 else
4830 ac_compiler_gnu=no
4832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4833 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4837 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4838 if test $ac_compiler_gnu = yes; then
4839 GXX=yes
4840 else
4841 GXX=
4843 ac_test_CXXFLAGS=${CXXFLAGS+set}
4844 ac_save_CXXFLAGS=$CXXFLAGS
4845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4846 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4847 if ${ac_cv_prog_cxx_g+:} false; then :
4848 $as_echo_n "(cached) " >&6
4849 else
4850 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4851 ac_cxx_werror_flag=yes
4852 ac_cv_prog_cxx_g=no
4853 CXXFLAGS="-g"
4854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4855 /* end confdefs.h. */
4858 main ()
4862 return 0;
4864 _ACEOF
4865 if ac_fn_cxx_try_compile "$LINENO"; then :
4866 ac_cv_prog_cxx_g=yes
4867 else
4868 CXXFLAGS=""
4869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4870 /* end confdefs.h. */
4873 main ()
4877 return 0;
4879 _ACEOF
4880 if ac_fn_cxx_try_compile "$LINENO"; then :
4882 else
4883 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4884 CXXFLAGS="-g"
4885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4886 /* end confdefs.h. */
4889 main ()
4893 return 0;
4895 _ACEOF
4896 if ac_fn_cxx_try_compile "$LINENO"; then :
4897 ac_cv_prog_cxx_g=yes
4899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4904 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4907 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4908 if test "$ac_test_CXXFLAGS" = set; then
4909 CXXFLAGS=$ac_save_CXXFLAGS
4910 elif test $ac_cv_prog_cxx_g = yes; then
4911 if test "$GXX" = yes; then
4912 CXXFLAGS="-g -O2"
4913 else
4914 CXXFLAGS="-g"
4916 else
4917 if test "$GXX" = yes; then
4918 CXXFLAGS="-O2"
4919 else
4920 CXXFLAGS=
4923 ac_ext=c
4924 ac_cpp='$CPP $CPPFLAGS'
4925 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4926 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4927 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4930 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4931 # but has idiosyncrasies of its own. We assume icc will define
4932 # __INTEL_COMPILER regardless of CFLAGS.
4934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4935 /* end confdefs.h. */
4938 main ()
4940 #ifndef __INTEL_COMPILER
4941 choke me
4942 #endif
4944 return 0;
4946 _ACEOF
4947 if ac_fn_c_try_compile "$LINENO"; then :
4948 ICC=yes
4949 else
4950 ICC=no
4952 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4954 # Check if it's Sun Studio compiler. We assume that
4955 # __SUNPRO_C will be defined for Sun Studio compilers
4956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4957 /* end confdefs.h. */
4960 main ()
4962 #ifndef __SUNPRO_C
4963 choke me
4964 #endif
4966 return 0;
4968 _ACEOF
4969 if ac_fn_c_try_compile "$LINENO"; then :
4970 SUN_STUDIO_CC=yes
4971 else
4972 SUN_STUDIO_CC=no
4974 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4980 # LLVM
4982 # Checked early because subsequent tests depend on it.
4986 # Check whether --with-llvm was given.
4987 if test "${with_llvm+set}" = set; then :
4988 withval=$with_llvm;
4989 case $withval in
4990 yes)
4992 $as_echo "#define USE_LLVM 1" >>confdefs.h
4999 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
5001 esac
5003 else
5004 with_llvm=no
5010 for ac_prog in gawk mawk nawk awk
5012 # Extract the first word of "$ac_prog", so it can be a program name with args.
5013 set dummy $ac_prog; ac_word=$2
5014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5015 $as_echo_n "checking for $ac_word... " >&6; }
5016 if ${ac_cv_prog_AWK+:} false; then :
5017 $as_echo_n "(cached) " >&6
5018 else
5019 if test -n "$AWK"; then
5020 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5021 else
5022 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5023 for as_dir in $PATH
5025 IFS=$as_save_IFS
5026 test -z "$as_dir" && as_dir=.
5027 for ac_exec_ext in '' $ac_executable_extensions; do
5028 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5029 ac_cv_prog_AWK="$ac_prog"
5030 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5031 break 2
5033 done
5034 done
5035 IFS=$as_save_IFS
5039 AWK=$ac_cv_prog_AWK
5040 if test -n "$AWK"; then
5041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5042 $as_echo "$AWK" >&6; }
5043 else
5044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5045 $as_echo "no" >&6; }
5049 test -n "$AWK" && break
5050 done
5052 if test "$with_llvm" = yes; then :
5058 if test -z "$LLVM_CONFIG"; then
5059 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
5061 # Extract the first word of "$ac_prog", so it can be a program name with args.
5062 set dummy $ac_prog; ac_word=$2
5063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5064 $as_echo_n "checking for $ac_word... " >&6; }
5065 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5066 $as_echo_n "(cached) " >&6
5067 else
5068 case $LLVM_CONFIG in
5069 [\\/]* | ?:[\\/]*)
5070 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5074 for as_dir in $PATH
5076 IFS=$as_save_IFS
5077 test -z "$as_dir" && as_dir=.
5078 for ac_exec_ext in '' $ac_executable_extensions; do
5079 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5080 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5081 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5082 break 2
5084 done
5085 done
5086 IFS=$as_save_IFS
5089 esac
5091 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5092 if test -n "$LLVM_CONFIG"; then
5093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5094 $as_echo "$LLVM_CONFIG" >&6; }
5095 else
5096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5097 $as_echo "no" >&6; }
5101 test -n "$LLVM_CONFIG" && break
5102 done
5104 else
5105 # Report the value of LLVM_CONFIG in configure's output in all cases.
5106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5107 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5109 $as_echo "$LLVM_CONFIG" >&6; }
5113 # no point continuing if llvm wasn't found
5114 if test -z "$LLVM_CONFIG"; then
5115 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5117 # check if detected $LLVM_CONFIG is executable
5118 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5119 if test "x$pgac_llvm_version" = "xno"; then
5120 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5122 # and whether the version is supported
5123 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5124 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5126 { $as_echo "$as_me:${as_lineno-$LINENO}: using llvm $pgac_llvm_version" >&5
5127 $as_echo "$as_me: using llvm $pgac_llvm_version" >&6;}
5129 # need clang to create some bitcode files
5131 if test -z "$CLANG"; then
5132 for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5134 # Extract the first word of "$ac_prog", so it can be a program name with args.
5135 set dummy $ac_prog; ac_word=$2
5136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5137 $as_echo_n "checking for $ac_word... " >&6; }
5138 if ${ac_cv_path_CLANG+:} false; then :
5139 $as_echo_n "(cached) " >&6
5140 else
5141 case $CLANG in
5142 [\\/]* | ?:[\\/]*)
5143 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5147 for as_dir in $PATH
5149 IFS=$as_save_IFS
5150 test -z "$as_dir" && as_dir=.
5151 for ac_exec_ext in '' $ac_executable_extensions; do
5152 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5153 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5154 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5155 break 2
5157 done
5158 done
5159 IFS=$as_save_IFS
5162 esac
5164 CLANG=$ac_cv_path_CLANG
5165 if test -n "$CLANG"; then
5166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5167 $as_echo "$CLANG" >&6; }
5168 else
5169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5170 $as_echo "no" >&6; }
5174 test -n "$CLANG" && break
5175 done
5177 else
5178 # Report the value of CLANG in configure's output in all cases.
5179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5180 $as_echo_n "checking for CLANG... " >&6; }
5181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5182 $as_echo "$CLANG" >&6; }
5185 if test -z "$CLANG"; then
5186 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5188 # make sure clang is executable
5189 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5190 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5192 # Could check clang version, but it doesn't seem that
5193 # important. Systems with a new enough LLVM version are usually
5194 # going to have a decent clang version too. It's also not entirely
5195 # clear what the minimum version is.
5197 # Collect compiler flags necessary to build the LLVM dependent
5198 # shared library.
5199 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5200 case $pgac_option in
5201 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5202 esac
5203 done
5205 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5206 case $pgac_option in
5207 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5208 esac
5209 done
5211 # ABI influencing options, standard influencing options
5212 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5213 case $pgac_option in
5214 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5215 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5216 esac
5217 done
5219 # Look for components we're interested in, collect necessary
5220 # libs. As some components are optional, we can't just list all of
5221 # them as it'd raise an error.
5222 pgac_components='';
5223 for pgac_component in `$LLVM_CONFIG --components`; do
5224 case $pgac_component in
5225 engine) pgac_components="$pgac_components $pgac_component";;
5226 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5227 orcjit) pgac_components="$pgac_components $pgac_component";;
5228 passes) pgac_components="$pgac_components $pgac_component";;
5229 native) pgac_components="$pgac_components $pgac_component";;
5230 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5231 esac
5232 done;
5234 # And then get the libraries that need to be linked in for the
5235 # selected components. They're large libraries, we only want to
5236 # link them into the LLVM using shared library.
5237 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5238 case $pgac_option in
5239 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5240 esac
5241 done
5243 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5253 fi # fi
5256 unset CFLAGS
5257 unset CXXFLAGS
5260 # Read the template
5262 . "$srcdir/src/template/$template" || exit
5264 # C[XX]FLAGS are selected so:
5265 # If the user specifies something in the environment, that is used.
5266 # else: If the template file set something, that is used.
5267 # else: If coverage was enabled, don't set anything.
5268 # else: If the compiler is GCC, then we use -O2.
5269 # else: If the compiler is something else, then we use -O, unless debugging.
5271 if test "$ac_env_CFLAGS_set" = set; then
5272 CFLAGS=$ac_env_CFLAGS_value
5273 elif test "${CFLAGS+set}" = set; then
5274 : # (keep what template set)
5275 elif test "$enable_coverage" = yes; then
5276 : # no optimization by default
5277 elif test "$GCC" = yes; then
5278 CFLAGS="-O2"
5279 else
5280 # if the user selected debug mode, don't use -O
5281 if test "$enable_debug" != yes; then
5282 CFLAGS="-O"
5286 if test "$ac_env_CXXFLAGS_set" = set; then
5287 CXXFLAGS=$ac_env_CXXFLAGS_value
5288 elif test "${CXXFLAGS+set}" = set; then
5289 : # (keep what template set)
5290 elif test "$enable_coverage" = yes; then
5291 : # no optimization by default
5292 elif test "$GCC" = yes; then
5293 CXXFLAGS="-O2"
5294 else
5295 # if the user selected debug mode, don't use -O
5296 if test "$enable_debug" != yes; then
5297 CXXFLAGS="-O"
5301 # When generating bitcode (for inlining) we always want to use -O2
5302 # even when --enable-debug is specified. The bitcode is not going to
5303 # be used for line-by-line debugging, and JIT inlining doesn't work
5304 # without at least -O1 (otherwise clang will emit 'noinline'
5305 # attributes everywhere), which is bad for testing. Still allow the
5306 # environment to override if done explicitly.
5307 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5308 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5309 else
5310 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5312 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5313 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5314 else
5315 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5318 # C[XX]FLAGS we determined above will be added back at the end
5319 user_CFLAGS=$CFLAGS
5320 CFLAGS=""
5321 user_CXXFLAGS=$CXXFLAGS
5322 CXXFLAGS=""
5323 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5324 BITCODE_CFLAGS=""
5325 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5326 BITCODE_CXXFLAGS=""
5328 # set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5329 if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5330 CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5332 if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5333 CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5336 # Some versions of GCC support some additional useful warning flags.
5337 # Check whether they are supported, and add them to CFLAGS if so.
5338 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5339 # but has its own. Also check other compiler-specific flags here.
5341 if test "$GCC" = yes -a "$ICC" = no; then
5342 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5343 CXXFLAGS="-Wall -Wpointer-arith"
5344 # These work in some but not all gcc versions
5345 save_CFLAGS=$CFLAGS
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5348 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5349 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5350 $as_echo_n "(cached) " >&6
5351 else
5352 pgac_save_CFLAGS=$CFLAGS
5353 pgac_save_CC=$CC
5354 CC=${CC}
5355 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5356 ac_save_c_werror_flag=$ac_c_werror_flag
5357 ac_c_werror_flag=yes
5358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5359 /* end confdefs.h. */
5362 main ()
5366 return 0;
5368 _ACEOF
5369 if ac_fn_c_try_compile "$LINENO"; then :
5370 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5371 else
5372 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5375 ac_c_werror_flag=$ac_save_c_werror_flag
5376 CFLAGS="$pgac_save_CFLAGS"
5377 CC="$pgac_save_CC"
5379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5380 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5381 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5382 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5386 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5387 # disable it, so AC_SUBST the negative form.
5388 PERMIT_DECLARATION_AFTER_STATEMENT=
5389 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5390 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5393 # Really don't want VLAs to be used in our dialect of C
5395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5396 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5397 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5398 $as_echo_n "(cached) " >&6
5399 else
5400 pgac_save_CFLAGS=$CFLAGS
5401 pgac_save_CC=$CC
5402 CC=${CC}
5403 CFLAGS="${CFLAGS} -Werror=vla"
5404 ac_save_c_werror_flag=$ac_c_werror_flag
5405 ac_c_werror_flag=yes
5406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5407 /* end confdefs.h. */
5410 main ()
5414 return 0;
5416 _ACEOF
5417 if ac_fn_c_try_compile "$LINENO"; then :
5418 pgac_cv_prog_CC_cflags__Werror_vla=yes
5419 else
5420 pgac_cv_prog_CC_cflags__Werror_vla=no
5422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5423 ac_c_werror_flag=$ac_save_c_werror_flag
5424 CFLAGS="$pgac_save_CFLAGS"
5425 CC="$pgac_save_CC"
5427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5428 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5429 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5430 CFLAGS="${CFLAGS} -Werror=vla"
5434 # On macOS, complain about usage of symbols newer than the deployment target
5436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS" >&5
5437 $as_echo_n "checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS... " >&6; }
5438 if ${pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new+:} false; then :
5439 $as_echo_n "(cached) " >&6
5440 else
5441 pgac_save_CFLAGS=$CFLAGS
5442 pgac_save_CC=$CC
5443 CC=${CC}
5444 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5445 ac_save_c_werror_flag=$ac_c_werror_flag
5446 ac_c_werror_flag=yes
5447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5448 /* end confdefs.h. */
5451 main ()
5455 return 0;
5457 _ACEOF
5458 if ac_fn_c_try_compile "$LINENO"; then :
5459 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=yes
5460 else
5461 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=no
5463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5464 ac_c_werror_flag=$ac_save_c_werror_flag
5465 CFLAGS="$pgac_save_CFLAGS"
5466 CC="$pgac_save_CC"
5468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&5
5469 $as_echo "$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&6; }
5470 if test x"$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" = x"yes"; then
5471 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS" >&5
5476 $as_echo_n "checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS... " >&6; }
5477 if ${pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new+:} false; then :
5478 $as_echo_n "(cached) " >&6
5479 else
5480 pgac_save_CXXFLAGS=$CXXFLAGS
5481 pgac_save_CXX=$CXX
5482 CXX=${CXX}
5483 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5484 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5485 ac_cxx_werror_flag=yes
5486 ac_ext=cpp
5487 ac_cpp='$CXXCPP $CPPFLAGS'
5488 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5489 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5490 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5493 /* end confdefs.h. */
5496 main ()
5500 return 0;
5502 _ACEOF
5503 if ac_fn_cxx_try_compile "$LINENO"; then :
5504 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=yes
5505 else
5506 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=no
5508 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5509 ac_ext=c
5510 ac_cpp='$CPP $CPPFLAGS'
5511 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5512 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5513 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5515 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5516 CXXFLAGS="$pgac_save_CXXFLAGS"
5517 CXX="$pgac_save_CXX"
5519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&5
5520 $as_echo "$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&6; }
5521 if test x"$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" = x"yes"; then
5522 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5526 # -Wvla is not applicable for C++
5528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5529 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5530 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5531 $as_echo_n "(cached) " >&6
5532 else
5533 pgac_save_CFLAGS=$CFLAGS
5534 pgac_save_CC=$CC
5535 CC=${CC}
5536 CFLAGS="${CFLAGS} -Wendif-labels"
5537 ac_save_c_werror_flag=$ac_c_werror_flag
5538 ac_c_werror_flag=yes
5539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5540 /* end confdefs.h. */
5543 main ()
5547 return 0;
5549 _ACEOF
5550 if ac_fn_c_try_compile "$LINENO"; then :
5551 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5552 else
5553 pgac_cv_prog_CC_cflags__Wendif_labels=no
5555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5556 ac_c_werror_flag=$ac_save_c_werror_flag
5557 CFLAGS="$pgac_save_CFLAGS"
5558 CC="$pgac_save_CC"
5560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5561 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5562 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5563 CFLAGS="${CFLAGS} -Wendif-labels"
5567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5568 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5569 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5570 $as_echo_n "(cached) " >&6
5571 else
5572 pgac_save_CXXFLAGS=$CXXFLAGS
5573 pgac_save_CXX=$CXX
5574 CXX=${CXX}
5575 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5576 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5577 ac_cxx_werror_flag=yes
5578 ac_ext=cpp
5579 ac_cpp='$CXXCPP $CPPFLAGS'
5580 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5581 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5582 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5585 /* end confdefs.h. */
5588 main ()
5592 return 0;
5594 _ACEOF
5595 if ac_fn_cxx_try_compile "$LINENO"; then :
5596 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5597 else
5598 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5601 ac_ext=c
5602 ac_cpp='$CPP $CPPFLAGS'
5603 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5604 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5605 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5607 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5608 CXXFLAGS="$pgac_save_CXXFLAGS"
5609 CXX="$pgac_save_CXX"
5611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5612 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5613 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5614 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5620 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5621 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5622 $as_echo_n "(cached) " >&6
5623 else
5624 pgac_save_CFLAGS=$CFLAGS
5625 pgac_save_CC=$CC
5626 CC=${CC}
5627 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5628 ac_save_c_werror_flag=$ac_c_werror_flag
5629 ac_c_werror_flag=yes
5630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5631 /* end confdefs.h. */
5634 main ()
5638 return 0;
5640 _ACEOF
5641 if ac_fn_c_try_compile "$LINENO"; then :
5642 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5643 else
5644 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5646 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5647 ac_c_werror_flag=$ac_save_c_werror_flag
5648 CFLAGS="$pgac_save_CFLAGS"
5649 CC="$pgac_save_CC"
5651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5652 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5653 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5654 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5659 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5660 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5661 $as_echo_n "(cached) " >&6
5662 else
5663 pgac_save_CXXFLAGS=$CXXFLAGS
5664 pgac_save_CXX=$CXX
5665 CXX=${CXX}
5666 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5667 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5668 ac_cxx_werror_flag=yes
5669 ac_ext=cpp
5670 ac_cpp='$CXXCPP $CPPFLAGS'
5671 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5672 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5673 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5676 /* end confdefs.h. */
5679 main ()
5683 return 0;
5685 _ACEOF
5686 if ac_fn_cxx_try_compile "$LINENO"; then :
5687 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5688 else
5689 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5692 ac_ext=c
5693 ac_cpp='$CPP $CPPFLAGS'
5694 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5695 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5696 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5698 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5699 CXXFLAGS="$pgac_save_CXXFLAGS"
5700 CXX="$pgac_save_CXX"
5702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5703 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5704 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5705 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5711 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5712 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5713 $as_echo_n "(cached) " >&6
5714 else
5715 pgac_save_CFLAGS=$CFLAGS
5716 pgac_save_CC=$CC
5717 CC=${CC}
5718 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5719 ac_save_c_werror_flag=$ac_c_werror_flag
5720 ac_c_werror_flag=yes
5721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5722 /* end confdefs.h. */
5725 main ()
5729 return 0;
5731 _ACEOF
5732 if ac_fn_c_try_compile "$LINENO"; then :
5733 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5734 else
5735 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5738 ac_c_werror_flag=$ac_save_c_werror_flag
5739 CFLAGS="$pgac_save_CFLAGS"
5740 CC="$pgac_save_CC"
5742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5743 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5744 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5745 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5750 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5751 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5752 $as_echo_n "(cached) " >&6
5753 else
5754 pgac_save_CXXFLAGS=$CXXFLAGS
5755 pgac_save_CXX=$CXX
5756 CXX=${CXX}
5757 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5758 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5759 ac_cxx_werror_flag=yes
5760 ac_ext=cpp
5761 ac_cpp='$CXXCPP $CPPFLAGS'
5762 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5763 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5764 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5767 /* end confdefs.h. */
5770 main ()
5774 return 0;
5776 _ACEOF
5777 if ac_fn_cxx_try_compile "$LINENO"; then :
5778 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5779 else
5780 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5783 ac_ext=c
5784 ac_cpp='$CPP $CPPFLAGS'
5785 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5786 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5787 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5789 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5790 CXXFLAGS="$pgac_save_CXXFLAGS"
5791 CXX="$pgac_save_CXX"
5793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5794 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5795 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5796 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5802 $as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5803 if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5804 $as_echo_n "(cached) " >&6
5805 else
5806 pgac_save_CFLAGS=$CFLAGS
5807 pgac_save_CC=$CC
5808 CC=${CC}
5809 CFLAGS="${CFLAGS} -Wcast-function-type"
5810 ac_save_c_werror_flag=$ac_c_werror_flag
5811 ac_c_werror_flag=yes
5812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5813 /* end confdefs.h. */
5816 main ()
5820 return 0;
5822 _ACEOF
5823 if ac_fn_c_try_compile "$LINENO"; then :
5824 pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5825 else
5826 pgac_cv_prog_CC_cflags__Wcast_function_type=no
5828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5829 ac_c_werror_flag=$ac_save_c_werror_flag
5830 CFLAGS="$pgac_save_CFLAGS"
5831 CC="$pgac_save_CC"
5833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5834 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5835 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5836 CFLAGS="${CFLAGS} -Wcast-function-type"
5840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5841 $as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5842 if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5843 $as_echo_n "(cached) " >&6
5844 else
5845 pgac_save_CXXFLAGS=$CXXFLAGS
5846 pgac_save_CXX=$CXX
5847 CXX=${CXX}
5848 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5849 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5850 ac_cxx_werror_flag=yes
5851 ac_ext=cpp
5852 ac_cpp='$CXXCPP $CPPFLAGS'
5853 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5854 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5855 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5858 /* end confdefs.h. */
5861 main ()
5865 return 0;
5867 _ACEOF
5868 if ac_fn_cxx_try_compile "$LINENO"; then :
5869 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5870 else
5871 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5873 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5874 ac_ext=c
5875 ac_cpp='$CPP $CPPFLAGS'
5876 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5877 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5878 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5880 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5881 CXXFLAGS="$pgac_save_CXXFLAGS"
5882 CXX="$pgac_save_CXX"
5884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5885 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5886 if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5887 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS" >&5
5893 $as_echo_n "checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS... " >&6; }
5894 if ${pgac_cv_prog_CC_cflags__Wshadow_compatible_local+:} false; then :
5895 $as_echo_n "(cached) " >&6
5896 else
5897 pgac_save_CFLAGS=$CFLAGS
5898 pgac_save_CC=$CC
5899 CC=${CC}
5900 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5901 ac_save_c_werror_flag=$ac_c_werror_flag
5902 ac_c_werror_flag=yes
5903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5904 /* end confdefs.h. */
5907 main ()
5911 return 0;
5913 _ACEOF
5914 if ac_fn_c_try_compile "$LINENO"; then :
5915 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=yes
5916 else
5917 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=no
5919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5920 ac_c_werror_flag=$ac_save_c_werror_flag
5921 CFLAGS="$pgac_save_CFLAGS"
5922 CC="$pgac_save_CC"
5924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&5
5925 $as_echo "$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&6; }
5926 if test x"$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" = x"yes"; then
5927 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS" >&5
5932 $as_echo_n "checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS... " >&6; }
5933 if ${pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local+:} false; then :
5934 $as_echo_n "(cached) " >&6
5935 else
5936 pgac_save_CXXFLAGS=$CXXFLAGS
5937 pgac_save_CXX=$CXX
5938 CXX=${CXX}
5939 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5940 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5941 ac_cxx_werror_flag=yes
5942 ac_ext=cpp
5943 ac_cpp='$CXXCPP $CPPFLAGS'
5944 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5945 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5946 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5949 /* end confdefs.h. */
5952 main ()
5956 return 0;
5958 _ACEOF
5959 if ac_fn_cxx_try_compile "$LINENO"; then :
5960 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=yes
5961 else
5962 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=no
5964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5965 ac_ext=c
5966 ac_cpp='$CPP $CPPFLAGS'
5967 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5968 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5969 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5971 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5972 CXXFLAGS="$pgac_save_CXXFLAGS"
5973 CXX="$pgac_save_CXX"
5975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&5
5976 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&6; }
5977 if test x"$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" = x"yes"; then
5978 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5982 # This was included in -Wall/-Wformat in older GCC versions
5984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5985 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5986 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5987 $as_echo_n "(cached) " >&6
5988 else
5989 pgac_save_CFLAGS=$CFLAGS
5990 pgac_save_CC=$CC
5991 CC=${CC}
5992 CFLAGS="${CFLAGS} -Wformat-security"
5993 ac_save_c_werror_flag=$ac_c_werror_flag
5994 ac_c_werror_flag=yes
5995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5996 /* end confdefs.h. */
5999 main ()
6003 return 0;
6005 _ACEOF
6006 if ac_fn_c_try_compile "$LINENO"; then :
6007 pgac_cv_prog_CC_cflags__Wformat_security=yes
6008 else
6009 pgac_cv_prog_CC_cflags__Wformat_security=no
6011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6012 ac_c_werror_flag=$ac_save_c_werror_flag
6013 CFLAGS="$pgac_save_CFLAGS"
6014 CC="$pgac_save_CC"
6016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
6017 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
6018 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
6019 CFLAGS="${CFLAGS} -Wformat-security"
6023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
6024 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
6025 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
6026 $as_echo_n "(cached) " >&6
6027 else
6028 pgac_save_CXXFLAGS=$CXXFLAGS
6029 pgac_save_CXX=$CXX
6030 CXX=${CXX}
6031 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6032 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6033 ac_cxx_werror_flag=yes
6034 ac_ext=cpp
6035 ac_cpp='$CXXCPP $CPPFLAGS'
6036 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6037 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6038 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6041 /* end confdefs.h. */
6044 main ()
6048 return 0;
6050 _ACEOF
6051 if ac_fn_cxx_try_compile "$LINENO"; then :
6052 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
6053 else
6054 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
6056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6057 ac_ext=c
6058 ac_cpp='$CPP $CPPFLAGS'
6059 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6060 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6061 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6063 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6064 CXXFLAGS="$pgac_save_CXXFLAGS"
6065 CXX="$pgac_save_CXX"
6067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
6068 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
6069 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
6070 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6074 # Disable strict-aliasing rules; needed for gcc 3.3+
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6077 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6078 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6079 $as_echo_n "(cached) " >&6
6080 else
6081 pgac_save_CFLAGS=$CFLAGS
6082 pgac_save_CC=$CC
6083 CC=${CC}
6084 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6085 ac_save_c_werror_flag=$ac_c_werror_flag
6086 ac_c_werror_flag=yes
6087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6088 /* end confdefs.h. */
6091 main ()
6095 return 0;
6097 _ACEOF
6098 if ac_fn_c_try_compile "$LINENO"; then :
6099 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6100 else
6101 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6104 ac_c_werror_flag=$ac_save_c_werror_flag
6105 CFLAGS="$pgac_save_CFLAGS"
6106 CC="$pgac_save_CC"
6108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6109 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6110 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6111 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6116 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6117 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6118 $as_echo_n "(cached) " >&6
6119 else
6120 pgac_save_CXXFLAGS=$CXXFLAGS
6121 pgac_save_CXX=$CXX
6122 CXX=${CXX}
6123 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6124 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6125 ac_cxx_werror_flag=yes
6126 ac_ext=cpp
6127 ac_cpp='$CXXCPP $CPPFLAGS'
6128 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6129 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6130 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6133 /* end confdefs.h. */
6136 main ()
6140 return 0;
6142 _ACEOF
6143 if ac_fn_cxx_try_compile "$LINENO"; then :
6144 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6145 else
6146 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6149 ac_ext=c
6150 ac_cpp='$CPP $CPPFLAGS'
6151 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6152 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6153 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6155 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6156 CXXFLAGS="$pgac_save_CXXFLAGS"
6157 CXX="$pgac_save_CXX"
6159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6160 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6161 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6162 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6166 # Disable optimizations that assume no overflow; needed for gcc 4.3+
6168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
6169 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
6170 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
6171 $as_echo_n "(cached) " >&6
6172 else
6173 pgac_save_CFLAGS=$CFLAGS
6174 pgac_save_CC=$CC
6175 CC=${CC}
6176 CFLAGS="${CFLAGS} -fwrapv"
6177 ac_save_c_werror_flag=$ac_c_werror_flag
6178 ac_c_werror_flag=yes
6179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6180 /* end confdefs.h. */
6183 main ()
6187 return 0;
6189 _ACEOF
6190 if ac_fn_c_try_compile "$LINENO"; then :
6191 pgac_cv_prog_CC_cflags__fwrapv=yes
6192 else
6193 pgac_cv_prog_CC_cflags__fwrapv=no
6195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6196 ac_c_werror_flag=$ac_save_c_werror_flag
6197 CFLAGS="$pgac_save_CFLAGS"
6198 CC="$pgac_save_CC"
6200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
6201 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
6202 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
6203 CFLAGS="${CFLAGS} -fwrapv"
6207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
6208 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
6209 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
6210 $as_echo_n "(cached) " >&6
6211 else
6212 pgac_save_CXXFLAGS=$CXXFLAGS
6213 pgac_save_CXX=$CXX
6214 CXX=${CXX}
6215 CXXFLAGS="${CXXFLAGS} -fwrapv"
6216 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6217 ac_cxx_werror_flag=yes
6218 ac_ext=cpp
6219 ac_cpp='$CXXCPP $CPPFLAGS'
6220 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6221 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6222 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6225 /* end confdefs.h. */
6228 main ()
6232 return 0;
6234 _ACEOF
6235 if ac_fn_cxx_try_compile "$LINENO"; then :
6236 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6237 else
6238 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6241 ac_ext=c
6242 ac_cpp='$CPP $CPPFLAGS'
6243 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6244 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6245 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6247 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6248 CXXFLAGS="$pgac_save_CXXFLAGS"
6249 CXX="$pgac_save_CXX"
6251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6252 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6253 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6254 CXXFLAGS="${CXXFLAGS} -fwrapv"
6258 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6261 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6262 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6263 $as_echo_n "(cached) " >&6
6264 else
6265 pgac_save_CFLAGS=$CFLAGS
6266 pgac_save_CC=$CC
6267 CC=${CC}
6268 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6269 ac_save_c_werror_flag=$ac_c_werror_flag
6270 ac_c_werror_flag=yes
6271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6272 /* end confdefs.h. */
6275 main ()
6279 return 0;
6281 _ACEOF
6282 if ac_fn_c_try_compile "$LINENO"; then :
6283 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6284 else
6285 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6288 ac_c_werror_flag=$ac_save_c_werror_flag
6289 CFLAGS="$pgac_save_CFLAGS"
6290 CC="$pgac_save_CC"
6292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6293 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6294 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6295 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6300 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6301 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6302 $as_echo_n "(cached) " >&6
6303 else
6304 pgac_save_CXXFLAGS=$CXXFLAGS
6305 pgac_save_CXX=$CXX
6306 CXX=${CXX}
6307 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6308 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6309 ac_cxx_werror_flag=yes
6310 ac_ext=cpp
6311 ac_cpp='$CXXCPP $CPPFLAGS'
6312 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6313 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6314 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6317 /* end confdefs.h. */
6320 main ()
6324 return 0;
6326 _ACEOF
6327 if ac_fn_cxx_try_compile "$LINENO"; then :
6328 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6329 else
6330 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6333 ac_ext=c
6334 ac_cpp='$CPP $CPPFLAGS'
6335 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6336 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6337 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6339 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6340 CXXFLAGS="$pgac_save_CXXFLAGS"
6341 CXX="$pgac_save_CXX"
6343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6344 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6345 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6346 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6350 # Optimization flags for specific files that benefit from loop unrolling
6351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6352 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6353 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6354 $as_echo_n "(cached) " >&6
6355 else
6356 pgac_save_CFLAGS=$CFLAGS
6357 pgac_save_CC=$CC
6358 CC=${CC}
6359 CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6360 ac_save_c_werror_flag=$ac_c_werror_flag
6361 ac_c_werror_flag=yes
6362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6363 /* end confdefs.h. */
6366 main ()
6370 return 0;
6372 _ACEOF
6373 if ac_fn_c_try_compile "$LINENO"; then :
6374 pgac_cv_prog_CC_cflags__funroll_loops=yes
6375 else
6376 pgac_cv_prog_CC_cflags__funroll_loops=no
6378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6379 ac_c_werror_flag=$ac_save_c_werror_flag
6380 CFLAGS="$pgac_save_CFLAGS"
6381 CC="$pgac_save_CC"
6383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6384 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6385 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6386 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6390 # Optimization flags for specific files that benefit from vectorization
6391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6392 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6393 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6394 $as_echo_n "(cached) " >&6
6395 else
6396 pgac_save_CFLAGS=$CFLAGS
6397 pgac_save_CC=$CC
6398 CC=${CC}
6399 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6400 ac_save_c_werror_flag=$ac_c_werror_flag
6401 ac_c_werror_flag=yes
6402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6403 /* end confdefs.h. */
6406 main ()
6410 return 0;
6412 _ACEOF
6413 if ac_fn_c_try_compile "$LINENO"; then :
6414 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6415 else
6416 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6419 ac_c_werror_flag=$ac_save_c_werror_flag
6420 CFLAGS="$pgac_save_CFLAGS"
6421 CC="$pgac_save_CC"
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6424 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6425 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6426 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6431 # The following tests want to suppress various unhelpful warnings by adding
6432 # -Wno-foo switches. But gcc won't complain about unrecognized -Wno-foo
6433 # switches, so we have to test for the positive form and if that works,
6434 # add the negative form. Note that tests of this form typically need to
6435 # be duplicated in the BITCODE_CFLAGS setup stanza below.
6437 # Suppress clang's unhelpful unused-command-line-argument warnings.
6438 NOT_THE_CFLAGS=""
6439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6440 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6441 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6442 $as_echo_n "(cached) " >&6
6443 else
6444 pgac_save_CFLAGS=$CFLAGS
6445 pgac_save_CC=$CC
6446 CC=${CC}
6447 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6448 ac_save_c_werror_flag=$ac_c_werror_flag
6449 ac_c_werror_flag=yes
6450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6451 /* end confdefs.h. */
6454 main ()
6458 return 0;
6460 _ACEOF
6461 if ac_fn_c_try_compile "$LINENO"; then :
6462 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6463 else
6464 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6466 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6467 ac_c_werror_flag=$ac_save_c_werror_flag
6468 CFLAGS="$pgac_save_CFLAGS"
6469 CC="$pgac_save_CC"
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6472 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6473 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6474 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6478 if test -n "$NOT_THE_CFLAGS"; then
6479 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6481 # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
6482 # of warnings when building plperl because of usages in the Perl headers.
6483 NOT_THE_CFLAGS=""
6484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
6485 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
6486 if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then :
6487 $as_echo_n "(cached) " >&6
6488 else
6489 pgac_save_CFLAGS=$CFLAGS
6490 pgac_save_CC=$CC
6491 CC=${CC}
6492 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6493 ac_save_c_werror_flag=$ac_c_werror_flag
6494 ac_c_werror_flag=yes
6495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6496 /* end confdefs.h. */
6499 main ()
6503 return 0;
6505 _ACEOF
6506 if ac_fn_c_try_compile "$LINENO"; then :
6507 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes
6508 else
6509 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no
6511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6512 ac_c_werror_flag=$ac_save_c_werror_flag
6513 CFLAGS="$pgac_save_CFLAGS"
6514 CC="$pgac_save_CC"
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5
6517 $as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; }
6518 if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then
6519 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6523 if test -n "$NOT_THE_CFLAGS"; then
6524 CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
6526 # Similarly disable useless truncation warnings from gcc 8+
6527 NOT_THE_CFLAGS=""
6528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6529 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6530 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6531 $as_echo_n "(cached) " >&6
6532 else
6533 pgac_save_CFLAGS=$CFLAGS
6534 pgac_save_CC=$CC
6535 CC=${CC}
6536 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6537 ac_save_c_werror_flag=$ac_c_werror_flag
6538 ac_c_werror_flag=yes
6539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6540 /* end confdefs.h. */
6543 main ()
6547 return 0;
6549 _ACEOF
6550 if ac_fn_c_try_compile "$LINENO"; then :
6551 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6552 else
6553 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6556 ac_c_werror_flag=$ac_save_c_werror_flag
6557 CFLAGS="$pgac_save_CFLAGS"
6558 CC="$pgac_save_CC"
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6561 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6562 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6563 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6567 if test -n "$NOT_THE_CFLAGS"; then
6568 CFLAGS="$CFLAGS -Wno-format-truncation"
6570 NOT_THE_CFLAGS=""
6571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6572 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6573 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6574 $as_echo_n "(cached) " >&6
6575 else
6576 pgac_save_CFLAGS=$CFLAGS
6577 pgac_save_CC=$CC
6578 CC=${CC}
6579 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6580 ac_save_c_werror_flag=$ac_c_werror_flag
6581 ac_c_werror_flag=yes
6582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6583 /* end confdefs.h. */
6586 main ()
6590 return 0;
6592 _ACEOF
6593 if ac_fn_c_try_compile "$LINENO"; then :
6594 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6595 else
6596 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6599 ac_c_werror_flag=$ac_save_c_werror_flag
6600 CFLAGS="$pgac_save_CFLAGS"
6601 CC="$pgac_save_CC"
6603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6604 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6605 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6606 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6610 if test -n "$NOT_THE_CFLAGS"; then
6611 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6613 # Suppress clang 16's strict warnings about function casts
6614 NOT_THE_CFLAGS=""
6615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS" >&5
6616 $as_echo_n "checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS... " >&6; }
6617 if ${pgac_cv_prog_CC_cflags__Wcast_function_type_strict+:} false; then :
6618 $as_echo_n "(cached) " >&6
6619 else
6620 pgac_save_CFLAGS=$CFLAGS
6621 pgac_save_CC=$CC
6622 CC=${CC}
6623 CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6624 ac_save_c_werror_flag=$ac_c_werror_flag
6625 ac_c_werror_flag=yes
6626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6627 /* end confdefs.h. */
6630 main ()
6634 return 0;
6636 _ACEOF
6637 if ac_fn_c_try_compile "$LINENO"; then :
6638 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=yes
6639 else
6640 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=no
6642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6643 ac_c_werror_flag=$ac_save_c_werror_flag
6644 CFLAGS="$pgac_save_CFLAGS"
6645 CC="$pgac_save_CC"
6647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&5
6648 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&6; }
6649 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" = x"yes"; then
6650 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6654 if test -n "$NOT_THE_CFLAGS"; then
6655 CFLAGS="$CFLAGS -Wno-cast-function-type-strict"
6657 elif test "$ICC" = yes; then
6658 # Intel's compiler has a bug/misoptimization in checking for
6659 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6662 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6663 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6664 $as_echo_n "(cached) " >&6
6665 else
6666 pgac_save_CFLAGS=$CFLAGS
6667 pgac_save_CC=$CC
6668 CC=${CC}
6669 CFLAGS="${CFLAGS} -mp1"
6670 ac_save_c_werror_flag=$ac_c_werror_flag
6671 ac_c_werror_flag=yes
6672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6673 /* end confdefs.h. */
6676 main ()
6680 return 0;
6682 _ACEOF
6683 if ac_fn_c_try_compile "$LINENO"; then :
6684 pgac_cv_prog_CC_cflags__mp1=yes
6685 else
6686 pgac_cv_prog_CC_cflags__mp1=no
6688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6689 ac_c_werror_flag=$ac_save_c_werror_flag
6690 CFLAGS="$pgac_save_CFLAGS"
6691 CC="$pgac_save_CC"
6693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6694 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6695 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6696 CFLAGS="${CFLAGS} -mp1"
6700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6701 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6702 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6703 $as_echo_n "(cached) " >&6
6704 else
6705 pgac_save_CXXFLAGS=$CXXFLAGS
6706 pgac_save_CXX=$CXX
6707 CXX=${CXX}
6708 CXXFLAGS="${CXXFLAGS} -mp1"
6709 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6710 ac_cxx_werror_flag=yes
6711 ac_ext=cpp
6712 ac_cpp='$CXXCPP $CPPFLAGS'
6713 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6714 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6715 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6718 /* end confdefs.h. */
6721 main ()
6725 return 0;
6727 _ACEOF
6728 if ac_fn_cxx_try_compile "$LINENO"; then :
6729 pgac_cv_prog_CXX_cxxflags__mp1=yes
6730 else
6731 pgac_cv_prog_CXX_cxxflags__mp1=no
6733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6734 ac_ext=c
6735 ac_cpp='$CPP $CPPFLAGS'
6736 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6737 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6738 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6740 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6741 CXXFLAGS="$pgac_save_CXXFLAGS"
6742 CXX="$pgac_save_CXX"
6744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6745 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6746 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6747 CXXFLAGS="${CXXFLAGS} -mp1"
6751 # Make sure strict aliasing is off (though this is said to be the default)
6753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6754 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6755 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6756 $as_echo_n "(cached) " >&6
6757 else
6758 pgac_save_CFLAGS=$CFLAGS
6759 pgac_save_CC=$CC
6760 CC=${CC}
6761 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6762 ac_save_c_werror_flag=$ac_c_werror_flag
6763 ac_c_werror_flag=yes
6764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6765 /* end confdefs.h. */
6768 main ()
6772 return 0;
6774 _ACEOF
6775 if ac_fn_c_try_compile "$LINENO"; then :
6776 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6777 else
6778 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6781 ac_c_werror_flag=$ac_save_c_werror_flag
6782 CFLAGS="$pgac_save_CFLAGS"
6783 CC="$pgac_save_CC"
6785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6786 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6787 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6788 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6793 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6794 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6795 $as_echo_n "(cached) " >&6
6796 else
6797 pgac_save_CXXFLAGS=$CXXFLAGS
6798 pgac_save_CXX=$CXX
6799 CXX=${CXX}
6800 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6801 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6802 ac_cxx_werror_flag=yes
6803 ac_ext=cpp
6804 ac_cpp='$CXXCPP $CPPFLAGS'
6805 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6806 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6807 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6810 /* end confdefs.h. */
6813 main ()
6817 return 0;
6819 _ACEOF
6820 if ac_fn_cxx_try_compile "$LINENO"; then :
6821 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6822 else
6823 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6826 ac_ext=c
6827 ac_cpp='$CPP $CPPFLAGS'
6828 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6829 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6830 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6832 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6833 CXXFLAGS="$pgac_save_CXXFLAGS"
6834 CXX="$pgac_save_CXX"
6836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6837 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6838 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6839 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6843 elif test "$PORTNAME" = "aix"; then
6844 # AIX's xlc has to have strict aliasing turned off too
6846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6847 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6848 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6849 $as_echo_n "(cached) " >&6
6850 else
6851 pgac_save_CFLAGS=$CFLAGS
6852 pgac_save_CC=$CC
6853 CC=${CC}
6854 CFLAGS="${CFLAGS} -qnoansialias"
6855 ac_save_c_werror_flag=$ac_c_werror_flag
6856 ac_c_werror_flag=yes
6857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6858 /* end confdefs.h. */
6861 main ()
6865 return 0;
6867 _ACEOF
6868 if ac_fn_c_try_compile "$LINENO"; then :
6869 pgac_cv_prog_CC_cflags__qnoansialias=yes
6870 else
6871 pgac_cv_prog_CC_cflags__qnoansialias=no
6873 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6874 ac_c_werror_flag=$ac_save_c_werror_flag
6875 CFLAGS="$pgac_save_CFLAGS"
6876 CC="$pgac_save_CC"
6878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6879 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6880 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6881 CFLAGS="${CFLAGS} -qnoansialias"
6885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6886 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6887 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6888 $as_echo_n "(cached) " >&6
6889 else
6890 pgac_save_CXXFLAGS=$CXXFLAGS
6891 pgac_save_CXX=$CXX
6892 CXX=${CXX}
6893 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6894 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6895 ac_cxx_werror_flag=yes
6896 ac_ext=cpp
6897 ac_cpp='$CXXCPP $CPPFLAGS'
6898 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6899 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6900 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6903 /* end confdefs.h. */
6906 main ()
6910 return 0;
6912 _ACEOF
6913 if ac_fn_cxx_try_compile "$LINENO"; then :
6914 pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6915 else
6916 pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6918 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6919 ac_ext=c
6920 ac_cpp='$CPP $CPPFLAGS'
6921 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6922 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6923 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6925 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6926 CXXFLAGS="$pgac_save_CXXFLAGS"
6927 CXX="$pgac_save_CXX"
6929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6930 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6931 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6932 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6938 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6939 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6940 $as_echo_n "(cached) " >&6
6941 else
6942 pgac_save_CFLAGS=$CFLAGS
6943 pgac_save_CC=$CC
6944 CC=${CC}
6945 CFLAGS="${CFLAGS} -qlonglong"
6946 ac_save_c_werror_flag=$ac_c_werror_flag
6947 ac_c_werror_flag=yes
6948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6949 /* end confdefs.h. */
6952 main ()
6956 return 0;
6958 _ACEOF
6959 if ac_fn_c_try_compile "$LINENO"; then :
6960 pgac_cv_prog_CC_cflags__qlonglong=yes
6961 else
6962 pgac_cv_prog_CC_cflags__qlonglong=no
6964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6965 ac_c_werror_flag=$ac_save_c_werror_flag
6966 CFLAGS="$pgac_save_CFLAGS"
6967 CC="$pgac_save_CC"
6969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6970 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6971 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6972 CFLAGS="${CFLAGS} -qlonglong"
6976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6977 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6978 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6979 $as_echo_n "(cached) " >&6
6980 else
6981 pgac_save_CXXFLAGS=$CXXFLAGS
6982 pgac_save_CXX=$CXX
6983 CXX=${CXX}
6984 CXXFLAGS="${CXXFLAGS} -qlonglong"
6985 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6986 ac_cxx_werror_flag=yes
6987 ac_ext=cpp
6988 ac_cpp='$CXXCPP $CPPFLAGS'
6989 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6990 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6991 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6994 /* end confdefs.h. */
6997 main ()
7001 return 0;
7003 _ACEOF
7004 if ac_fn_cxx_try_compile "$LINENO"; then :
7005 pgac_cv_prog_CXX_cxxflags__qlonglong=yes
7006 else
7007 pgac_cv_prog_CXX_cxxflags__qlonglong=no
7009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7010 ac_ext=c
7011 ac_cpp='$CPP $CPPFLAGS'
7012 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7013 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7014 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7016 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7017 CXXFLAGS="$pgac_save_CXXFLAGS"
7018 CXX="$pgac_save_CXX"
7020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
7021 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
7022 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
7023 CXXFLAGS="${CXXFLAGS} -qlonglong"
7029 # If the compiler knows how to hide symbols, add the switch needed for that to
7030 # CFLAGS_SL_MODULE and define HAVE_VISIBILITY_ATTRIBUTE.
7032 # This is done separately from the above because -fvisibility is supported by
7033 # quite a few different compilers, making the required repetition bothersome.
7035 # We might need to add a separate test to check if
7036 # __attribute__((visibility("hidden"))) is supported, if we encounter a
7037 # compiler that supports one of the supported variants of -fvisibility=hidden
7038 # but uses a different syntax to mark a symbol as exported.
7039 if test "$GCC" = yes -o "$SUN_STUDIO_CC" = yes ; then
7040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE" >&5
7041 $as_echo_n "checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
7042 if ${pgac_cv_prog_CC_cflags__fvisibility_hidden+:} false; then :
7043 $as_echo_n "(cached) " >&6
7044 else
7045 pgac_save_CFLAGS=$CFLAGS
7046 pgac_save_CC=$CC
7047 CC=${CC}
7048 CFLAGS="${CFLAGS_SL_MODULE} -fvisibility=hidden"
7049 ac_save_c_werror_flag=$ac_c_werror_flag
7050 ac_c_werror_flag=yes
7051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7052 /* end confdefs.h. */
7055 main ()
7059 return 0;
7061 _ACEOF
7062 if ac_fn_c_try_compile "$LINENO"; then :
7063 pgac_cv_prog_CC_cflags__fvisibility_hidden=yes
7064 else
7065 pgac_cv_prog_CC_cflags__fvisibility_hidden=no
7067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7068 ac_c_werror_flag=$ac_save_c_werror_flag
7069 CFLAGS="$pgac_save_CFLAGS"
7070 CC="$pgac_save_CC"
7072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fvisibility_hidden" >&5
7073 $as_echo "$pgac_cv_prog_CC_cflags__fvisibility_hidden" >&6; }
7074 if test x"$pgac_cv_prog_CC_cflags__fvisibility_hidden" = x"yes"; then
7075 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -fvisibility=hidden"
7079 # For C++ we additionally want -fvisibility-inlines-hidden
7080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
7081 $as_echo_n "checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
7082 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_hidden+:} false; then :
7083 $as_echo_n "(cached) " >&6
7084 else
7085 pgac_save_CXXFLAGS=$CXXFLAGS
7086 pgac_save_CXX=$CXX
7087 CXX=${CXX}
7088 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
7089 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7090 ac_cxx_werror_flag=yes
7091 ac_ext=cpp
7092 ac_cpp='$CXXCPP $CPPFLAGS'
7093 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7094 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7095 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7098 /* end confdefs.h. */
7101 main ()
7105 return 0;
7107 _ACEOF
7108 if ac_fn_cxx_try_compile "$LINENO"; then :
7109 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=yes
7110 else
7111 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=no
7113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7114 ac_ext=c
7115 ac_cpp='$CPP $CPPFLAGS'
7116 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7117 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7118 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7120 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7121 CXXFLAGS="$pgac_save_CXXFLAGS"
7122 CXX="$pgac_save_CXX"
7124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&5
7125 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&6; }
7126 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" = x"yes"; then
7127 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
7130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE" >&5
7131 $as_echo_n "checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE... " >&6; }
7132 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden+:} false; then :
7133 $as_echo_n "(cached) " >&6
7134 else
7135 pgac_save_CXXFLAGS=$CXXFLAGS
7136 pgac_save_CXX=$CXX
7137 CXX=${CXX}
7138 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
7139 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7140 ac_cxx_werror_flag=yes
7141 ac_ext=cpp
7142 ac_cpp='$CXXCPP $CPPFLAGS'
7143 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7144 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7145 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7148 /* end confdefs.h. */
7151 main ()
7155 return 0;
7157 _ACEOF
7158 if ac_fn_cxx_try_compile "$LINENO"; then :
7159 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=yes
7160 else
7161 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=no
7163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7164 ac_ext=c
7165 ac_cpp='$CPP $CPPFLAGS'
7166 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7167 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7168 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7170 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7171 CXXFLAGS="$pgac_save_CXXFLAGS"
7172 CXX="$pgac_save_CXX"
7174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&5
7175 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&6; }
7176 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" = x"yes"; then
7177 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
7180 have_visibility_attribute=$pgac_cv_prog_CC_cflags__fvisibility_hidden
7181 elif test "$PORTNAME" = "aix"; then
7182 # Note that xlc accepts -fvisibility=hidden as a file.
7183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qvisibility=hidden, for CFLAGS_SL_MODULE" >&5
7184 $as_echo_n "checking whether ${CC} supports -qvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
7185 if ${pgac_cv_prog_CC_cflags__qvisibility_hidden+:} false; then :
7186 $as_echo_n "(cached) " >&6
7187 else
7188 pgac_save_CFLAGS=$CFLAGS
7189 pgac_save_CC=$CC
7190 CC=${CC}
7191 CFLAGS="${CFLAGS_SL_MODULE} -qvisibility=hidden"
7192 ac_save_c_werror_flag=$ac_c_werror_flag
7193 ac_c_werror_flag=yes
7194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7195 /* end confdefs.h. */
7198 main ()
7202 return 0;
7204 _ACEOF
7205 if ac_fn_c_try_compile "$LINENO"; then :
7206 pgac_cv_prog_CC_cflags__qvisibility_hidden=yes
7207 else
7208 pgac_cv_prog_CC_cflags__qvisibility_hidden=no
7210 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7211 ac_c_werror_flag=$ac_save_c_werror_flag
7212 CFLAGS="$pgac_save_CFLAGS"
7213 CC="$pgac_save_CC"
7215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qvisibility_hidden" >&5
7216 $as_echo "$pgac_cv_prog_CC_cflags__qvisibility_hidden" >&6; }
7217 if test x"$pgac_cv_prog_CC_cflags__qvisibility_hidden" = x"yes"; then
7218 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -qvisibility=hidden"
7222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
7223 $as_echo_n "checking whether ${CXX} supports -qvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
7224 if ${pgac_cv_prog_CXX_cxxflags__qvisibility_hidden+:} false; then :
7225 $as_echo_n "(cached) " >&6
7226 else
7227 pgac_save_CXXFLAGS=$CXXFLAGS
7228 pgac_save_CXX=$CXX
7229 CXX=${CXX}
7230 CXXFLAGS="${CXXFLAGS_SL_MODULE} -qvisibility=hidden"
7231 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7232 ac_cxx_werror_flag=yes
7233 ac_ext=cpp
7234 ac_cpp='$CXXCPP $CPPFLAGS'
7235 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7236 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7237 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7240 /* end confdefs.h. */
7243 main ()
7247 return 0;
7249 _ACEOF
7250 if ac_fn_cxx_try_compile "$LINENO"; then :
7251 pgac_cv_prog_CXX_cxxflags__qvisibility_hidden=yes
7252 else
7253 pgac_cv_prog_CXX_cxxflags__qvisibility_hidden=no
7255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7256 ac_ext=c
7257 ac_cpp='$CPP $CPPFLAGS'
7258 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7259 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7260 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7262 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7263 CXXFLAGS="$pgac_save_CXXFLAGS"
7264 CXX="$pgac_save_CXX"
7266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" >&5
7267 $as_echo "$pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" >&6; }
7268 if test x"$pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" = x"yes"; then
7269 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -qvisibility=hidden"
7272 have_visibility_attribute=$pgac_cv_prog_CC_cflags__qvisibility_hidden
7273 # Old xlc versions (<13.1) don't have support for -qvisibility. Use expfull to force
7274 # all extension module symbols to be exported.
7275 if test "$pgac_cv_prog_CC_cflags__qvisibility_hidden" != "yes"; then
7276 CFLAGS_SL_MODULE="$CFLAGS_SL_MODULE -Wl,-b,expfull"
7280 if test "$have_visibility_attribute" = "yes"; then
7282 $as_echo "#define HAVE_VISIBILITY_ATTRIBUTE 1" >>confdefs.h
7291 # Determine flags used to emit bitcode for JIT inlining.
7292 # 1. We must duplicate any behaviour-changing compiler flags used above,
7293 # to keep compatibility with the compiler used for normal Postgres code.
7294 # 2. We don't bother to duplicate extra-warnings switches --- seeing a
7295 # warning in the main build is enough.
7296 # 3. But we must duplicate -Wno-warning flags, else we'll see those anyway.
7297 if test "$with_llvm" = yes ; then
7298 CLANGXX="$CLANG -xc++"
7300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
7301 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
7302 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
7303 $as_echo_n "(cached) " >&6
7304 else
7305 pgac_save_CFLAGS=$CFLAGS
7306 pgac_save_CC=$CC
7307 CC=${CLANG}
7308 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7309 ac_save_c_werror_flag=$ac_c_werror_flag
7310 ac_c_werror_flag=yes
7311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7312 /* end confdefs.h. */
7315 main ()
7319 return 0;
7321 _ACEOF
7322 if ac_fn_c_try_compile "$LINENO"; then :
7323 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
7324 else
7325 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
7327 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7328 ac_c_werror_flag=$ac_save_c_werror_flag
7329 CFLAGS="$pgac_save_CFLAGS"
7330 CC="$pgac_save_CC"
7332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
7333 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
7334 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
7335 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
7339 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
7340 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
7341 $as_echo_n "(cached) " >&6
7342 else
7343 pgac_save_CXXFLAGS=$CXXFLAGS
7344 pgac_save_CXX=$CXX
7345 CXX=${CLANGXX}
7346 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7347 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7348 ac_cxx_werror_flag=yes
7349 ac_ext=cpp
7350 ac_cpp='$CXXCPP $CPPFLAGS'
7351 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7352 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7353 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7356 /* end confdefs.h. */
7359 main ()
7363 return 0;
7365 _ACEOF
7366 if ac_fn_cxx_try_compile "$LINENO"; then :
7367 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
7368 else
7369 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
7371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7372 ac_ext=c
7373 ac_cpp='$CPP $CPPFLAGS'
7374 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7375 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7376 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7378 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7379 CXXFLAGS="$pgac_save_CXXFLAGS"
7380 CXX="$pgac_save_CXX"
7382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
7383 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
7384 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
7385 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
7389 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
7390 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
7391 $as_echo_n "(cached) " >&6
7392 else
7393 pgac_save_CFLAGS=$CFLAGS
7394 pgac_save_CC=$CC
7395 CC=${CLANG}
7396 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7397 ac_save_c_werror_flag=$ac_c_werror_flag
7398 ac_c_werror_flag=yes
7399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7400 /* end confdefs.h. */
7403 main ()
7407 return 0;
7409 _ACEOF
7410 if ac_fn_c_try_compile "$LINENO"; then :
7411 pgac_cv_prog_CLANG_cflags__fwrapv=yes
7412 else
7413 pgac_cv_prog_CLANG_cflags__fwrapv=no
7415 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7416 ac_c_werror_flag=$ac_save_c_werror_flag
7417 CFLAGS="$pgac_save_CFLAGS"
7418 CC="$pgac_save_CC"
7420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
7421 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
7422 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
7423 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
7427 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
7428 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
7429 $as_echo_n "(cached) " >&6
7430 else
7431 pgac_save_CXXFLAGS=$CXXFLAGS
7432 pgac_save_CXX=$CXX
7433 CXX=${CLANGXX}
7434 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7435 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7436 ac_cxx_werror_flag=yes
7437 ac_ext=cpp
7438 ac_cpp='$CXXCPP $CPPFLAGS'
7439 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7440 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7441 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7444 /* end confdefs.h. */
7447 main ()
7451 return 0;
7453 _ACEOF
7454 if ac_fn_cxx_try_compile "$LINENO"; then :
7455 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
7456 else
7457 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
7459 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7460 ac_ext=c
7461 ac_cpp='$CPP $CPPFLAGS'
7462 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7463 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7464 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7466 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7467 CXXFLAGS="$pgac_save_CXXFLAGS"
7468 CXX="$pgac_save_CXX"
7470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
7471 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
7472 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
7473 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
7477 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
7478 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
7479 $as_echo_n "(cached) " >&6
7480 else
7481 pgac_save_CFLAGS=$CFLAGS
7482 pgac_save_CC=$CC
7483 CC=${CLANG}
7484 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7485 ac_save_c_werror_flag=$ac_c_werror_flag
7486 ac_c_werror_flag=yes
7487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7488 /* end confdefs.h. */
7491 main ()
7495 return 0;
7497 _ACEOF
7498 if ac_fn_c_try_compile "$LINENO"; then :
7499 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7500 else
7501 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7503 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7504 ac_c_werror_flag=$ac_save_c_werror_flag
7505 CFLAGS="$pgac_save_CFLAGS"
7506 CC="$pgac_save_CC"
7508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7509 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7510 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7511 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7515 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7516 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7517 $as_echo_n "(cached) " >&6
7518 else
7519 pgac_save_CXXFLAGS=$CXXFLAGS
7520 pgac_save_CXX=$CXX
7521 CXX=${CLANGXX}
7522 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7523 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7524 ac_cxx_werror_flag=yes
7525 ac_ext=cpp
7526 ac_cpp='$CXXCPP $CPPFLAGS'
7527 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7528 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7529 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7532 /* end confdefs.h. */
7535 main ()
7539 return 0;
7541 _ACEOF
7542 if ac_fn_cxx_try_compile "$LINENO"; then :
7543 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7544 else
7545 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7547 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7548 ac_ext=c
7549 ac_cpp='$CPP $CPPFLAGS'
7550 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7551 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7552 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7554 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7555 CXXFLAGS="$pgac_save_CXXFLAGS"
7556 CXX="$pgac_save_CXX"
7558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7559 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7560 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7561 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS" >&5
7566 $as_echo_n "checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS... " >&6; }
7567 if ${pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers+:} false; then :
7568 $as_echo_n "(cached) " >&6
7569 else
7570 pgac_save_CFLAGS=$CFLAGS
7571 pgac_save_CC=$CC
7572 CC=${CLANG}
7573 CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7574 ac_save_c_werror_flag=$ac_c_werror_flag
7575 ac_c_werror_flag=yes
7576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7577 /* end confdefs.h. */
7580 main ()
7584 return 0;
7586 _ACEOF
7587 if ac_fn_c_try_compile "$LINENO"; then :
7588 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=yes
7589 else
7590 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=no
7592 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7593 ac_c_werror_flag=$ac_save_c_werror_flag
7594 CFLAGS="$pgac_save_CFLAGS"
7595 CC="$pgac_save_CC"
7597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&5
7598 $as_echo "$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&6; }
7599 if test x"$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" = x"yes"; then
7600 BITCODE_CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS" >&5
7604 $as_echo_n "checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS... " >&6; }
7605 if ${pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers+:} false; then :
7606 $as_echo_n "(cached) " >&6
7607 else
7608 pgac_save_CXXFLAGS=$CXXFLAGS
7609 pgac_save_CXX=$CXX
7610 CXX=${CLANGXX}
7611 CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7612 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7613 ac_cxx_werror_flag=yes
7614 ac_ext=cpp
7615 ac_cpp='$CXXCPP $CPPFLAGS'
7616 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7617 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7618 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7621 /* end confdefs.h. */
7624 main ()
7628 return 0;
7630 _ACEOF
7631 if ac_fn_cxx_try_compile "$LINENO"; then :
7632 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=yes
7633 else
7634 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=no
7636 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7637 ac_ext=c
7638 ac_cpp='$CPP $CPPFLAGS'
7639 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7640 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7641 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7643 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7644 CXXFLAGS="$pgac_save_CXXFLAGS"
7645 CXX="$pgac_save_CXX"
7647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&5
7648 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&6; }
7649 if test x"$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" = x"yes"; then
7650 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7654 NOT_THE_CFLAGS=""
7655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
7656 $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
7657 if ${pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument+:} false; then :
7658 $as_echo_n "(cached) " >&6
7659 else
7660 pgac_save_CFLAGS=$CFLAGS
7661 pgac_save_CC=$CC
7662 CC=${CLANG}
7663 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7664 ac_save_c_werror_flag=$ac_c_werror_flag
7665 ac_c_werror_flag=yes
7666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7667 /* end confdefs.h. */
7670 main ()
7674 return 0;
7676 _ACEOF
7677 if ac_fn_c_try_compile "$LINENO"; then :
7678 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=yes
7679 else
7680 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=no
7682 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7683 ac_c_werror_flag=$ac_save_c_werror_flag
7684 CFLAGS="$pgac_save_CFLAGS"
7685 CC="$pgac_save_CC"
7687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&5
7688 $as_echo "$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&6; }
7689 if test x"$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" = x"yes"; then
7690 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7693 if test -n "$NOT_THE_CFLAGS"; then
7694 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-unused-command-line-argument"
7696 NOT_THE_CFLAGS=""
7697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
7698 $as_echo_n "checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
7699 if ${pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro+:} false; then :
7700 $as_echo_n "(cached) " >&6
7701 else
7702 pgac_save_CFLAGS=$CFLAGS
7703 pgac_save_CC=$CC
7704 CC=${CLANG}
7705 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7706 ac_save_c_werror_flag=$ac_c_werror_flag
7707 ac_c_werror_flag=yes
7708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7709 /* end confdefs.h. */
7712 main ()
7716 return 0;
7718 _ACEOF
7719 if ac_fn_c_try_compile "$LINENO"; then :
7720 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=yes
7721 else
7722 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=no
7724 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7725 ac_c_werror_flag=$ac_save_c_werror_flag
7726 CFLAGS="$pgac_save_CFLAGS"
7727 CC="$pgac_save_CC"
7729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&5
7730 $as_echo "$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&6; }
7731 if test x"$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" = x"yes"; then
7732 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7735 if test -n "$NOT_THE_CFLAGS"; then
7736 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
7738 NOT_THE_CFLAGS=""
7739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
7740 $as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
7741 if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :
7742 $as_echo_n "(cached) " >&6
7743 else
7744 pgac_save_CFLAGS=$CFLAGS
7745 pgac_save_CC=$CC
7746 CC=${CLANG}
7747 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7748 ac_save_c_werror_flag=$ac_c_werror_flag
7749 ac_c_werror_flag=yes
7750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7751 /* end confdefs.h. */
7754 main ()
7758 return 0;
7760 _ACEOF
7761 if ac_fn_c_try_compile "$LINENO"; then :
7762 pgac_cv_prog_CLANG_cflags__Wformat_truncation=yes
7763 else
7764 pgac_cv_prog_CLANG_cflags__Wformat_truncation=no
7766 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7767 ac_c_werror_flag=$ac_save_c_werror_flag
7768 CFLAGS="$pgac_save_CFLAGS"
7769 CC="$pgac_save_CC"
7771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&5
7772 $as_echo "$pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&6; }
7773 if test x"$pgac_cv_prog_CLANG_cflags__Wformat_truncation" = x"yes"; then
7774 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7777 if test -n "$NOT_THE_CFLAGS"; then
7778 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"
7780 NOT_THE_CFLAGS=""
7781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
7782 $as_echo_n "checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
7783 if ${pgac_cv_prog_CLANG_cflags__Wstringop_truncation+:} false; then :
7784 $as_echo_n "(cached) " >&6
7785 else
7786 pgac_save_CFLAGS=$CFLAGS
7787 pgac_save_CC=$CC
7788 CC=${CLANG}
7789 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7790 ac_save_c_werror_flag=$ac_c_werror_flag
7791 ac_c_werror_flag=yes
7792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7793 /* end confdefs.h. */
7796 main ()
7800 return 0;
7802 _ACEOF
7803 if ac_fn_c_try_compile "$LINENO"; then :
7804 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=yes
7805 else
7806 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=no
7808 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7809 ac_c_werror_flag=$ac_save_c_werror_flag
7810 CFLAGS="$pgac_save_CFLAGS"
7811 CC="$pgac_save_CC"
7813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&5
7814 $as_echo "$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&6; }
7815 if test x"$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" = x"yes"; then
7816 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7819 if test -n "$NOT_THE_CFLAGS"; then
7820 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-stringop-truncation"
7824 # supply -g if --enable-debug
7825 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7826 CFLAGS="$CFLAGS -g"
7829 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7830 CXXFLAGS="$CXXFLAGS -g"
7833 # enable code coverage if --enable-coverage
7834 if test "$enable_coverage" = yes; then
7835 if test "$GCC" = yes; then
7836 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7837 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7838 else
7839 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7843 # enable profiling if --enable-profiling
7844 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7845 if test "$GCC" = yes; then
7847 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7849 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7850 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7851 else
7852 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7856 # On Solaris, we need this #define to get POSIX-conforming versions
7857 # of many interfaces (sigwait, getpwuid_r, ...).
7858 if test "$PORTNAME" = "solaris"; then
7859 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
7862 # We already have this in Makefile.win32, but configure needs it too
7863 if test "$PORTNAME" = "win32"; then
7864 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7867 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7868 # user-specified flags (if any) at the end. This lets users override
7869 # the automatic additions.
7870 CFLAGS="$CFLAGS $user_CFLAGS"
7871 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7872 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7873 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7878 # The template file must set up CFLAGS_SL; we don't support user override
7881 # Check if the compiler still works with the final flag settings
7882 # (note, we're not checking that for CXX, which is optional)
7883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7884 $as_echo_n "checking whether the C compiler still works... " >&6; }
7885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7886 /* end confdefs.h. */
7889 main ()
7891 return 0;
7893 return 0;
7895 _ACEOF
7896 if ac_fn_c_try_link "$LINENO"; then :
7897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7898 $as_echo "yes" >&6; }
7899 else
7900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7901 $as_echo "no" >&6; }
7902 as_fn_error $? "cannot proceed" "$LINENO" 5
7904 rm -f core conftest.err conftest.$ac_objext \
7905 conftest$ac_exeext conftest.$ac_ext
7907 # Defend against gcc -ffast-math
7908 if test "$GCC" = yes; then
7909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7910 /* end confdefs.h. */
7913 main ()
7915 #ifdef __FAST_MATH__
7916 choke me
7917 #endif
7919 return 0;
7921 _ACEOF
7922 if ac_fn_c_try_compile "$LINENO"; then :
7924 else
7925 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7930 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7931 # versions of clang do not understand -fexcess-precision=standard, the use of
7932 # x87 floating point operations leads to problems like isinf possibly returning
7933 # false for a value that is infinite when converted from the 80bit register to
7934 # the 8byte memory representation.
7936 # Only perform the test if the compiler doesn't understand
7937 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7938 # automatically.
7939 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7941 /* end confdefs.h. */
7944 main ()
7947 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7948 choke me
7949 #endif
7952 return 0;
7954 _ACEOF
7955 if ac_fn_c_try_compile "$LINENO"; then :
7957 else
7958 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7960 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7963 ac_ext=c
7964 ac_cpp='$CPP $CPPFLAGS'
7965 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7966 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7967 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7969 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7970 # On Suns, sometimes $CPP names a directory.
7971 if test -n "$CPP" && test -d "$CPP"; then
7972 CPP=
7974 if test -z "$CPP"; then
7975 if ${ac_cv_prog_CPP+:} false; then :
7976 $as_echo_n "(cached) " >&6
7977 else
7978 # Double quotes because CPP needs to be expanded
7979 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7981 ac_preproc_ok=false
7982 for ac_c_preproc_warn_flag in '' yes
7984 # Use a header file that comes with gcc, so configuring glibc
7985 # with a fresh cross-compiler works.
7986 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7987 # <limits.h> exists even on freestanding compilers.
7988 # On the NeXT, cc -E runs the code through the compiler's parser,
7989 # not just through cpp. "Syntax error" is here to catch this case.
7990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7991 /* end confdefs.h. */
7992 #ifdef __STDC__
7993 # include <limits.h>
7994 #else
7995 # include <assert.h>
7996 #endif
7997 Syntax error
7998 _ACEOF
7999 if ac_fn_c_try_cpp "$LINENO"; then :
8001 else
8002 # Broken: fails on valid input.
8003 continue
8005 rm -f conftest.err conftest.i conftest.$ac_ext
8007 # OK, works on sane cases. Now check whether nonexistent headers
8008 # can be detected and how.
8009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8010 /* end confdefs.h. */
8011 #include <ac_nonexistent.h>
8012 _ACEOF
8013 if ac_fn_c_try_cpp "$LINENO"; then :
8014 # Broken: success on invalid input.
8015 continue
8016 else
8017 # Passes both tests.
8018 ac_preproc_ok=:
8019 break
8021 rm -f conftest.err conftest.i conftest.$ac_ext
8023 done
8024 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8025 rm -f conftest.i conftest.err conftest.$ac_ext
8026 if $ac_preproc_ok; then :
8027 break
8030 done
8031 ac_cv_prog_CPP=$CPP
8034 CPP=$ac_cv_prog_CPP
8035 else
8036 ac_cv_prog_CPP=$CPP
8038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
8039 $as_echo "$CPP" >&6; }
8040 ac_preproc_ok=false
8041 for ac_c_preproc_warn_flag in '' yes
8043 # Use a header file that comes with gcc, so configuring glibc
8044 # with a fresh cross-compiler works.
8045 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8046 # <limits.h> exists even on freestanding compilers.
8047 # On the NeXT, cc -E runs the code through the compiler's parser,
8048 # not just through cpp. "Syntax error" is here to catch this case.
8049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8050 /* end confdefs.h. */
8051 #ifdef __STDC__
8052 # include <limits.h>
8053 #else
8054 # include <assert.h>
8055 #endif
8056 Syntax error
8057 _ACEOF
8058 if ac_fn_c_try_cpp "$LINENO"; then :
8060 else
8061 # Broken: fails on valid input.
8062 continue
8064 rm -f conftest.err conftest.i conftest.$ac_ext
8066 # OK, works on sane cases. Now check whether nonexistent headers
8067 # can be detected and how.
8068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8069 /* end confdefs.h. */
8070 #include <ac_nonexistent.h>
8071 _ACEOF
8072 if ac_fn_c_try_cpp "$LINENO"; then :
8073 # Broken: success on invalid input.
8074 continue
8075 else
8076 # Passes both tests.
8077 ac_preproc_ok=:
8078 break
8080 rm -f conftest.err conftest.i conftest.$ac_ext
8082 done
8083 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8084 rm -f conftest.i conftest.err conftest.$ac_ext
8085 if $ac_preproc_ok; then :
8087 else
8088 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8089 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8090 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
8091 See \`config.log' for more details" "$LINENO" 5; }
8094 ac_ext=c
8095 ac_cpp='$CPP $CPPFLAGS'
8096 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8097 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8098 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8104 # Set up TAS assembly code if needed; the template file has now had its
8105 # chance to request this.
8107 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
8110 if test "$need_tas" = yes ; then
8111 TAS=tas.o
8112 else
8113 TAS=""
8118 cat >>confdefs.h <<_ACEOF
8119 #define DLSUFFIX "$DLSUFFIX"
8120 _ACEOF
8124 # Set up pkg_config in case we need it below
8133 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8134 if test -n "$ac_tool_prefix"; then
8135 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8136 set dummy ${ac_tool_prefix}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_PKG_CONFIG+:} false; then :
8140 $as_echo_n "(cached) " >&6
8141 else
8142 case $PKG_CONFIG in
8143 [\\/]* | ?:[\\/]*)
8144 ac_cv_path_PKG_CONFIG="$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_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 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8166 if test -n "$PKG_CONFIG"; then
8167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8168 $as_echo "$PKG_CONFIG" >&6; }
8169 else
8170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8171 $as_echo "no" >&6; }
8176 if test -z "$ac_cv_path_PKG_CONFIG"; then
8177 ac_pt_PKG_CONFIG=$PKG_CONFIG
8178 # Extract the first word of "pkg-config", so it can be a program name with args.
8179 set dummy pkg-config; ac_word=$2
8180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8181 $as_echo_n "checking for $ac_word... " >&6; }
8182 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
8183 $as_echo_n "(cached) " >&6
8184 else
8185 case $ac_pt_PKG_CONFIG in
8186 [\\/]* | ?:[\\/]*)
8187 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8190 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8191 for as_dir in $PATH
8193 IFS=$as_save_IFS
8194 test -z "$as_dir" && as_dir=.
8195 for ac_exec_ext in '' $ac_executable_extensions; do
8196 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8197 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8198 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8199 break 2
8201 done
8202 done
8203 IFS=$as_save_IFS
8206 esac
8208 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8209 if test -n "$ac_pt_PKG_CONFIG"; then
8210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8211 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
8212 else
8213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8214 $as_echo "no" >&6; }
8217 if test "x$ac_pt_PKG_CONFIG" = x; then
8218 PKG_CONFIG=""
8219 else
8220 case $cross_compiling:$ac_tool_warned in
8221 yes:)
8222 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8223 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8224 ac_tool_warned=yes ;;
8225 esac
8226 PKG_CONFIG=$ac_pt_PKG_CONFIG
8228 else
8229 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8233 if test -n "$PKG_CONFIG"; then
8234 _pkg_min_version=0.9.0
8235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
8236 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
8237 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8239 $as_echo "yes" >&6; }
8240 else
8241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8242 $as_echo "no" >&6; }
8243 PKG_CONFIG=""
8248 # Automatic dependency tracking
8252 # Check whether --enable-depend was given.
8253 if test "${enable_depend+set}" = set; then :
8254 enableval=$enable_depend;
8255 case $enableval in
8256 yes)
8257 autodepend=yes
8263 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
8265 esac
8267 else
8268 enable_depend=no
8277 # Enable assert checks
8281 # Check whether --enable-cassert was given.
8282 if test "${enable_cassert+set}" = set; then :
8283 enableval=$enable_cassert;
8284 case $enableval in
8285 yes)
8287 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
8294 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
8296 esac
8298 else
8299 enable_cassert=no
8307 # Include directories
8309 ac_save_IFS=$IFS
8310 IFS="${IFS}${PATH_SEPARATOR}"
8311 # SRCH_INC comes from the template file
8312 for dir in $with_includes $SRCH_INC; do
8313 if test -d "$dir"; then
8314 INCLUDES="$INCLUDES -I$dir"
8315 else
8316 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
8317 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
8319 done
8320 IFS=$ac_save_IFS
8325 # Library directories
8327 ac_save_IFS=$IFS
8328 IFS="${IFS}${PATH_SEPARATOR}"
8329 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
8330 for dir in $LIBRARY_DIRS $SRCH_LIB; do
8331 if test -d "$dir"; then
8332 LIBDIRS="$LIBDIRS -L$dir"
8333 else
8334 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
8335 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
8337 done
8338 IFS=$ac_save_IFS
8341 # ICU
8343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
8344 $as_echo_n "checking whether to build with ICU support... " >&6; }
8348 # Check whether --with-icu was given.
8349 if test "${with_icu+set}" = set; then :
8350 withval=$with_icu;
8351 case $withval in
8352 yes)
8354 $as_echo "#define USE_ICU 1" >>confdefs.h
8361 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
8363 esac
8365 else
8366 with_icu=yes
8368 $as_echo "#define USE_ICU 1" >>confdefs.h
8373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
8374 $as_echo "$with_icu" >&6; }
8377 if test "$with_icu" = yes; then
8379 pkg_failed=no
8380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
8381 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
8383 if test -n "$ICU_CFLAGS"; then
8384 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
8385 elif test -n "$PKG_CONFIG"; then
8386 if test -n "$PKG_CONFIG" && \
8387 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8388 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8389 ac_status=$?
8390 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8391 test $ac_status = 0; }; then
8392 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
8393 test "x$?" != "x0" && pkg_failed=yes
8394 else
8395 pkg_failed=yes
8397 else
8398 pkg_failed=untried
8400 if test -n "$ICU_LIBS"; then
8401 pkg_cv_ICU_LIBS="$ICU_LIBS"
8402 elif test -n "$PKG_CONFIG"; then
8403 if test -n "$PKG_CONFIG" && \
8404 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8405 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8406 ac_status=$?
8407 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8408 test $ac_status = 0; }; then
8409 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
8410 test "x$?" != "x0" && pkg_failed=yes
8411 else
8412 pkg_failed=yes
8414 else
8415 pkg_failed=untried
8420 if test $pkg_failed = yes; then
8421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8422 $as_echo "no" >&6; }
8424 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8425 _pkg_short_errors_supported=yes
8426 else
8427 _pkg_short_errors_supported=no
8429 if test $_pkg_short_errors_supported = yes; then
8430 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8431 else
8432 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8434 # Put the nasty error message in config.log where it belongs
8435 echo "$ICU_PKG_ERRORS" >&5
8437 as_fn_error $? "ICU library not found
8438 If you have ICU already installed, see config.log for details on the
8439 failure. It is possible the compiler isn't looking in the proper directory.
8440 Use --without-icu to disable ICU support." "$LINENO" 5
8441 elif test $pkg_failed = untried; then
8442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8443 $as_echo "no" >&6; }
8444 as_fn_error $? "ICU library not found
8445 If you have ICU already installed, see config.log for details on the
8446 failure. It is possible the compiler isn't looking in the proper directory.
8447 Use --without-icu to disable ICU support." "$LINENO" 5
8448 else
8449 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
8450 ICU_LIBS=$pkg_cv_ICU_LIBS
8451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8452 $as_echo "yes" >&6; }
8458 # Optionally build Tcl modules (PL/Tcl)
8460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
8461 $as_echo_n "checking whether to build with Tcl... " >&6; }
8465 # Check whether --with-tcl was given.
8466 if test "${with_tcl+set}" = set; then :
8467 withval=$with_tcl;
8468 case $withval in
8469 yes)
8476 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
8478 esac
8480 else
8481 with_tcl=no
8486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
8487 $as_echo "$with_tcl" >&6; }
8490 # We see if the path to the Tcl/Tk configuration scripts is specified.
8491 # This will override the use of tclsh to find the paths to search.
8496 # Check whether --with-tclconfig was given.
8497 if test "${with_tclconfig+set}" = set; then :
8498 withval=$with_tclconfig;
8499 case $withval in
8500 yes)
8501 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8504 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8509 esac
8516 # Optionally build Perl modules (PL/Perl)
8518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
8519 $as_echo_n "checking whether to build Perl modules... " >&6; }
8523 # Check whether --with-perl was given.
8524 if test "${with_perl+set}" = set; then :
8525 withval=$with_perl;
8526 case $withval in
8527 yes)
8534 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
8536 esac
8538 else
8539 with_perl=no
8544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
8545 $as_echo "$with_perl" >&6; }
8549 # Optionally build Python modules (PL/Python)
8551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
8552 $as_echo_n "checking whether to build Python modules... " >&6; }
8556 # Check whether --with-python was given.
8557 if test "${with_python+set}" = set; then :
8558 withval=$with_python;
8559 case $withval in
8560 yes)
8567 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
8569 esac
8571 else
8572 with_python=no
8577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8578 $as_echo "$with_python" >&6; }
8582 # GSSAPI
8584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
8585 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
8589 # Check whether --with-gssapi was given.
8590 if test "${with_gssapi+set}" = set; then :
8591 withval=$with_gssapi;
8592 case $withval in
8593 yes)
8596 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
8598 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
8605 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
8607 esac
8609 else
8610 with_gssapi=no
8615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8616 $as_echo "$with_gssapi" >&6; }
8624 # Kerberos configuration parameters
8629 # Check whether --with-krb-srvnam was given.
8630 if test "${with_krb_srvnam+set}" = set; then :
8631 withval=$with_krb_srvnam;
8632 case $withval in
8633 yes)
8634 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8637 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8642 esac
8644 else
8645 with_krb_srvnam="postgres"
8651 cat >>confdefs.h <<_ACEOF
8652 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8653 _ACEOF
8658 # PAM
8660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8661 $as_echo_n "checking whether to build with PAM support... " >&6; }
8665 # Check whether --with-pam was given.
8666 if test "${with_pam+set}" = set; then :
8667 withval=$with_pam;
8668 case $withval in
8669 yes)
8671 $as_echo "#define USE_PAM 1" >>confdefs.h
8678 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8680 esac
8682 else
8683 with_pam=no
8688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8689 $as_echo "$with_pam" >&6; }
8693 # BSD AUTH
8695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8696 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8700 # Check whether --with-bsd-auth was given.
8701 if test "${with_bsd_auth+set}" = set; then :
8702 withval=$with_bsd_auth;
8703 case $withval in
8704 yes)
8706 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8713 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8715 esac
8717 else
8718 with_bsd_auth=no
8723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8724 $as_echo "$with_bsd_auth" >&6; }
8728 # LDAP
8730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8731 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8735 # Check whether --with-ldap was given.
8736 if test "${with_ldap+set}" = set; then :
8737 withval=$with_ldap;
8738 case $withval in
8739 yes)
8741 $as_echo "#define USE_LDAP 1" >>confdefs.h
8748 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8750 esac
8752 else
8753 with_ldap=no
8758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8759 $as_echo "$with_ldap" >&6; }
8764 # Bonjour
8766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8767 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8771 # Check whether --with-bonjour was given.
8772 if test "${with_bonjour+set}" = set; then :
8773 withval=$with_bonjour;
8774 case $withval in
8775 yes)
8777 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8784 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8786 esac
8788 else
8789 with_bonjour=no
8794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8795 $as_echo "$with_bonjour" >&6; }
8799 # SELinux
8801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8802 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8806 # Check whether --with-selinux was given.
8807 if test "${with_selinux+set}" = set; then :
8808 withval=$with_selinux;
8809 case $withval in
8810 yes)
8817 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8819 esac
8821 else
8822 with_selinux=no
8828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8829 $as_echo "$with_selinux" >&6; }
8832 # Systemd
8834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8835 $as_echo_n "checking whether to build with systemd support... " >&6; }
8839 # Check whether --with-systemd was given.
8840 if test "${with_systemd+set}" = set; then :
8841 withval=$with_systemd;
8842 case $withval in
8843 yes)
8845 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8852 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8854 esac
8856 else
8857 with_systemd=no
8863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8864 $as_echo "$with_systemd" >&6; }
8867 # Readline
8872 # Check whether --with-readline was given.
8873 if test "${with_readline+set}" = set; then :
8874 withval=$with_readline;
8875 case $withval in
8876 yes)
8883 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8885 esac
8887 else
8888 with_readline=yes
8893 # readline on MinGW has problems with backslashes in psql and other bugs.
8894 # This is particularly a problem with non-US code pages.
8895 # Therefore disable its use until we understand the cause. 2004-07-20
8896 if test "$PORTNAME" = "win32"; then
8897 if test "$with_readline" = yes; then
8898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8899 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8900 with_readline=no
8907 # Prefer libedit
8912 # Check whether --with-libedit-preferred was given.
8913 if test "${with_libedit_preferred+set}" = set; then :
8914 withval=$with_libedit_preferred;
8915 case $withval in
8916 yes)
8923 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8925 esac
8927 else
8928 with_libedit_preferred=no
8936 # UUID library
8938 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8939 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8940 # UUID library. More than one of these might be present on a given platform,
8941 # so we make the user say which one she wants.
8946 # Check whether --with-uuid was given.
8947 if test "${with_uuid+set}" = set; then :
8948 withval=$with_uuid;
8949 case $withval in
8950 yes)
8951 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8954 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8959 esac
8964 if test x"$with_uuid" = x"" ; then
8965 with_uuid=no
8970 # Check whether --with-ossp-uuid was given.
8971 if test "${with_ossp_uuid+set}" = set; then :
8972 withval=$with_ossp_uuid;
8973 case $withval in
8974 yes)
8981 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8983 esac
8985 else
8986 with_ossp_uuid=no
8991 if test "$with_ossp_uuid" = yes ; then
8992 with_uuid=ossp
8995 if test "$with_uuid" != no ; then
8996 if test "$with_uuid" = bsd ; then
8998 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
9000 elif test "$with_uuid" = e2fs ; then
9002 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
9004 elif test "$with_uuid" = ossp ; then
9006 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
9008 else
9009 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
9016 # XML
9018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
9019 $as_echo_n "checking whether to build with XML support... " >&6; }
9023 # Check whether --with-libxml was given.
9024 if test "${with_libxml+set}" = set; then :
9025 withval=$with_libxml;
9026 case $withval in
9027 yes)
9029 $as_echo "#define USE_LIBXML 1" >>confdefs.h
9036 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
9038 esac
9040 else
9041 with_libxml=no
9046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
9047 $as_echo "$with_libxml" >&6; }
9050 if test "$with_libxml" = yes ; then
9051 # Check pkg-config, then xml2-config. But for backwards compatibility,
9052 # setting XML2_CONFIG overrides pkg-config.
9053 have_libxml2_pkg_config=no
9054 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
9056 pkg_failed=no
9057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
9058 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
9060 if test -n "$XML2_CFLAGS"; then
9061 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
9062 elif test -n "$PKG_CONFIG"; then
9063 if test -n "$PKG_CONFIG" && \
9064 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
9065 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
9066 ac_status=$?
9067 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9068 test $ac_status = 0; }; then
9069 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
9070 test "x$?" != "x0" && pkg_failed=yes
9071 else
9072 pkg_failed=yes
9074 else
9075 pkg_failed=untried
9077 if test -n "$XML2_LIBS"; then
9078 pkg_cv_XML2_LIBS="$XML2_LIBS"
9079 elif test -n "$PKG_CONFIG"; then
9080 if test -n "$PKG_CONFIG" && \
9081 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
9082 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
9083 ac_status=$?
9084 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9085 test $ac_status = 0; }; then
9086 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
9087 test "x$?" != "x0" && pkg_failed=yes
9088 else
9089 pkg_failed=yes
9091 else
9092 pkg_failed=untried
9097 if test $pkg_failed = yes; then
9098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9099 $as_echo "no" >&6; }
9101 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9102 _pkg_short_errors_supported=yes
9103 else
9104 _pkg_short_errors_supported=no
9106 if test $_pkg_short_errors_supported = yes; then
9107 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
9108 else
9109 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
9111 # Put the nasty error message in config.log where it belongs
9112 echo "$XML2_PKG_ERRORS" >&5
9114 # do nothing
9115 elif test $pkg_failed = untried; then
9116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9117 $as_echo "no" >&6; }
9118 # do nothing
9119 else
9120 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
9121 XML2_LIBS=$pkg_cv_XML2_LIBS
9122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9123 $as_echo "yes" >&6; }
9124 have_libxml2_pkg_config=yes
9127 if test "$have_libxml2_pkg_config" = no ; then
9128 if test -z "$XML2_CONFIG"; then
9129 for ac_prog in xml2-config
9131 # Extract the first word of "$ac_prog", so it can be a program name with args.
9132 set dummy $ac_prog; ac_word=$2
9133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9134 $as_echo_n "checking for $ac_word... " >&6; }
9135 if ${ac_cv_path_XML2_CONFIG+:} false; then :
9136 $as_echo_n "(cached) " >&6
9137 else
9138 case $XML2_CONFIG in
9139 [\\/]* | ?:[\\/]*)
9140 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
9143 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9144 for as_dir in $PATH
9146 IFS=$as_save_IFS
9147 test -z "$as_dir" && as_dir=.
9148 for ac_exec_ext in '' $ac_executable_extensions; do
9149 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9150 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9152 break 2
9154 done
9155 done
9156 IFS=$as_save_IFS
9159 esac
9161 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
9162 if test -n "$XML2_CONFIG"; then
9163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
9164 $as_echo "$XML2_CONFIG" >&6; }
9165 else
9166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9167 $as_echo "no" >&6; }
9171 test -n "$XML2_CONFIG" && break
9172 done
9174 else
9175 # Report the value of XML2_CONFIG in configure's output in all cases.
9176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
9177 $as_echo_n "checking for XML2_CONFIG... " >&6; }
9178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
9179 $as_echo "$XML2_CONFIG" >&6; }
9182 if test -n "$XML2_CONFIG"; then
9183 XML2_CFLAGS=`$XML2_CONFIG --cflags`
9184 XML2_LIBS=`$XML2_CONFIG --libs`
9187 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
9188 for pgac_option in $XML2_CFLAGS; do
9189 case $pgac_option in
9190 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9191 esac
9192 done
9193 for pgac_option in $XML2_LIBS; do
9194 case $pgac_option in
9195 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9196 esac
9197 done
9202 # XSLT
9207 # Check whether --with-libxslt was given.
9208 if test "${with_libxslt+set}" = set; then :
9209 withval=$with_libxslt;
9210 case $withval in
9211 yes)
9213 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
9220 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
9222 esac
9224 else
9225 with_libxslt=no
9235 # tzdata
9240 # Check whether --with-system-tzdata was given.
9241 if test "${with_system_tzdata+set}" = set; then :
9242 withval=$with_system_tzdata;
9243 case $withval in
9244 yes)
9245 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
9248 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
9253 esac
9261 # Zlib
9266 # Check whether --with-zlib was given.
9267 if test "${with_zlib+set}" = set; then :
9268 withval=$with_zlib;
9269 case $withval in
9270 yes)
9277 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
9279 esac
9281 else
9282 with_zlib=yes
9290 # LZ4
9292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
9293 $as_echo_n "checking whether to build with LZ4 support... " >&6; }
9297 # Check whether --with-lz4 was given.
9298 if test "${with_lz4+set}" = set; then :
9299 withval=$with_lz4;
9300 case $withval in
9301 yes)
9303 $as_echo "#define USE_LZ4 1" >>confdefs.h
9310 as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
9312 esac
9314 else
9315 with_lz4=no
9320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
9321 $as_echo "$with_lz4" >&6; }
9324 if test "$with_lz4" = yes; then
9326 pkg_failed=no
9327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
9328 $as_echo_n "checking for liblz4... " >&6; }
9330 if test -n "$LZ4_CFLAGS"; then
9331 pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
9332 elif test -n "$PKG_CONFIG"; then
9333 if test -n "$PKG_CONFIG" && \
9334 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9335 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9336 ac_status=$?
9337 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9338 test $ac_status = 0; }; then
9339 pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
9340 test "x$?" != "x0" && pkg_failed=yes
9341 else
9342 pkg_failed=yes
9344 else
9345 pkg_failed=untried
9347 if test -n "$LZ4_LIBS"; then
9348 pkg_cv_LZ4_LIBS="$LZ4_LIBS"
9349 elif test -n "$PKG_CONFIG"; then
9350 if test -n "$PKG_CONFIG" && \
9351 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9352 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9353 ac_status=$?
9354 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9355 test $ac_status = 0; }; then
9356 pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
9357 test "x$?" != "x0" && pkg_failed=yes
9358 else
9359 pkg_failed=yes
9361 else
9362 pkg_failed=untried
9367 if test $pkg_failed = yes; then
9368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9369 $as_echo "no" >&6; }
9371 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9372 _pkg_short_errors_supported=yes
9373 else
9374 _pkg_short_errors_supported=no
9376 if test $_pkg_short_errors_supported = yes; then
9377 LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
9378 else
9379 LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
9381 # Put the nasty error message in config.log where it belongs
9382 echo "$LZ4_PKG_ERRORS" >&5
9384 as_fn_error $? "Package requirements (liblz4) were not met:
9386 $LZ4_PKG_ERRORS
9388 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9389 installed software in a non-standard prefix.
9391 Alternatively, you may set the environment variables LZ4_CFLAGS
9392 and LZ4_LIBS to avoid the need to call pkg-config.
9393 See the pkg-config man page for more details." "$LINENO" 5
9394 elif test $pkg_failed = untried; then
9395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9396 $as_echo "no" >&6; }
9397 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9398 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9399 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9400 is in your PATH or set the PKG_CONFIG environment variable to the full
9401 path to pkg-config.
9403 Alternatively, you may set the environment variables LZ4_CFLAGS
9404 and LZ4_LIBS to avoid the need to call pkg-config.
9405 See the pkg-config man page for more details.
9407 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9408 See \`config.log' for more details" "$LINENO" 5; }
9409 else
9410 LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
9411 LZ4_LIBS=$pkg_cv_LZ4_LIBS
9412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9413 $as_echo "yes" >&6; }
9416 # We only care about -I, -D, and -L switches;
9417 # note that -llz4 will be added by AC_CHECK_LIB below.
9418 for pgac_option in $LZ4_CFLAGS; do
9419 case $pgac_option in
9420 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9421 esac
9422 done
9423 for pgac_option in $LZ4_LIBS; do
9424 case $pgac_option in
9425 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9426 esac
9427 done
9431 # ZSTD
9433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ZSTD support" >&5
9434 $as_echo_n "checking whether to build with ZSTD support... " >&6; }
9438 # Check whether --with-zstd was given.
9439 if test "${with_zstd+set}" = set; then :
9440 withval=$with_zstd;
9441 case $withval in
9442 yes)
9444 $as_echo "#define USE_ZSTD 1" >>confdefs.h
9451 as_fn_error $? "no argument expected for --with-zstd option" "$LINENO" 5
9453 esac
9455 else
9456 with_zstd=no
9461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_zstd" >&5
9462 $as_echo "$with_zstd" >&6; }
9465 if test "$with_zstd" = yes; then
9467 pkg_failed=no
9468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd >= 1.4.0" >&5
9469 $as_echo_n "checking for libzstd >= 1.4.0... " >&6; }
9471 if test -n "$ZSTD_CFLAGS"; then
9472 pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
9473 elif test -n "$PKG_CONFIG"; then
9474 if test -n "$PKG_CONFIG" && \
9475 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9476 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9477 ac_status=$?
9478 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9479 test $ac_status = 0; }; then
9480 pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd >= 1.4.0" 2>/dev/null`
9481 test "x$?" != "x0" && pkg_failed=yes
9482 else
9483 pkg_failed=yes
9485 else
9486 pkg_failed=untried
9488 if test -n "$ZSTD_LIBS"; then
9489 pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
9490 elif test -n "$PKG_CONFIG"; then
9491 if test -n "$PKG_CONFIG" && \
9492 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9493 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9494 ac_status=$?
9495 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9496 test $ac_status = 0; }; then
9497 pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd >= 1.4.0" 2>/dev/null`
9498 test "x$?" != "x0" && pkg_failed=yes
9499 else
9500 pkg_failed=yes
9502 else
9503 pkg_failed=untried
9508 if test $pkg_failed = yes; then
9509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9510 $as_echo "no" >&6; }
9512 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9513 _pkg_short_errors_supported=yes
9514 else
9515 _pkg_short_errors_supported=no
9517 if test $_pkg_short_errors_supported = yes; then
9518 ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9519 else
9520 ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9522 # Put the nasty error message in config.log where it belongs
9523 echo "$ZSTD_PKG_ERRORS" >&5
9525 as_fn_error $? "Package requirements (libzstd >= 1.4.0) were not met:
9527 $ZSTD_PKG_ERRORS
9529 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9530 installed software in a non-standard prefix.
9532 Alternatively, you may set the environment variables ZSTD_CFLAGS
9533 and ZSTD_LIBS to avoid the need to call pkg-config.
9534 See the pkg-config man page for more details." "$LINENO" 5
9535 elif test $pkg_failed = untried; then
9536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9537 $as_echo "no" >&6; }
9538 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9539 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9540 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9541 is in your PATH or set the PKG_CONFIG environment variable to the full
9542 path to pkg-config.
9544 Alternatively, you may set the environment variables ZSTD_CFLAGS
9545 and ZSTD_LIBS to avoid the need to call pkg-config.
9546 See the pkg-config man page for more details.
9548 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9549 See \`config.log' for more details" "$LINENO" 5; }
9550 else
9551 ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
9552 ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
9553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9554 $as_echo "yes" >&6; }
9557 # We only care about -I, -D, and -L switches;
9558 # note that -lzstd will be added by AC_CHECK_LIB below.
9559 for pgac_option in $ZSTD_CFLAGS; do
9560 case $pgac_option in
9561 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9562 esac
9563 done
9564 for pgac_option in $ZSTD_LIBS; do
9565 case $pgac_option in
9566 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9567 esac
9568 done
9571 # Assignments
9574 CPPFLAGS="$CPPFLAGS $INCLUDES"
9575 LDFLAGS="$LDFLAGS $LIBDIRS"
9581 if test -n "$ac_tool_prefix"; then
9582 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9583 set dummy ${ac_tool_prefix}strip; ac_word=$2
9584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9585 $as_echo_n "checking for $ac_word... " >&6; }
9586 if ${ac_cv_prog_STRIP+:} false; then :
9587 $as_echo_n "(cached) " >&6
9588 else
9589 if test -n "$STRIP"; then
9590 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9591 else
9592 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9593 for as_dir in $PATH
9595 IFS=$as_save_IFS
9596 test -z "$as_dir" && as_dir=.
9597 for ac_exec_ext in '' $ac_executable_extensions; do
9598 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9599 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9600 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9601 break 2
9603 done
9604 done
9605 IFS=$as_save_IFS
9609 STRIP=$ac_cv_prog_STRIP
9610 if test -n "$STRIP"; then
9611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9612 $as_echo "$STRIP" >&6; }
9613 else
9614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9615 $as_echo "no" >&6; }
9620 if test -z "$ac_cv_prog_STRIP"; then
9621 ac_ct_STRIP=$STRIP
9622 # Extract the first word of "strip", so it can be a program name with args.
9623 set dummy strip; ac_word=$2
9624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9625 $as_echo_n "checking for $ac_word... " >&6; }
9626 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9627 $as_echo_n "(cached) " >&6
9628 else
9629 if test -n "$ac_ct_STRIP"; then
9630 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9631 else
9632 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9633 for as_dir in $PATH
9635 IFS=$as_save_IFS
9636 test -z "$as_dir" && as_dir=.
9637 for ac_exec_ext in '' $ac_executable_extensions; do
9638 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9639 ac_cv_prog_ac_ct_STRIP="strip"
9640 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9641 break 2
9643 done
9644 done
9645 IFS=$as_save_IFS
9649 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9650 if test -n "$ac_ct_STRIP"; then
9651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9652 $as_echo "$ac_ct_STRIP" >&6; }
9653 else
9654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9655 $as_echo "no" >&6; }
9658 if test "x$ac_ct_STRIP" = x; then
9659 STRIP=":"
9660 else
9661 case $cross_compiling:$ac_tool_warned in
9662 yes:)
9663 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9664 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9665 ac_tool_warned=yes ;;
9666 esac
9667 STRIP=$ac_ct_STRIP
9669 else
9670 STRIP="$ac_cv_prog_STRIP"
9674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9675 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9676 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9677 STRIP_STATIC_LIB="$STRIP --strip-unneeded"
9678 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9680 $as_echo "yes" >&6; }
9681 else
9682 case $host_os in
9683 darwin*)
9684 STRIP="$STRIP -x"
9685 STRIP_STATIC_LIB=$STRIP
9686 STRIP_SHARED_LIB=$STRIP
9687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9688 $as_echo "yes" >&6; }
9691 STRIP_STATIC_LIB=:
9692 STRIP_SHARED_LIB=:
9693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9694 $as_echo "no" >&6; }
9696 esac
9701 if test -n "$ac_tool_prefix"; then
9702 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9703 set dummy ${ac_tool_prefix}ar; ac_word=$2
9704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9705 $as_echo_n "checking for $ac_word... " >&6; }
9706 if ${ac_cv_prog_AR+:} false; then :
9707 $as_echo_n "(cached) " >&6
9708 else
9709 if test -n "$AR"; then
9710 ac_cv_prog_AR="$AR" # Let the user override the test.
9711 else
9712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9713 for as_dir in $PATH
9715 IFS=$as_save_IFS
9716 test -z "$as_dir" && as_dir=.
9717 for ac_exec_ext in '' $ac_executable_extensions; do
9718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9719 ac_cv_prog_AR="${ac_tool_prefix}ar"
9720 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9721 break 2
9723 done
9724 done
9725 IFS=$as_save_IFS
9729 AR=$ac_cv_prog_AR
9730 if test -n "$AR"; then
9731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9732 $as_echo "$AR" >&6; }
9733 else
9734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9735 $as_echo "no" >&6; }
9740 if test -z "$ac_cv_prog_AR"; then
9741 ac_ct_AR=$AR
9742 # Extract the first word of "ar", so it can be a program name with args.
9743 set dummy ar; ac_word=$2
9744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9745 $as_echo_n "checking for $ac_word... " >&6; }
9746 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9747 $as_echo_n "(cached) " >&6
9748 else
9749 if test -n "$ac_ct_AR"; then
9750 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9751 else
9752 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9753 for as_dir in $PATH
9755 IFS=$as_save_IFS
9756 test -z "$as_dir" && as_dir=.
9757 for ac_exec_ext in '' $ac_executable_extensions; do
9758 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9759 ac_cv_prog_ac_ct_AR="ar"
9760 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9761 break 2
9763 done
9764 done
9765 IFS=$as_save_IFS
9769 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9770 if test -n "$ac_ct_AR"; then
9771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9772 $as_echo "$ac_ct_AR" >&6; }
9773 else
9774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9775 $as_echo "no" >&6; }
9778 if test "x$ac_ct_AR" = x; then
9779 AR="ar"
9780 else
9781 case $cross_compiling:$ac_tool_warned in
9782 yes:)
9783 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9784 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9785 ac_tool_warned=yes ;;
9786 esac
9787 AR=$ac_ct_AR
9789 else
9790 AR="$ac_cv_prog_AR"
9793 if test "$PORTNAME" = "win32"; then
9794 if test -n "$ac_tool_prefix"; then
9795 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9796 set dummy ${ac_tool_prefix}windres; ac_word=$2
9797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9798 $as_echo_n "checking for $ac_word... " >&6; }
9799 if ${ac_cv_prog_WINDRES+:} false; then :
9800 $as_echo_n "(cached) " >&6
9801 else
9802 if test -n "$WINDRES"; then
9803 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9804 else
9805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9806 for as_dir in $PATH
9808 IFS=$as_save_IFS
9809 test -z "$as_dir" && as_dir=.
9810 for ac_exec_ext in '' $ac_executable_extensions; do
9811 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9812 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9813 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9814 break 2
9816 done
9817 done
9818 IFS=$as_save_IFS
9822 WINDRES=$ac_cv_prog_WINDRES
9823 if test -n "$WINDRES"; then
9824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9825 $as_echo "$WINDRES" >&6; }
9826 else
9827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9828 $as_echo "no" >&6; }
9833 if test -z "$ac_cv_prog_WINDRES"; then
9834 ac_ct_WINDRES=$WINDRES
9835 # Extract the first word of "windres", so it can be a program name with args.
9836 set dummy windres; ac_word=$2
9837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9838 $as_echo_n "checking for $ac_word... " >&6; }
9839 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9840 $as_echo_n "(cached) " >&6
9841 else
9842 if test -n "$ac_ct_WINDRES"; then
9843 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9844 else
9845 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9846 for as_dir in $PATH
9848 IFS=$as_save_IFS
9849 test -z "$as_dir" && as_dir=.
9850 for ac_exec_ext in '' $ac_executable_extensions; do
9851 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9852 ac_cv_prog_ac_ct_WINDRES="windres"
9853 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9854 break 2
9856 done
9857 done
9858 IFS=$as_save_IFS
9862 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9863 if test -n "$ac_ct_WINDRES"; then
9864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9865 $as_echo "$ac_ct_WINDRES" >&6; }
9866 else
9867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9868 $as_echo "no" >&6; }
9871 if test "x$ac_ct_WINDRES" = x; then
9872 WINDRES="windres"
9873 else
9874 case $cross_compiling:$ac_tool_warned in
9875 yes:)
9876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9877 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9878 ac_tool_warned=yes ;;
9879 esac
9880 WINDRES=$ac_ct_WINDRES
9882 else
9883 WINDRES="$ac_cv_prog_WINDRES"
9888 # Find a good install program. We prefer a C program (faster),
9889 # so one script is as good as another. But avoid the broken or
9890 # incompatible versions:
9891 # SysV /etc/install, /usr/sbin/install
9892 # SunOS /usr/etc/install
9893 # IRIX /sbin/install
9894 # AIX /bin/install
9895 # AmigaOS /C/install, which installs bootblocks on floppy discs
9896 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9897 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9898 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9899 # OS/2's system install, which has a completely different semantic
9900 # ./install, which can be erroneously created by make from ./install.sh.
9901 # Reject install programs that cannot install multiple files.
9902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9903 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9904 if test -z "$INSTALL"; then
9905 if ${ac_cv_path_install+:} false; then :
9906 $as_echo_n "(cached) " >&6
9907 else
9908 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9909 for as_dir in $PATH
9911 IFS=$as_save_IFS
9912 test -z "$as_dir" && as_dir=.
9913 # Account for people who put trailing slashes in PATH elements.
9914 case $as_dir/ in #((
9915 ./ | .// | /[cC]/* | \
9916 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9917 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9918 /usr/ucb/* ) ;;
9920 # OSF1 and SCO ODT 3.0 have their own names for install.
9921 # Don't use installbsd from OSF since it installs stuff as root
9922 # by default.
9923 for ac_prog in ginstall scoinst install; do
9924 for ac_exec_ext in '' $ac_executable_extensions; do
9925 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9926 if test $ac_prog = install &&
9927 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9928 # AIX install. It has an incompatible calling convention.
9930 elif test $ac_prog = install &&
9931 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9932 # program-specific install script used by HP pwplus--don't use.
9934 else
9935 rm -rf conftest.one conftest.two conftest.dir
9936 echo one > conftest.one
9937 echo two > conftest.two
9938 mkdir conftest.dir
9939 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9940 test -s conftest.one && test -s conftest.two &&
9941 test -s conftest.dir/conftest.one &&
9942 test -s conftest.dir/conftest.two
9943 then
9944 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9945 break 3
9949 done
9950 done
9952 esac
9954 done
9955 IFS=$as_save_IFS
9957 rm -rf conftest.one conftest.two conftest.dir
9960 if test "${ac_cv_path_install+set}" = set; then
9961 INSTALL=$ac_cv_path_install
9962 else
9963 # As a last resort, use the slow shell script. Don't cache a
9964 # value for INSTALL within a source directory, because that will
9965 # break other packages using the cache if that directory is
9966 # removed, or if the value is a relative name.
9967 INSTALL=$ac_install_sh
9970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9971 $as_echo "$INSTALL" >&6; }
9973 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9974 # It thinks the first close brace ends the variable substitution.
9975 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9977 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9979 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9981 # When Autoconf chooses install-sh as install program it tries to generate
9982 # a relative path to it in each makefile where it substitutes it. This clashes
9983 # with our Makefile.global concept. This workaround helps.
9984 case $INSTALL in
9985 *install-sh*) install_bin='';;
9986 *) install_bin=$INSTALL;;
9987 esac
9990 if test -z "$TAR"; then
9991 for ac_prog in tar
9993 # Extract the first word of "$ac_prog", so it can be a program name with args.
9994 set dummy $ac_prog; ac_word=$2
9995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9996 $as_echo_n "checking for $ac_word... " >&6; }
9997 if ${ac_cv_path_TAR+:} false; then :
9998 $as_echo_n "(cached) " >&6
9999 else
10000 case $TAR in
10001 [\\/]* | ?:[\\/]*)
10002 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10006 for as_dir in $PATH
10008 IFS=$as_save_IFS
10009 test -z "$as_dir" && as_dir=.
10010 for ac_exec_ext in '' $ac_executable_extensions; do
10011 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10012 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10014 break 2
10016 done
10017 done
10018 IFS=$as_save_IFS
10021 esac
10023 TAR=$ac_cv_path_TAR
10024 if test -n "$TAR"; then
10025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10026 $as_echo "$TAR" >&6; }
10027 else
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10029 $as_echo "no" >&6; }
10033 test -n "$TAR" && break
10034 done
10036 else
10037 # Report the value of TAR in configure's output in all cases.
10038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10039 $as_echo_n "checking for TAR... " >&6; }
10040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10041 $as_echo "$TAR" >&6; }
10044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
10045 $as_echo_n "checking whether ln -s works... " >&6; }
10046 LN_S=$as_ln_s
10047 if test "$LN_S" = "ln -s"; then
10048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10049 $as_echo "yes" >&6; }
10050 else
10051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
10052 $as_echo "no, using $LN_S" >&6; }
10055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
10056 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
10057 if test -z "$MKDIR_P"; then
10058 if ${ac_cv_path_mkdir+:} false; then :
10059 $as_echo_n "(cached) " >&6
10060 else
10061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10062 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
10064 IFS=$as_save_IFS
10065 test -z "$as_dir" && as_dir=.
10066 for ac_prog in mkdir gmkdir; do
10067 for ac_exec_ext in '' $ac_executable_extensions; do
10068 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
10069 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
10070 'mkdir (GNU coreutils) '* | \
10071 'mkdir (coreutils) '* | \
10072 'mkdir (fileutils) '4.1*)
10073 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
10074 break 3;;
10075 esac
10076 done
10077 done
10078 done
10079 IFS=$as_save_IFS
10083 test -d ./--version && rmdir ./--version
10084 if test "${ac_cv_path_mkdir+set}" = set; then
10085 MKDIR_P="$ac_cv_path_mkdir -p"
10086 else
10087 # As a last resort, use the slow shell script. Don't cache a
10088 # value for MKDIR_P within a source directory, because that will
10089 # break other packages using the cache if that directory is
10090 # removed, or if the value is a relative name.
10091 MKDIR_P="$ac_install_sh -d"
10094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
10095 $as_echo "$MKDIR_P" >&6; }
10097 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
10098 # a relative path to it in each makefile where it substitutes it. This clashes
10099 # with our Makefile.global concept. This workaround helps.
10100 case $MKDIR_P in
10101 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
10102 esac
10104 if test -z "$BISON"; then
10105 for ac_prog in bison
10107 # Extract the first word of "$ac_prog", so it can be a program name with args.
10108 set dummy $ac_prog; ac_word=$2
10109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10110 $as_echo_n "checking for $ac_word... " >&6; }
10111 if ${ac_cv_path_BISON+:} false; then :
10112 $as_echo_n "(cached) " >&6
10113 else
10114 case $BISON in
10115 [\\/]* | ?:[\\/]*)
10116 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
10119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10120 for as_dir in $PATH
10122 IFS=$as_save_IFS
10123 test -z "$as_dir" && as_dir=.
10124 for ac_exec_ext in '' $ac_executable_extensions; do
10125 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10126 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
10127 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10128 break 2
10130 done
10131 done
10132 IFS=$as_save_IFS
10135 esac
10137 BISON=$ac_cv_path_BISON
10138 if test -n "$BISON"; then
10139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10140 $as_echo "$BISON" >&6; }
10141 else
10142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10143 $as_echo "no" >&6; }
10147 test -n "$BISON" && break
10148 done
10150 else
10151 # Report the value of BISON in configure's output in all cases.
10152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
10153 $as_echo_n "checking for BISON... " >&6; }
10154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10155 $as_echo "$BISON" >&6; }
10159 if test "$BISON"; then
10160 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
10161 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
10162 $as_echo "$as_me: using $pgac_bison_version" >&6;}
10163 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 2.3) exit 0; else exit 1;}'
10164 then
10165 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10166 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10167 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." >&5
10168 $as_echo "$as_me: WARNING:
10169 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10170 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." >&2;}
10171 BISON=""
10173 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
10174 # of the now preferred %name-prefix "base_yy", but the latter
10175 # doesn't work with Bison 2.3 or less. So for now we silence the
10176 # deprecation warnings.
10177 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
10178 then
10179 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
10183 if test -z "$BISON"; then
10184 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10185 *** Without Bison you will not be able to build PostgreSQL from Git nor
10186 *** change any of the parser definition files. You can obtain Bison from
10187 *** a GNU mirror site. (If you are using the official distribution of
10188 *** PostgreSQL then you do not need to worry about this, because the Bison
10189 *** output is pre-generated.)" >&5
10190 $as_echo "$as_me: 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.)" >&2;}
10199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
10200 $as_echo_n "checking for flex... " >&6; }
10201 if ${pgac_cv_path_flex+:} false; then :
10202 $as_echo_n "(cached) " >&6
10203 else
10204 # Let the user override the test
10205 if test -n "$FLEX"; then
10206 pgac_cv_path_flex=$FLEX
10207 else
10208 pgac_save_IFS=$IFS
10209 IFS=$PATH_SEPARATOR
10210 for pgac_dir in $PATH; do
10211 IFS=$pgac_save_IFS
10212 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
10213 pgac_dir=`pwd`
10215 for pgac_prog in flex lex; do
10216 pgac_candidate="$pgac_dir/$pgac_prog"
10217 if test -f "$pgac_candidate" \
10218 && $pgac_candidate --version </dev/null >/dev/null 2>&1
10219 then
10220 echo '%%' > conftest.l
10221 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
10222 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
10223 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;}'
10224 then
10225 pgac_cv_path_flex=$pgac_candidate
10226 break 2
10227 else
10228 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10229 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10230 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." >&5
10231 $as_echo "$as_me: WARNING:
10232 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10233 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." >&2;}
10237 done
10238 done
10239 rm -f conftest.l lex.yy.c
10240 : ${pgac_cv_path_flex=no}
10244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
10245 $as_echo "$pgac_cv_path_flex" >&6; }
10246 if test x"$pgac_cv_path_flex" = x"no"; then
10247 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10248 *** Without Flex you will not be able to build PostgreSQL from Git nor
10249 *** change any of the scanner definition files. You can obtain Flex from
10250 *** a GNU mirror site. (If you are using the official distribution of
10251 *** PostgreSQL then you do not need to worry about this because the Flex
10252 *** output is pre-generated.)" >&5
10253 $as_echo "$as_me: 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.)" >&2;}
10260 FLEX=
10261 else
10262 FLEX=$pgac_cv_path_flex
10263 pgac_flex_version=`$FLEX --version 2>/dev/null`
10264 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
10265 $as_echo "$as_me: using $pgac_flex_version" >&6;}
10272 if test -z "$PERL"; then
10273 for ac_prog in perl
10275 # Extract the first word of "$ac_prog", so it can be a program name with args.
10276 set dummy $ac_prog; ac_word=$2
10277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10278 $as_echo_n "checking for $ac_word... " >&6; }
10279 if ${ac_cv_path_PERL+:} false; then :
10280 $as_echo_n "(cached) " >&6
10281 else
10282 case $PERL in
10283 [\\/]* | ?:[\\/]*)
10284 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
10287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10288 for as_dir in $PATH
10290 IFS=$as_save_IFS
10291 test -z "$as_dir" && as_dir=.
10292 for ac_exec_ext in '' $ac_executable_extensions; do
10293 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10294 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
10295 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10296 break 2
10298 done
10299 done
10300 IFS=$as_save_IFS
10303 esac
10305 PERL=$ac_cv_path_PERL
10306 if test -n "$PERL"; then
10307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10308 $as_echo "$PERL" >&6; }
10309 else
10310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311 $as_echo "no" >&6; }
10315 test -n "$PERL" && break
10316 done
10318 else
10319 # Report the value of PERL in configure's output in all cases.
10320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
10321 $as_echo_n "checking for PERL... " >&6; }
10322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10323 $as_echo "$PERL" >&6; }
10327 if test "$PERL"; then
10328 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'`
10329 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
10330 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
10331 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
10332 $AWK '{ if ($1 == 5 && ($2 >= 14)) exit 1; else exit 0;}'
10333 then
10334 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10335 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10336 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." >&5
10337 $as_echo "$as_me: WARNING:
10338 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10339 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." >&2;}
10340 PERL=""
10344 if test -z "$PERL"; then
10345 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10346 *** Without Perl you will not be able to build PostgreSQL from Git.
10347 *** You can obtain Perl from any CPAN mirror site.
10348 *** (If you are using the official distribution of PostgreSQL then you do not
10349 *** need to worry about this, because the Perl output is pre-generated.)" >&5
10350 $as_echo "$as_me: WARNING:
10351 *** Without Perl you will not be able to build PostgreSQL from Git.
10352 *** You can obtain Perl from any CPAN mirror site.
10353 *** (If you are using the official distribution of PostgreSQL then you do not
10354 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
10357 if test "$with_perl" = yes; then
10358 if test -z "$PERL"; then
10359 as_fn_error $? "Perl not found" "$LINENO" 5
10362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
10363 $as_echo_n "checking for Perl archlibexp... " >&6; }
10364 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
10365 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
10366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
10367 $as_echo "$perl_archlibexp" >&6; }
10368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
10369 $as_echo_n "checking for Perl privlibexp... " >&6; }
10370 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
10371 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
10372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
10373 $as_echo "$perl_privlibexp" >&6; }
10374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
10375 $as_echo_n "checking for Perl useshrplib... " >&6; }
10376 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
10377 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
10378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
10379 $as_echo "$perl_useshrplib" >&6; }
10380 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
10381 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
10382 You might have to rebuild your Perl installation. Refer to the
10383 documentation for details. Use --without-perl to disable building
10384 PL/Perl." "$LINENO" 5
10386 # On most platforms, archlibexp is also where the Perl include files live ...
10387 perl_includespec="-I$perl_archlibexp/CORE"
10388 # ... but on newer macOS versions, we must use -iwithsysroot to look
10389 # under $PG_SYSROOT
10390 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
10391 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
10392 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
10396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
10397 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
10398 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10400 $as_echo "$perl_ccflags" >&6; }
10401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10402 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10403 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10405 $as_echo "$perl_embed_ccflags" >&6; }
10408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10409 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10410 if test "$PORTNAME" = "win32" ; then
10411 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10412 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10413 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10414 else
10415 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10416 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10417 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10420 else
10421 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10422 pgac_tmp2=`$PERL -MConfig -e 'print "$Config{ccdlflags} $Config{ldflags}"'`
10423 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%"`
10425 if test -z "$perl_embed_ldflags" ; then
10426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10427 $as_echo "no" >&6; }
10428 as_fn_error $? "could not determine flags for linking embedded Perl.
10429 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10430 installed." "$LINENO" 5
10431 else
10432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10433 $as_echo "$perl_embed_ldflags" >&6; }
10438 if test "$with_python" = yes; then
10439 if test -z "$PYTHON"; then
10440 for ac_prog in python3 python
10442 # Extract the first word of "$ac_prog", so it can be a program name with args.
10443 set dummy $ac_prog; ac_word=$2
10444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10445 $as_echo_n "checking for $ac_word... " >&6; }
10446 if ${ac_cv_path_PYTHON+:} false; then :
10447 $as_echo_n "(cached) " >&6
10448 else
10449 case $PYTHON in
10450 [\\/]* | ?:[\\/]*)
10451 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10455 for as_dir in $PATH
10457 IFS=$as_save_IFS
10458 test -z "$as_dir" && as_dir=.
10459 for ac_exec_ext in '' $ac_executable_extensions; do
10460 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10461 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10462 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10463 break 2
10465 done
10466 done
10467 IFS=$as_save_IFS
10470 esac
10472 PYTHON=$ac_cv_path_PYTHON
10473 if test -n "$PYTHON"; then
10474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10475 $as_echo "$PYTHON" >&6; }
10476 else
10477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10478 $as_echo "no" >&6; }
10482 test -n "$PYTHON" && break
10483 done
10485 else
10486 # Report the value of PYTHON in configure's output in all cases.
10487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10488 $as_echo_n "checking for PYTHON... " >&6; }
10489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10490 $as_echo "$PYTHON" >&6; }
10493 if test x"$PYTHON" = x""; then
10494 as_fn_error $? "Python not found" "$LINENO" 5
10498 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10499 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10500 $as_echo "$as_me: using python $python_fullversion" >&6;}
10501 # python_fullversion is typically n.n.n plus some trailing junk
10502 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10503 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10504 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10505 # Reject unsupported Python versions as soon as practical.
10506 if test "$python_majorversion" -lt 3; then
10507 as_fn_error $? "Python version $python_version is too old (version 3 or later is required)" "$LINENO" 5
10510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
10511 $as_echo_n "checking for Python sysconfig module... " >&6; }
10512 if "${PYTHON}" -c 'import sysconfig' 2>&5
10513 then
10514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10515 $as_echo "yes" >&6; }
10516 else
10517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10518 $as_echo "no" >&6; }
10519 as_fn_error $? "sysconfig module not found" "$LINENO" 5
10522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10523 $as_echo_n "checking Python configuration directory... " >&6; }
10524 python_configdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBPL'))))"`
10525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10526 $as_echo "$python_configdir" >&6; }
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directory" >&5
10529 $as_echo_n "checking Python include directory... " >&6; }
10530 python_includespec=`${PYTHON} -c "import sysconfig; print('-I' + sysconfig.get_config_var('INCLUDEPY'))"`
10531 if test "$PORTNAME" = win32 ; then
10532 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10535 $as_echo "$python_includespec" >&6; }
10539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10540 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10542 python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10543 python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
10545 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10546 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10547 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10548 then
10549 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10550 found_shlib=1
10551 else
10552 # Otherwise, guess the base name of the shlib.
10553 # LDVERSION was added in Python 3.2, before that use VERSION,
10554 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10555 python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
10556 if test x"${python_ldversion}" != x""; then
10557 ldlibrary="python${python_ldversion}"
10558 else
10559 python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
10560 if test x"${python_version_var}" != x""; then
10561 ldlibrary="python${python_version_var}"
10562 else
10563 ldlibrary="python${python_version}"
10566 # Search for a likely-looking file.
10567 found_shlib=0
10568 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10570 if test -e "$d/lib${ldlibrary}${DLSUFFIX}"; then
10571 python_libdir="$d"
10572 found_shlib=1
10573 break 2
10575 done
10576 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10577 # (".so.n.n") as well. However, check this only after failing to find
10578 # ".so" anywhere, because yet other platforms (Debian) put the .so
10579 # symlink in a different directory from the underlying versioned shlib.
10580 if test "$found_shlib" != 1; then
10581 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10583 for f in "$d/lib${ldlibrary}.so."* ; do
10584 if test -e "$f"; then
10585 python_libdir="$d"
10586 found_shlib=1
10587 break 2
10589 done
10590 done
10592 # As usual, Windows has its own ideas. Possible default library
10593 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10594 # and the "lib" prefix might not be there.
10595 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10596 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10598 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10599 if test -e "$f"; then
10600 python_libdir="$d"
10601 found_shlib=1
10602 break 2
10604 done
10605 done
10608 if test "$found_shlib" != 1; then
10609 as_fn_error $? "could not find shared library for Python
10610 You might have to rebuild your Python installation. Refer to the
10611 documentation for details. Use --without-python to disable building
10612 PL/Python." "$LINENO" 5
10614 python_libspec="-L${python_libdir} -l${ldlibrary}"
10616 python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10619 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10625 if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then
10626 if test -z "$ZIC"; then
10627 for ac_prog in zic
10629 # Extract the first word of "$ac_prog", so it can be a program name with args.
10630 set dummy $ac_prog; ac_word=$2
10631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10632 $as_echo_n "checking for $ac_word... " >&6; }
10633 if ${ac_cv_path_ZIC+:} false; then :
10634 $as_echo_n "(cached) " >&6
10635 else
10636 case $ZIC in
10637 [\\/]* | ?:[\\/]*)
10638 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10642 for as_dir in $PATH
10644 IFS=$as_save_IFS
10645 test -z "$as_dir" && as_dir=.
10646 for ac_exec_ext in '' $ac_executable_extensions; do
10647 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10648 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10649 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10650 break 2
10652 done
10653 done
10654 IFS=$as_save_IFS
10657 esac
10659 ZIC=$ac_cv_path_ZIC
10660 if test -n "$ZIC"; then
10661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10662 $as_echo "$ZIC" >&6; }
10663 else
10664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10665 $as_echo "no" >&6; }
10669 test -n "$ZIC" && break
10670 done
10672 else
10673 # Report the value of ZIC in configure's output in all cases.
10674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10675 $as_echo_n "checking for ZIC... " >&6; }
10676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10677 $as_echo "$ZIC" >&6; }
10680 if test -z "$ZIC"; then
10681 as_fn_error $? "
10682 When cross-compiling, either use the option --with-system-tzdata to use
10683 existing time-zone data, or set the environment variable ZIC to a zic
10684 program to use during the build." "$LINENO" 5
10689 # Pthreads
10691 # For each platform, we need to know about any special compile and link
10692 # libraries, and whether the normal C function names are thread-safe.
10693 # WIN32 doesn't need the pthread tests; it always uses threads
10695 # These tests are run before the library-tests, because linking with the
10696 # other libraries can pull in the pthread functions as a side-effect. We
10697 # want to use the -pthread or similar flags directly, and not rely on
10698 # the side-effects of linking with some other library.
10700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10701 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10702 if ${ac_cv_path_SED+:} false; then :
10703 $as_echo_n "(cached) " >&6
10704 else
10705 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10706 for ac_i in 1 2 3 4 5 6 7; do
10707 ac_script="$ac_script$as_nl$ac_script"
10708 done
10709 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10710 { ac_script=; unset ac_script;}
10711 if test -z "$SED"; then
10712 ac_path_SED_found=false
10713 # Loop through the user's path and test for each of PROGNAME-LIST
10714 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10715 for as_dir in $PATH
10717 IFS=$as_save_IFS
10718 test -z "$as_dir" && as_dir=.
10719 for ac_prog in sed gsed; do
10720 for ac_exec_ext in '' $ac_executable_extensions; do
10721 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10722 as_fn_executable_p "$ac_path_SED" || continue
10723 # Check for GNU ac_path_SED and select it if it is found.
10724 # Check for GNU $ac_path_SED
10725 case `"$ac_path_SED" --version 2>&1` in
10726 *GNU*)
10727 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10729 ac_count=0
10730 $as_echo_n 0123456789 >"conftest.in"
10731 while :
10733 cat "conftest.in" "conftest.in" >"conftest.tmp"
10734 mv "conftest.tmp" "conftest.in"
10735 cp "conftest.in" "conftest.nl"
10736 $as_echo '' >> "conftest.nl"
10737 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10738 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10739 as_fn_arith $ac_count + 1 && ac_count=$as_val
10740 if test $ac_count -gt ${ac_path_SED_max-0}; then
10741 # Best one so far, save it but keep looking for a better one
10742 ac_cv_path_SED="$ac_path_SED"
10743 ac_path_SED_max=$ac_count
10745 # 10*(2^10) chars as input seems more than enough
10746 test $ac_count -gt 10 && break
10747 done
10748 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10749 esac
10751 $ac_path_SED_found && break 3
10752 done
10753 done
10754 done
10755 IFS=$as_save_IFS
10756 if test -z "$ac_cv_path_SED"; then
10757 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10759 else
10760 ac_cv_path_SED=$SED
10764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10765 $as_echo "$ac_cv_path_SED" >&6; }
10766 SED="$ac_cv_path_SED"
10767 rm -f conftest.sed
10770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10771 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10772 if ${ac_cv_path_GREP+:} false; then :
10773 $as_echo_n "(cached) " >&6
10774 else
10775 if test -z "$GREP"; then
10776 ac_path_GREP_found=false
10777 # Loop through the user's path and test for each of PROGNAME-LIST
10778 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10779 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10781 IFS=$as_save_IFS
10782 test -z "$as_dir" && as_dir=.
10783 for ac_prog in grep ggrep; do
10784 for ac_exec_ext in '' $ac_executable_extensions; do
10785 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10786 as_fn_executable_p "$ac_path_GREP" || continue
10787 # Check for GNU ac_path_GREP and select it if it is found.
10788 # Check for GNU $ac_path_GREP
10789 case `"$ac_path_GREP" --version 2>&1` in
10790 *GNU*)
10791 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10793 ac_count=0
10794 $as_echo_n 0123456789 >"conftest.in"
10795 while :
10797 cat "conftest.in" "conftest.in" >"conftest.tmp"
10798 mv "conftest.tmp" "conftest.in"
10799 cp "conftest.in" "conftest.nl"
10800 $as_echo 'GREP' >> "conftest.nl"
10801 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10802 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10803 as_fn_arith $ac_count + 1 && ac_count=$as_val
10804 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10805 # Best one so far, save it but keep looking for a better one
10806 ac_cv_path_GREP="$ac_path_GREP"
10807 ac_path_GREP_max=$ac_count
10809 # 10*(2^10) chars as input seems more than enough
10810 test $ac_count -gt 10 && break
10811 done
10812 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10813 esac
10815 $ac_path_GREP_found && break 3
10816 done
10817 done
10818 done
10819 IFS=$as_save_IFS
10820 if test -z "$ac_cv_path_GREP"; then
10821 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10823 else
10824 ac_cv_path_GREP=$GREP
10828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10829 $as_echo "$ac_cv_path_GREP" >&6; }
10830 GREP="$ac_cv_path_GREP"
10833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10834 $as_echo_n "checking for egrep... " >&6; }
10835 if ${ac_cv_path_EGREP+:} false; then :
10836 $as_echo_n "(cached) " >&6
10837 else
10838 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10839 then ac_cv_path_EGREP="$GREP -E"
10840 else
10841 if test -z "$EGREP"; then
10842 ac_path_EGREP_found=false
10843 # Loop through the user's path and test for each of PROGNAME-LIST
10844 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10845 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10847 IFS=$as_save_IFS
10848 test -z "$as_dir" && as_dir=.
10849 for ac_prog in egrep; do
10850 for ac_exec_ext in '' $ac_executable_extensions; do
10851 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10852 as_fn_executable_p "$ac_path_EGREP" || continue
10853 # Check for GNU ac_path_EGREP and select it if it is found.
10854 # Check for GNU $ac_path_EGREP
10855 case `"$ac_path_EGREP" --version 2>&1` in
10856 *GNU*)
10857 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10859 ac_count=0
10860 $as_echo_n 0123456789 >"conftest.in"
10861 while :
10863 cat "conftest.in" "conftest.in" >"conftest.tmp"
10864 mv "conftest.tmp" "conftest.in"
10865 cp "conftest.in" "conftest.nl"
10866 $as_echo 'EGREP' >> "conftest.nl"
10867 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10868 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10869 as_fn_arith $ac_count + 1 && ac_count=$as_val
10870 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10871 # Best one so far, save it but keep looking for a better one
10872 ac_cv_path_EGREP="$ac_path_EGREP"
10873 ac_path_EGREP_max=$ac_count
10875 # 10*(2^10) chars as input seems more than enough
10876 test $ac_count -gt 10 && break
10877 done
10878 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10879 esac
10881 $ac_path_EGREP_found && break 3
10882 done
10883 done
10884 done
10885 IFS=$as_save_IFS
10886 if test -z "$ac_cv_path_EGREP"; then
10887 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10889 else
10890 ac_cv_path_EGREP=$EGREP
10895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10896 $as_echo "$ac_cv_path_EGREP" >&6; }
10897 EGREP="$ac_cv_path_EGREP"
10900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10901 $as_echo_n "checking for ANSI C header files... " >&6; }
10902 if ${ac_cv_header_stdc+:} false; then :
10903 $as_echo_n "(cached) " >&6
10904 else
10905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10906 /* end confdefs.h. */
10907 #include <stdlib.h>
10908 #include <stdarg.h>
10909 #include <string.h>
10910 #include <float.h>
10913 main ()
10917 return 0;
10919 _ACEOF
10920 if ac_fn_c_try_compile "$LINENO"; then :
10921 ac_cv_header_stdc=yes
10922 else
10923 ac_cv_header_stdc=no
10925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10927 if test $ac_cv_header_stdc = yes; then
10928 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10930 /* end confdefs.h. */
10931 #include <string.h>
10933 _ACEOF
10934 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10935 $EGREP "memchr" >/dev/null 2>&1; then :
10937 else
10938 ac_cv_header_stdc=no
10940 rm -f conftest*
10944 if test $ac_cv_header_stdc = yes; then
10945 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10947 /* end confdefs.h. */
10948 #include <stdlib.h>
10950 _ACEOF
10951 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10952 $EGREP "free" >/dev/null 2>&1; then :
10954 else
10955 ac_cv_header_stdc=no
10957 rm -f conftest*
10961 if test $ac_cv_header_stdc = yes; then
10962 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10963 if test "$cross_compiling" = yes; then :
10965 else
10966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10967 /* end confdefs.h. */
10968 #include <ctype.h>
10969 #include <stdlib.h>
10970 #if ((' ' & 0x0FF) == 0x020)
10971 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10972 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10973 #else
10974 # define ISLOWER(c) \
10975 (('a' <= (c) && (c) <= 'i') \
10976 || ('j' <= (c) && (c) <= 'r') \
10977 || ('s' <= (c) && (c) <= 'z'))
10978 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10979 #endif
10981 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10983 main ()
10985 int i;
10986 for (i = 0; i < 256; i++)
10987 if (XOR (islower (i), ISLOWER (i))
10988 || toupper (i) != TOUPPER (i))
10989 return 2;
10990 return 0;
10992 _ACEOF
10993 if ac_fn_c_try_run "$LINENO"; then :
10995 else
10996 ac_cv_header_stdc=no
10998 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10999 conftest.$ac_objext conftest.beam conftest.$ac_ext
11004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11005 $as_echo "$ac_cv_header_stdc" >&6; }
11006 if test $ac_cv_header_stdc = yes; then
11008 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
11012 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11013 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11014 inttypes.h stdint.h unistd.h
11015 do :
11016 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11017 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
11019 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11020 cat >>confdefs.h <<_ACEOF
11021 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11022 _ACEOF
11026 done
11029 if test "$PORTNAME" != "win32"; then :
11030 # then
11035 ac_ext=c
11036 ac_cpp='$CPP $CPPFLAGS'
11037 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11038 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11039 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11041 ax_pthread_ok=no
11043 # We used to check for pthread.h first, but this fails if pthread.h
11044 # requires special compiler flags (e.g. on Tru64 or Sequent).
11045 # It gets checked for in the link test anyway.
11047 # First of all, check if the user has set any of the PTHREAD_LIBS,
11048 # etcetera environment variables, and if threads linking works using
11049 # them:
11050 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
11051 ax_pthread_save_CC="$CC"
11052 ax_pthread_save_CFLAGS="$CFLAGS"
11053 ax_pthread_save_LIBS="$LIBS"
11054 if test "x$PTHREAD_CC" != "x"; then :
11055 CC="$PTHREAD_CC"
11057 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11058 LIBS="$PTHREAD_LIBS $LIBS"
11059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
11060 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
11061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11062 /* end confdefs.h. */
11064 /* Override any GCC internal prototype to avoid an error.
11065 Use char because int might match the return type of a GCC
11066 builtin and then its argument prototype would still apply. */
11067 #ifdef __cplusplus
11068 extern "C"
11069 #endif
11070 char pthread_join ();
11072 main ()
11074 return pthread_join ();
11076 return 0;
11078 _ACEOF
11079 if ac_fn_c_try_link "$LINENO"; then :
11080 ax_pthread_ok=yes
11082 rm -f core conftest.err conftest.$ac_objext \
11083 conftest$ac_exeext conftest.$ac_ext
11084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11085 $as_echo "$ax_pthread_ok" >&6; }
11086 if test "x$ax_pthread_ok" = "xno"; then
11087 PTHREAD_LIBS=""
11088 PTHREAD_CFLAGS=""
11090 CC="$ax_pthread_save_CC"
11091 CFLAGS="$ax_pthread_save_CFLAGS"
11092 LIBS="$ax_pthread_save_LIBS"
11095 # We must check for the threads library under a number of different
11096 # names; the ordering is very important because some systems
11097 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
11098 # libraries is broken (non-POSIX).
11100 # Create a list of thread flags to try. Items starting with a "-" are
11101 # C compiler flags, and other items are library names, except for "none"
11102 # which indicates that we try without any flags at all, and "pthread-config"
11103 # which is a program returning the flags for the Pth emulation library.
11105 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
11107 # The ordering *is* (sometimes) important. Some notes on the
11108 # individual items follow:
11110 # pthreads: AIX (must check this before -lpthread)
11111 # none: in case threads are in libc; should be tried before -Kthread and
11112 # other compiler flags to prevent continual compiler warnings
11113 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
11114 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
11115 # (Note: HP C rejects this with "bad form for `-t' option")
11116 # -pthreads: Solaris/gcc (Note: HP C also rejects)
11117 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
11118 # doesn't hurt to check since this sometimes defines pthreads and
11119 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
11120 # is present but should not be used directly; and before -mthreads,
11121 # because the compiler interprets this as "-mt" + "-hreads")
11122 # -mthreads: Mingw32/gcc, Lynx/gcc
11123 # pthread: Linux, etcetera
11124 # --thread-safe: KAI C++
11125 # pthread-config: use pthread-config program (for GNU Pth library)
11127 case $host_os in
11129 freebsd*)
11131 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
11132 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
11134 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
11137 hpux*)
11139 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
11140 # multi-threading and also sets -lpthread."
11142 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
11145 openedition*)
11147 # IBM z/OS requires a feature-test macro to be defined in order to
11148 # enable POSIX threads at all, so give the user a hint if this is
11149 # not set. (We don't define these ourselves, as they can affect
11150 # other portions of the system API in unpredictable ways.)
11152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11153 /* end confdefs.h. */
11155 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
11156 AX_PTHREAD_ZOS_MISSING
11157 # endif
11159 _ACEOF
11160 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11161 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
11162 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
11163 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
11165 rm -f conftest*
11169 solaris*)
11171 # On Solaris (at least, for some versions), libc contains stubbed
11172 # (non-functional) versions of the pthreads routines, so link-based
11173 # tests will erroneously succeed. (N.B.: The stubs are missing
11174 # pthread_cleanup_push, or rather a function called by this macro,
11175 # so we could check for that, but who knows whether they'll stub
11176 # that too in a future libc.) So we'll check first for the
11177 # standard Solaris way of linking pthreads (-mt -lpthread).
11179 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
11181 esac
11183 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
11185 if test "x$GCC" = "xyes"; then :
11186 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
11189 # The presence of a feature test macro requesting re-entrant function
11190 # definitions is, on some systems, a strong hint that pthreads support is
11191 # correctly enabled
11193 case $host_os in
11194 darwin* | hpux* | linux* | osf* | solaris*)
11195 ax_pthread_check_macro="_REENTRANT"
11198 aix*)
11199 ax_pthread_check_macro="_THREAD_SAFE"
11203 ax_pthread_check_macro="--"
11205 esac
11206 if test "x$ax_pthread_check_macro" = "x--"; then :
11207 ax_pthread_check_cond=0
11208 else
11209 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
11212 # Are we compiling with Clang?
11214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
11215 $as_echo_n "checking whether $CC is Clang... " >&6; }
11216 if ${ax_cv_PTHREAD_CLANG+:} false; then :
11217 $as_echo_n "(cached) " >&6
11218 else
11219 ax_cv_PTHREAD_CLANG=no
11220 # Note that Autoconf sets GCC=yes for Clang as well as GCC
11221 if test "x$GCC" = "xyes"; then
11222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11223 /* end confdefs.h. */
11224 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
11225 # if defined(__clang__) && defined(__llvm__)
11226 AX_PTHREAD_CC_IS_CLANG
11227 # endif
11229 _ACEOF
11230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11231 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
11232 ax_cv_PTHREAD_CLANG=yes
11234 rm -f conftest*
11239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
11240 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
11241 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
11243 ax_pthread_clang_warning=no
11245 # Clang needs special handling, because older versions handle the -pthread
11246 # option in a rather... idiosyncratic way
11248 if test "x$ax_pthread_clang" = "xyes"; then
11250 # Clang takes -pthread; it has never supported any other flag
11252 # (Note 1: This will need to be revisited if a system that Clang
11253 # supports has POSIX threads in a separate library. This tends not
11254 # to be the way of modern systems, but it's conceivable.)
11256 # (Note 2: On some systems, notably Darwin, -pthread is not needed
11257 # to get POSIX threads support; the API is always present and
11258 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
11259 # -pthread does define _REENTRANT, and while the Darwin headers
11260 # ignore this macro, third-party headers might not.)
11262 PTHREAD_CFLAGS="-pthread"
11263 PTHREAD_LIBS=
11265 ax_pthread_ok=yes
11267 # However, older versions of Clang make a point of warning the user
11268 # that, in an invocation where only linking and no compilation is
11269 # taking place, the -pthread option has no effect ("argument unused
11270 # during compilation"). They expect -pthread to be passed in only
11271 # when source code is being compiled.
11273 # Problem is, this is at odds with the way Automake and most other
11274 # C build frameworks function, which is that the same flags used in
11275 # compilation (CFLAGS) are also used in linking. Many systems
11276 # supported by AX_PTHREAD require exactly this for POSIX threads
11277 # support, and in fact it is often not straightforward to specify a
11278 # flag that is used only in the compilation phase and not in
11279 # linking. Such a scenario is extremely rare in practice.
11281 # Even though use of the -pthread flag in linking would only print
11282 # a warning, this can be a nuisance for well-run software projects
11283 # that build with -Werror. So if the active version of Clang has
11284 # this misfeature, we search for an option to squash it.
11286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
11287 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
11288 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
11289 $as_echo_n "(cached) " >&6
11290 else
11291 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
11292 # Create an alternate version of $ac_link that compiles and
11293 # links in two steps (.c -> .o, .o -> exe) instead of one
11294 # (.c -> exe), because the warning occurs only in the second
11295 # step
11296 ax_pthread_save_ac_link="$ac_link"
11297 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
11298 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
11299 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
11300 ax_pthread_save_CFLAGS="$CFLAGS"
11301 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
11302 if test "x$ax_pthread_try" = "xunknown"; then :
11303 break
11305 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
11306 ac_link="$ax_pthread_save_ac_link"
11307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11308 /* end confdefs.h. */
11309 int main(void){return 0;}
11310 _ACEOF
11311 if ac_fn_c_try_link "$LINENO"; then :
11312 ac_link="$ax_pthread_2step_ac_link"
11313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11314 /* end confdefs.h. */
11315 int main(void){return 0;}
11316 _ACEOF
11317 if ac_fn_c_try_link "$LINENO"; then :
11318 break
11320 rm -f core conftest.err conftest.$ac_objext \
11321 conftest$ac_exeext conftest.$ac_ext
11324 rm -f core conftest.err conftest.$ac_objext \
11325 conftest$ac_exeext conftest.$ac_ext
11326 done
11327 ac_link="$ax_pthread_save_ac_link"
11328 CFLAGS="$ax_pthread_save_CFLAGS"
11329 if test "x$ax_pthread_try" = "x"; then :
11330 ax_pthread_try=no
11332 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
11335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
11336 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
11338 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
11339 no | unknown) ;;
11340 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
11341 esac
11343 fi # $ax_pthread_clang = yes
11345 if test "x$ax_pthread_ok" = "xno"; then
11346 for ax_pthread_try_flag in $ax_pthread_flags; do
11348 case $ax_pthread_try_flag in
11349 none)
11350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
11351 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
11354 -mt,pthread)
11355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
11356 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
11357 PTHREAD_CFLAGS="-mt"
11358 PTHREAD_LIBS="-lpthread"
11362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
11363 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
11364 PTHREAD_CFLAGS="$ax_pthread_try_flag"
11367 pthread-config)
11368 # Extract the first word of "pthread-config", so it can be a program name with args.
11369 set dummy pthread-config; ac_word=$2
11370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11371 $as_echo_n "checking for $ac_word... " >&6; }
11372 if ${ac_cv_prog_ax_pthread_config+:} false; then :
11373 $as_echo_n "(cached) " >&6
11374 else
11375 if test -n "$ax_pthread_config"; then
11376 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
11377 else
11378 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11379 for as_dir in $PATH
11381 IFS=$as_save_IFS
11382 test -z "$as_dir" && as_dir=.
11383 for ac_exec_ext in '' $ac_executable_extensions; do
11384 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11385 ac_cv_prog_ax_pthread_config="yes"
11386 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11387 break 2
11389 done
11390 done
11391 IFS=$as_save_IFS
11393 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
11396 ax_pthread_config=$ac_cv_prog_ax_pthread_config
11397 if test -n "$ax_pthread_config"; then
11398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11399 $as_echo "$ax_pthread_config" >&6; }
11400 else
11401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11402 $as_echo "no" >&6; }
11406 if test "x$ax_pthread_config" = "xno"; then :
11407 continue
11409 PTHREAD_CFLAGS="`pthread-config --cflags`"
11410 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11415 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11416 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11418 esac
11420 ax_pthread_save_CFLAGS="$CFLAGS"
11421 ax_pthread_save_LIBS="$LIBS"
11422 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11423 LIBS="$PTHREAD_LIBS $LIBS"
11425 # Check for various functions. We must include pthread.h,
11426 # since some functions may be macros. (On the Sequent, we
11427 # need a special flag -Kthread to make this header compile.)
11428 # We check for pthread_join because it is in -lpthread on IRIX
11429 # while pthread_create is in libc. We check for pthread_attr_init
11430 # due to DEC craziness with -lpthreads. We check for
11431 # pthread_cleanup_push because it is one of the few pthread
11432 # functions on Solaris that doesn't have a non-functional libc stub.
11433 # We try pthread_create on general principles.
11435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11436 /* end confdefs.h. */
11437 #include <pthread.h>
11438 # if $ax_pthread_check_cond
11439 # error "$ax_pthread_check_macro must be defined"
11440 # endif
11441 static void routine(void *a) { a = 0; }
11442 static void *start_routine(void *a) { return a; }
11444 main ()
11446 pthread_t th; pthread_attr_t attr;
11447 pthread_create(&th, 0, start_routine, 0);
11448 pthread_join(th, 0);
11449 pthread_attr_init(&attr);
11450 pthread_cleanup_push(routine, 0);
11451 pthread_cleanup_pop(0) /* ; */
11453 return 0;
11455 _ACEOF
11456 if ac_fn_c_try_link "$LINENO"; then :
11457 ax_pthread_ok=yes
11459 rm -f core conftest.err conftest.$ac_objext \
11460 conftest$ac_exeext conftest.$ac_ext
11462 CFLAGS="$ax_pthread_save_CFLAGS"
11463 LIBS="$ax_pthread_save_LIBS"
11465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11466 $as_echo "$ax_pthread_ok" >&6; }
11467 if test "x$ax_pthread_ok" = "xyes"; then :
11468 break
11471 PTHREAD_LIBS=""
11472 PTHREAD_CFLAGS=""
11473 done
11476 # Various other checks:
11477 if test "x$ax_pthread_ok" = "xyes"; then
11478 ax_pthread_save_CFLAGS="$CFLAGS"
11479 ax_pthread_save_LIBS="$LIBS"
11480 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11481 LIBS="$PTHREAD_LIBS $LIBS"
11483 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11485 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11486 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11487 $as_echo_n "(cached) " >&6
11488 else
11489 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11490 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11492 /* end confdefs.h. */
11493 #include <pthread.h>
11495 main ()
11497 int attr = $ax_pthread_attr; return attr /* ; */
11499 return 0;
11501 _ACEOF
11502 if ac_fn_c_try_link "$LINENO"; then :
11503 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11505 rm -f core conftest.err conftest.$ac_objext \
11506 conftest$ac_exeext conftest.$ac_ext
11507 done
11510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11511 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11512 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11513 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11514 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11516 cat >>confdefs.h <<_ACEOF
11517 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11518 _ACEOF
11520 ax_pthread_joinable_attr_defined=yes
11524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11525 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11526 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11527 $as_echo_n "(cached) " >&6
11528 else
11529 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11530 case $host_os in
11531 solaris*)
11532 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11534 esac
11537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11538 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11539 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11540 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11541 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11542 ax_pthread_special_flags_added=yes
11545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11546 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11547 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11548 $as_echo_n "(cached) " >&6
11549 else
11550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11551 /* end confdefs.h. */
11552 #include <pthread.h>
11554 main ()
11556 int i = PTHREAD_PRIO_INHERIT;
11558 return 0;
11560 _ACEOF
11561 if ac_fn_c_try_link "$LINENO"; then :
11562 ax_cv_PTHREAD_PRIO_INHERIT=yes
11563 else
11564 ax_cv_PTHREAD_PRIO_INHERIT=no
11566 rm -f core conftest.err conftest.$ac_objext \
11567 conftest$ac_exeext conftest.$ac_ext
11570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11571 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11572 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11573 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11575 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11577 ax_pthread_prio_inherit_defined=yes
11581 CFLAGS="$ax_pthread_save_CFLAGS"
11582 LIBS="$ax_pthread_save_LIBS"
11584 # More AIX lossage: compile with *_r variant
11585 if test "x$GCC" != "xyes"; then
11586 case $host_os in
11587 aix*)
11588 case "x/$CC" in #(
11589 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11590 #handle absolute path differently from PATH based program lookup
11591 case "x$CC" in #(
11592 x/*) :
11593 if as_fn_executable_p ${CC}_r; then :
11594 PTHREAD_CC="${CC}_r"
11595 fi ;; #(
11596 *) :
11597 for ac_prog in ${CC}_r
11599 # Extract the first word of "$ac_prog", so it can be a program name with args.
11600 set dummy $ac_prog; ac_word=$2
11601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11602 $as_echo_n "checking for $ac_word... " >&6; }
11603 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11604 $as_echo_n "(cached) " >&6
11605 else
11606 if test -n "$PTHREAD_CC"; then
11607 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11608 else
11609 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11610 for as_dir in $PATH
11612 IFS=$as_save_IFS
11613 test -z "$as_dir" && as_dir=.
11614 for ac_exec_ext in '' $ac_executable_extensions; do
11615 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11616 ac_cv_prog_PTHREAD_CC="$ac_prog"
11617 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11618 break 2
11620 done
11621 done
11622 IFS=$as_save_IFS
11626 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11627 if test -n "$PTHREAD_CC"; then
11628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11629 $as_echo "$PTHREAD_CC" >&6; }
11630 else
11631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11632 $as_echo "no" >&6; }
11636 test -n "$PTHREAD_CC" && break
11637 done
11638 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11640 esac ;; #(
11641 *) :
11643 esac
11645 esac
11649 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11655 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11656 if test "x$ax_pthread_ok" = "xyes"; then
11658 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11661 else
11662 ax_pthread_ok=no
11665 ac_ext=c
11666 ac_cpp='$CPP $CPPFLAGS'
11667 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11668 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11669 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11671 # set thread flags
11673 # Some platforms use these, so just define them. They can't hurt if they
11674 # are not supported.
11675 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE"
11677 # Check for *_r functions
11678 _CFLAGS="$CFLAGS"
11679 _LIBS="$LIBS"
11680 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11681 LIBS="$LIBS $PTHREAD_LIBS"
11683 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11684 if test "x$ac_cv_header_pthread_h" = xyes; then :
11686 else
11687 as_fn_error $? "
11688 pthread.h not found" "$LINENO" 5
11693 for ac_func in strerror_r
11694 do :
11695 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
11696 if test "x$ac_cv_func_strerror_r" = xyes; then :
11697 cat >>confdefs.h <<_ACEOF
11698 #define HAVE_STRERROR_R 1
11699 _ACEOF
11702 done
11705 # Do test here with the proper thread flags
11706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11707 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11708 if ${pgac_cv_func_strerror_r_int+:} false; then :
11709 $as_echo_n "(cached) " >&6
11710 else
11711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11712 /* end confdefs.h. */
11713 #include <string.h>
11715 main ()
11717 char buf[100];
11718 switch (strerror_r(1, buf, sizeof(buf)))
11719 { case 0: break; default: break; }
11722 return 0;
11724 _ACEOF
11725 if ac_fn_c_try_compile "$LINENO"; then :
11726 pgac_cv_func_strerror_r_int=yes
11727 else
11728 pgac_cv_func_strerror_r_int=no
11730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11733 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11734 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11736 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11741 CFLAGS="$_CFLAGS"
11742 LIBS="$_LIBS"
11745 else
11746 # else
11747 # do not use values from template file
11748 PTHREAD_CFLAGS=
11749 PTHREAD_LIBS=
11751 fi # fi
11758 ## Libraries
11760 ## Most libraries are included only if they demonstrably provide a function
11761 ## we need, but libm is an exception: always include it, because there are
11762 ## too many compilers that play cute optimization games that will break
11763 ## probes for standard functions such as pow().
11766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11767 $as_echo_n "checking for main in -lm... " >&6; }
11768 if ${ac_cv_lib_m_main+:} false; then :
11769 $as_echo_n "(cached) " >&6
11770 else
11771 ac_check_lib_save_LIBS=$LIBS
11772 LIBS="-lm $LIBS"
11773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11774 /* end confdefs.h. */
11778 main ()
11780 return main ();
11782 return 0;
11784 _ACEOF
11785 if ac_fn_c_try_link "$LINENO"; then :
11786 ac_cv_lib_m_main=yes
11787 else
11788 ac_cv_lib_m_main=no
11790 rm -f core conftest.err conftest.$ac_objext \
11791 conftest$ac_exeext conftest.$ac_ext
11792 LIBS=$ac_check_lib_save_LIBS
11794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11795 $as_echo "$ac_cv_lib_m_main" >&6; }
11796 if test "x$ac_cv_lib_m_main" = xyes; then :
11797 cat >>confdefs.h <<_ACEOF
11798 #define HAVE_LIBM 1
11799 _ACEOF
11801 LIBS="-lm $LIBS"
11805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11806 $as_echo_n "checking for library containing setproctitle... " >&6; }
11807 if ${ac_cv_search_setproctitle+:} false; then :
11808 $as_echo_n "(cached) " >&6
11809 else
11810 ac_func_search_save_LIBS=$LIBS
11811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11812 /* end confdefs.h. */
11814 /* Override any GCC internal prototype to avoid an error.
11815 Use char because int might match the return type of a GCC
11816 builtin and then its argument prototype would still apply. */
11817 #ifdef __cplusplus
11818 extern "C"
11819 #endif
11820 char setproctitle ();
11822 main ()
11824 return setproctitle ();
11826 return 0;
11828 _ACEOF
11829 for ac_lib in '' util; do
11830 if test -z "$ac_lib"; then
11831 ac_res="none required"
11832 else
11833 ac_res=-l$ac_lib
11834 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11836 if ac_fn_c_try_link "$LINENO"; then :
11837 ac_cv_search_setproctitle=$ac_res
11839 rm -f core conftest.err conftest.$ac_objext \
11840 conftest$ac_exeext
11841 if ${ac_cv_search_setproctitle+:} false; then :
11842 break
11844 done
11845 if ${ac_cv_search_setproctitle+:} false; then :
11847 else
11848 ac_cv_search_setproctitle=no
11850 rm conftest.$ac_ext
11851 LIBS=$ac_func_search_save_LIBS
11853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11854 $as_echo "$ac_cv_search_setproctitle" >&6; }
11855 ac_res=$ac_cv_search_setproctitle
11856 if test "$ac_res" != no; then :
11857 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11861 # gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
11862 # when enabling asan the dlopen check doesn't notice that -ldl is actually
11863 # required. Just checking for dlsym() ought to suffice.
11864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
11865 $as_echo_n "checking for library containing dlsym... " >&6; }
11866 if ${ac_cv_search_dlsym+:} false; then :
11867 $as_echo_n "(cached) " >&6
11868 else
11869 ac_func_search_save_LIBS=$LIBS
11870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11871 /* end confdefs.h. */
11873 /* Override any GCC internal prototype to avoid an error.
11874 Use char because int might match the return type of a GCC
11875 builtin and then its argument prototype would still apply. */
11876 #ifdef __cplusplus
11877 extern "C"
11878 #endif
11879 char dlsym ();
11881 main ()
11883 return dlsym ();
11885 return 0;
11887 _ACEOF
11888 for ac_lib in '' dl; do
11889 if test -z "$ac_lib"; then
11890 ac_res="none required"
11891 else
11892 ac_res=-l$ac_lib
11893 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11895 if ac_fn_c_try_link "$LINENO"; then :
11896 ac_cv_search_dlsym=$ac_res
11898 rm -f core conftest.err conftest.$ac_objext \
11899 conftest$ac_exeext
11900 if ${ac_cv_search_dlsym+:} false; then :
11901 break
11903 done
11904 if ${ac_cv_search_dlsym+:} false; then :
11906 else
11907 ac_cv_search_dlsym=no
11909 rm conftest.$ac_ext
11910 LIBS=$ac_func_search_save_LIBS
11912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
11913 $as_echo "$ac_cv_search_dlsym" >&6; }
11914 ac_res=$ac_cv_search_dlsym
11915 if test "$ac_res" != no; then :
11916 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11921 $as_echo_n "checking for library containing socket... " >&6; }
11922 if ${ac_cv_search_socket+:} false; then :
11923 $as_echo_n "(cached) " >&6
11924 else
11925 ac_func_search_save_LIBS=$LIBS
11926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11927 /* end confdefs.h. */
11929 /* Override any GCC internal prototype to avoid an error.
11930 Use char because int might match the return type of a GCC
11931 builtin and then its argument prototype would still apply. */
11932 #ifdef __cplusplus
11933 extern "C"
11934 #endif
11935 char socket ();
11937 main ()
11939 return socket ();
11941 return 0;
11943 _ACEOF
11944 for ac_lib in '' socket ws2_32; do
11945 if test -z "$ac_lib"; then
11946 ac_res="none required"
11947 else
11948 ac_res=-l$ac_lib
11949 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11951 if ac_fn_c_try_link "$LINENO"; then :
11952 ac_cv_search_socket=$ac_res
11954 rm -f core conftest.err conftest.$ac_objext \
11955 conftest$ac_exeext
11956 if ${ac_cv_search_socket+:} false; then :
11957 break
11959 done
11960 if ${ac_cv_search_socket+:} false; then :
11962 else
11963 ac_cv_search_socket=no
11965 rm conftest.$ac_ext
11966 LIBS=$ac_func_search_save_LIBS
11968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11969 $as_echo "$ac_cv_search_socket" >&6; }
11970 ac_res=$ac_cv_search_socket
11971 if test "$ac_res" != no; then :
11972 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11977 $as_echo_n "checking for library containing getopt_long... " >&6; }
11978 if ${ac_cv_search_getopt_long+:} false; then :
11979 $as_echo_n "(cached) " >&6
11980 else
11981 ac_func_search_save_LIBS=$LIBS
11982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11983 /* end confdefs.h. */
11985 /* Override any GCC internal prototype to avoid an error.
11986 Use char because int might match the return type of a GCC
11987 builtin and then its argument prototype would still apply. */
11988 #ifdef __cplusplus
11989 extern "C"
11990 #endif
11991 char getopt_long ();
11993 main ()
11995 return getopt_long ();
11997 return 0;
11999 _ACEOF
12000 for ac_lib in '' getopt gnugetopt; do
12001 if test -z "$ac_lib"; then
12002 ac_res="none required"
12003 else
12004 ac_res=-l$ac_lib
12005 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12007 if ac_fn_c_try_link "$LINENO"; then :
12008 ac_cv_search_getopt_long=$ac_res
12010 rm -f core conftest.err conftest.$ac_objext \
12011 conftest$ac_exeext
12012 if ${ac_cv_search_getopt_long+:} false; then :
12013 break
12015 done
12016 if ${ac_cv_search_getopt_long+:} false; then :
12018 else
12019 ac_cv_search_getopt_long=no
12021 rm conftest.$ac_ext
12022 LIBS=$ac_func_search_save_LIBS
12024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
12025 $as_echo "$ac_cv_search_getopt_long" >&6; }
12026 ac_res=$ac_cv_search_getopt_long
12027 if test "$ac_res" != no; then :
12028 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
12033 $as_echo_n "checking for library containing shm_open... " >&6; }
12034 if ${ac_cv_search_shm_open+:} false; then :
12035 $as_echo_n "(cached) " >&6
12036 else
12037 ac_func_search_save_LIBS=$LIBS
12038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12039 /* end confdefs.h. */
12041 /* Override any GCC internal prototype to avoid an error.
12042 Use char because int might match the return type of a GCC
12043 builtin and then its argument prototype would still apply. */
12044 #ifdef __cplusplus
12045 extern "C"
12046 #endif
12047 char shm_open ();
12049 main ()
12051 return shm_open ();
12053 return 0;
12055 _ACEOF
12056 for ac_lib in '' rt; do
12057 if test -z "$ac_lib"; then
12058 ac_res="none required"
12059 else
12060 ac_res=-l$ac_lib
12061 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12063 if ac_fn_c_try_link "$LINENO"; then :
12064 ac_cv_search_shm_open=$ac_res
12066 rm -f core conftest.err conftest.$ac_objext \
12067 conftest$ac_exeext
12068 if ${ac_cv_search_shm_open+:} false; then :
12069 break
12071 done
12072 if ${ac_cv_search_shm_open+:} false; then :
12074 else
12075 ac_cv_search_shm_open=no
12077 rm conftest.$ac_ext
12078 LIBS=$ac_func_search_save_LIBS
12080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
12081 $as_echo "$ac_cv_search_shm_open" >&6; }
12082 ac_res=$ac_cv_search_shm_open
12083 if test "$ac_res" != no; then :
12084 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
12089 $as_echo_n "checking for library containing shm_unlink... " >&6; }
12090 if ${ac_cv_search_shm_unlink+:} false; then :
12091 $as_echo_n "(cached) " >&6
12092 else
12093 ac_func_search_save_LIBS=$LIBS
12094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12095 /* end confdefs.h. */
12097 /* Override any GCC internal prototype to avoid an error.
12098 Use char because int might match the return type of a GCC
12099 builtin and then its argument prototype would still apply. */
12100 #ifdef __cplusplus
12101 extern "C"
12102 #endif
12103 char shm_unlink ();
12105 main ()
12107 return shm_unlink ();
12109 return 0;
12111 _ACEOF
12112 for ac_lib in '' rt; do
12113 if test -z "$ac_lib"; then
12114 ac_res="none required"
12115 else
12116 ac_res=-l$ac_lib
12117 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12119 if ac_fn_c_try_link "$LINENO"; then :
12120 ac_cv_search_shm_unlink=$ac_res
12122 rm -f core conftest.err conftest.$ac_objext \
12123 conftest$ac_exeext
12124 if ${ac_cv_search_shm_unlink+:} false; then :
12125 break
12127 done
12128 if ${ac_cv_search_shm_unlink+:} false; then :
12130 else
12131 ac_cv_search_shm_unlink=no
12133 rm conftest.$ac_ext
12134 LIBS=$ac_func_search_save_LIBS
12136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
12137 $as_echo "$ac_cv_search_shm_unlink" >&6; }
12138 ac_res=$ac_cv_search_shm_unlink
12139 if test "$ac_res" != no; then :
12140 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
12145 $as_echo_n "checking for library containing clock_gettime... " >&6; }
12146 if ${ac_cv_search_clock_gettime+:} false; then :
12147 $as_echo_n "(cached) " >&6
12148 else
12149 ac_func_search_save_LIBS=$LIBS
12150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12151 /* end confdefs.h. */
12153 /* Override any GCC internal prototype to avoid an error.
12154 Use char because int might match the return type of a GCC
12155 builtin and then its argument prototype would still apply. */
12156 #ifdef __cplusplus
12157 extern "C"
12158 #endif
12159 char clock_gettime ();
12161 main ()
12163 return clock_gettime ();
12165 return 0;
12167 _ACEOF
12168 for ac_lib in '' rt; do
12169 if test -z "$ac_lib"; then
12170 ac_res="none required"
12171 else
12172 ac_res=-l$ac_lib
12173 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12175 if ac_fn_c_try_link "$LINENO"; then :
12176 ac_cv_search_clock_gettime=$ac_res
12178 rm -f core conftest.err conftest.$ac_objext \
12179 conftest$ac_exeext
12180 if ${ac_cv_search_clock_gettime+:} false; then :
12181 break
12183 done
12184 if ${ac_cv_search_clock_gettime+:} false; then :
12186 else
12187 ac_cv_search_clock_gettime=no
12189 rm conftest.$ac_ext
12190 LIBS=$ac_func_search_save_LIBS
12192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
12193 $as_echo "$ac_cv_search_clock_gettime" >&6; }
12194 ac_res=$ac_cv_search_clock_gettime
12195 if test "$ac_res" != no; then :
12196 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12200 # Cygwin:
12201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
12202 $as_echo_n "checking for library containing shmget... " >&6; }
12203 if ${ac_cv_search_shmget+:} false; then :
12204 $as_echo_n "(cached) " >&6
12205 else
12206 ac_func_search_save_LIBS=$LIBS
12207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12208 /* end confdefs.h. */
12210 /* Override any GCC internal prototype to avoid an error.
12211 Use char because int might match the return type of a GCC
12212 builtin and then its argument prototype would still apply. */
12213 #ifdef __cplusplus
12214 extern "C"
12215 #endif
12216 char shmget ();
12218 main ()
12220 return shmget ();
12222 return 0;
12224 _ACEOF
12225 for ac_lib in '' cygipc; do
12226 if test -z "$ac_lib"; then
12227 ac_res="none required"
12228 else
12229 ac_res=-l$ac_lib
12230 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12232 if ac_fn_c_try_link "$LINENO"; then :
12233 ac_cv_search_shmget=$ac_res
12235 rm -f core conftest.err conftest.$ac_objext \
12236 conftest$ac_exeext
12237 if ${ac_cv_search_shmget+:} false; then :
12238 break
12240 done
12241 if ${ac_cv_search_shmget+:} false; then :
12243 else
12244 ac_cv_search_shmget=no
12246 rm conftest.$ac_ext
12247 LIBS=$ac_func_search_save_LIBS
12249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
12250 $as_echo "$ac_cv_search_shmget" >&6; }
12251 ac_res=$ac_cv_search_shmget
12252 if test "$ac_res" != no; then :
12253 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12257 # *BSD:
12258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
12259 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
12260 if ${ac_cv_search_backtrace_symbols+:} false; then :
12261 $as_echo_n "(cached) " >&6
12262 else
12263 ac_func_search_save_LIBS=$LIBS
12264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12265 /* end confdefs.h. */
12267 /* Override any GCC internal prototype to avoid an error.
12268 Use char because int might match the return type of a GCC
12269 builtin and then its argument prototype would still apply. */
12270 #ifdef __cplusplus
12271 extern "C"
12272 #endif
12273 char backtrace_symbols ();
12275 main ()
12277 return backtrace_symbols ();
12279 return 0;
12281 _ACEOF
12282 for ac_lib in '' execinfo; do
12283 if test -z "$ac_lib"; then
12284 ac_res="none required"
12285 else
12286 ac_res=-l$ac_lib
12287 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12289 if ac_fn_c_try_link "$LINENO"; then :
12290 ac_cv_search_backtrace_symbols=$ac_res
12292 rm -f core conftest.err conftest.$ac_objext \
12293 conftest$ac_exeext
12294 if ${ac_cv_search_backtrace_symbols+:} false; then :
12295 break
12297 done
12298 if ${ac_cv_search_backtrace_symbols+:} false; then :
12300 else
12301 ac_cv_search_backtrace_symbols=no
12303 rm conftest.$ac_ext
12304 LIBS=$ac_func_search_save_LIBS
12306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
12307 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
12308 ac_res=$ac_cv_search_backtrace_symbols
12309 if test "$ac_res" != no; then :
12310 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
12316 $as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
12317 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12318 $as_echo_n "(cached) " >&6
12319 else
12320 ac_func_search_save_LIBS=$LIBS
12321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12322 /* end confdefs.h. */
12324 /* Override any GCC internal prototype to avoid an error.
12325 Use char because int might match the return type of a GCC
12326 builtin and then its argument prototype would still apply. */
12327 #ifdef __cplusplus
12328 extern "C"
12329 #endif
12330 char pthread_barrier_wait ();
12332 main ()
12334 return pthread_barrier_wait ();
12336 return 0;
12338 _ACEOF
12339 for ac_lib in '' pthread; do
12340 if test -z "$ac_lib"; then
12341 ac_res="none required"
12342 else
12343 ac_res=-l$ac_lib
12344 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12346 if ac_fn_c_try_link "$LINENO"; then :
12347 ac_cv_search_pthread_barrier_wait=$ac_res
12349 rm -f core conftest.err conftest.$ac_objext \
12350 conftest$ac_exeext
12351 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12352 break
12354 done
12355 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12357 else
12358 ac_cv_search_pthread_barrier_wait=no
12360 rm conftest.$ac_ext
12361 LIBS=$ac_func_search_save_LIBS
12363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_barrier_wait" >&5
12364 $as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
12365 ac_res=$ac_cv_search_pthread_barrier_wait
12366 if test "$ac_res" != no; then :
12367 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12372 if test "$with_readline" = yes; then
12375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
12376 $as_echo_n "checking for library containing readline... " >&6; }
12377 if ${pgac_cv_check_readline+:} false; then :
12378 $as_echo_n "(cached) " >&6
12379 else
12380 pgac_cv_check_readline=no
12381 pgac_save_LIBS=$LIBS
12382 if test x"$with_libedit_preferred" != x"yes"
12383 then READLINE_ORDER="-lreadline -ledit"
12384 else READLINE_ORDER="-ledit -lreadline"
12386 for pgac_rllib in $READLINE_ORDER ; do
12387 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
12388 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
12389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12390 /* end confdefs.h. */
12392 /* Override any GCC internal prototype to avoid an error.
12393 Use char because int might match the return type of a GCC
12394 builtin and then its argument prototype would still apply. */
12395 #ifdef __cplusplus
12396 extern "C"
12397 #endif
12398 char readline ();
12400 main ()
12402 return readline ();
12404 return 0;
12406 _ACEOF
12407 if ac_fn_c_try_link "$LINENO"; then :
12409 # Older NetBSD and OpenBSD have a broken linker that does not
12410 # recognize dependent libraries; assume curses is needed if we didn't
12411 # find any dependency.
12412 case $host_os in
12413 netbsd* | openbsd*)
12414 if test x"$pgac_lib" = x"" ; then
12415 pgac_lib=" -lcurses"
12416 fi ;;
12417 esac
12419 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12420 break
12423 rm -f core conftest.err conftest.$ac_objext \
12424 conftest$ac_exeext conftest.$ac_ext
12425 done
12426 if test "$pgac_cv_check_readline" != no ; then
12427 break
12429 done
12430 LIBS=$pgac_save_LIBS
12433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12434 $as_echo "$pgac_cv_check_readline" >&6; }
12435 if test "$pgac_cv_check_readline" != no ; then
12436 LIBS="$pgac_cv_check_readline $LIBS"
12438 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12443 if test x"$pgac_cv_check_readline" = x"no"; then
12444 as_fn_error $? "readline library not found
12445 If you have readline already installed, see config.log for details on the
12446 failure. It is possible the compiler isn't looking in the proper directory.
12447 Use --without-readline to disable readline support." "$LINENO" 5
12451 if test "$with_zlib" = yes; then
12452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12453 $as_echo_n "checking for inflate in -lz... " >&6; }
12454 if ${ac_cv_lib_z_inflate+:} false; then :
12455 $as_echo_n "(cached) " >&6
12456 else
12457 ac_check_lib_save_LIBS=$LIBS
12458 LIBS="-lz $LIBS"
12459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12460 /* end confdefs.h. */
12462 /* Override any GCC internal prototype to avoid an error.
12463 Use char because int might match the return type of a GCC
12464 builtin and then its argument prototype would still apply. */
12465 #ifdef __cplusplus
12466 extern "C"
12467 #endif
12468 char inflate ();
12470 main ()
12472 return inflate ();
12474 return 0;
12476 _ACEOF
12477 if ac_fn_c_try_link "$LINENO"; then :
12478 ac_cv_lib_z_inflate=yes
12479 else
12480 ac_cv_lib_z_inflate=no
12482 rm -f core conftest.err conftest.$ac_objext \
12483 conftest$ac_exeext conftest.$ac_ext
12484 LIBS=$ac_check_lib_save_LIBS
12486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12487 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12488 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12489 cat >>confdefs.h <<_ACEOF
12490 #define HAVE_LIBZ 1
12491 _ACEOF
12493 LIBS="-lz $LIBS"
12495 else
12496 as_fn_error $? "zlib library not found
12497 If you have zlib already installed, see config.log for details on the
12498 failure. It is possible the compiler isn't looking in the proper directory.
12499 Use --without-zlib to disable zlib support." "$LINENO" 5
12504 if test "$enable_spinlocks" = yes; then
12506 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
12508 else
12509 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12510 *** Not using spinlocks will cause poor performance." >&5
12511 $as_echo "$as_me: WARNING:
12512 *** Not using spinlocks will cause poor performance." >&2;}
12515 if test "$enable_atomics" = yes; then
12517 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
12519 else
12520 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12521 *** Not using atomic operations will cause poor performance." >&5
12522 $as_echo "$as_me: WARNING:
12523 *** Not using atomic operations will cause poor performance." >&2;}
12526 if test "$with_gssapi" = yes ; then
12527 if test "$PORTNAME" != "win32"; then
12528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_store_cred_into" >&5
12529 $as_echo_n "checking for library containing gss_store_cred_into... " >&6; }
12530 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12531 $as_echo_n "(cached) " >&6
12532 else
12533 ac_func_search_save_LIBS=$LIBS
12534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12535 /* end confdefs.h. */
12537 /* Override any GCC internal prototype to avoid an error.
12538 Use char because int might match the return type of a GCC
12539 builtin and then its argument prototype would still apply. */
12540 #ifdef __cplusplus
12541 extern "C"
12542 #endif
12543 char gss_store_cred_into ();
12545 main ()
12547 return gss_store_cred_into ();
12549 return 0;
12551 _ACEOF
12552 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12553 if test -z "$ac_lib"; then
12554 ac_res="none required"
12555 else
12556 ac_res=-l$ac_lib
12557 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12559 if ac_fn_c_try_link "$LINENO"; then :
12560 ac_cv_search_gss_store_cred_into=$ac_res
12562 rm -f core conftest.err conftest.$ac_objext \
12563 conftest$ac_exeext
12564 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12565 break
12567 done
12568 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12570 else
12571 ac_cv_search_gss_store_cred_into=no
12573 rm conftest.$ac_ext
12574 LIBS=$ac_func_search_save_LIBS
12576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_store_cred_into" >&5
12577 $as_echo "$ac_cv_search_gss_store_cred_into" >&6; }
12578 ac_res=$ac_cv_search_gss_store_cred_into
12579 if test "$ac_res" != no; then :
12580 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12582 else
12583 as_fn_error $? "could not find function 'gss_store_cred_into' required for GSSAPI" "$LINENO" 5
12586 else
12587 LIBS="$LIBS -lgssapi32"
12592 # SSL Library
12594 # There is currently only one supported SSL/TLS library: OpenSSL.
12599 # Check whether --with-ssl was given.
12600 if test "${with_ssl+set}" = set; then :
12601 withval=$with_ssl;
12602 case $withval in
12603 yes)
12604 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12607 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12612 esac
12617 if test x"$with_ssl" = x"" ; then
12618 with_ssl=no
12623 # Check whether --with-openssl was given.
12624 if test "${with_openssl+set}" = set; then :
12625 withval=$with_openssl;
12626 case $withval in
12627 yes)
12634 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12636 esac
12638 else
12639 with_openssl=no
12644 if test "$with_openssl" = yes ; then
12645 with_ssl=openssl
12648 if test "$with_ssl" = openssl ; then
12649 # Minimum required OpenSSL version is 1.0.2
12651 $as_echo "#define OPENSSL_API_COMPAT 0x10002000L" >>confdefs.h
12653 if test "$PORTNAME" != "win32"; then
12654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12655 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12656 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12657 $as_echo_n "(cached) " >&6
12658 else
12659 ac_check_lib_save_LIBS=$LIBS
12660 LIBS="-lcrypto $LIBS"
12661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12662 /* end confdefs.h. */
12664 /* Override any GCC internal prototype to avoid an error.
12665 Use char because int might match the return type of a GCC
12666 builtin and then its argument prototype would still apply. */
12667 #ifdef __cplusplus
12668 extern "C"
12669 #endif
12670 char CRYPTO_new_ex_data ();
12672 main ()
12674 return CRYPTO_new_ex_data ();
12676 return 0;
12678 _ACEOF
12679 if ac_fn_c_try_link "$LINENO"; then :
12680 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12681 else
12682 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12684 rm -f core conftest.err conftest.$ac_objext \
12685 conftest$ac_exeext conftest.$ac_ext
12686 LIBS=$ac_check_lib_save_LIBS
12688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12689 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12690 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12691 cat >>confdefs.h <<_ACEOF
12692 #define HAVE_LIBCRYPTO 1
12693 _ACEOF
12695 LIBS="-lcrypto $LIBS"
12697 else
12698 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12702 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12703 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12704 $as_echo_n "(cached) " >&6
12705 else
12706 ac_check_lib_save_LIBS=$LIBS
12707 LIBS="-lssl $LIBS"
12708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12709 /* end confdefs.h. */
12711 /* Override any GCC internal prototype to avoid an error.
12712 Use char because int might match the return type of a GCC
12713 builtin and then its argument prototype would still apply. */
12714 #ifdef __cplusplus
12715 extern "C"
12716 #endif
12717 char SSL_new ();
12719 main ()
12721 return SSL_new ();
12723 return 0;
12725 _ACEOF
12726 if ac_fn_c_try_link "$LINENO"; then :
12727 ac_cv_lib_ssl_SSL_new=yes
12728 else
12729 ac_cv_lib_ssl_SSL_new=no
12731 rm -f core conftest.err conftest.$ac_objext \
12732 conftest$ac_exeext conftest.$ac_ext
12733 LIBS=$ac_check_lib_save_LIBS
12735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12736 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12737 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12738 cat >>confdefs.h <<_ACEOF
12739 #define HAVE_LIBSSL 1
12740 _ACEOF
12742 LIBS="-lssl $LIBS"
12744 else
12745 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12748 else
12749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12750 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12751 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12752 $as_echo_n "(cached) " >&6
12753 else
12754 ac_func_search_save_LIBS=$LIBS
12755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12756 /* end confdefs.h. */
12758 /* Override any GCC internal prototype to avoid an error.
12759 Use char because int might match the return type of a GCC
12760 builtin and then its argument prototype would still apply. */
12761 #ifdef __cplusplus
12762 extern "C"
12763 #endif
12764 char CRYPTO_new_ex_data ();
12766 main ()
12768 return CRYPTO_new_ex_data ();
12770 return 0;
12772 _ACEOF
12773 for ac_lib in '' eay32 crypto; do
12774 if test -z "$ac_lib"; then
12775 ac_res="none required"
12776 else
12777 ac_res=-l$ac_lib
12778 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12780 if ac_fn_c_try_link "$LINENO"; then :
12781 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12783 rm -f core conftest.err conftest.$ac_objext \
12784 conftest$ac_exeext
12785 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12786 break
12788 done
12789 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12791 else
12792 ac_cv_search_CRYPTO_new_ex_data=no
12794 rm conftest.$ac_ext
12795 LIBS=$ac_func_search_save_LIBS
12797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12798 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12799 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12800 if test "$ac_res" != no; then :
12801 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12803 else
12804 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12808 $as_echo_n "checking for library containing SSL_new... " >&6; }
12809 if ${ac_cv_search_SSL_new+:} false; then :
12810 $as_echo_n "(cached) " >&6
12811 else
12812 ac_func_search_save_LIBS=$LIBS
12813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12814 /* end confdefs.h. */
12816 /* Override any GCC internal prototype to avoid an error.
12817 Use char because int might match the return type of a GCC
12818 builtin and then its argument prototype would still apply. */
12819 #ifdef __cplusplus
12820 extern "C"
12821 #endif
12822 char SSL_new ();
12824 main ()
12826 return SSL_new ();
12828 return 0;
12830 _ACEOF
12831 for ac_lib in '' ssleay32 ssl; do
12832 if test -z "$ac_lib"; then
12833 ac_res="none required"
12834 else
12835 ac_res=-l$ac_lib
12836 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12838 if ac_fn_c_try_link "$LINENO"; then :
12839 ac_cv_search_SSL_new=$ac_res
12841 rm -f core conftest.err conftest.$ac_objext \
12842 conftest$ac_exeext
12843 if ${ac_cv_search_SSL_new+:} false; then :
12844 break
12846 done
12847 if ${ac_cv_search_SSL_new+:} false; then :
12849 else
12850 ac_cv_search_SSL_new=no
12852 rm conftest.$ac_ext
12853 LIBS=$ac_func_search_save_LIBS
12855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12856 $as_echo "$ac_cv_search_SSL_new" >&6; }
12857 ac_res=$ac_cv_search_SSL_new
12858 if test "$ac_res" != no; then :
12859 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12861 else
12862 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12866 # Function introduced in OpenSSL 1.0.2, not in LibreSSL.
12867 for ac_func in SSL_CTX_set_cert_cb
12868 do :
12869 ac_fn_c_check_func "$LINENO" "SSL_CTX_set_cert_cb" "ac_cv_func_SSL_CTX_set_cert_cb"
12870 if test "x$ac_cv_func_SSL_CTX_set_cert_cb" = xyes; then :
12871 cat >>confdefs.h <<_ACEOF
12872 #define HAVE_SSL_CTX_SET_CERT_CB 1
12873 _ACEOF
12876 done
12878 # Functions introduced in OpenSSL 1.1.0. We used to check for
12879 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12880 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12881 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12882 # functions.
12883 for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free
12884 do :
12885 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12886 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12887 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12888 cat >>confdefs.h <<_ACEOF
12889 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12890 _ACEOF
12893 done
12895 # OpenSSL versions before 1.1.0 required setting callback functions, for
12896 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12897 # function was removed.
12898 for ac_func in CRYPTO_lock
12899 do :
12900 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12901 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12902 cat >>confdefs.h <<_ACEOF
12903 #define HAVE_CRYPTO_LOCK 1
12904 _ACEOF
12907 done
12909 # Function introduced in OpenSSL 1.1.1.
12910 for ac_func in X509_get_signature_info
12911 do :
12912 ac_fn_c_check_func "$LINENO" "X509_get_signature_info" "ac_cv_func_X509_get_signature_info"
12913 if test "x$ac_cv_func_X509_get_signature_info" = xyes; then :
12914 cat >>confdefs.h <<_ACEOF
12915 #define HAVE_X509_GET_SIGNATURE_INFO 1
12916 _ACEOF
12919 done
12922 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
12924 elif test "$with_ssl" != no ; then
12925 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
12929 if test "$with_pam" = yes ; then
12930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12931 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12932 if ${ac_cv_lib_pam_pam_start+:} false; then :
12933 $as_echo_n "(cached) " >&6
12934 else
12935 ac_check_lib_save_LIBS=$LIBS
12936 LIBS="-lpam $LIBS"
12937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12938 /* end confdefs.h. */
12940 /* Override any GCC internal prototype to avoid an error.
12941 Use char because int might match the return type of a GCC
12942 builtin and then its argument prototype would still apply. */
12943 #ifdef __cplusplus
12944 extern "C"
12945 #endif
12946 char pam_start ();
12948 main ()
12950 return pam_start ();
12952 return 0;
12954 _ACEOF
12955 if ac_fn_c_try_link "$LINENO"; then :
12956 ac_cv_lib_pam_pam_start=yes
12957 else
12958 ac_cv_lib_pam_pam_start=no
12960 rm -f core conftest.err conftest.$ac_objext \
12961 conftest$ac_exeext conftest.$ac_ext
12962 LIBS=$ac_check_lib_save_LIBS
12964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12965 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12966 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12967 cat >>confdefs.h <<_ACEOF
12968 #define HAVE_LIBPAM 1
12969 _ACEOF
12971 LIBS="-lpam $LIBS"
12973 else
12974 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12979 if test "$with_libxml" = yes ; then
12980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12981 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12982 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12983 $as_echo_n "(cached) " >&6
12984 else
12985 ac_check_lib_save_LIBS=$LIBS
12986 LIBS="-lxml2 $LIBS"
12987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12988 /* end confdefs.h. */
12990 /* Override any GCC internal prototype to avoid an error.
12991 Use char because int might match the return type of a GCC
12992 builtin and then its argument prototype would still apply. */
12993 #ifdef __cplusplus
12994 extern "C"
12995 #endif
12996 char xmlSaveToBuffer ();
12998 main ()
13000 return xmlSaveToBuffer ();
13002 return 0;
13004 _ACEOF
13005 if ac_fn_c_try_link "$LINENO"; then :
13006 ac_cv_lib_xml2_xmlSaveToBuffer=yes
13007 else
13008 ac_cv_lib_xml2_xmlSaveToBuffer=no
13010 rm -f core conftest.err conftest.$ac_objext \
13011 conftest$ac_exeext conftest.$ac_ext
13012 LIBS=$ac_check_lib_save_LIBS
13014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
13015 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
13016 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
13017 cat >>confdefs.h <<_ACEOF
13018 #define HAVE_LIBXML2 1
13019 _ACEOF
13021 LIBS="-lxml2 $LIBS"
13023 else
13024 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
13029 if test "$with_libxslt" = yes ; then
13030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
13031 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
13032 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
13033 $as_echo_n "(cached) " >&6
13034 else
13035 ac_check_lib_save_LIBS=$LIBS
13036 LIBS="-lxslt $LIBS"
13037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13038 /* end confdefs.h. */
13040 /* Override any GCC internal prototype to avoid an error.
13041 Use char because int might match the return type of a GCC
13042 builtin and then its argument prototype would still apply. */
13043 #ifdef __cplusplus
13044 extern "C"
13045 #endif
13046 char xsltCleanupGlobals ();
13048 main ()
13050 return xsltCleanupGlobals ();
13052 return 0;
13054 _ACEOF
13055 if ac_fn_c_try_link "$LINENO"; then :
13056 ac_cv_lib_xslt_xsltCleanupGlobals=yes
13057 else
13058 ac_cv_lib_xslt_xsltCleanupGlobals=no
13060 rm -f core conftest.err conftest.$ac_objext \
13061 conftest$ac_exeext conftest.$ac_ext
13062 LIBS=$ac_check_lib_save_LIBS
13064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
13065 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
13066 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
13067 cat >>confdefs.h <<_ACEOF
13068 #define HAVE_LIBXSLT 1
13069 _ACEOF
13071 LIBS="-lxslt $LIBS"
13073 else
13074 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
13079 if test "$with_lz4" = yes ; then
13080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
13081 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
13082 if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
13083 $as_echo_n "(cached) " >&6
13084 else
13085 ac_check_lib_save_LIBS=$LIBS
13086 LIBS="-llz4 $LIBS"
13087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13088 /* end confdefs.h. */
13090 /* Override any GCC internal prototype to avoid an error.
13091 Use char because int might match the return type of a GCC
13092 builtin and then its argument prototype would still apply. */
13093 #ifdef __cplusplus
13094 extern "C"
13095 #endif
13096 char LZ4_compress_default ();
13098 main ()
13100 return LZ4_compress_default ();
13102 return 0;
13104 _ACEOF
13105 if ac_fn_c_try_link "$LINENO"; then :
13106 ac_cv_lib_lz4_LZ4_compress_default=yes
13107 else
13108 ac_cv_lib_lz4_LZ4_compress_default=no
13110 rm -f core conftest.err conftest.$ac_objext \
13111 conftest$ac_exeext conftest.$ac_ext
13112 LIBS=$ac_check_lib_save_LIBS
13114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5
13115 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
13116 if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
13117 cat >>confdefs.h <<_ACEOF
13118 #define HAVE_LIBLZ4 1
13119 _ACEOF
13121 LIBS="-llz4 $LIBS"
13123 else
13124 as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
13129 if test "$with_zstd" = yes ; then
13130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5
13131 $as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; }
13132 if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then :
13133 $as_echo_n "(cached) " >&6
13134 else
13135 ac_check_lib_save_LIBS=$LIBS
13136 LIBS="-lzstd $LIBS"
13137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13138 /* end confdefs.h. */
13140 /* Override any GCC internal prototype to avoid an error.
13141 Use char because int might match the return type of a GCC
13142 builtin and then its argument prototype would still apply. */
13143 #ifdef __cplusplus
13144 extern "C"
13145 #endif
13146 char ZSTD_compress ();
13148 main ()
13150 return ZSTD_compress ();
13152 return 0;
13154 _ACEOF
13155 if ac_fn_c_try_link "$LINENO"; then :
13156 ac_cv_lib_zstd_ZSTD_compress=yes
13157 else
13158 ac_cv_lib_zstd_ZSTD_compress=no
13160 rm -f core conftest.err conftest.$ac_objext \
13161 conftest$ac_exeext conftest.$ac_ext
13162 LIBS=$ac_check_lib_save_LIBS
13164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5
13165 $as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; }
13166 if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then :
13167 cat >>confdefs.h <<_ACEOF
13168 #define HAVE_LIBZSTD 1
13169 _ACEOF
13171 LIBS="-lzstd $LIBS"
13173 else
13174 as_fn_error $? "library 'zstd' is required for ZSTD support" "$LINENO" 5
13179 # Note: We can test for libldap_r only after we know PTHREAD_LIBS;
13180 # also, on AIX, we may need to have openssl in LIBS for this step.
13181 if test "$with_ldap" = yes ; then
13182 _LIBS="$LIBS"
13183 if test "$PORTNAME" != "win32"; then
13184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
13185 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
13186 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
13187 $as_echo_n "(cached) " >&6
13188 else
13189 ac_check_lib_save_LIBS=$LIBS
13190 LIBS="-lldap $EXTRA_LDAP_LIBS $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 ldap_bind ();
13202 main ()
13204 return ldap_bind ();
13206 return 0;
13208 _ACEOF
13209 if ac_fn_c_try_link "$LINENO"; then :
13210 ac_cv_lib_ldap_ldap_bind=yes
13211 else
13212 ac_cv_lib_ldap_ldap_bind=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_ldap_ldap_bind" >&5
13219 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
13220 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
13221 cat >>confdefs.h <<_ACEOF
13222 #define HAVE_LIBLDAP 1
13223 _ACEOF
13225 LIBS="-lldap $LIBS"
13227 else
13228 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
13231 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
13232 # This test is carried out against libldap.
13233 for ac_func in ldap_initialize
13234 do :
13235 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
13236 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
13237 cat >>confdefs.h <<_ACEOF
13238 #define HAVE_LDAP_INITIALIZE 1
13239 _ACEOF
13242 done
13244 # The separate ldap_r library only exists in OpenLDAP < 2.5, and if we
13245 # have 2.5 or later, we shouldn't even probe for ldap_r (we might find a
13246 # library from a separate OpenLDAP installation). The most reliable
13247 # way to check that is to check for a function introduced in 2.5.
13248 ac_fn_c_check_func "$LINENO" "ldap_verify_credentials" "ac_cv_func_ldap_verify_credentials"
13249 if test "x$ac_cv_func_ldap_verify_credentials" = xyes; then :
13250 thread_safe_libldap=yes
13251 else
13252 thread_safe_libldap=no
13255 if test "$thread_safe_libldap" = no; then
13256 # Use ldap_r for FE if available, else assume ldap is thread-safe.
13257 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
13258 LIBS="$_LIBS"
13259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
13260 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
13261 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
13262 $as_echo_n "(cached) " >&6
13263 else
13264 ac_check_lib_save_LIBS=$LIBS
13265 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
13266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13267 /* end confdefs.h. */
13269 /* Override any GCC internal prototype to avoid an error.
13270 Use char because int might match the return type of a GCC
13271 builtin and then its argument prototype would still apply. */
13272 #ifdef __cplusplus
13273 extern "C"
13274 #endif
13275 char ldap_bind ();
13277 main ()
13279 return ldap_bind ();
13281 return 0;
13283 _ACEOF
13284 if ac_fn_c_try_link "$LINENO"; then :
13285 ac_cv_lib_ldap_r_ldap_bind=yes
13286 else
13287 ac_cv_lib_ldap_r_ldap_bind=no
13289 rm -f core conftest.err conftest.$ac_objext \
13290 conftest$ac_exeext conftest.$ac_ext
13291 LIBS=$ac_check_lib_save_LIBS
13293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
13294 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
13295 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
13296 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
13297 else
13298 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13301 else
13302 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13304 else
13305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
13306 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
13307 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
13308 $as_echo_n "(cached) " >&6
13309 else
13310 ac_check_lib_save_LIBS=$LIBS
13311 LIBS="-lwldap32 $LIBS"
13312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13313 /* end confdefs.h. */
13315 /* Override any GCC internal prototype to avoid an error.
13316 Use char because int might match the return type of a GCC
13317 builtin and then its argument prototype would still apply. */
13318 #ifdef __cplusplus
13319 extern "C"
13320 #endif
13321 char ldap_bind ();
13323 main ()
13325 return ldap_bind ();
13327 return 0;
13329 _ACEOF
13330 if ac_fn_c_try_link "$LINENO"; then :
13331 ac_cv_lib_wldap32_ldap_bind=yes
13332 else
13333 ac_cv_lib_wldap32_ldap_bind=no
13335 rm -f core conftest.err conftest.$ac_objext \
13336 conftest$ac_exeext conftest.$ac_ext
13337 LIBS=$ac_check_lib_save_LIBS
13339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
13340 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
13341 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
13342 cat >>confdefs.h <<_ACEOF
13343 #define HAVE_LIBWLDAP32 1
13344 _ACEOF
13346 LIBS="-lwldap32 $LIBS"
13348 else
13349 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13352 LDAP_LIBS_FE="-lwldap32"
13353 LDAP_LIBS_BE="-lwldap32"
13355 LIBS="$_LIBS"
13360 # for contrib/sepgsql
13361 if test "$with_selinux" = yes; then
13362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
13363 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
13364 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
13365 $as_echo_n "(cached) " >&6
13366 else
13367 ac_check_lib_save_LIBS=$LIBS
13368 LIBS="-lselinux $LIBS"
13369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13370 /* end confdefs.h. */
13372 /* Override any GCC internal prototype to avoid an error.
13373 Use char because int might match the return type of a GCC
13374 builtin and then its argument prototype would still apply. */
13375 #ifdef __cplusplus
13376 extern "C"
13377 #endif
13378 char security_compute_create_name ();
13380 main ()
13382 return security_compute_create_name ();
13384 return 0;
13386 _ACEOF
13387 if ac_fn_c_try_link "$LINENO"; then :
13388 ac_cv_lib_selinux_security_compute_create_name=yes
13389 else
13390 ac_cv_lib_selinux_security_compute_create_name=no
13392 rm -f core conftest.err conftest.$ac_objext \
13393 conftest$ac_exeext conftest.$ac_ext
13394 LIBS=$ac_check_lib_save_LIBS
13396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
13397 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
13398 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
13399 cat >>confdefs.h <<_ACEOF
13400 #define HAVE_LIBSELINUX 1
13401 _ACEOF
13403 LIBS="-lselinux $LIBS"
13405 else
13406 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
13411 # for contrib/uuid-ossp
13412 if test "$with_uuid" = bsd ; then
13413 # On BSD, the UUID functions are in libc
13414 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
13415 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
13416 UUID_LIBS=""
13417 else
13418 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
13421 elif test "$with_uuid" = e2fs ; then
13422 # On macOS, the UUID functions are in libc
13423 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
13424 if test "x$ac_cv_func_uuid_generate" = xyes; then :
13425 UUID_LIBS=""
13426 else
13427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
13428 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
13429 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
13430 $as_echo_n "(cached) " >&6
13431 else
13432 ac_check_lib_save_LIBS=$LIBS
13433 LIBS="-luuid $LIBS"
13434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13435 /* end confdefs.h. */
13437 /* Override any GCC internal prototype to avoid an error.
13438 Use char because int might match the return type of a GCC
13439 builtin and then its argument prototype would still apply. */
13440 #ifdef __cplusplus
13441 extern "C"
13442 #endif
13443 char uuid_generate ();
13445 main ()
13447 return uuid_generate ();
13449 return 0;
13451 _ACEOF
13452 if ac_fn_c_try_link "$LINENO"; then :
13453 ac_cv_lib_uuid_uuid_generate=yes
13454 else
13455 ac_cv_lib_uuid_uuid_generate=no
13457 rm -f core conftest.err conftest.$ac_objext \
13458 conftest$ac_exeext conftest.$ac_ext
13459 LIBS=$ac_check_lib_save_LIBS
13461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13462 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13463 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13464 UUID_LIBS="-luuid"
13465 else
13466 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13471 elif test "$with_uuid" = ossp ; then
13472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13473 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13474 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13475 $as_echo_n "(cached) " >&6
13476 else
13477 ac_check_lib_save_LIBS=$LIBS
13478 LIBS="-lossp-uuid $LIBS"
13479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13480 /* end confdefs.h. */
13482 /* Override any GCC internal prototype to avoid an error.
13483 Use char because int might match the return type of a GCC
13484 builtin and then its argument prototype would still apply. */
13485 #ifdef __cplusplus
13486 extern "C"
13487 #endif
13488 char uuid_export ();
13490 main ()
13492 return uuid_export ();
13494 return 0;
13496 _ACEOF
13497 if ac_fn_c_try_link "$LINENO"; then :
13498 ac_cv_lib_ossp_uuid_uuid_export=yes
13499 else
13500 ac_cv_lib_ossp_uuid_uuid_export=no
13502 rm -f core conftest.err conftest.$ac_objext \
13503 conftest$ac_exeext conftest.$ac_ext
13504 LIBS=$ac_check_lib_save_LIBS
13506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13507 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13508 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13509 UUID_LIBS="-lossp-uuid"
13510 else
13511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13512 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13513 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13514 $as_echo_n "(cached) " >&6
13515 else
13516 ac_check_lib_save_LIBS=$LIBS
13517 LIBS="-luuid $LIBS"
13518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13519 /* end confdefs.h. */
13521 /* Override any GCC internal prototype to avoid an error.
13522 Use char because int might match the return type of a GCC
13523 builtin and then its argument prototype would still apply. */
13524 #ifdef __cplusplus
13525 extern "C"
13526 #endif
13527 char uuid_export ();
13529 main ()
13531 return uuid_export ();
13533 return 0;
13535 _ACEOF
13536 if ac_fn_c_try_link "$LINENO"; then :
13537 ac_cv_lib_uuid_uuid_export=yes
13538 else
13539 ac_cv_lib_uuid_uuid_export=no
13541 rm -f core conftest.err conftest.$ac_objext \
13542 conftest$ac_exeext conftest.$ac_ext
13543 LIBS=$ac_check_lib_save_LIBS
13545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13546 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13547 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13548 UUID_LIBS="-luuid"
13549 else
13550 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13560 ## Header files
13563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13564 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13565 if ${ac_cv_header_stdbool_h+:} false; then :
13566 $as_echo_n "(cached) " >&6
13567 else
13568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13569 /* end confdefs.h. */
13571 #include <stdbool.h>
13572 #ifndef bool
13573 "error: bool is not defined"
13574 #endif
13575 #ifndef false
13576 "error: false is not defined"
13577 #endif
13578 #if false
13579 "error: false is not 0"
13580 #endif
13581 #ifndef true
13582 "error: true is not defined"
13583 #endif
13584 #if true != 1
13585 "error: true is not 1"
13586 #endif
13587 #ifndef __bool_true_false_are_defined
13588 "error: __bool_true_false_are_defined is not defined"
13589 #endif
13591 struct s { _Bool s: 1; _Bool t; } s;
13593 char a[true == 1 ? 1 : -1];
13594 char b[false == 0 ? 1 : -1];
13595 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13596 char d[(bool) 0.5 == true ? 1 : -1];
13597 /* See body of main program for 'e'. */
13598 char f[(_Bool) 0.0 == false ? 1 : -1];
13599 char g[true];
13600 char h[sizeof (_Bool)];
13601 char i[sizeof s.t];
13602 enum { j = false, k = true, l = false * true, m = true * 256 };
13603 /* The following fails for
13604 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13605 _Bool n[m];
13606 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13607 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13608 /* Catch a bug in an HP-UX C compiler. See
13609 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13610 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13612 _Bool q = true;
13613 _Bool *pq = &q;
13616 main ()
13619 bool e = &s;
13620 *pq |= q;
13621 *pq |= ! q;
13622 /* Refer to every declared value, to avoid compiler optimizations. */
13623 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13624 + !m + !n + !o + !p + !q + !pq);
13627 return 0;
13629 _ACEOF
13630 if ac_fn_c_try_compile "$LINENO"; then :
13631 ac_cv_header_stdbool_h=yes
13632 else
13633 ac_cv_header_stdbool_h=no
13635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13638 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13639 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13640 if test "x$ac_cv_type__Bool" = xyes; then :
13642 cat >>confdefs.h <<_ACEOF
13643 #define HAVE__BOOL 1
13644 _ACEOF
13650 if test $ac_cv_header_stdbool_h = yes; then
13652 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13657 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
13658 do :
13659 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13660 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13661 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13662 cat >>confdefs.h <<_ACEOF
13663 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13664 _ACEOF
13668 done
13671 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13672 for ac_header in readline/readline.h
13673 do :
13674 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13675 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13676 cat >>confdefs.h <<_ACEOF
13677 #define HAVE_READLINE_READLINE_H 1
13678 _ACEOF
13680 else
13681 for ac_header in readline.h
13682 do :
13683 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13684 if test "x$ac_cv_header_readline_h" = xyes; then :
13685 cat >>confdefs.h <<_ACEOF
13686 #define HAVE_READLINE_H 1
13687 _ACEOF
13689 else
13690 as_fn_error $? "readline header not found
13691 If you have readline already installed, see config.log for details on the
13692 failure. It is possible the compiler isn't looking in the proper directory.
13693 Use --without-readline to disable readline support." "$LINENO" 5
13696 done
13700 done
13702 for ac_header in readline/history.h
13703 do :
13704 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13705 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13706 cat >>confdefs.h <<_ACEOF
13707 #define HAVE_READLINE_HISTORY_H 1
13708 _ACEOF
13710 else
13711 for ac_header in history.h
13712 do :
13713 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13714 if test "x$ac_cv_header_history_h" = xyes; then :
13715 cat >>confdefs.h <<_ACEOF
13716 #define HAVE_HISTORY_H 1
13717 _ACEOF
13719 else
13720 as_fn_error $? "history header not found
13721 If you have readline already installed, see config.log for details on the
13722 failure. It is possible the compiler isn't looking in the proper directory.
13723 Use --without-readline to disable readline support." "$LINENO" 5
13726 done
13730 done
13734 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13735 # Some installations of libedit usurp /usr/include/readline/, which seems
13736 # bad practice, since in combined installations readline will have its headers
13737 # there. We might have to resort to AC_EGREP checks to make sure we found
13738 # the proper header...
13739 for ac_header in editline/readline.h
13740 do :
13741 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13742 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13743 cat >>confdefs.h <<_ACEOF
13744 #define HAVE_EDITLINE_READLINE_H 1
13745 _ACEOF
13747 else
13748 for ac_header in readline.h
13749 do :
13750 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13751 if test "x$ac_cv_header_readline_h" = xyes; then :
13752 cat >>confdefs.h <<_ACEOF
13753 #define HAVE_READLINE_H 1
13754 _ACEOF
13756 else
13757 for ac_header in readline/readline.h
13758 do :
13759 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13760 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13761 cat >>confdefs.h <<_ACEOF
13762 #define HAVE_READLINE_READLINE_H 1
13763 _ACEOF
13765 else
13766 as_fn_error $? "readline header not found
13767 If you have libedit already installed, see config.log for details on the
13768 failure. It is possible the compiler isn't looking in the proper directory.
13769 Use --without-readline to disable libedit support." "$LINENO" 5
13772 done
13776 done
13780 done
13782 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13783 # not be there at all. Hence, don't complain if not found. We must check
13784 # though, since in yet other versions it is an independent header.
13785 for ac_header in editline/history.h
13786 do :
13787 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13788 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13789 cat >>confdefs.h <<_ACEOF
13790 #define HAVE_EDITLINE_HISTORY_H 1
13791 _ACEOF
13793 else
13794 for ac_header in history.h
13795 do :
13796 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13797 if test "x$ac_cv_header_history_h" = xyes; then :
13798 cat >>confdefs.h <<_ACEOF
13799 #define HAVE_HISTORY_H 1
13800 _ACEOF
13802 else
13803 for ac_header in readline/history.h
13804 do :
13805 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13806 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13807 cat >>confdefs.h <<_ACEOF
13808 #define HAVE_READLINE_HISTORY_H 1
13809 _ACEOF
13813 done
13817 done
13821 done
13825 if test "$with_zlib" = yes; then
13826 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13827 if test "x$ac_cv_header_zlib_h" = xyes; then :
13829 else
13830 as_fn_error $? "zlib header not found
13831 If you have zlib already installed, see config.log for details on the
13832 failure. It is possible the compiler isn't looking in the proper directory.
13833 Use --without-zlib to disable zlib support." "$LINENO" 5
13839 if test -z "$LZ4"; then
13840 for ac_prog in lz4
13842 # Extract the first word of "$ac_prog", so it can be a program name with args.
13843 set dummy $ac_prog; ac_word=$2
13844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13845 $as_echo_n "checking for $ac_word... " >&6; }
13846 if ${ac_cv_path_LZ4+:} false; then :
13847 $as_echo_n "(cached) " >&6
13848 else
13849 case $LZ4 in
13850 [\\/]* | ?:[\\/]*)
13851 ac_cv_path_LZ4="$LZ4" # Let the user override the test with a path.
13854 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13855 for as_dir in $PATH
13857 IFS=$as_save_IFS
13858 test -z "$as_dir" && as_dir=.
13859 for ac_exec_ext in '' $ac_executable_extensions; do
13860 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13861 ac_cv_path_LZ4="$as_dir/$ac_word$ac_exec_ext"
13862 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13863 break 2
13865 done
13866 done
13867 IFS=$as_save_IFS
13870 esac
13872 LZ4=$ac_cv_path_LZ4
13873 if test -n "$LZ4"; then
13874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13875 $as_echo "$LZ4" >&6; }
13876 else
13877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13878 $as_echo "no" >&6; }
13882 test -n "$LZ4" && break
13883 done
13885 else
13886 # Report the value of LZ4 in configure's output in all cases.
13887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4" >&5
13888 $as_echo_n "checking for LZ4... " >&6; }
13889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13890 $as_echo "$LZ4" >&6; }
13893 if test "$with_lz4" = yes; then
13894 ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
13895 if test "x$ac_cv_header_lz4_h" = xyes; then :
13897 else
13898 as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
13904 if test -z "$ZSTD"; then
13905 for ac_prog in zstd
13907 # Extract the first word of "$ac_prog", so it can be a program name with args.
13908 set dummy $ac_prog; ac_word=$2
13909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13910 $as_echo_n "checking for $ac_word... " >&6; }
13911 if ${ac_cv_path_ZSTD+:} false; then :
13912 $as_echo_n "(cached) " >&6
13913 else
13914 case $ZSTD in
13915 [\\/]* | ?:[\\/]*)
13916 ac_cv_path_ZSTD="$ZSTD" # Let the user override the test with a path.
13919 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13920 for as_dir in $PATH
13922 IFS=$as_save_IFS
13923 test -z "$as_dir" && as_dir=.
13924 for ac_exec_ext in '' $ac_executable_extensions; do
13925 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13926 ac_cv_path_ZSTD="$as_dir/$ac_word$ac_exec_ext"
13927 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13928 break 2
13930 done
13931 done
13932 IFS=$as_save_IFS
13935 esac
13937 ZSTD=$ac_cv_path_ZSTD
13938 if test -n "$ZSTD"; then
13939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13940 $as_echo "$ZSTD" >&6; }
13941 else
13942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13943 $as_echo "no" >&6; }
13947 test -n "$ZSTD" && break
13948 done
13950 else
13951 # Report the value of ZSTD in configure's output in all cases.
13952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD" >&5
13953 $as_echo_n "checking for ZSTD... " >&6; }
13954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13955 $as_echo "$ZSTD" >&6; }
13958 if test "$with_zstd" = yes; then
13959 ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default"
13960 if test "x$ac_cv_header_zstd_h" = xyes; then :
13962 else
13963 as_fn_error $? "zstd.h header file is required for ZSTD" "$LINENO" 5
13969 if test "$with_gssapi" = yes ; then
13970 for ac_header in gssapi/gssapi.h
13971 do :
13972 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13973 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13974 cat >>confdefs.h <<_ACEOF
13975 #define HAVE_GSSAPI_GSSAPI_H 1
13976 _ACEOF
13978 else
13979 for ac_header in gssapi.h
13980 do :
13981 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13982 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13983 cat >>confdefs.h <<_ACEOF
13984 #define HAVE_GSSAPI_H 1
13985 _ACEOF
13987 else
13988 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13991 done
13995 done
13997 for ac_header in gssapi/gssapi_ext.h
13998 do :
13999 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi_ext.h" "ac_cv_header_gssapi_gssapi_ext_h" "$ac_includes_default"
14000 if test "x$ac_cv_header_gssapi_gssapi_ext_h" = xyes; then :
14001 cat >>confdefs.h <<_ACEOF
14002 #define HAVE_GSSAPI_GSSAPI_EXT_H 1
14003 _ACEOF
14005 else
14006 for ac_header in gssapi_ext.h
14007 do :
14008 ac_fn_c_check_header_mongrel "$LINENO" "gssapi_ext.h" "ac_cv_header_gssapi_ext_h" "$ac_includes_default"
14009 if test "x$ac_cv_header_gssapi_ext_h" = xyes; then :
14010 cat >>confdefs.h <<_ACEOF
14011 #define HAVE_GSSAPI_EXT_H 1
14012 _ACEOF
14014 else
14015 as_fn_error $? "gssapi_ext.h header file is required for GSSAPI" "$LINENO" 5
14018 done
14022 done
14026 if test -z "$OPENSSL"; then
14027 for ac_prog in openssl
14029 # Extract the first word of "$ac_prog", so it can be a program name with args.
14030 set dummy $ac_prog; ac_word=$2
14031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14032 $as_echo_n "checking for $ac_word... " >&6; }
14033 if ${ac_cv_path_OPENSSL+:} false; then :
14034 $as_echo_n "(cached) " >&6
14035 else
14036 case $OPENSSL in
14037 [\\/]* | ?:[\\/]*)
14038 ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a path.
14041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14042 for as_dir in $PATH
14044 IFS=$as_save_IFS
14045 test -z "$as_dir" && as_dir=.
14046 for ac_exec_ext in '' $ac_executable_extensions; do
14047 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14048 ac_cv_path_OPENSSL="$as_dir/$ac_word$ac_exec_ext"
14049 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14050 break 2
14052 done
14053 done
14054 IFS=$as_save_IFS
14057 esac
14059 OPENSSL=$ac_cv_path_OPENSSL
14060 if test -n "$OPENSSL"; then
14061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
14062 $as_echo "$OPENSSL" >&6; }
14063 else
14064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14065 $as_echo "no" >&6; }
14069 test -n "$OPENSSL" && break
14070 done
14072 else
14073 # Report the value of OPENSSL in configure's output in all cases.
14074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
14075 $as_echo_n "checking for OPENSSL... " >&6; }
14076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
14077 $as_echo "$OPENSSL" >&6; }
14080 pgac_openssl_version="$($OPENSSL version 2> /dev/null || echo openssl not found)"
14081 { $as_echo "$as_me:${as_lineno-$LINENO}: using openssl: $pgac_openssl_version" >&5
14082 $as_echo "$as_me: using openssl: $pgac_openssl_version" >&6;}
14083 if test "$with_ssl" = openssl ; then
14084 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
14085 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
14087 else
14088 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
14092 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
14093 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
14095 else
14096 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
14102 if test "$with_pam" = yes ; then
14103 for ac_header in security/pam_appl.h
14104 do :
14105 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
14106 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
14107 cat >>confdefs.h <<_ACEOF
14108 #define HAVE_SECURITY_PAM_APPL_H 1
14109 _ACEOF
14111 else
14112 for ac_header in pam/pam_appl.h
14113 do :
14114 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
14115 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
14116 cat >>confdefs.h <<_ACEOF
14117 #define HAVE_PAM_PAM_APPL_H 1
14118 _ACEOF
14120 else
14121 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
14124 done
14128 done
14132 if test "$with_bsd_auth" = yes ; then
14133 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
14134 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
14136 else
14137 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
14143 if test "$with_systemd" = yes ; then
14144 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
14145 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
14147 else
14148 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
14154 if test "$with_libxml" = yes ; then
14155 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
14156 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
14158 else
14159 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
14165 if test "$with_libxslt" = yes ; then
14166 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
14167 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
14169 else
14170 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
14176 if test "$with_ldap" = yes ; then
14177 if test "$PORTNAME" != "win32"; then
14178 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
14179 if test "x$ac_cv_header_ldap_h" = xyes; then :
14181 else
14182 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
14186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
14187 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
14188 if ${pgac_cv_ldap_safe+:} false; then :
14189 $as_echo_n "(cached) " >&6
14190 else
14191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14192 /* end confdefs.h. */
14193 #include <ldap.h>
14194 #if !defined(LDAP_VENDOR_VERSION) || \
14195 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
14196 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
14197 choke me
14198 #endif
14200 main ()
14204 return 0;
14206 _ACEOF
14207 if ac_fn_c_try_compile "$LINENO"; then :
14208 pgac_cv_ldap_safe=yes
14209 else
14210 pgac_cv_ldap_safe=no
14212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
14215 $as_echo "$pgac_cv_ldap_safe" >&6; }
14217 if test "$pgac_cv_ldap_safe" != yes; then
14218 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14219 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14220 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14221 *** also uses LDAP will crash on exit." >&5
14222 $as_echo "$as_me: WARNING:
14223 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14224 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14225 *** also uses LDAP will crash on exit." >&2;}
14227 else
14228 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
14229 #include <windows.h>
14232 if test "x$ac_cv_header_winldap_h" = xyes; then :
14234 else
14235 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
14242 if test "$with_bonjour" = yes ; then
14243 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
14244 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
14246 else
14247 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
14253 # for contrib/uuid-ossp
14254 if test "$with_uuid" = bsd ; then
14255 for ac_header in uuid.h
14256 do :
14257 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14258 if test "x$ac_cv_header_uuid_h" = xyes; then :
14259 cat >>confdefs.h <<_ACEOF
14260 #define HAVE_UUID_H 1
14261 _ACEOF
14262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14263 /* end confdefs.h. */
14264 #include <uuid.h>
14266 _ACEOF
14267 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14268 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
14270 else
14271 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
14273 rm -f conftest*
14275 else
14276 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
14279 done
14281 elif test "$with_uuid" = e2fs ; then
14282 for ac_header in uuid/uuid.h
14283 do :
14284 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
14285 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
14286 cat >>confdefs.h <<_ACEOF
14287 #define HAVE_UUID_UUID_H 1
14288 _ACEOF
14289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14290 /* end confdefs.h. */
14291 #include <uuid/uuid.h>
14293 _ACEOF
14294 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14295 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14297 else
14298 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
14300 rm -f conftest*
14302 else
14303 for ac_header in uuid.h
14304 do :
14305 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14306 if test "x$ac_cv_header_uuid_h" = xyes; then :
14307 cat >>confdefs.h <<_ACEOF
14308 #define HAVE_UUID_H 1
14309 _ACEOF
14310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14311 /* end confdefs.h. */
14312 #include <uuid.h>
14314 _ACEOF
14315 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14316 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14318 else
14319 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
14321 rm -f conftest*
14323 else
14324 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
14327 done
14331 done
14333 elif test "$with_uuid" = ossp ; then
14334 for ac_header in ossp/uuid.h
14335 do :
14336 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
14337 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
14338 cat >>confdefs.h <<_ACEOF
14339 #define HAVE_OSSP_UUID_H 1
14340 _ACEOF
14341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14342 /* end confdefs.h. */
14343 #include <ossp/uuid.h>
14345 _ACEOF
14346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14347 $EGREP "uuid_export" >/dev/null 2>&1; then :
14349 else
14350 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
14352 rm -f conftest*
14354 else
14355 for ac_header in uuid.h
14356 do :
14357 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14358 if test "x$ac_cv_header_uuid_h" = xyes; then :
14359 cat >>confdefs.h <<_ACEOF
14360 #define HAVE_UUID_H 1
14361 _ACEOF
14362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14363 /* end confdefs.h. */
14364 #include <uuid.h>
14366 _ACEOF
14367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14368 $EGREP "uuid_export" >/dev/null 2>&1; then :
14370 else
14371 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
14373 rm -f conftest*
14375 else
14376 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
14379 done
14383 done
14387 if test "$PORTNAME" = "win32" ; then
14388 for ac_header in crtdefs.h
14389 do :
14390 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
14391 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
14392 cat >>confdefs.h <<_ACEOF
14393 #define HAVE_CRTDEFS_H 1
14394 _ACEOF
14398 done
14403 ## Types, structures, compiler characteristics
14406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14407 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14408 if ${ac_cv_c_bigendian+:} false; then :
14409 $as_echo_n "(cached) " >&6
14410 else
14411 ac_cv_c_bigendian=unknown
14412 # See if we're dealing with a universal compiler.
14413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14414 /* end confdefs.h. */
14415 #ifndef __APPLE_CC__
14416 not a universal capable compiler
14417 #endif
14418 typedef int dummy;
14420 _ACEOF
14421 if ac_fn_c_try_compile "$LINENO"; then :
14423 # Check for potential -arch flags. It is not universal unless
14424 # there are at least two -arch flags with different values.
14425 ac_arch=
14426 ac_prev=
14427 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14428 if test -n "$ac_prev"; then
14429 case $ac_word in
14430 i?86 | x86_64 | ppc | ppc64)
14431 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14432 ac_arch=$ac_word
14433 else
14434 ac_cv_c_bigendian=universal
14435 break
14438 esac
14439 ac_prev=
14440 elif test "x$ac_word" = "x-arch"; then
14441 ac_prev=arch
14443 done
14445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14446 if test $ac_cv_c_bigendian = unknown; then
14447 # See if sys/param.h defines the BYTE_ORDER macro.
14448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14449 /* end confdefs.h. */
14450 #include <sys/types.h>
14451 #include <sys/param.h>
14454 main ()
14456 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14457 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14458 && LITTLE_ENDIAN)
14459 bogus endian macros
14460 #endif
14463 return 0;
14465 _ACEOF
14466 if ac_fn_c_try_compile "$LINENO"; then :
14467 # It does; now see whether it defined to BIG_ENDIAN or not.
14468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14469 /* end confdefs.h. */
14470 #include <sys/types.h>
14471 #include <sys/param.h>
14474 main ()
14476 #if BYTE_ORDER != BIG_ENDIAN
14477 not big endian
14478 #endif
14481 return 0;
14483 _ACEOF
14484 if ac_fn_c_try_compile "$LINENO"; then :
14485 ac_cv_c_bigendian=yes
14486 else
14487 ac_cv_c_bigendian=no
14489 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14493 if test $ac_cv_c_bigendian = unknown; then
14494 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14496 /* end confdefs.h. */
14497 #include <limits.h>
14500 main ()
14502 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14503 bogus endian macros
14504 #endif
14507 return 0;
14509 _ACEOF
14510 if ac_fn_c_try_compile "$LINENO"; then :
14511 # It does; now see whether it defined to _BIG_ENDIAN or not.
14512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14513 /* end confdefs.h. */
14514 #include <limits.h>
14517 main ()
14519 #ifndef _BIG_ENDIAN
14520 not big endian
14521 #endif
14524 return 0;
14526 _ACEOF
14527 if ac_fn_c_try_compile "$LINENO"; then :
14528 ac_cv_c_bigendian=yes
14529 else
14530 ac_cv_c_bigendian=no
14532 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14536 if test $ac_cv_c_bigendian = unknown; then
14537 # Compile a test program.
14538 if test "$cross_compiling" = yes; then :
14539 # Try to guess by grepping values from an object file.
14540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14541 /* end confdefs.h. */
14542 short int ascii_mm[] =
14543 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14544 short int ascii_ii[] =
14545 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14546 int use_ascii (int i) {
14547 return ascii_mm[i] + ascii_ii[i];
14549 short int ebcdic_ii[] =
14550 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14551 short int ebcdic_mm[] =
14552 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14553 int use_ebcdic (int i) {
14554 return ebcdic_mm[i] + ebcdic_ii[i];
14556 extern int foo;
14559 main ()
14561 return use_ascii (foo) == use_ebcdic (foo);
14563 return 0;
14565 _ACEOF
14566 if ac_fn_c_try_compile "$LINENO"; then :
14567 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14568 ac_cv_c_bigendian=yes
14570 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14571 if test "$ac_cv_c_bigendian" = unknown; then
14572 ac_cv_c_bigendian=no
14573 else
14574 # finding both strings is unlikely to happen, but who knows?
14575 ac_cv_c_bigendian=unknown
14579 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14580 else
14581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14582 /* end confdefs.h. */
14583 $ac_includes_default
14585 main ()
14588 /* Are we little or big endian? From Harbison&Steele. */
14589 union
14591 long int l;
14592 char c[sizeof (long int)];
14593 } u;
14594 u.l = 1;
14595 return u.c[sizeof (long int) - 1] == 1;
14598 return 0;
14600 _ACEOF
14601 if ac_fn_c_try_run "$LINENO"; then :
14602 ac_cv_c_bigendian=no
14603 else
14604 ac_cv_c_bigendian=yes
14606 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14607 conftest.$ac_objext conftest.beam conftest.$ac_ext
14612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14613 $as_echo "$ac_cv_c_bigendian" >&6; }
14614 case $ac_cv_c_bigendian in #(
14615 yes)
14616 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14617 ;; #(
14619 ;; #(
14620 universal)
14622 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14624 ;; #(
14626 as_fn_error $? "unknown endianness
14627 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14628 esac
14630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14631 $as_echo_n "checking for inline... " >&6; }
14632 if ${ac_cv_c_inline+:} false; then :
14633 $as_echo_n "(cached) " >&6
14634 else
14635 ac_cv_c_inline=no
14636 for ac_kw in inline __inline__ __inline; do
14637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14638 /* end confdefs.h. */
14639 #ifndef __cplusplus
14640 typedef int foo_t;
14641 static $ac_kw foo_t static_foo () {return 0; }
14642 $ac_kw foo_t foo () {return 0; }
14643 #endif
14645 _ACEOF
14646 if ac_fn_c_try_compile "$LINENO"; then :
14647 ac_cv_c_inline=$ac_kw
14649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14650 test "$ac_cv_c_inline" != no && break
14651 done
14654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14655 $as_echo "$ac_cv_c_inline" >&6; }
14657 case $ac_cv_c_inline in
14658 inline | yes) ;;
14660 case $ac_cv_c_inline in
14661 no) ac_val=;;
14662 *) ac_val=$ac_cv_c_inline;;
14663 esac
14664 cat >>confdefs.h <<_ACEOF
14665 #ifndef __cplusplus
14666 #define inline $ac_val
14667 #endif
14668 _ACEOF
14670 esac
14672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14673 $as_echo_n "checking for printf format archetype... " >&6; }
14674 if ${pgac_cv_printf_archetype+:} false; then :
14675 $as_echo_n "(cached) " >&6
14676 else
14677 pgac_cv_printf_archetype=gnu_printf
14678 ac_save_c_werror_flag=$ac_c_werror_flag
14679 ac_c_werror_flag=yes
14680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14681 /* end confdefs.h. */
14682 extern void pgac_write(int ignore, const char *fmt,...)
14683 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14685 main ()
14687 pgac_write(0, "error %s: %m", "foo");
14689 return 0;
14691 _ACEOF
14692 if ac_fn_c_try_compile "$LINENO"; then :
14693 ac_archetype_ok=yes
14694 else
14695 ac_archetype_ok=no
14697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14698 ac_c_werror_flag=$ac_save_c_werror_flag
14700 if [ "$ac_archetype_ok" = no ]; then
14701 pgac_cv_printf_archetype=__syslog__
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=printf
14729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14730 $as_echo "$pgac_cv_printf_archetype" >&6; }
14732 cat >>confdefs.h <<_ACEOF
14733 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14734 _ACEOF
14737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14738 $as_echo_n "checking for _Static_assert... " >&6; }
14739 if ${pgac_cv__static_assert+:} false; then :
14740 $as_echo_n "(cached) " >&6
14741 else
14742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14743 /* end confdefs.h. */
14746 main ()
14748 ({ _Static_assert(1, "foo"); })
14750 return 0;
14752 _ACEOF
14753 if ac_fn_c_try_link "$LINENO"; then :
14754 pgac_cv__static_assert=yes
14755 else
14756 pgac_cv__static_assert=no
14758 rm -f core conftest.err conftest.$ac_objext \
14759 conftest$ac_exeext conftest.$ac_ext
14761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14762 $as_echo "$pgac_cv__static_assert" >&6; }
14763 if test x"$pgac_cv__static_assert" = xyes ; then
14765 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14769 $as_echo_n "checking for typeof... " >&6; }
14770 if ${pgac_cv_c_typeof+:} false; then :
14771 $as_echo_n "(cached) " >&6
14772 else
14773 pgac_cv_c_typeof=no
14774 for pgac_kw in typeof __typeof__ decltype; do
14775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14776 /* end confdefs.h. */
14779 main ()
14781 int x = 0;
14782 $pgac_kw(x) y;
14783 y = x;
14784 return y;
14786 return 0;
14788 _ACEOF
14789 if ac_fn_c_try_compile "$LINENO"; then :
14790 pgac_cv_c_typeof=$pgac_kw
14792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14793 test "$pgac_cv_c_typeof" != no && break
14794 done
14796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14797 $as_echo "$pgac_cv_c_typeof" >&6; }
14798 if test "$pgac_cv_c_typeof" != no; then
14800 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14802 if test "$pgac_cv_c_typeof" != typeof; then
14804 cat >>confdefs.h <<_ACEOF
14805 #define typeof $pgac_cv_c_typeof
14806 _ACEOF
14810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14811 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14812 if ${pgac_cv__types_compatible+:} false; then :
14813 $as_echo_n "(cached) " >&6
14814 else
14815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14816 /* end confdefs.h. */
14819 main ()
14821 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14823 return 0;
14825 _ACEOF
14826 if ac_fn_c_try_compile "$LINENO"; then :
14827 pgac_cv__types_compatible=yes
14828 else
14829 pgac_cv__types_compatible=no
14831 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14834 $as_echo "$pgac_cv__types_compatible" >&6; }
14835 if test x"$pgac_cv__types_compatible" = xyes ; then
14837 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14841 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14842 if ${pgac_cv__builtin_constant_p+:} false; then :
14843 $as_echo_n "(cached) " >&6
14844 else
14845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14846 /* end confdefs.h. */
14847 static int x;
14848 static int y[__builtin_constant_p(x) ? x : 1];
14849 static int z[__builtin_constant_p("string literal") ? 1 : x];
14852 _ACEOF
14853 if ac_fn_c_try_compile "$LINENO"; then :
14854 pgac_cv__builtin_constant_p=yes
14855 else
14856 pgac_cv__builtin_constant_p=no
14858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14861 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14862 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14864 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14868 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14869 if ${pgac_cv__builtin_unreachable+:} false; then :
14870 $as_echo_n "(cached) " >&6
14871 else
14872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14873 /* end confdefs.h. */
14876 main ()
14878 __builtin_unreachable();
14880 return 0;
14882 _ACEOF
14883 if ac_fn_c_try_link "$LINENO"; then :
14884 pgac_cv__builtin_unreachable=yes
14885 else
14886 pgac_cv__builtin_unreachable=no
14888 rm -f core conftest.err conftest.$ac_objext \
14889 conftest$ac_exeext conftest.$ac_ext
14891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14892 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14893 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14895 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14899 $as_echo_n "checking for computed goto support... " >&6; }
14900 if ${pgac_cv_computed_goto+:} false; then :
14901 $as_echo_n "(cached) " >&6
14902 else
14903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14904 /* end confdefs.h. */
14907 main ()
14909 void *labeladdrs[] = {&&my_label};
14910 goto *labeladdrs[0];
14911 my_label:
14912 return 1;
14915 return 0;
14917 _ACEOF
14918 if ac_fn_c_try_compile "$LINENO"; then :
14919 pgac_cv_computed_goto=yes
14920 else
14921 pgac_cv_computed_goto=no
14923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14926 $as_echo "$pgac_cv_computed_goto" >&6; }
14927 if test x"$pgac_cv_computed_goto" = xyes ; then
14929 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14932 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14933 #include <time.h>
14936 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14938 cat >>confdefs.h <<_ACEOF
14939 #define HAVE_STRUCT_TM_TM_ZONE 1
14940 _ACEOF
14946 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14947 #include <sys/ipc.h>
14948 #include <sys/sem.h>
14951 if test "x$ac_cv_type_union_semun" = xyes; then :
14953 cat >>confdefs.h <<_ACEOF
14954 #define HAVE_UNION_SEMUN 1
14955 _ACEOF
14960 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/socket.h>
14962 if test "x$ac_cv_type_socklen_t" = xyes; then :
14964 cat >>confdefs.h <<_ACEOF
14965 #define HAVE_SOCKLEN_T 1
14966 _ACEOF
14971 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14972 #include <sys/socket.h>
14975 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14977 cat >>confdefs.h <<_ACEOF
14978 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14979 _ACEOF
14985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14986 $as_echo_n "checking for locale_t... " >&6; }
14987 if ${pgac_cv_type_locale_t+:} false; then :
14988 $as_echo_n "(cached) " >&6
14989 else
14990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14991 /* end confdefs.h. */
14992 #include <locale.h>
14993 locale_t x;
14995 main ()
14999 return 0;
15001 _ACEOF
15002 if ac_fn_c_try_compile "$LINENO"; then :
15003 pgac_cv_type_locale_t=yes
15004 else
15005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15006 /* end confdefs.h. */
15007 #include <xlocale.h>
15008 locale_t x;
15010 main ()
15014 return 0;
15016 _ACEOF
15017 if ac_fn_c_try_compile "$LINENO"; then :
15018 pgac_cv_type_locale_t='yes (in xlocale.h)'
15019 else
15020 pgac_cv_type_locale_t=no
15022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
15027 $as_echo "$pgac_cv_type_locale_t" >&6; }
15028 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
15030 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
15034 # MSVC doesn't cope well with defining restrict to __restrict, the
15035 # spelling it understands, because it conflicts with
15036 # __declspec(restrict). Therefore we define pg_restrict to the
15037 # appropriate definition, which presumably won't conflict.
15039 # Allow platforms with buggy compilers to force restrict to not be
15040 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
15041 # template.
15042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
15043 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
15044 if ${ac_cv_c_restrict+:} false; then :
15045 $as_echo_n "(cached) " >&6
15046 else
15047 ac_cv_c_restrict=no
15048 # The order here caters to the fact that C++ does not require restrict.
15049 for ac_kw in __restrict __restrict__ _Restrict restrict; do
15050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15051 /* end confdefs.h. */
15052 typedef int * int_ptr;
15053 int foo (int_ptr $ac_kw ip) {
15054 return ip[0];
15057 main ()
15059 int s[1];
15060 int * $ac_kw t = s;
15061 t[0] = 0;
15062 return foo(t)
15064 return 0;
15066 _ACEOF
15067 if ac_fn_c_try_compile "$LINENO"; then :
15068 ac_cv_c_restrict=$ac_kw
15070 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15071 test "$ac_cv_c_restrict" != no && break
15072 done
15075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
15076 $as_echo "$ac_cv_c_restrict" >&6; }
15078 case $ac_cv_c_restrict in
15079 restrict) ;;
15080 no) $as_echo "#define restrict /**/" >>confdefs.h
15082 *) cat >>confdefs.h <<_ACEOF
15083 #define restrict $ac_cv_c_restrict
15084 _ACEOF
15086 esac
15088 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
15089 pg_restrict=""
15090 else
15091 pg_restrict="$ac_cv_c_restrict"
15094 cat >>confdefs.h <<_ACEOF
15095 #define pg_restrict $pg_restrict
15096 _ACEOF
15099 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
15100 #include <getopt.h>
15101 #endif
15103 if test "x$ac_cv_type_struct_option" = xyes; then :
15105 cat >>confdefs.h <<_ACEOF
15106 #define HAVE_STRUCT_OPTION 1
15107 _ACEOF
15113 case $host_cpu in
15114 x86_64)
15115 # On x86_64, check if we can compile a popcntq instruction
15116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
15117 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
15118 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
15119 $as_echo_n "(cached) " >&6
15120 else
15121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15122 /* end confdefs.h. */
15125 main ()
15127 long long x = 1; long long r;
15128 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
15130 return 0;
15132 _ACEOF
15133 if ac_fn_c_try_compile "$LINENO"; then :
15134 pgac_cv_have_x86_64_popcntq=yes
15135 else
15136 pgac_cv_have_x86_64_popcntq=no
15138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
15141 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
15142 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
15144 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
15148 ppc*|powerpc*)
15149 # On PPC, check if compiler accepts "i"(x) when __builtin_constant_p(x).
15150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
15151 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
15152 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
15153 $as_echo_n "(cached) " >&6
15154 else
15155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15156 /* end confdefs.h. */
15157 static inline int
15158 addi(int ra, int si)
15160 int res = 0;
15161 if (__builtin_constant_p(si))
15162 __asm__ __volatile__(
15163 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
15164 return res;
15166 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
15168 main ()
15172 return 0;
15174 _ACEOF
15175 if ac_fn_c_try_compile "$LINENO"; then :
15176 pgac_cv_have_i_constraint__builtin_constant_p=yes
15177 else
15178 pgac_cv_have_i_constraint__builtin_constant_p=no
15180 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
15183 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
15184 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
15186 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
15190 esac
15192 # Check largefile support. You might think this is a system service not a
15193 # compiler characteristic, but you'd be wrong. We must check this before
15194 # probing existence of related functions such as fseeko, since the largefile
15195 # defines can affect what is generated for that.
15196 if test "$PORTNAME" != "win32"; then
15197 # Check whether --enable-largefile was given.
15198 if test "${enable_largefile+set}" = set; then :
15199 enableval=$enable_largefile;
15202 if test "$enable_largefile" != no; then
15204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15205 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15206 if ${ac_cv_sys_largefile_CC+:} false; then :
15207 $as_echo_n "(cached) " >&6
15208 else
15209 ac_cv_sys_largefile_CC=no
15210 if test "$GCC" != yes; then
15211 ac_save_CC=$CC
15212 while :; do
15213 # IRIX 6.2 and later do not support large files by default,
15214 # so use the C compiler's -n32 option if that helps.
15215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15216 /* end confdefs.h. */
15217 #include <sys/types.h>
15218 /* Check that off_t can represent 2**63 - 1 correctly.
15219 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15220 since some C++ compilers masquerading as C compilers
15221 incorrectly reject 9223372036854775807. */
15222 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15223 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15224 && LARGE_OFF_T % 2147483647 == 1)
15225 ? 1 : -1];
15227 main ()
15231 return 0;
15233 _ACEOF
15234 if ac_fn_c_try_compile "$LINENO"; then :
15235 break
15237 rm -f core conftest.err conftest.$ac_objext
15238 CC="$CC -n32"
15239 if ac_fn_c_try_compile "$LINENO"; then :
15240 ac_cv_sys_largefile_CC=' -n32'; break
15242 rm -f core conftest.err conftest.$ac_objext
15243 break
15244 done
15245 CC=$ac_save_CC
15246 rm -f conftest.$ac_ext
15249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15250 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15251 if test "$ac_cv_sys_largefile_CC" != no; then
15252 CC=$CC$ac_cv_sys_largefile_CC
15255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15256 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15257 if ${ac_cv_sys_file_offset_bits+:} false; then :
15258 $as_echo_n "(cached) " >&6
15259 else
15260 while :; do
15261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15262 /* end confdefs.h. */
15263 #include <sys/types.h>
15264 /* Check that off_t can represent 2**63 - 1 correctly.
15265 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15266 since some C++ compilers masquerading as C compilers
15267 incorrectly reject 9223372036854775807. */
15268 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15269 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15270 && LARGE_OFF_T % 2147483647 == 1)
15271 ? 1 : -1];
15273 main ()
15277 return 0;
15279 _ACEOF
15280 if ac_fn_c_try_compile "$LINENO"; then :
15281 ac_cv_sys_file_offset_bits=no; break
15283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15285 /* end confdefs.h. */
15286 #define _FILE_OFFSET_BITS 64
15287 #include <sys/types.h>
15288 /* Check that off_t can represent 2**63 - 1 correctly.
15289 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15290 since some C++ compilers masquerading as C compilers
15291 incorrectly reject 9223372036854775807. */
15292 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15293 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15294 && LARGE_OFF_T % 2147483647 == 1)
15295 ? 1 : -1];
15297 main ()
15301 return 0;
15303 _ACEOF
15304 if ac_fn_c_try_compile "$LINENO"; then :
15305 ac_cv_sys_file_offset_bits=64; break
15307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15308 ac_cv_sys_file_offset_bits=unknown
15309 break
15310 done
15312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15313 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15314 case $ac_cv_sys_file_offset_bits in #(
15315 no | unknown) ;;
15317 cat >>confdefs.h <<_ACEOF
15318 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15319 _ACEOF
15321 esac
15322 rm -rf conftest*
15323 if test $ac_cv_sys_file_offset_bits = unknown; then
15324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15325 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15326 if ${ac_cv_sys_large_files+:} false; then :
15327 $as_echo_n "(cached) " >&6
15328 else
15329 while :; do
15330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15331 /* end confdefs.h. */
15332 #include <sys/types.h>
15333 /* Check that off_t can represent 2**63 - 1 correctly.
15334 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15335 since some C++ compilers masquerading as C compilers
15336 incorrectly reject 9223372036854775807. */
15337 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15338 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15339 && LARGE_OFF_T % 2147483647 == 1)
15340 ? 1 : -1];
15342 main ()
15346 return 0;
15348 _ACEOF
15349 if ac_fn_c_try_compile "$LINENO"; then :
15350 ac_cv_sys_large_files=no; break
15352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15354 /* end confdefs.h. */
15355 #define _LARGE_FILES 1
15356 #include <sys/types.h>
15357 /* Check that off_t can represent 2**63 - 1 correctly.
15358 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15359 since some C++ compilers masquerading as C compilers
15360 incorrectly reject 9223372036854775807. */
15361 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15362 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15363 && LARGE_OFF_T % 2147483647 == 1)
15364 ? 1 : -1];
15366 main ()
15370 return 0;
15372 _ACEOF
15373 if ac_fn_c_try_compile "$LINENO"; then :
15374 ac_cv_sys_large_files=1; break
15376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15377 ac_cv_sys_large_files=unknown
15378 break
15379 done
15381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15382 $as_echo "$ac_cv_sys_large_files" >&6; }
15383 case $ac_cv_sys_large_files in #(
15384 no | unknown) ;;
15386 cat >>confdefs.h <<_ACEOF
15387 #define _LARGE_FILES $ac_cv_sys_large_files
15388 _ACEOF
15390 esac
15391 rm -rf conftest*
15400 # The cast to long int works around a bug in the HP C Compiler
15401 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15402 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15403 # This bug is HP SR number 8606223364.
15404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15405 $as_echo_n "checking size of off_t... " >&6; }
15406 if ${ac_cv_sizeof_off_t+:} false; then :
15407 $as_echo_n "(cached) " >&6
15408 else
15409 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
15411 else
15412 if test "$ac_cv_type_off_t" = yes; then
15413 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15414 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15415 as_fn_error 77 "cannot compute sizeof (off_t)
15416 See \`config.log' for more details" "$LINENO" 5; }
15417 else
15418 ac_cv_sizeof_off_t=0
15423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15424 $as_echo "$ac_cv_sizeof_off_t" >&6; }
15428 cat >>confdefs.h <<_ACEOF
15429 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15430 _ACEOF
15434 # If we don't have largefile support, can't handle segment size >= 2GB.
15435 if test "$ac_cv_sizeof_off_t" -lt 8; then
15436 if expr $RELSEG_SIZE '*' $blocksize '>=' 2 '*' 1024 '*' 1024; then
15437 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15441 # The cast to long int works around a bug in the HP C Compiler
15442 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15443 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15444 # This bug is HP SR number 8606223364.
15445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
15446 $as_echo_n "checking size of bool... " >&6; }
15447 if ${ac_cv_sizeof_bool+:} false; then :
15448 $as_echo_n "(cached) " >&6
15449 else
15450 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
15451 #include <stdbool.h>
15452 #endif
15453 "; then :
15455 else
15456 if test "$ac_cv_type_bool" = yes; then
15457 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15458 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15459 as_fn_error 77 "cannot compute sizeof (bool)
15460 See \`config.log' for more details" "$LINENO" 5; }
15461 else
15462 ac_cv_sizeof_bool=0
15467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15468 $as_echo "$ac_cv_sizeof_bool" >&6; }
15472 cat >>confdefs.h <<_ACEOF
15473 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15474 _ACEOF
15478 if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
15480 $as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
15486 ## Functions, global variables
15489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15490 $as_echo_n "checking for int timezone... " >&6; }
15491 if ${pgac_cv_var_int_timezone+:} false; then :
15492 $as_echo_n "(cached) " >&6
15493 else
15494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15495 /* end confdefs.h. */
15496 #include <time.h>
15497 int res;
15499 main ()
15501 #ifndef __CYGWIN__
15502 res = timezone / 60;
15503 #else
15504 res = _timezone / 60;
15505 #endif
15507 return 0;
15509 _ACEOF
15510 if ac_fn_c_try_link "$LINENO"; then :
15511 pgac_cv_var_int_timezone=yes
15512 else
15513 pgac_cv_var_int_timezone=no
15515 rm -f core conftest.err conftest.$ac_objext \
15516 conftest$ac_exeext conftest.$ac_ext
15518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15519 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15520 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15522 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15526 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15527 if ${pgac_cv_func_wcstombs_l+:} false; then :
15528 $as_echo_n "(cached) " >&6
15529 else
15530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15531 /* end confdefs.h. */
15532 #include <stdlib.h>
15533 #include <locale.h>
15535 main ()
15537 #ifndef wcstombs_l
15538 (void) wcstombs_l;
15539 #endif
15541 return 0;
15543 _ACEOF
15544 if ac_fn_c_try_compile "$LINENO"; then :
15545 pgac_cv_func_wcstombs_l='yes'
15546 else
15547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15548 /* end confdefs.h. */
15549 #include <stdlib.h>
15550 #include <locale.h>
15551 #include <xlocale.h>
15553 main ()
15555 #ifndef wcstombs_l
15556 (void) wcstombs_l;
15557 #endif
15559 return 0;
15561 _ACEOF
15562 if ac_fn_c_try_compile "$LINENO"; then :
15563 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15564 else
15565 pgac_cv_func_wcstombs_l='no'
15567 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15569 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15572 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15573 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15575 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15579 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15580 # symbols that that library has no business exposing to the world. Pending
15581 # acquisition of a clue by those developers, ignore libedit (including its
15582 # possible alias of libreadline) while checking for everything else.
15583 LIBS_including_readline="$LIBS"
15584 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15586 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
15587 do :
15588 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15589 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15590 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15591 cat >>confdefs.h <<_ACEOF
15592 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15593 _ACEOF
15596 done
15599 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15601 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15602 if ${pgac_cv__builtin_bswap16+:} false; then :
15603 $as_echo_n "(cached) " >&6
15604 else
15605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15606 /* end confdefs.h. */
15609 call__builtin_bswap16(int x)
15611 return __builtin_bswap16(x);
15614 main ()
15618 return 0;
15620 _ACEOF
15621 if ac_fn_c_try_link "$LINENO"; then :
15622 pgac_cv__builtin_bswap16=yes
15623 else
15624 pgac_cv__builtin_bswap16=no
15626 rm -f core conftest.err conftest.$ac_objext \
15627 conftest$ac_exeext conftest.$ac_ext
15629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15630 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15631 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15633 cat >>confdefs.h <<_ACEOF
15634 #define HAVE__BUILTIN_BSWAP16 1
15635 _ACEOF
15638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15639 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15640 if ${pgac_cv__builtin_bswap32+:} false; then :
15641 $as_echo_n "(cached) " >&6
15642 else
15643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15644 /* end confdefs.h. */
15647 call__builtin_bswap32(int x)
15649 return __builtin_bswap32(x);
15652 main ()
15656 return 0;
15658 _ACEOF
15659 if ac_fn_c_try_link "$LINENO"; then :
15660 pgac_cv__builtin_bswap32=yes
15661 else
15662 pgac_cv__builtin_bswap32=no
15664 rm -f core conftest.err conftest.$ac_objext \
15665 conftest$ac_exeext conftest.$ac_ext
15667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15668 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15669 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15671 cat >>confdefs.h <<_ACEOF
15672 #define HAVE__BUILTIN_BSWAP32 1
15673 _ACEOF
15676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15677 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15678 if ${pgac_cv__builtin_bswap64+:} false; then :
15679 $as_echo_n "(cached) " >&6
15680 else
15681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15682 /* end confdefs.h. */
15685 call__builtin_bswap64(long int x)
15687 return __builtin_bswap64(x);
15690 main ()
15694 return 0;
15696 _ACEOF
15697 if ac_fn_c_try_link "$LINENO"; then :
15698 pgac_cv__builtin_bswap64=yes
15699 else
15700 pgac_cv__builtin_bswap64=no
15702 rm -f core conftest.err conftest.$ac_objext \
15703 conftest$ac_exeext conftest.$ac_ext
15705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15706 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15707 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15709 cat >>confdefs.h <<_ACEOF
15710 #define HAVE__BUILTIN_BSWAP64 1
15711 _ACEOF
15714 # We assume that we needn't test all widths of these explicitly:
15715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15716 $as_echo_n "checking for __builtin_clz... " >&6; }
15717 if ${pgac_cv__builtin_clz+:} false; then :
15718 $as_echo_n "(cached) " >&6
15719 else
15720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15721 /* end confdefs.h. */
15724 call__builtin_clz(unsigned int x)
15726 return __builtin_clz(x);
15729 main ()
15733 return 0;
15735 _ACEOF
15736 if ac_fn_c_try_link "$LINENO"; then :
15737 pgac_cv__builtin_clz=yes
15738 else
15739 pgac_cv__builtin_clz=no
15741 rm -f core conftest.err conftest.$ac_objext \
15742 conftest$ac_exeext conftest.$ac_ext
15744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15745 $as_echo "$pgac_cv__builtin_clz" >&6; }
15746 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15748 cat >>confdefs.h <<_ACEOF
15749 #define HAVE__BUILTIN_CLZ 1
15750 _ACEOF
15753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15754 $as_echo_n "checking for __builtin_ctz... " >&6; }
15755 if ${pgac_cv__builtin_ctz+:} false; then :
15756 $as_echo_n "(cached) " >&6
15757 else
15758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15759 /* end confdefs.h. */
15762 call__builtin_ctz(unsigned int x)
15764 return __builtin_ctz(x);
15767 main ()
15771 return 0;
15773 _ACEOF
15774 if ac_fn_c_try_link "$LINENO"; then :
15775 pgac_cv__builtin_ctz=yes
15776 else
15777 pgac_cv__builtin_ctz=no
15779 rm -f core conftest.err conftest.$ac_objext \
15780 conftest$ac_exeext conftest.$ac_ext
15782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15783 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15784 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15786 cat >>confdefs.h <<_ACEOF
15787 #define HAVE__BUILTIN_CTZ 1
15788 _ACEOF
15791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15792 $as_echo_n "checking for __builtin_popcount... " >&6; }
15793 if ${pgac_cv__builtin_popcount+:} false; then :
15794 $as_echo_n "(cached) " >&6
15795 else
15796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15797 /* end confdefs.h. */
15800 call__builtin_popcount(unsigned int x)
15802 return __builtin_popcount(x);
15805 main ()
15809 return 0;
15811 _ACEOF
15812 if ac_fn_c_try_link "$LINENO"; then :
15813 pgac_cv__builtin_popcount=yes
15814 else
15815 pgac_cv__builtin_popcount=no
15817 rm -f core conftest.err conftest.$ac_objext \
15818 conftest$ac_exeext conftest.$ac_ext
15820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15821 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15822 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15824 cat >>confdefs.h <<_ACEOF
15825 #define HAVE__BUILTIN_POPCOUNT 1
15826 _ACEOF
15829 # __builtin_frame_address may draw a diagnostic for non-constant argument,
15830 # so it needs a different test function.
15831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
15832 $as_echo_n "checking for __builtin_frame_address... " >&6; }
15833 if ${pgac_cv__builtin_frame_address+:} false; then :
15834 $as_echo_n "(cached) " >&6
15835 else
15836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15837 /* end confdefs.h. */
15839 void *
15840 call__builtin_frame_address(void)
15842 return __builtin_frame_address(0);
15845 main ()
15849 return 0;
15851 _ACEOF
15852 if ac_fn_c_try_link "$LINENO"; then :
15853 pgac_cv__builtin_frame_address=yes
15854 else
15855 pgac_cv__builtin_frame_address=no
15857 rm -f core conftest.err conftest.$ac_objext \
15858 conftest$ac_exeext conftest.$ac_ext
15860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5
15861 $as_echo "$pgac_cv__builtin_frame_address" >&6; }
15862 if test x"${pgac_cv__builtin_frame_address}" = xyes ; then
15864 cat >>confdefs.h <<_ACEOF
15865 #define HAVE__BUILTIN_FRAME_ADDRESS 1
15866 _ACEOF
15870 # We require 64-bit fseeko() to be available, but run this check anyway
15871 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
15872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15873 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15874 if ${ac_cv_sys_largefile_source+:} false; then :
15875 $as_echo_n "(cached) " >&6
15876 else
15877 while :; do
15878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15879 /* end confdefs.h. */
15880 #include <sys/types.h> /* for off_t */
15881 #include <stdio.h>
15883 main ()
15885 int (*fp) (FILE *, off_t, int) = fseeko;
15886 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15888 return 0;
15890 _ACEOF
15891 if ac_fn_c_try_link "$LINENO"; then :
15892 ac_cv_sys_largefile_source=no; break
15894 rm -f core conftest.err conftest.$ac_objext \
15895 conftest$ac_exeext conftest.$ac_ext
15896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15897 /* end confdefs.h. */
15898 #define _LARGEFILE_SOURCE 1
15899 #include <sys/types.h> /* for off_t */
15900 #include <stdio.h>
15902 main ()
15904 int (*fp) (FILE *, off_t, int) = fseeko;
15905 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15907 return 0;
15909 _ACEOF
15910 if ac_fn_c_try_link "$LINENO"; then :
15911 ac_cv_sys_largefile_source=1; break
15913 rm -f core conftest.err conftest.$ac_objext \
15914 conftest$ac_exeext conftest.$ac_ext
15915 ac_cv_sys_largefile_source=unknown
15916 break
15917 done
15919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15920 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15921 case $ac_cv_sys_largefile_source in #(
15922 no | unknown) ;;
15924 cat >>confdefs.h <<_ACEOF
15925 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15926 _ACEOF
15928 esac
15929 rm -rf conftest*
15931 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15932 # in glibc 2.1.3, but that breaks too many other things.
15933 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15934 if test $ac_cv_sys_largefile_source != unknown; then
15936 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15941 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15942 # by calling it, 2009-04-02
15943 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15944 # The Clang compiler raises a warning for an undeclared identifier that matches
15945 # a compiler builtin function. All extant Clang versions are affected, as of
15946 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
15947 # C and Objective C languages, but Clang does report an error under C++ and
15948 # Objective C++.
15950 # Passing -fno-builtin to the compiler would suppress this problem. That
15951 # strategy would have the advantage of being insensitive to stray warnings, but
15952 # it would make tests less realistic.
15953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15954 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15955 if ${ac_cv_c_decl_report+:} false; then :
15956 $as_echo_n "(cached) " >&6
15957 else
15958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15959 /* end confdefs.h. */
15962 main ()
15964 (void) strchr;
15966 return 0;
15968 _ACEOF
15969 if ac_fn_c_try_compile "$LINENO"; then :
15970 if test -s conftest.err; then :
15971 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15972 # valid AC_CHECK_DECL input. No library function is consistently available
15973 # on freestanding implementations, so test against a dummy declaration.
15974 # Include always-available headers on the off chance that they somehow
15975 # elicit warnings.
15976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15977 /* end confdefs.h. */
15978 #include <float.h>
15979 #include <limits.h>
15980 #include <stdarg.h>
15981 #include <stddef.h>
15982 extern void ac_decl (int, char *);
15984 main ()
15986 #ifdef __cplusplus
15987 (void) ac_decl ((int) 0, (char *) 0);
15988 (void) ac_decl;
15989 #else
15990 (void) ac_decl;
15991 #endif
15994 return 0;
15996 _ACEOF
15997 if ac_fn_c_try_compile "$LINENO"; then :
15998 if test -s conftest.err; then :
15999 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16000 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16001 as_fn_error $? "cannot detect from compiler exit status or warnings
16002 See \`config.log' for more details" "$LINENO" 5; }
16003 else
16004 ac_cv_c_decl_report=warning
16006 else
16007 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16008 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16009 as_fn_error $? "cannot compile a simple declaration test
16010 See \`config.log' for more details" "$LINENO" 5; }
16012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16013 else
16014 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16015 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16016 as_fn_error $? "compiler does not report undeclared identifiers
16017 See \`config.log' for more details" "$LINENO" 5; }
16019 else
16020 ac_cv_c_decl_report=error
16022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
16025 $as_echo "$ac_cv_c_decl_report" >&6; }
16027 case $ac_cv_c_decl_report in
16028 warning) ac_c_decl_warn_flag=yes ;;
16029 *) ac_c_decl_warn_flag= ;;
16030 esac
16032 if test "$PORTNAME" != "solaris"; then :
16034 for ac_func in posix_fadvise
16035 do :
16036 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
16037 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
16038 cat >>confdefs.h <<_ACEOF
16039 #define HAVE_POSIX_FADVISE 1
16040 _ACEOF
16043 done
16045 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
16047 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
16048 ac_have_decl=1
16049 else
16050 ac_have_decl=0
16053 cat >>confdefs.h <<_ACEOF
16054 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
16055 _ACEOF
16058 fi # fi
16060 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
16062 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
16063 ac_have_decl=1
16064 else
16065 ac_have_decl=0
16068 cat >>confdefs.h <<_ACEOF
16069 #define HAVE_DECL_FDATASYNC $ac_have_decl
16070 _ACEOF
16072 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
16073 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
16074 ac_have_decl=1
16075 else
16076 ac_have_decl=0
16079 cat >>confdefs.h <<_ACEOF
16080 #define HAVE_DECL_STRLCAT $ac_have_decl
16081 _ACEOF
16082 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
16083 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
16084 ac_have_decl=1
16085 else
16086 ac_have_decl=0
16089 cat >>confdefs.h <<_ACEOF
16090 #define HAVE_DECL_STRLCPY $ac_have_decl
16091 _ACEOF
16092 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
16093 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
16094 ac_have_decl=1
16095 else
16096 ac_have_decl=0
16099 cat >>confdefs.h <<_ACEOF
16100 #define HAVE_DECL_STRNLEN $ac_have_decl
16101 _ACEOF
16104 # We can't use AC_REPLACE_FUNCS to replace these functions, because it
16105 # won't handle deployment target restrictions on macOS
16106 ac_fn_c_check_decl "$LINENO" "preadv" "ac_cv_have_decl_preadv" "#include <sys/uio.h>
16108 if test "x$ac_cv_have_decl_preadv" = xyes; then :
16109 ac_have_decl=1
16110 else
16111 ac_have_decl=0
16114 cat >>confdefs.h <<_ACEOF
16115 #define HAVE_DECL_PREADV $ac_have_decl
16116 _ACEOF
16117 if test $ac_have_decl = 1; then :
16119 else
16120 case " $LIBOBJS " in
16121 *" preadv.$ac_objext "* ) ;;
16122 *) LIBOBJS="$LIBOBJS preadv.$ac_objext"
16124 esac
16128 ac_fn_c_check_decl "$LINENO" "pwritev" "ac_cv_have_decl_pwritev" "#include <sys/uio.h>
16130 if test "x$ac_cv_have_decl_pwritev" = xyes; then :
16131 ac_have_decl=1
16132 else
16133 ac_have_decl=0
16136 cat >>confdefs.h <<_ACEOF
16137 #define HAVE_DECL_PWRITEV $ac_have_decl
16138 _ACEOF
16139 if test $ac_have_decl = 1; then :
16141 else
16142 case " $LIBOBJS " in
16143 *" pwritev.$ac_objext "* ) ;;
16144 *) LIBOBJS="$LIBOBJS pwritev.$ac_objext"
16146 esac
16151 # This is probably only present on macOS, but may as well check always
16152 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
16154 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
16155 ac_have_decl=1
16156 else
16157 ac_have_decl=0
16160 cat >>confdefs.h <<_ACEOF
16161 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
16162 _ACEOF
16165 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
16166 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
16167 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
16169 else
16170 case " $LIBOBJS " in
16171 *" explicit_bzero.$ac_objext "* ) ;;
16172 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
16174 esac
16178 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
16179 if test "x$ac_cv_func_getopt" = xyes; then :
16180 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
16182 else
16183 case " $LIBOBJS " in
16184 *" getopt.$ac_objext "* ) ;;
16185 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16187 esac
16191 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
16192 if test "x$ac_cv_func_getpeereid" = xyes; then :
16193 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16195 else
16196 case " $LIBOBJS " in
16197 *" getpeereid.$ac_objext "* ) ;;
16198 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
16200 esac
16204 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
16205 if test "x$ac_cv_func_inet_aton" = xyes; then :
16206 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
16208 else
16209 case " $LIBOBJS " in
16210 *" inet_aton.$ac_objext "* ) ;;
16211 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
16213 esac
16217 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
16218 if test "x$ac_cv_func_mkdtemp" = xyes; then :
16219 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
16221 else
16222 case " $LIBOBJS " in
16223 *" mkdtemp.$ac_objext "* ) ;;
16224 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
16226 esac
16230 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
16231 if test "x$ac_cv_func_strlcat" = xyes; then :
16232 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
16234 else
16235 case " $LIBOBJS " in
16236 *" strlcat.$ac_objext "* ) ;;
16237 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
16239 esac
16243 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
16244 if test "x$ac_cv_func_strlcpy" = xyes; then :
16245 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
16247 else
16248 case " $LIBOBJS " in
16249 *" strlcpy.$ac_objext "* ) ;;
16250 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
16252 esac
16256 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
16257 if test "x$ac_cv_func_strnlen" = xyes; then :
16258 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
16260 else
16261 case " $LIBOBJS " in
16262 *" strnlen.$ac_objext "* ) ;;
16263 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
16265 esac
16271 ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
16272 if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
16273 $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
16275 else
16276 case " $LIBOBJS " in
16277 *" pthread_barrier_wait.$ac_objext "* ) ;;
16278 *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
16280 esac
16286 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
16287 # Cygwin and (apparently, based on test results) Mingw both
16288 # have a broken strtof(), so substitute its implementation.
16289 # That's not a perfect fix, since it doesn't avoid double-rounding,
16290 # but we have no better options.
16291 case " $LIBOBJS " in
16292 *" strtof.$ac_objext "* ) ;;
16293 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16295 esac
16297 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
16298 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
16301 # Similarly, use system's getopt_long() only if system provides struct option.
16302 if test x"$ac_cv_type_struct_option" = xyes ; then
16303 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
16304 if test "x$ac_cv_func_getopt_long" = xyes; then :
16305 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
16307 else
16308 case " $LIBOBJS " in
16309 *" getopt_long.$ac_objext "* ) ;;
16310 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16312 esac
16317 else
16318 case " $LIBOBJS " in
16319 *" getopt_long.$ac_objext "* ) ;;
16320 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16322 esac
16326 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
16327 # (i.e., allow '-' as a flag character), so use our version on those platforms.
16328 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
16329 case " $LIBOBJS " in
16330 *" getopt.$ac_objext "* ) ;;
16331 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16333 esac
16337 # mingw has adopted a GNU-centric interpretation of optind/optreset,
16338 # so always use our version on Windows.
16339 if test "$PORTNAME" = "win32"; then
16340 case " $LIBOBJS " in
16341 *" getopt.$ac_objext "* ) ;;
16342 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16344 esac
16346 case " $LIBOBJS " in
16347 *" getopt_long.$ac_objext "* ) ;;
16348 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16350 esac
16354 # Win32 (really MinGW) support
16355 if test "$PORTNAME" = "win32"; then
16356 for ac_func in _configthreadlocale
16357 do :
16358 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16359 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16360 cat >>confdefs.h <<_ACEOF
16361 #define HAVE__CONFIGTHREADLOCALE 1
16362 _ACEOF
16365 done
16367 case " $LIBOBJS " in
16368 *" dirmod.$ac_objext "* ) ;;
16369 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16371 esac
16373 case " $LIBOBJS " in
16374 *" kill.$ac_objext "* ) ;;
16375 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16377 esac
16379 case " $LIBOBJS " in
16380 *" open.$ac_objext "* ) ;;
16381 *) LIBOBJS="$LIBOBJS open.$ac_objext"
16383 esac
16385 case " $LIBOBJS " in
16386 *" system.$ac_objext "* ) ;;
16387 *) LIBOBJS="$LIBOBJS system.$ac_objext"
16389 esac
16391 case " $LIBOBJS " in
16392 *" win32common.$ac_objext "* ) ;;
16393 *) LIBOBJS="$LIBOBJS win32common.$ac_objext"
16395 esac
16397 case " $LIBOBJS " in
16398 *" win32dlopen.$ac_objext "* ) ;;
16399 *) LIBOBJS="$LIBOBJS win32dlopen.$ac_objext"
16401 esac
16403 case " $LIBOBJS " in
16404 *" win32env.$ac_objext "* ) ;;
16405 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16407 esac
16409 case " $LIBOBJS " in
16410 *" win32error.$ac_objext "* ) ;;
16411 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16413 esac
16415 case " $LIBOBJS " in
16416 *" win32fdatasync.$ac_objext "* ) ;;
16417 *) LIBOBJS="$LIBOBJS win32fdatasync.$ac_objext"
16419 esac
16421 case " $LIBOBJS " in
16422 *" win32getrusage.$ac_objext "* ) ;;
16423 *) LIBOBJS="$LIBOBJS win32getrusage.$ac_objext"
16425 esac
16427 case " $LIBOBJS " in
16428 *" win32link.$ac_objext "* ) ;;
16429 *) LIBOBJS="$LIBOBJS win32link.$ac_objext"
16431 esac
16433 case " $LIBOBJS " in
16434 *" win32ntdll.$ac_objext "* ) ;;
16435 *) LIBOBJS="$LIBOBJS win32ntdll.$ac_objext"
16437 esac
16439 case " $LIBOBJS " in
16440 *" win32pread.$ac_objext "* ) ;;
16441 *) LIBOBJS="$LIBOBJS win32pread.$ac_objext"
16443 esac
16445 case " $LIBOBJS " in
16446 *" win32pwrite.$ac_objext "* ) ;;
16447 *) LIBOBJS="$LIBOBJS win32pwrite.$ac_objext"
16449 esac
16451 case " $LIBOBJS " in
16452 *" win32security.$ac_objext "* ) ;;
16453 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16455 esac
16457 case " $LIBOBJS " in
16458 *" win32setlocale.$ac_objext "* ) ;;
16459 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16461 esac
16463 case " $LIBOBJS " in
16464 *" win32stat.$ac_objext "* ) ;;
16465 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
16467 esac
16470 # Cygwin needs only a bit of that
16471 if test "$PORTNAME" = "cygwin"; then
16472 case " $LIBOBJS " in
16473 *" dirmod.$ac_objext "* ) ;;
16474 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16476 esac
16480 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16481 if test "x$ac_cv_func_syslog" = xyes; then :
16482 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16483 if test "x$ac_cv_header_syslog_h" = xyes; then :
16485 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16494 $as_echo_n "checking for opterr... " >&6; }
16495 if ${pgac_cv_var_int_opterr+:} false; then :
16496 $as_echo_n "(cached) " >&6
16497 else
16498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16499 /* end confdefs.h. */
16500 #include <unistd.h>
16502 main ()
16504 extern int opterr; opterr = 1;
16506 return 0;
16508 _ACEOF
16509 if ac_fn_c_try_link "$LINENO"; then :
16510 pgac_cv_var_int_opterr=yes
16511 else
16512 pgac_cv_var_int_opterr=no
16514 rm -f core conftest.err conftest.$ac_objext \
16515 conftest$ac_exeext conftest.$ac_ext
16517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16518 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16519 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16521 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16526 $as_echo_n "checking for optreset... " >&6; }
16527 if ${pgac_cv_var_int_optreset+:} false; then :
16528 $as_echo_n "(cached) " >&6
16529 else
16530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16531 /* end confdefs.h. */
16532 #include <unistd.h>
16534 main ()
16536 extern int optreset; optreset = 1;
16538 return 0;
16540 _ACEOF
16541 if ac_fn_c_try_link "$LINENO"; then :
16542 pgac_cv_var_int_optreset=yes
16543 else
16544 pgac_cv_var_int_optreset=no
16546 rm -f core conftest.err conftest.$ac_objext \
16547 conftest$ac_exeext conftest.$ac_ext
16549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16550 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16551 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16553 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16557 if test "$with_icu" = yes; then
16558 ac_save_CPPFLAGS=$CPPFLAGS
16559 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16561 # Verify we have ICU's header files
16562 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16563 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16565 else
16566 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16571 CPPFLAGS=$ac_save_CPPFLAGS
16574 if test "$with_llvm" = yes; then
16576 # Check which functionality is present
16577 SAVE_CPPFLAGS="$CPPFLAGS"
16578 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16579 ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16581 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16582 ac_have_decl=1
16583 else
16584 ac_have_decl=0
16587 cat >>confdefs.h <<_ACEOF
16588 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16589 _ACEOF
16591 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16593 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16594 ac_have_decl=1
16595 else
16596 ac_have_decl=0
16599 cat >>confdefs.h <<_ACEOF
16600 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16601 _ACEOF
16602 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16604 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16605 ac_have_decl=1
16606 else
16607 ac_have_decl=0
16610 cat >>confdefs.h <<_ACEOF
16611 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16612 _ACEOF
16614 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16616 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16617 ac_have_decl=1
16618 else
16619 ac_have_decl=0
16622 cat >>confdefs.h <<_ACEOF
16623 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16624 _ACEOF
16625 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16627 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16628 ac_have_decl=1
16629 else
16630 ac_have_decl=0
16633 cat >>confdefs.h <<_ACEOF
16634 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16635 _ACEOF
16637 CPPFLAGS="$SAVE_CPPFLAGS"
16641 # Lastly, restore full LIBS list and check for readline/libedit symbols
16642 LIBS="$LIBS_including_readline"
16644 if test "$with_readline" = yes; then
16645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
16646 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
16647 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
16648 $as_echo_n "(cached) " >&6
16649 else
16650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16651 /* end confdefs.h. */
16652 #include <stdio.h>
16653 #if defined(HAVE_READLINE_READLINE_H)
16654 #include <readline/readline.h>
16655 #elif defined(HAVE_EDITLINE_READLINE_H)
16656 #include <editline/readline.h>
16657 #elif defined(HAVE_READLINE_H)
16658 #include <readline.h>
16659 #endif
16662 main ()
16664 rl_completion_suppress_quote = 1;
16666 return 0;
16668 _ACEOF
16669 if ac_fn_c_try_link "$LINENO"; then :
16670 pgac_cv_var_rl_completion_suppress_quote=yes
16671 else
16672 pgac_cv_var_rl_completion_suppress_quote=no
16674 rm -f core conftest.err conftest.$ac_objext \
16675 conftest$ac_exeext conftest.$ac_ext
16677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
16678 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
16679 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
16681 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
16684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
16685 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
16686 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
16687 $as_echo_n "(cached) " >&6
16688 else
16689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16690 /* end confdefs.h. */
16691 #include <stdio.h>
16692 #if defined(HAVE_READLINE_READLINE_H)
16693 #include <readline/readline.h>
16694 #elif defined(HAVE_EDITLINE_READLINE_H)
16695 #include <editline/readline.h>
16696 #elif defined(HAVE_READLINE_H)
16697 #include <readline.h>
16698 #endif
16701 main ()
16703 rl_filename_quote_characters = "x";
16705 return 0;
16707 _ACEOF
16708 if ac_fn_c_try_link "$LINENO"; then :
16709 pgac_cv_var_rl_filename_quote_characters=yes
16710 else
16711 pgac_cv_var_rl_filename_quote_characters=no
16713 rm -f core conftest.err conftest.$ac_objext \
16714 conftest$ac_exeext conftest.$ac_ext
16716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
16717 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
16718 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
16720 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
16723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
16724 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
16725 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
16726 $as_echo_n "(cached) " >&6
16727 else
16728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16729 /* end confdefs.h. */
16730 #include <stdio.h>
16731 #if defined(HAVE_READLINE_READLINE_H)
16732 #include <readline/readline.h>
16733 #elif defined(HAVE_EDITLINE_READLINE_H)
16734 #include <editline/readline.h>
16735 #elif defined(HAVE_READLINE_H)
16736 #include <readline.h>
16737 #endif
16740 main ()
16742 rl_filename_quoting_function = 0;
16744 return 0;
16746 _ACEOF
16747 if ac_fn_c_try_link "$LINENO"; then :
16748 pgac_cv_var_rl_filename_quoting_function=yes
16749 else
16750 pgac_cv_var_rl_filename_quoting_function=no
16752 rm -f core conftest.err conftest.$ac_objext \
16753 conftest$ac_exeext conftest.$ac_ext
16755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
16756 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
16757 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
16759 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
16763 for ac_func in append_history history_truncate_file rl_completion_matches rl_filename_completion_function rl_reset_screen_size rl_variable_bind
16764 do :
16765 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16766 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16767 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16768 cat >>confdefs.h <<_ACEOF
16769 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16770 _ACEOF
16773 done
16778 # This test makes sure that run tests work at all. Sometimes a shared
16779 # library is found by the linker, but the runtime linker can't find it.
16780 # This check should come after all modifications of compiler or linker
16781 # variables, and before any other run tests.
16782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16783 $as_echo_n "checking test program... " >&6; }
16784 if test "$cross_compiling" = yes; then :
16785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16786 $as_echo "cross-compiling" >&6; }
16787 else
16788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16789 /* end confdefs.h. */
16790 int main() { return 0; }
16791 _ACEOF
16792 if ac_fn_c_try_run "$LINENO"; then :
16793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16794 $as_echo "ok" >&6; }
16795 else
16796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16797 $as_echo "failed" >&6; }
16798 as_fn_error $? "
16799 Could not execute a simple test program. This may be a problem
16800 related to locating shared libraries. Check the file 'config.log'
16801 for the exact reason." "$LINENO" 5
16803 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16804 conftest.$ac_objext conftest.beam conftest.$ac_ext
16808 # --------------------
16809 # Run tests below here
16810 # --------------------
16813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16814 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16815 if ${pgac_cv_type_long_int_64+:} false; then :
16816 $as_echo_n "(cached) " >&6
16817 else
16818 if test "$cross_compiling" = yes; then :
16819 # If cross-compiling, check the size reported by the compiler and
16820 # trust that the arithmetic works.
16821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16822 /* end confdefs.h. */
16825 main ()
16827 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16828 test_array [0] = 0;
16829 return test_array [0];
16832 return 0;
16834 _ACEOF
16835 if ac_fn_c_try_compile "$LINENO"; then :
16836 pgac_cv_type_long_int_64=yes
16837 else
16838 pgac_cv_type_long_int_64=no
16840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16841 else
16842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16843 /* end confdefs.h. */
16844 typedef long int ac_int64;
16847 * These are globals to discourage the compiler from folding all the
16848 * arithmetic tests down to compile-time constants.
16850 ac_int64 a = 20000001;
16851 ac_int64 b = 40000005;
16853 int does_int64_work()
16855 ac_int64 c,d;
16857 if (sizeof(ac_int64) != 8)
16858 return 0; /* definitely not the right size */
16860 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16861 c = a * b;
16862 d = (c + b) / b;
16863 if (d != a+1)
16864 return 0;
16865 return 1;
16869 main() {
16870 return (! does_int64_work());
16872 _ACEOF
16873 if ac_fn_c_try_run "$LINENO"; then :
16874 pgac_cv_type_long_int_64=yes
16875 else
16876 pgac_cv_type_long_int_64=no
16878 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16879 conftest.$ac_objext conftest.beam conftest.$ac_ext
16883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16884 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16886 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16887 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16889 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16894 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16895 pg_int64_type="long int"
16896 else
16897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16898 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16899 if ${pgac_cv_type_long_long_int_64+:} false; then :
16900 $as_echo_n "(cached) " >&6
16901 else
16902 if test "$cross_compiling" = yes; then :
16903 # If cross-compiling, check the size reported by the compiler and
16904 # trust that the arithmetic works.
16905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16906 /* end confdefs.h. */
16909 main ()
16911 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16912 test_array [0] = 0;
16913 return test_array [0];
16916 return 0;
16918 _ACEOF
16919 if ac_fn_c_try_compile "$LINENO"; then :
16920 pgac_cv_type_long_long_int_64=yes
16921 else
16922 pgac_cv_type_long_long_int_64=no
16924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16925 else
16926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16927 /* end confdefs.h. */
16928 typedef long long int ac_int64;
16931 * These are globals to discourage the compiler from folding all the
16932 * arithmetic tests down to compile-time constants.
16934 ac_int64 a = 20000001;
16935 ac_int64 b = 40000005;
16937 int does_int64_work()
16939 ac_int64 c,d;
16941 if (sizeof(ac_int64) != 8)
16942 return 0; /* definitely not the right size */
16944 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16945 c = a * b;
16946 d = (c + b) / b;
16947 if (d != a+1)
16948 return 0;
16949 return 1;
16953 main() {
16954 return (! does_int64_work());
16956 _ACEOF
16957 if ac_fn_c_try_run "$LINENO"; then :
16958 pgac_cv_type_long_long_int_64=yes
16959 else
16960 pgac_cv_type_long_long_int_64=no
16962 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16963 conftest.$ac_objext conftest.beam conftest.$ac_ext
16967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16968 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16970 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16971 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16973 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16977 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16978 pg_int64_type="long long int"
16979 else
16980 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16985 cat >>confdefs.h <<_ACEOF
16986 #define PG_INT64_TYPE $pg_int64_type
16987 _ACEOF
16990 # Select the printf length modifier that goes with that, too.
16991 if test x"$pg_int64_type" = x"long long int" ; then
16992 INT64_MODIFIER='"ll"'
16993 else
16994 INT64_MODIFIER='"l"'
16998 cat >>confdefs.h <<_ACEOF
16999 #define INT64_MODIFIER $INT64_MODIFIER
17000 _ACEOF
17003 # has to be down here, rather than with the other builtins, because
17004 # the test uses PG_INT64_TYPE.
17005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
17006 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
17007 if ${pgac_cv__builtin_op_overflow+:} false; then :
17008 $as_echo_n "(cached) " >&6
17009 else
17010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17011 /* end confdefs.h. */
17013 PG_INT64_TYPE a = 1;
17014 PG_INT64_TYPE b = 1;
17015 PG_INT64_TYPE result;
17016 int oflo;
17019 main ()
17021 oflo = __builtin_mul_overflow(a, b, &result);
17023 return 0;
17025 _ACEOF
17026 if ac_fn_c_try_link "$LINENO"; then :
17027 pgac_cv__builtin_op_overflow=yes
17028 else
17029 pgac_cv__builtin_op_overflow=no
17031 rm -f core conftest.err conftest.$ac_objext \
17032 conftest$ac_exeext conftest.$ac_ext
17034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
17035 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
17036 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
17038 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
17042 # Check size of void *, size_t (enables tweaks for > 32bit address space)
17043 # The cast to long int works around a bug in the HP C Compiler
17044 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17045 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17046 # This bug is HP SR number 8606223364.
17047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
17048 $as_echo_n "checking size of void *... " >&6; }
17049 if ${ac_cv_sizeof_void_p+:} false; then :
17050 $as_echo_n "(cached) " >&6
17051 else
17052 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
17054 else
17055 if test "$ac_cv_type_void_p" = yes; then
17056 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17057 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17058 as_fn_error 77 "cannot compute sizeof (void *)
17059 See \`config.log' for more details" "$LINENO" 5; }
17060 else
17061 ac_cv_sizeof_void_p=0
17066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
17067 $as_echo "$ac_cv_sizeof_void_p" >&6; }
17071 cat >>confdefs.h <<_ACEOF
17072 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
17073 _ACEOF
17076 # The cast to long int works around a bug in the HP C Compiler
17077 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17078 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17079 # This bug is HP SR number 8606223364.
17080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
17081 $as_echo_n "checking size of size_t... " >&6; }
17082 if ${ac_cv_sizeof_size_t+:} false; then :
17083 $as_echo_n "(cached) " >&6
17084 else
17085 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
17087 else
17088 if test "$ac_cv_type_size_t" = yes; then
17089 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17090 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17091 as_fn_error 77 "cannot compute sizeof (size_t)
17092 See \`config.log' for more details" "$LINENO" 5; }
17093 else
17094 ac_cv_sizeof_size_t=0
17099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
17100 $as_echo "$ac_cv_sizeof_size_t" >&6; }
17104 cat >>confdefs.h <<_ACEOF
17105 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
17106 _ACEOF
17109 # The cast to long int works around a bug in the HP C Compiler
17110 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17111 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17112 # This bug is HP SR number 8606223364.
17113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
17114 $as_echo_n "checking size of long... " >&6; }
17115 if ${ac_cv_sizeof_long+:} false; then :
17116 $as_echo_n "(cached) " >&6
17117 else
17118 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
17120 else
17121 if test "$ac_cv_type_long" = yes; then
17122 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17123 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17124 as_fn_error 77 "cannot compute sizeof (long)
17125 See \`config.log' for more details" "$LINENO" 5; }
17126 else
17127 ac_cv_sizeof_long=0
17132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
17133 $as_echo "$ac_cv_sizeof_long" >&6; }
17137 cat >>confdefs.h <<_ACEOF
17138 #define SIZEOF_LONG $ac_cv_sizeof_long
17139 _ACEOF
17143 # Determine memory alignment requirements for the basic C data types.
17145 # The cast to long int works around a bug in the HP C Compiler,
17146 # see AC_CHECK_SIZEOF for more information.
17147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
17148 $as_echo_n "checking alignment of short... " >&6; }
17149 if ${ac_cv_alignof_short+:} false; then :
17150 $as_echo_n "(cached) " >&6
17151 else
17152 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
17153 #ifndef offsetof
17154 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17155 #endif
17156 typedef struct { char x; short y; } ac__type_alignof_;"; then :
17158 else
17159 if test "$ac_cv_type_short" = yes; then
17160 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17161 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17162 as_fn_error 77 "cannot compute alignment of short
17163 See \`config.log' for more details" "$LINENO" 5; }
17164 else
17165 ac_cv_alignof_short=0
17170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
17171 $as_echo "$ac_cv_alignof_short" >&6; }
17175 cat >>confdefs.h <<_ACEOF
17176 #define ALIGNOF_SHORT $ac_cv_alignof_short
17177 _ACEOF
17180 # The cast to long int works around a bug in the HP C Compiler,
17181 # see AC_CHECK_SIZEOF for more information.
17182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
17183 $as_echo_n "checking alignment of int... " >&6; }
17184 if ${ac_cv_alignof_int+:} false; then :
17185 $as_echo_n "(cached) " >&6
17186 else
17187 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
17188 #ifndef offsetof
17189 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17190 #endif
17191 typedef struct { char x; int y; } ac__type_alignof_;"; then :
17193 else
17194 if test "$ac_cv_type_int" = yes; then
17195 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17196 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17197 as_fn_error 77 "cannot compute alignment of int
17198 See \`config.log' for more details" "$LINENO" 5; }
17199 else
17200 ac_cv_alignof_int=0
17205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
17206 $as_echo "$ac_cv_alignof_int" >&6; }
17210 cat >>confdefs.h <<_ACEOF
17211 #define ALIGNOF_INT $ac_cv_alignof_int
17212 _ACEOF
17215 # The cast to long int works around a bug in the HP C Compiler,
17216 # see AC_CHECK_SIZEOF for more information.
17217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17218 $as_echo_n "checking alignment of long... " >&6; }
17219 if ${ac_cv_alignof_long+:} false; then :
17220 $as_echo_n "(cached) " >&6
17221 else
17222 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
17223 #ifndef offsetof
17224 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17225 #endif
17226 typedef struct { char x; long y; } ac__type_alignof_;"; then :
17228 else
17229 if test "$ac_cv_type_long" = yes; then
17230 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17231 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17232 as_fn_error 77 "cannot compute alignment of long
17233 See \`config.log' for more details" "$LINENO" 5; }
17234 else
17235 ac_cv_alignof_long=0
17240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17241 $as_echo "$ac_cv_alignof_long" >&6; }
17245 cat >>confdefs.h <<_ACEOF
17246 #define ALIGNOF_LONG $ac_cv_alignof_long
17247 _ACEOF
17250 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17251 # The cast to long int works around a bug in the HP C Compiler,
17252 # see AC_CHECK_SIZEOF for more information.
17253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
17254 $as_echo_n "checking alignment of long long int... " >&6; }
17255 if ${ac_cv_alignof_long_long_int+:} false; then :
17256 $as_echo_n "(cached) " >&6
17257 else
17258 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
17259 #ifndef offsetof
17260 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17261 #endif
17262 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
17264 else
17265 if test "$ac_cv_type_long_long_int" = yes; then
17266 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17267 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17268 as_fn_error 77 "cannot compute alignment of long long int
17269 See \`config.log' for more details" "$LINENO" 5; }
17270 else
17271 ac_cv_alignof_long_long_int=0
17276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
17277 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
17281 cat >>confdefs.h <<_ACEOF
17282 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
17283 _ACEOF
17287 # The cast to long int works around a bug in the HP C Compiler,
17288 # see AC_CHECK_SIZEOF for more information.
17289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
17290 $as_echo_n "checking alignment of double... " >&6; }
17291 if ${ac_cv_alignof_double+:} false; then :
17292 $as_echo_n "(cached) " >&6
17293 else
17294 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
17295 #ifndef offsetof
17296 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17297 #endif
17298 typedef struct { char x; double y; } ac__type_alignof_;"; then :
17300 else
17301 if test "$ac_cv_type_double" = yes; then
17302 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17303 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17304 as_fn_error 77 "cannot compute alignment of double
17305 See \`config.log' for more details" "$LINENO" 5; }
17306 else
17307 ac_cv_alignof_double=0
17312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17313 $as_echo "$ac_cv_alignof_double" >&6; }
17317 cat >>confdefs.h <<_ACEOF
17318 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
17319 _ACEOF
17323 # Compute maximum alignment of any basic type.
17324 # We assume long's alignment is at least as strong as char, short, or int;
17325 # but we must check long long (if it is being used for int64) and double.
17326 # Note that we intentionally do not consider any types wider than 64 bits,
17327 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17328 # for disk and memory space.
17330 MAX_ALIGNOF=$ac_cv_alignof_long
17331 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17332 MAX_ALIGNOF=$ac_cv_alignof_double
17334 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17335 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17338 cat >>confdefs.h <<_ACEOF
17339 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17340 _ACEOF
17344 # Some platforms predefine the types int8, int16, etc. Only check
17345 # a (hopefully) representative subset.
17346 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17348 if test "x$ac_cv_type_int8" = xyes; then :
17350 cat >>confdefs.h <<_ACEOF
17351 #define HAVE_INT8 1
17352 _ACEOF
17356 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17358 if test "x$ac_cv_type_uint8" = xyes; then :
17360 cat >>confdefs.h <<_ACEOF
17361 #define HAVE_UINT8 1
17362 _ACEOF
17366 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17368 if test "x$ac_cv_type_int64" = xyes; then :
17370 cat >>confdefs.h <<_ACEOF
17371 #define HAVE_INT64 1
17372 _ACEOF
17376 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17378 if test "x$ac_cv_type_uint64" = xyes; then :
17380 cat >>confdefs.h <<_ACEOF
17381 #define HAVE_UINT64 1
17382 _ACEOF
17388 # Some compilers offer a 128-bit integer scalar type.
17389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17390 $as_echo_n "checking for __int128... " >&6; }
17391 if ${pgac_cv__128bit_int+:} false; then :
17392 $as_echo_n "(cached) " >&6
17393 else
17394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17395 /* end confdefs.h. */
17398 * We don't actually run this test, just link it to verify that any support
17399 * functions needed for __int128 are present.
17401 * These are globals to discourage the compiler from folding all the
17402 * arithmetic tests down to compile-time constants. We do not have
17403 * convenient support for 128bit literals at this point...
17405 __int128 a = 48828125;
17406 __int128 b = 97656250;
17409 main ()
17412 __int128 c,d;
17413 a = (a << 12) + 1; /* 200000000001 */
17414 b = (b << 12) + 5; /* 400000000005 */
17415 /* try the most relevant arithmetic ops */
17416 c = a * b;
17417 d = (c + b) / b;
17418 /* must use the results, else compiler may optimize arithmetic away */
17419 if (d != a+1)
17420 return 1;
17423 return 0;
17425 _ACEOF
17426 if ac_fn_c_try_link "$LINENO"; then :
17427 pgac_cv__128bit_int=yes
17428 else
17429 pgac_cv__128bit_int=no
17431 rm -f core conftest.err conftest.$ac_objext \
17432 conftest$ac_exeext conftest.$ac_ext
17434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17435 $as_echo "$pgac_cv__128bit_int" >&6; }
17436 if test x"$pgac_cv__128bit_int" = xyes ; then
17437 # Use of non-default alignment with __int128 tickles bugs in some compilers.
17438 # If not cross-compiling, we can test for bugs and disable use of __int128
17439 # with buggy compilers. If cross-compiling, hope for the best.
17440 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17442 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17443 if ${pgac_cv__128bit_int_bug+:} false; then :
17444 $as_echo_n "(cached) " >&6
17445 else
17446 if test "$cross_compiling" = yes; then :
17447 pgac_cv__128bit_int_bug="assuming ok"
17448 else
17449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17450 /* end confdefs.h. */
17452 /* This must match the corresponding code in c.h: */
17453 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17454 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17455 #elif defined(_MSC_VER)
17456 #define pg_attribute_aligned(a) __declspec(align(a))
17457 #endif
17458 typedef __int128 int128a
17459 #if defined(pg_attribute_aligned)
17460 pg_attribute_aligned(8)
17461 #endif
17463 int128a holder;
17464 void pass_by_val(void *buffer, int128a par) { holder = par; }
17467 main ()
17470 long int i64 = 97656225L << 12;
17471 int128a q;
17472 pass_by_val(main, (int128a) i64);
17473 q = (int128a) i64;
17474 if (q != holder)
17475 return 1;
17478 return 0;
17480 _ACEOF
17481 if ac_fn_c_try_run "$LINENO"; then :
17482 pgac_cv__128bit_int_bug=ok
17483 else
17484 pgac_cv__128bit_int_bug=broken
17486 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17487 conftest.$ac_objext conftest.beam conftest.$ac_ext
17491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17492 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17493 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17495 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17497 # The cast to long int works around a bug in the HP C Compiler,
17498 # see AC_CHECK_SIZEOF for more information.
17499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17500 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17501 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17502 $as_echo_n "(cached) " >&6
17503 else
17504 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
17505 #ifndef offsetof
17506 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17507 #endif
17508 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17510 else
17511 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17512 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17513 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17514 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17515 See \`config.log' for more details" "$LINENO" 5; }
17516 else
17517 ac_cv_alignof_PG_INT128_TYPE=0
17522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17523 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17527 cat >>confdefs.h <<_ACEOF
17528 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17529 _ACEOF
17535 # Check for various atomic operations now that we have checked how to declare
17536 # 64bit integers.
17537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17538 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17539 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17540 $as_echo_n "(cached) " >&6
17541 else
17542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17543 /* end confdefs.h. */
17546 main ()
17548 char lock = 0;
17549 __sync_lock_test_and_set(&lock, 1);
17550 __sync_lock_release(&lock);
17552 return 0;
17554 _ACEOF
17555 if ac_fn_c_try_link "$LINENO"; then :
17556 pgac_cv_gcc_sync_char_tas="yes"
17557 else
17558 pgac_cv_gcc_sync_char_tas="no"
17560 rm -f core conftest.err conftest.$ac_objext \
17561 conftest$ac_exeext conftest.$ac_ext
17563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17564 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17565 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17567 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17571 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17572 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17573 $as_echo_n "(cached) " >&6
17574 else
17575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17576 /* end confdefs.h. */
17579 main ()
17581 int lock = 0;
17582 __sync_lock_test_and_set(&lock, 1);
17583 __sync_lock_release(&lock);
17585 return 0;
17587 _ACEOF
17588 if ac_fn_c_try_link "$LINENO"; then :
17589 pgac_cv_gcc_sync_int32_tas="yes"
17590 else
17591 pgac_cv_gcc_sync_int32_tas="no"
17593 rm -f core conftest.err conftest.$ac_objext \
17594 conftest$ac_exeext conftest.$ac_ext
17596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17597 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17598 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17600 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17604 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17605 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17606 $as_echo_n "(cached) " >&6
17607 else
17608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17609 /* end confdefs.h. */
17612 main ()
17614 int val = 0;
17615 __sync_val_compare_and_swap(&val, 0, 37);
17617 return 0;
17619 _ACEOF
17620 if ac_fn_c_try_link "$LINENO"; then :
17621 pgac_cv_gcc_sync_int32_cas="yes"
17622 else
17623 pgac_cv_gcc_sync_int32_cas="no"
17625 rm -f core conftest.err conftest.$ac_objext \
17626 conftest$ac_exeext conftest.$ac_ext
17628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17629 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17630 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17632 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17636 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17637 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17638 $as_echo_n "(cached) " >&6
17639 else
17640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17641 /* end confdefs.h. */
17644 main ()
17646 PG_INT64_TYPE lock = 0;
17647 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17649 return 0;
17651 _ACEOF
17652 if ac_fn_c_try_link "$LINENO"; then :
17653 pgac_cv_gcc_sync_int64_cas="yes"
17654 else
17655 pgac_cv_gcc_sync_int64_cas="no"
17657 rm -f core conftest.err conftest.$ac_objext \
17658 conftest$ac_exeext conftest.$ac_ext
17660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17661 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17662 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17664 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17668 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17669 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17670 $as_echo_n "(cached) " >&6
17671 else
17672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17673 /* end confdefs.h. */
17676 main ()
17678 int val = 0;
17679 int expect = 0;
17680 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17682 return 0;
17684 _ACEOF
17685 if ac_fn_c_try_link "$LINENO"; then :
17686 pgac_cv_gcc_atomic_int32_cas="yes"
17687 else
17688 pgac_cv_gcc_atomic_int32_cas="no"
17690 rm -f core conftest.err conftest.$ac_objext \
17691 conftest$ac_exeext conftest.$ac_ext
17693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17694 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17695 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17697 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17701 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17702 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17703 $as_echo_n "(cached) " >&6
17704 else
17705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17706 /* end confdefs.h. */
17709 main ()
17711 PG_INT64_TYPE val = 0;
17712 PG_INT64_TYPE expect = 0;
17713 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17715 return 0;
17717 _ACEOF
17718 if ac_fn_c_try_link "$LINENO"; then :
17719 pgac_cv_gcc_atomic_int64_cas="yes"
17720 else
17721 pgac_cv_gcc_atomic_int64_cas="no"
17723 rm -f core conftest.err conftest.$ac_objext \
17724 conftest$ac_exeext conftest.$ac_ext
17726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17727 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17728 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17730 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17735 # Check for x86 cpuid instruction
17736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17737 $as_echo_n "checking for __get_cpuid... " >&6; }
17738 if ${pgac_cv__get_cpuid+:} false; then :
17739 $as_echo_n "(cached) " >&6
17740 else
17741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17742 /* end confdefs.h. */
17743 #include <cpuid.h>
17745 main ()
17747 unsigned int exx[4] = {0, 0, 0, 0};
17748 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17751 return 0;
17753 _ACEOF
17754 if ac_fn_c_try_link "$LINENO"; then :
17755 pgac_cv__get_cpuid="yes"
17756 else
17757 pgac_cv__get_cpuid="no"
17759 rm -f core conftest.err conftest.$ac_objext \
17760 conftest$ac_exeext conftest.$ac_ext
17762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17763 $as_echo "$pgac_cv__get_cpuid" >&6; }
17764 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17766 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17771 $as_echo_n "checking for __cpuid... " >&6; }
17772 if ${pgac_cv__cpuid+:} false; then :
17773 $as_echo_n "(cached) " >&6
17774 else
17775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17776 /* end confdefs.h. */
17777 #include <intrin.h>
17779 main ()
17781 unsigned int exx[4] = {0, 0, 0, 0};
17782 __get_cpuid(exx[0], 1);
17785 return 0;
17787 _ACEOF
17788 if ac_fn_c_try_link "$LINENO"; then :
17789 pgac_cv__cpuid="yes"
17790 else
17791 pgac_cv__cpuid="no"
17793 rm -f core conftest.err conftest.$ac_objext \
17794 conftest$ac_exeext conftest.$ac_ext
17796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17797 $as_echo "$pgac_cv__cpuid" >&6; }
17798 if test x"$pgac_cv__cpuid" = x"yes"; then
17800 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17804 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17806 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17807 # with the default compiler flags. If not, check if adding the -msse4.2
17808 # flag helps. CFLAGS_CRC is set to -msse4.2 if that's required.
17809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17810 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17811 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17812 $as_echo_n "(cached) " >&6
17813 else
17814 pgac_save_CFLAGS=$CFLAGS
17815 CFLAGS="$pgac_save_CFLAGS "
17816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17817 /* end confdefs.h. */
17818 #include <nmmintrin.h>
17820 main ()
17822 unsigned int crc = 0;
17823 crc = _mm_crc32_u8(crc, 0);
17824 crc = _mm_crc32_u32(crc, 0);
17825 /* return computed value, to prevent the above being optimized away */
17826 return crc == 0;
17828 return 0;
17830 _ACEOF
17831 if ac_fn_c_try_link "$LINENO"; then :
17832 pgac_cv_sse42_crc32_intrinsics_=yes
17833 else
17834 pgac_cv_sse42_crc32_intrinsics_=no
17836 rm -f core conftest.err conftest.$ac_objext \
17837 conftest$ac_exeext conftest.$ac_ext
17838 CFLAGS="$pgac_save_CFLAGS"
17840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17841 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17842 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17843 CFLAGS_CRC=""
17844 pgac_sse42_crc32_intrinsics=yes
17847 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17849 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17850 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17851 $as_echo_n "(cached) " >&6
17852 else
17853 pgac_save_CFLAGS=$CFLAGS
17854 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17856 /* end confdefs.h. */
17857 #include <nmmintrin.h>
17859 main ()
17861 unsigned int crc = 0;
17862 crc = _mm_crc32_u8(crc, 0);
17863 crc = _mm_crc32_u32(crc, 0);
17864 /* return computed value, to prevent the above being optimized away */
17865 return crc == 0;
17867 return 0;
17869 _ACEOF
17870 if ac_fn_c_try_link "$LINENO"; then :
17871 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17872 else
17873 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17875 rm -f core conftest.err conftest.$ac_objext \
17876 conftest$ac_exeext conftest.$ac_ext
17877 CFLAGS="$pgac_save_CFLAGS"
17879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17880 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17881 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17882 CFLAGS_CRC="-msse4.2"
17883 pgac_sse42_crc32_intrinsics=yes
17888 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17889 # define __SSE4_2__ in that case.
17890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17891 /* end confdefs.h. */
17894 main ()
17897 #ifndef __SSE4_2__
17898 #error __SSE4_2__ not defined
17899 #endif
17902 return 0;
17904 _ACEOF
17905 if ac_fn_c_try_compile "$LINENO"; then :
17906 SSE4_2_TARGETED=1
17908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17910 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17912 # First check if __crc32c* intrinsics can be used with the default compiler
17913 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17914 # CFLAGS_CRC is set if the extra flag is required.
17915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17916 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17917 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17918 $as_echo_n "(cached) " >&6
17919 else
17920 pgac_save_CFLAGS=$CFLAGS
17921 CFLAGS="$pgac_save_CFLAGS "
17922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17923 /* end confdefs.h. */
17924 #include <arm_acle.h>
17926 main ()
17928 unsigned int crc = 0;
17929 crc = __crc32cb(crc, 0);
17930 crc = __crc32ch(crc, 0);
17931 crc = __crc32cw(crc, 0);
17932 crc = __crc32cd(crc, 0);
17933 /* return computed value, to prevent the above being optimized away */
17934 return crc == 0;
17936 return 0;
17938 _ACEOF
17939 if ac_fn_c_try_link "$LINENO"; then :
17940 pgac_cv_armv8_crc32c_intrinsics_=yes
17941 else
17942 pgac_cv_armv8_crc32c_intrinsics_=no
17944 rm -f core conftest.err conftest.$ac_objext \
17945 conftest$ac_exeext conftest.$ac_ext
17946 CFLAGS="$pgac_save_CFLAGS"
17948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17949 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17950 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17951 CFLAGS_CRC=""
17952 pgac_armv8_crc32c_intrinsics=yes
17955 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17957 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17958 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17959 $as_echo_n "(cached) " >&6
17960 else
17961 pgac_save_CFLAGS=$CFLAGS
17962 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17964 /* end confdefs.h. */
17965 #include <arm_acle.h>
17967 main ()
17969 unsigned int crc = 0;
17970 crc = __crc32cb(crc, 0);
17971 crc = __crc32ch(crc, 0);
17972 crc = __crc32cw(crc, 0);
17973 crc = __crc32cd(crc, 0);
17974 /* return computed value, to prevent the above being optimized away */
17975 return crc == 0;
17977 return 0;
17979 _ACEOF
17980 if ac_fn_c_try_link "$LINENO"; then :
17981 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17982 else
17983 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17985 rm -f core conftest.err conftest.$ac_objext \
17986 conftest$ac_exeext conftest.$ac_ext
17987 CFLAGS="$pgac_save_CFLAGS"
17989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17990 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17991 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17992 CFLAGS_CRC="-march=armv8-a+crc"
17993 pgac_armv8_crc32c_intrinsics=yes
17998 # Check for LoongArch CRC intrinsics to do CRC calculations.
18000 # Check if __builtin_loongarch_crcc_* intrinsics can be used
18001 # with the default compiler flags.
18002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_loongarch_crcc_w_b_w, __builtin_loongarch_crcc_w_h_w, __builtin_loongarch_crcc_w_w_w and __builtin_loongarch_crcc_w_d_w" >&5
18003 $as_echo_n "checking for __builtin_loongarch_crcc_w_b_w, __builtin_loongarch_crcc_w_h_w, __builtin_loongarch_crcc_w_w_w and __builtin_loongarch_crcc_w_d_w... " >&6; }
18004 if ${pgac_cv_loongarch_crc32c_intrinsics+:} false; then :
18005 $as_echo_n "(cached) " >&6
18006 else
18007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18008 /* end confdefs.h. */
18011 main ()
18013 unsigned int crc = 0;
18014 crc = __builtin_loongarch_crcc_w_b_w(0, crc);
18015 crc = __builtin_loongarch_crcc_w_h_w(0, crc);
18016 crc = __builtin_loongarch_crcc_w_w_w(0, crc);
18017 crc = __builtin_loongarch_crcc_w_d_w(0, crc);
18018 /* return computed value, to prevent the above being optimized away */
18019 return crc == 0;
18021 return 0;
18023 _ACEOF
18024 if ac_fn_c_try_link "$LINENO"; then :
18025 pgac_cv_loongarch_crc32c_intrinsics=yes
18026 else
18027 pgac_cv_loongarch_crc32c_intrinsics=no
18029 rm -f core conftest.err conftest.$ac_objext \
18030 conftest$ac_exeext conftest.$ac_ext
18032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_loongarch_crc32c_intrinsics" >&5
18033 $as_echo "$pgac_cv_loongarch_crc32c_intrinsics" >&6; }
18034 if test x"$pgac_cv_loongarch_crc32c_intrinsics" = x"yes"; then
18035 pgac_loongarch_crc32c_intrinsics=yes
18041 # Select CRC-32C implementation.
18043 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
18044 # use the special CRC instructions for calculating CRC-32C. If we're not
18045 # targeting such a processor, but we can nevertheless produce code that uses
18046 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
18047 # implementations and select which one to use at runtime, depending on whether
18048 # SSE 4.2 is supported by the processor we're running on.
18050 # Similarly, if we are targeting an ARM processor that has the CRC
18051 # instructions that are part of the ARMv8 CRC Extension, use them. And if
18052 # we're not targeting such a processor, but can nevertheless produce code that
18053 # uses the CRC instructions, compile both, and select at runtime.
18055 # You can skip the runtime check by setting the appropriate USE_*_CRC32 flag to 1
18056 # in the template or configure command line.
18058 # If we are targeting a LoongArch processor, CRC instructions are
18059 # always available (at least on 64 bit), so no runtime check is needed.
18060 if test x"$USE_SLICING_BY_8_CRC32C" = x"" && test x"$USE_SSE42_CRC32C" = x"" && test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"" && test x"$USE_ARMV8_CRC32C" = x"" && test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"" && test x"$USE_LOONGARCH_CRC32C" = x""; then
18061 # Use Intel SSE 4.2 if available.
18062 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
18063 USE_SSE42_CRC32C=1
18064 else
18065 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
18066 # the runtime check.
18067 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
18068 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
18069 else
18070 # Use ARM CRC Extension if available.
18071 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_CRC" = x""; then
18072 USE_ARMV8_CRC32C=1
18073 else
18074 # ARM CRC Extension, with runtime check?
18075 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
18076 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
18077 else
18078 # LoongArch CRCC instructions.
18079 if test x"$pgac_loongarch_crc32c_intrinsics" = x"yes"; then
18080 USE_LOONGARCH_CRC32C=1
18081 else
18082 # fall back to slicing-by-8 algorithm, which doesn't require any
18083 # special CPU support.
18084 USE_SLICING_BY_8_CRC32C=1
18092 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
18093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
18094 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
18095 if test x"$USE_SSE42_CRC32C" = x"1"; then
18097 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
18099 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
18100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
18101 $as_echo "SSE 4.2" >&6; }
18102 else
18103 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18105 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18107 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
18108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
18109 $as_echo "SSE 4.2 with runtime check" >&6; }
18110 else
18111 if test x"$USE_ARMV8_CRC32C" = x"1"; then
18113 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
18115 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
18116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
18117 $as_echo "ARMv8 CRC instructions" >&6; }
18118 else
18119 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18121 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18123 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
18124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
18125 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
18126 else
18127 if test x"$USE_LOONGARCH_CRC32C" = x"1"; then
18129 $as_echo "#define USE_LOONGARCH_CRC32C 1" >>confdefs.h
18131 PG_CRC32C_OBJS="pg_crc32c_loongarch.o"
18132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: LoongArch CRCC instructions" >&5
18133 $as_echo "LoongArch CRCC instructions" >&6; }
18134 else
18136 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
18138 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
18139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
18140 $as_echo "slicing-by-8" >&6; }
18149 # Select semaphore implementation type.
18150 if test "$PORTNAME" != "win32"; then
18151 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
18152 # Need sem_open for this
18153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
18154 $as_echo_n "checking for library containing sem_open... " >&6; }
18155 if ${ac_cv_search_sem_open+:} false; then :
18156 $as_echo_n "(cached) " >&6
18157 else
18158 ac_func_search_save_LIBS=$LIBS
18159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18160 /* end confdefs.h. */
18162 /* Override any GCC internal prototype to avoid an error.
18163 Use char because int might match the return type of a GCC
18164 builtin and then its argument prototype would still apply. */
18165 #ifdef __cplusplus
18166 extern "C"
18167 #endif
18168 char sem_open ();
18170 main ()
18172 return sem_open ();
18174 return 0;
18176 _ACEOF
18177 for ac_lib in '' rt pthread; do
18178 if test -z "$ac_lib"; then
18179 ac_res="none required"
18180 else
18181 ac_res=-l$ac_lib
18182 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18184 if ac_fn_c_try_link "$LINENO"; then :
18185 ac_cv_search_sem_open=$ac_res
18187 rm -f core conftest.err conftest.$ac_objext \
18188 conftest$ac_exeext
18189 if ${ac_cv_search_sem_open+:} false; then :
18190 break
18192 done
18193 if ${ac_cv_search_sem_open+:} false; then :
18195 else
18196 ac_cv_search_sem_open=no
18198 rm conftest.$ac_ext
18199 LIBS=$ac_func_search_save_LIBS
18201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18202 $as_echo "$ac_cv_search_sem_open" >&6; }
18203 ac_res=$ac_cv_search_sem_open
18204 if test "$ac_res" != no; then :
18205 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18206 USE_NAMED_POSIX_SEMAPHORES=1
18210 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18211 # Need sem_init for this
18212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18213 $as_echo_n "checking for library containing sem_init... " >&6; }
18214 if ${ac_cv_search_sem_init+:} false; then :
18215 $as_echo_n "(cached) " >&6
18216 else
18217 ac_func_search_save_LIBS=$LIBS
18218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18219 /* end confdefs.h. */
18221 /* Override any GCC internal prototype to avoid an error.
18222 Use char because int might match the return type of a GCC
18223 builtin and then its argument prototype would still apply. */
18224 #ifdef __cplusplus
18225 extern "C"
18226 #endif
18227 char sem_init ();
18229 main ()
18231 return sem_init ();
18233 return 0;
18235 _ACEOF
18236 for ac_lib in '' rt pthread; do
18237 if test -z "$ac_lib"; then
18238 ac_res="none required"
18239 else
18240 ac_res=-l$ac_lib
18241 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18243 if ac_fn_c_try_link "$LINENO"; then :
18244 ac_cv_search_sem_init=$ac_res
18246 rm -f core conftest.err conftest.$ac_objext \
18247 conftest$ac_exeext
18248 if ${ac_cv_search_sem_init+:} false; then :
18249 break
18251 done
18252 if ${ac_cv_search_sem_init+:} false; then :
18254 else
18255 ac_cv_search_sem_init=no
18257 rm conftest.$ac_ext
18258 LIBS=$ac_func_search_save_LIBS
18260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18261 $as_echo "$ac_cv_search_sem_init" >&6; }
18262 ac_res=$ac_cv_search_sem_init
18263 if test "$ac_res" != no; then :
18264 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18265 USE_UNNAMED_POSIX_SEMAPHORES=1
18269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18270 $as_echo_n "checking which semaphore API to use... " >&6; }
18271 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18273 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18275 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18276 sematype="named POSIX"
18277 else
18278 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18280 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18282 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18283 sematype="unnamed POSIX"
18284 else
18286 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18288 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18289 sematype="System V"
18292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18293 $as_echo "$sematype" >&6; }
18294 else
18296 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18298 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18302 # Select shared-memory implementation type.
18303 if test "$PORTNAME" != "win32"; then
18305 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18307 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18308 else
18310 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18312 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18315 # Select random number source. If a TLS library is used then it will be the
18316 # first choice, else the native platform sources (Windows API or /dev/urandom)
18317 # will be used.
18318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18319 $as_echo_n "checking which random number source to use... " >&6; }
18320 if test x"$with_ssl" = x"openssl" ; then
18321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18322 $as_echo "OpenSSL" >&6; }
18323 elif test x"$PORTNAME" = x"win32" ; then
18324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18325 $as_echo "Windows native" >&6; }
18326 elif test x"$cross_compiling" = x"yes"; then
18327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming /dev/urandom" >&5
18328 $as_echo "assuming /dev/urandom" >&6; }
18329 else
18330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18331 $as_echo "/dev/urandom" >&6; }
18332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18333 $as_echo_n "checking for /dev/urandom... " >&6; }
18334 if ${ac_cv_file__dev_urandom+:} false; then :
18335 $as_echo_n "(cached) " >&6
18336 else
18337 test "$cross_compiling" = yes &&
18338 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18339 if test -r "/dev/urandom"; then
18340 ac_cv_file__dev_urandom=yes
18341 else
18342 ac_cv_file__dev_urandom=no
18345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18346 $as_echo "$ac_cv_file__dev_urandom" >&6; }
18347 if test "x$ac_cv_file__dev_urandom" = xyes; then :
18352 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
18353 as_fn_error $? "
18354 no source of strong random numbers was found
18355 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
18359 # If not set in template file, set bytes to use libc memset()
18360 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18361 MEMSET_LOOP_LIMIT=1024
18364 cat >>confdefs.h <<_ACEOF
18365 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18366 _ACEOF
18370 if test "$enable_nls" = yes ; then
18372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18373 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18374 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18375 $as_echo_n "(cached) " >&6
18376 else
18377 ac_func_search_save_LIBS=$LIBS
18378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18379 /* end confdefs.h. */
18381 /* Override any GCC internal prototype to avoid an error.
18382 Use char because int might match the return type of a GCC
18383 builtin and then its argument prototype would still apply. */
18384 #ifdef __cplusplus
18385 extern "C"
18386 #endif
18387 char bind_textdomain_codeset ();
18389 main ()
18391 return bind_textdomain_codeset ();
18393 return 0;
18395 _ACEOF
18396 for ac_lib in '' intl; do
18397 if test -z "$ac_lib"; then
18398 ac_res="none required"
18399 else
18400 ac_res=-l$ac_lib
18401 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18403 if ac_fn_c_try_link "$LINENO"; then :
18404 ac_cv_search_bind_textdomain_codeset=$ac_res
18406 rm -f core conftest.err conftest.$ac_objext \
18407 conftest$ac_exeext
18408 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18409 break
18411 done
18412 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18414 else
18415 ac_cv_search_bind_textdomain_codeset=no
18417 rm conftest.$ac_ext
18418 LIBS=$ac_func_search_save_LIBS
18420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18421 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18422 ac_res=$ac_cv_search_bind_textdomain_codeset
18423 if test "$ac_res" != no; then :
18424 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18426 else
18427 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18430 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18431 if test "x$ac_cv_header_libintl_h" = xyes; then :
18433 else
18434 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18438 if test -z "$MSGFMT"; then
18439 for ac_prog in msgfmt
18441 # Extract the first word of "$ac_prog", so it can be a program name with args.
18442 set dummy $ac_prog; ac_word=$2
18443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18444 $as_echo_n "checking for $ac_word... " >&6; }
18445 if ${ac_cv_path_MSGFMT+:} false; then :
18446 $as_echo_n "(cached) " >&6
18447 else
18448 case $MSGFMT in
18449 [\\/]* | ?:[\\/]*)
18450 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18454 for as_dir in $PATH
18456 IFS=$as_save_IFS
18457 test -z "$as_dir" && as_dir=.
18458 for ac_exec_ext in '' $ac_executable_extensions; do
18459 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18460 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18461 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18462 break 2
18464 done
18465 done
18466 IFS=$as_save_IFS
18469 esac
18471 MSGFMT=$ac_cv_path_MSGFMT
18472 if test -n "$MSGFMT"; then
18473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18474 $as_echo "$MSGFMT" >&6; }
18475 else
18476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18477 $as_echo "no" >&6; }
18481 test -n "$MSGFMT" && break
18482 done
18484 else
18485 # Report the value of MSGFMT in configure's output in all cases.
18486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18487 $as_echo_n "checking for MSGFMT... " >&6; }
18488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18489 $as_echo "$MSGFMT" >&6; }
18492 if test -z "$MSGFMT"; then
18493 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18496 $as_echo_n "checking for msgfmt flags... " >&6; }
18497 if ${pgac_cv_msgfmt_flags+:} false; then :
18498 $as_echo_n "(cached) " >&6
18499 else
18500 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18501 pgac_cv_msgfmt_flags=-c
18504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18505 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18506 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18508 if test -z "$MSGMERGE"; then
18509 for ac_prog in msgmerge
18511 # Extract the first word of "$ac_prog", so it can be a program name with args.
18512 set dummy $ac_prog; ac_word=$2
18513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18514 $as_echo_n "checking for $ac_word... " >&6; }
18515 if ${ac_cv_path_MSGMERGE+:} false; then :
18516 $as_echo_n "(cached) " >&6
18517 else
18518 case $MSGMERGE in
18519 [\\/]* | ?:[\\/]*)
18520 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18523 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18524 for as_dir in $PATH
18526 IFS=$as_save_IFS
18527 test -z "$as_dir" && as_dir=.
18528 for ac_exec_ext in '' $ac_executable_extensions; do
18529 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18530 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18531 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18532 break 2
18534 done
18535 done
18536 IFS=$as_save_IFS
18539 esac
18541 MSGMERGE=$ac_cv_path_MSGMERGE
18542 if test -n "$MSGMERGE"; then
18543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18544 $as_echo "$MSGMERGE" >&6; }
18545 else
18546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18547 $as_echo "no" >&6; }
18551 test -n "$MSGMERGE" && break
18552 done
18554 else
18555 # Report the value of MSGMERGE in configure's output in all cases.
18556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18557 $as_echo_n "checking for MSGMERGE... " >&6; }
18558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18559 $as_echo "$MSGMERGE" >&6; }
18562 if test -z "$XGETTEXT"; then
18563 for ac_prog in xgettext
18565 # Extract the first word of "$ac_prog", so it can be a program name with args.
18566 set dummy $ac_prog; ac_word=$2
18567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18568 $as_echo_n "checking for $ac_word... " >&6; }
18569 if ${ac_cv_path_XGETTEXT+:} false; then :
18570 $as_echo_n "(cached) " >&6
18571 else
18572 case $XGETTEXT in
18573 [\\/]* | ?:[\\/]*)
18574 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18578 for as_dir in $PATH
18580 IFS=$as_save_IFS
18581 test -z "$as_dir" && as_dir=.
18582 for ac_exec_ext in '' $ac_executable_extensions; do
18583 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18584 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18585 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18586 break 2
18588 done
18589 done
18590 IFS=$as_save_IFS
18593 esac
18595 XGETTEXT=$ac_cv_path_XGETTEXT
18596 if test -n "$XGETTEXT"; then
18597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18598 $as_echo "$XGETTEXT" >&6; }
18599 else
18600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18601 $as_echo "no" >&6; }
18605 test -n "$XGETTEXT" && break
18606 done
18608 else
18609 # Report the value of XGETTEXT in configure's output in all cases.
18610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18611 $as_echo_n "checking for XGETTEXT... " >&6; }
18612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18613 $as_echo "$XGETTEXT" >&6; }
18619 # Check for Tcl configuration script tclConfig.sh
18620 if test "$with_tcl" = yes; then
18621 if test -z "$TCLSH"; then
18622 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18624 # Extract the first word of "$ac_prog", so it can be a program name with args.
18625 set dummy $ac_prog; ac_word=$2
18626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18627 $as_echo_n "checking for $ac_word... " >&6; }
18628 if ${ac_cv_path_TCLSH+:} false; then :
18629 $as_echo_n "(cached) " >&6
18630 else
18631 case $TCLSH in
18632 [\\/]* | ?:[\\/]*)
18633 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18637 for as_dir in $PATH
18639 IFS=$as_save_IFS
18640 test -z "$as_dir" && as_dir=.
18641 for ac_exec_ext in '' $ac_executable_extensions; do
18642 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18643 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18644 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18645 break 2
18647 done
18648 done
18649 IFS=$as_save_IFS
18652 esac
18654 TCLSH=$ac_cv_path_TCLSH
18655 if test -n "$TCLSH"; then
18656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18657 $as_echo "$TCLSH" >&6; }
18658 else
18659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18660 $as_echo "no" >&6; }
18664 test -n "$TCLSH" && break
18665 done
18667 else
18668 # Report the value of TCLSH in configure's output in all cases.
18669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18670 $as_echo_n "checking for TCLSH... " >&6; }
18671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18672 $as_echo "$TCLSH" >&6; }
18675 if test x"$TCLSH" = x""; then
18676 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18680 $as_echo_n "checking for tclConfig.sh... " >&6; }
18681 # Let user override test
18682 if test -z "$TCL_CONFIG_SH"; then
18683 pgac_test_dirs="$with_tclconfig"
18685 set X $pgac_test_dirs; shift
18686 if test $# -eq 0; then
18687 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18688 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18689 # On newer macOS, $auto_path frequently doesn't include the place
18690 # where tclConfig.sh actually lives. Append that to the end, so as not
18691 # to break cases where a non-default Tcl installation is being used.
18692 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18693 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18695 set X $pgac_test_dirs; shift
18698 for pgac_dir do
18699 if test -r "$pgac_dir/tclConfig.sh"; then
18700 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18701 break
18703 done
18706 if test -z "$TCL_CONFIG_SH"; then
18707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18708 $as_echo "no" >&6; }
18709 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18710 else
18711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18712 $as_echo "$TCL_CONFIG_SH" >&6; }
18717 . "$TCL_CONFIG_SH"
18718 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18719 eval TCL_LIBS=\"$TCL_LIBS\"
18720 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18721 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18723 if test "$TCL_SHARED_BUILD" != 1; then
18724 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18725 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18727 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18728 ac_save_CPPFLAGS=$CPPFLAGS
18729 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18730 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18731 if test "x$ac_cv_header_tcl_h" = xyes; then :
18733 else
18734 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18738 CPPFLAGS=$ac_save_CPPFLAGS
18741 # check for <perl.h>
18742 if test "$with_perl" = yes; then
18743 ac_save_CPPFLAGS=$CPPFLAGS
18744 CPPFLAGS="$CPPFLAGS $perl_includespec"
18745 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18747 if test "x$ac_cv_header_perl_h" = xyes; then :
18749 else
18750 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18754 # While we're at it, check that we can link to libperl.
18755 # On most platforms, if perl.h is there then libperl.so will be too, but at
18756 # this writing Debian packages them separately. There is no known reason to
18757 # waste cycles on separate probes for the Tcl or Python libraries, though.
18758 # On some Red Hat platforms, the link attempt can fail if we don't use
18759 # CFLAGS_SL while building the test program.
18760 ac_save_CFLAGS=$CFLAGS
18761 CFLAGS="$CFLAGS $CFLAGS_SL"
18762 pgac_save_LIBS=$LIBS
18763 LIBS="$perl_embed_ldflags"
18764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18765 $as_echo_n "checking for libperl... " >&6; }
18766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18767 /* end confdefs.h. */
18769 #include <EXTERN.h>
18770 #include <perl.h>
18773 main ()
18775 perl_alloc();
18777 return 0;
18779 _ACEOF
18780 if ac_fn_c_try_link "$LINENO"; then :
18781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18782 $as_echo "yes" >&6; }
18783 else
18784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18785 $as_echo "no" >&6; }
18786 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18788 rm -f core conftest.err conftest.$ac_objext \
18789 conftest$ac_exeext conftest.$ac_ext
18790 LIBS=$pgac_save_LIBS
18791 CFLAGS=$ac_save_CFLAGS
18792 CPPFLAGS=$ac_save_CPPFLAGS
18795 # check for <Python.h>
18796 if test "$with_python" = yes; then
18797 ac_save_CPPFLAGS=$CPPFLAGS
18798 CPPFLAGS="$python_includespec $CPPFLAGS"
18799 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18800 if test "x$ac_cv_header_Python_h" = xyes; then :
18802 else
18803 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18807 CPPFLAGS=$ac_save_CPPFLAGS
18811 # Check for documentation-building tools
18813 if test -z "$XMLLINT"; then
18814 for ac_prog in xmllint
18816 # Extract the first word of "$ac_prog", so it can be a program name with args.
18817 set dummy $ac_prog; ac_word=$2
18818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18819 $as_echo_n "checking for $ac_word... " >&6; }
18820 if ${ac_cv_path_XMLLINT+:} false; then :
18821 $as_echo_n "(cached) " >&6
18822 else
18823 case $XMLLINT in
18824 [\\/]* | ?:[\\/]*)
18825 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18828 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18829 for as_dir in $PATH
18831 IFS=$as_save_IFS
18832 test -z "$as_dir" && as_dir=.
18833 for ac_exec_ext in '' $ac_executable_extensions; do
18834 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18835 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18836 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18837 break 2
18839 done
18840 done
18841 IFS=$as_save_IFS
18844 esac
18846 XMLLINT=$ac_cv_path_XMLLINT
18847 if test -n "$XMLLINT"; then
18848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18849 $as_echo "$XMLLINT" >&6; }
18850 else
18851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18852 $as_echo "no" >&6; }
18856 test -n "$XMLLINT" && break
18857 done
18859 else
18860 # Report the value of XMLLINT in configure's output in all cases.
18861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18862 $as_echo_n "checking for XMLLINT... " >&6; }
18863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18864 $as_echo "$XMLLINT" >&6; }
18867 if test -z "$XSLTPROC"; then
18868 for ac_prog in xsltproc
18870 # Extract the first word of "$ac_prog", so it can be a program name with args.
18871 set dummy $ac_prog; ac_word=$2
18872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18873 $as_echo_n "checking for $ac_word... " >&6; }
18874 if ${ac_cv_path_XSLTPROC+:} false; then :
18875 $as_echo_n "(cached) " >&6
18876 else
18877 case $XSLTPROC in
18878 [\\/]* | ?:[\\/]*)
18879 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18882 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18883 for as_dir in $PATH
18885 IFS=$as_save_IFS
18886 test -z "$as_dir" && as_dir=.
18887 for ac_exec_ext in '' $ac_executable_extensions; do
18888 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18889 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18890 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18891 break 2
18893 done
18894 done
18895 IFS=$as_save_IFS
18898 esac
18900 XSLTPROC=$ac_cv_path_XSLTPROC
18901 if test -n "$XSLTPROC"; then
18902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18903 $as_echo "$XSLTPROC" >&6; }
18904 else
18905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18906 $as_echo "no" >&6; }
18910 test -n "$XSLTPROC" && break
18911 done
18913 else
18914 # Report the value of XSLTPROC in configure's output in all cases.
18915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18916 $as_echo_n "checking for XSLTPROC... " >&6; }
18917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18918 $as_echo "$XSLTPROC" >&6; }
18921 if test -z "$FOP"; then
18922 for ac_prog in fop
18924 # Extract the first word of "$ac_prog", so it can be a program name with args.
18925 set dummy $ac_prog; ac_word=$2
18926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18927 $as_echo_n "checking for $ac_word... " >&6; }
18928 if ${ac_cv_path_FOP+:} false; then :
18929 $as_echo_n "(cached) " >&6
18930 else
18931 case $FOP in
18932 [\\/]* | ?:[\\/]*)
18933 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18936 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18937 for as_dir in $PATH
18939 IFS=$as_save_IFS
18940 test -z "$as_dir" && as_dir=.
18941 for ac_exec_ext in '' $ac_executable_extensions; do
18942 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18943 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18944 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18945 break 2
18947 done
18948 done
18949 IFS=$as_save_IFS
18952 esac
18954 FOP=$ac_cv_path_FOP
18955 if test -n "$FOP"; then
18956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18957 $as_echo "$FOP" >&6; }
18958 else
18959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18960 $as_echo "no" >&6; }
18964 test -n "$FOP" && break
18965 done
18967 else
18968 # Report the value of FOP in configure's output in all cases.
18969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18970 $as_echo_n "checking for FOP... " >&6; }
18971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18972 $as_echo "$FOP" >&6; }
18975 if test -z "$DBTOEPUB"; then
18976 for ac_prog in dbtoepub
18978 # Extract the first word of "$ac_prog", so it can be a program name with args.
18979 set dummy $ac_prog; ac_word=$2
18980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18981 $as_echo_n "checking for $ac_word... " >&6; }
18982 if ${ac_cv_path_DBTOEPUB+:} false; then :
18983 $as_echo_n "(cached) " >&6
18984 else
18985 case $DBTOEPUB in
18986 [\\/]* | ?:[\\/]*)
18987 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18991 for as_dir in $PATH
18993 IFS=$as_save_IFS
18994 test -z "$as_dir" && as_dir=.
18995 for ac_exec_ext in '' $ac_executable_extensions; do
18996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18997 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18999 break 2
19001 done
19002 done
19003 IFS=$as_save_IFS
19006 esac
19008 DBTOEPUB=$ac_cv_path_DBTOEPUB
19009 if test -n "$DBTOEPUB"; then
19010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19011 $as_echo "$DBTOEPUB" >&6; }
19012 else
19013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19014 $as_echo "no" >&6; }
19018 test -n "$DBTOEPUB" && break
19019 done
19021 else
19022 # Report the value of DBTOEPUB in configure's output in all cases.
19023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
19024 $as_echo_n "checking for DBTOEPUB... " >&6; }
19025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19026 $as_echo "$DBTOEPUB" >&6; }
19031 # Check for test tools
19033 if test "$enable_tap_tests" = yes; then
19034 # Make sure we know where prove is.
19035 if test -z "$PROVE"; then
19036 for ac_prog in prove
19038 # Extract the first word of "$ac_prog", so it can be a program name with args.
19039 set dummy $ac_prog; ac_word=$2
19040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19041 $as_echo_n "checking for $ac_word... " >&6; }
19042 if ${ac_cv_path_PROVE+:} false; then :
19043 $as_echo_n "(cached) " >&6
19044 else
19045 case $PROVE in
19046 [\\/]* | ?:[\\/]*)
19047 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
19050 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19051 for as_dir in $PATH
19053 IFS=$as_save_IFS
19054 test -z "$as_dir" && as_dir=.
19055 for ac_exec_ext in '' $ac_executable_extensions; do
19056 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19057 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
19058 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19059 break 2
19061 done
19062 done
19063 IFS=$as_save_IFS
19066 esac
19068 PROVE=$ac_cv_path_PROVE
19069 if test -n "$PROVE"; then
19070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19071 $as_echo "$PROVE" >&6; }
19072 else
19073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19074 $as_echo "no" >&6; }
19078 test -n "$PROVE" && break
19079 done
19081 else
19082 # Report the value of PROVE in configure's output in all cases.
19083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
19084 $as_echo_n "checking for PROVE... " >&6; }
19085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19086 $as_echo "$PROVE" >&6; }
19089 if test -z "$PROVE"; then
19090 as_fn_error $? "prove not found" "$LINENO" 5
19092 # Check for necessary Perl modules. You might think we should use
19093 # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
19094 # installation than perl, eg on MSys, so we have to check using prove.
19095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
19096 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
19097 __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__
19098 modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
19099 if test $? -eq 0; then
19100 # log the module version details, but don't show them interactively
19101 echo "$modulestderr" >&5
19102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19103 $as_echo "yes" >&6; }
19104 else
19105 # on failure, though, show the results to the user
19106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modulestderr" >&5
19107 $as_echo "$modulestderr" >&6; }
19108 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
19112 # If compiler will take -Wl,--as-needed (or various platform-specific
19113 # spellings thereof) then add that to LDFLAGS. This is much easier than
19114 # trying to filter LIBS to the minimum for each executable.
19115 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
19116 # libreadline; therefore we postpone testing it until we know what library
19117 # dependencies readline has. The test code will try to link with $LIBS.
19118 if test "$with_readline" = yes; then
19119 link_test_func=readline
19120 else
19121 link_test_func=exit
19124 if test "$PORTNAME" = "darwin"; then
19125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS" >&5
19126 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS... " >&6; }
19127 if ${pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs+:} false; then :
19128 $as_echo_n "(cached) " >&6
19129 else
19130 pgac_save_LDFLAGS=$LDFLAGS
19131 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19132 if test "$cross_compiling" = yes; then :
19133 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs="assuming no"
19134 else
19135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19136 /* end confdefs.h. */
19137 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19139 main ()
19143 return 0;
19145 _ACEOF
19146 if ac_fn_c_try_run "$LINENO"; then :
19147 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=yes
19148 else
19149 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=no
19151 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19152 conftest.$ac_objext conftest.beam conftest.$ac_ext
19155 LDFLAGS="$pgac_save_LDFLAGS"
19157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&5
19158 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&6; }
19159 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" = x"yes"; then
19160 LDFLAGS="${LDFLAGS} -Wl,-dead_strip_dylibs"
19164 elif test "$PORTNAME" = "openbsd"; then
19165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS" >&5
19166 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS... " >&6; }
19167 if ${pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic+:} false; then :
19168 $as_echo_n "(cached) " >&6
19169 else
19170 pgac_save_LDFLAGS=$LDFLAGS
19171 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19172 if test "$cross_compiling" = yes; then :
19173 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic="assuming no"
19174 else
19175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19176 /* end confdefs.h. */
19177 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19179 main ()
19183 return 0;
19185 _ACEOF
19186 if ac_fn_c_try_run "$LINENO"; then :
19187 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=yes
19188 else
19189 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=no
19191 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19192 conftest.$ac_objext conftest.beam conftest.$ac_ext
19195 LDFLAGS="$pgac_save_LDFLAGS"
19197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&5
19198 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&6; }
19199 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" = x"yes"; then
19200 LDFLAGS="${LDFLAGS} -Wl,-Bdynamic"
19204 else
19205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed, for LDFLAGS" >&5
19206 $as_echo_n "checking whether $CC supports -Wl,--as-needed, for LDFLAGS... " >&6; }
19207 if ${pgac_cv_prog_cc_LDFLAGS__Wl___as_needed+:} false; then :
19208 $as_echo_n "(cached) " >&6
19209 else
19210 pgac_save_LDFLAGS=$LDFLAGS
19211 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19212 if test "$cross_compiling" = yes; then :
19213 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed="assuming no"
19214 else
19215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19216 /* end confdefs.h. */
19217 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19219 main ()
19223 return 0;
19225 _ACEOF
19226 if ac_fn_c_try_run "$LINENO"; then :
19227 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=yes
19228 else
19229 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=no
19231 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19232 conftest.$ac_objext conftest.beam conftest.$ac_ext
19235 LDFLAGS="$pgac_save_LDFLAGS"
19237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&5
19238 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&6; }
19239 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" = x"yes"; then
19240 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
19246 # For linkers that understand --export-dynamic, add that to the LDFLAGS_EX_BE
19247 # (backend specific ldflags). One some platforms this will always fail (e.g.,
19248 # windows), but on others it depends on the choice of linker (e.g., solaris).
19249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE" >&5
19250 $as_echo_n "checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE... " >&6; }
19251 if ${pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic+:} false; then :
19252 $as_echo_n "(cached) " >&6
19253 else
19254 pgac_save_LDFLAGS=$LDFLAGS
19255 LDFLAGS="$pgac_save_LDFLAGS -Wl,--export-dynamic"
19256 if test "$cross_compiling" = yes; then :
19257 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic="assuming no"
19258 else
19259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19260 /* end confdefs.h. */
19261 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19263 main ()
19267 return 0;
19269 _ACEOF
19270 if ac_fn_c_try_run "$LINENO"; then :
19271 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=yes
19272 else
19273 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=no
19275 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19276 conftest.$ac_objext conftest.beam conftest.$ac_ext
19279 LDFLAGS="$pgac_save_LDFLAGS"
19281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&5
19282 $as_echo "$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&6; }
19283 if test x"$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" = x"yes"; then
19284 LDFLAGS_EX_BE="${LDFLAGS_EX_BE} -Wl,--export-dynamic"
19289 # Create compiler version string
19290 if test x"$GCC" = x"yes" ; then
19291 cc_string=`${CC} --version | sed q`
19292 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19293 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19294 cc_string=`${CC} -V 2>&1 | sed q`
19295 else
19296 cc_string=$CC
19300 cat >>confdefs.h <<_ACEOF
19301 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19302 _ACEOF
19305 # Supply a numeric version string for use by 3rd party add-ons
19306 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19307 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
19308 $AWK '{printf "%d%04d", $1, $2}'`"
19310 cat >>confdefs.h <<_ACEOF
19311 #define PG_VERSION_NUM $PG_VERSION_NUM
19312 _ACEOF
19316 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19317 # literally, so that it's possible to override it at build time using
19318 # a command like "make ... PG_SYSROOT=path". This has to be done after
19319 # we've finished all configure checks that depend on CPPFLAGS.
19320 # The same for LDFLAGS, too.
19321 if test x"$PG_SYSROOT" != x; then
19322 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19323 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19328 # Begin output steps
19330 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19331 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19332 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19333 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19334 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19335 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19336 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19337 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19338 # Currently only used when LLVM is used
19339 if test "$with_llvm" = yes ; then
19340 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19341 $as_echo "$as_me: using CXX=$CXX" >&6;}
19342 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19343 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19344 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19345 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19346 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19347 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19348 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19349 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19352 # prepare build tree if outside source tree
19353 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19354 # Note 2: /bin/pwd might be better than shell's built-in at getting
19355 # a symlink-free name.
19356 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19357 vpath_build=no
19358 else
19359 vpath_build=yes
19360 if test "$no_create" != yes; then
19361 $as_echo_n "preparing build tree... " >&6
19362 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19363 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19364 || as_fn_error $? "failed" "$LINENO" 5
19365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19366 $as_echo "done" >&6; }
19372 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19375 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}"
19378 if test "$PORTNAME" = "win32"; then
19379 ac_config_commands="$ac_config_commands check_win32_symlinks"
19383 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19386 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19389 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19392 cat >confcache <<\_ACEOF
19393 # This file is a shell script that caches the results of configure
19394 # tests run on this system so they can be shared between configure
19395 # scripts and configure runs, see configure's option --config-cache.
19396 # It is not useful on other systems. If it contains results you don't
19397 # want to keep, you may remove or edit it.
19399 # config.status only pays attention to the cache file if you give it
19400 # the --recheck option to rerun configure.
19402 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19403 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19404 # following values.
19406 _ACEOF
19408 # The following way of writing the cache mishandles newlines in values,
19409 # but we know of no workaround that is simple, portable, and efficient.
19410 # So, we kill variables containing newlines.
19411 # Ultrix sh set writes to stderr and can't be redirected directly,
19412 # and sets the high bit in the cache file unless we assign to the vars.
19414 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19415 eval ac_val=\$$ac_var
19416 case $ac_val in #(
19417 *${as_nl}*)
19418 case $ac_var in #(
19419 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19420 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19421 esac
19422 case $ac_var in #(
19423 _ | IFS | as_nl) ;; #(
19424 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19425 *) { eval $ac_var=; unset $ac_var;} ;;
19426 esac ;;
19427 esac
19428 done
19430 (set) 2>&1 |
19431 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19432 *${as_nl}ac_space=\ *)
19433 # `set' does not quote correctly, so add quotes: double-quote
19434 # substitution turns \\\\ into \\, and sed turns \\ into \.
19435 sed -n \
19436 "s/'/'\\\\''/g;
19437 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19438 ;; #(
19440 # `set' quotes correctly as required by POSIX, so do not add quotes.
19441 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19443 esac |
19444 sort
19446 sed '
19447 /^ac_cv_env_/b end
19448 t clear
19449 :clear
19450 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19451 t end
19452 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19453 :end' >>confcache
19454 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19455 if test -w "$cache_file"; then
19456 if test "x$cache_file" != "x/dev/null"; then
19457 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19458 $as_echo "$as_me: updating cache $cache_file" >&6;}
19459 if test ! -f "$cache_file" || test -h "$cache_file"; then
19460 cat confcache >"$cache_file"
19461 else
19462 case $cache_file in #(
19463 */* | ?:*)
19464 mv -f confcache "$cache_file"$$ &&
19465 mv -f "$cache_file"$$ "$cache_file" ;; #(
19467 mv -f confcache "$cache_file" ;;
19468 esac
19471 else
19472 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19473 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19476 rm -f confcache
19478 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19479 # Let make expand exec_prefix.
19480 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19482 DEFS=-DHAVE_CONFIG_H
19484 ac_libobjs=
19485 ac_ltlibobjs=
19487 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19488 # 1. Remove the extension, and $U if already installed.
19489 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19490 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19491 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19492 # will be set to the directory where LIBOBJS objects are built.
19493 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19494 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19495 done
19496 LIBOBJS=$ac_libobjs
19498 LTLIBOBJS=$ac_ltlibobjs
19503 : "${CONFIG_STATUS=./config.status}"
19504 ac_write_fail=0
19505 ac_clean_files_save=$ac_clean_files
19506 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19507 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19508 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19509 as_write_fail=0
19510 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19511 #! $SHELL
19512 # Generated by $as_me.
19513 # Run this file to recreate the current configuration.
19514 # Compiler output produced by configure, useful for debugging
19515 # configure, is in config.log if it exists.
19517 debug=false
19518 ac_cs_recheck=false
19519 ac_cs_silent=false
19521 SHELL=\${CONFIG_SHELL-$SHELL}
19522 export SHELL
19523 _ASEOF
19524 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19525 ## -------------------- ##
19526 ## M4sh Initialization. ##
19527 ## -------------------- ##
19529 # Be more Bourne compatible
19530 DUALCASE=1; export DUALCASE # for MKS sh
19531 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19532 emulate sh
19533 NULLCMD=:
19534 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19535 # is contrary to our usage. Disable this feature.
19536 alias -g '${1+"$@"}'='"$@"'
19537 setopt NO_GLOB_SUBST
19538 else
19539 case `(set -o) 2>/dev/null` in #(
19540 *posix*) :
19541 set -o posix ;; #(
19542 *) :
19544 esac
19548 as_nl='
19550 export as_nl
19551 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19552 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19553 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19554 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19555 # Prefer a ksh shell builtin over an external printf program on Solaris,
19556 # but without wasting forks for bash or zsh.
19557 if test -z "$BASH_VERSION$ZSH_VERSION" \
19558 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19559 as_echo='print -r --'
19560 as_echo_n='print -rn --'
19561 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19562 as_echo='printf %s\n'
19563 as_echo_n='printf %s'
19564 else
19565 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19566 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19567 as_echo_n='/usr/ucb/echo -n'
19568 else
19569 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19570 as_echo_n_body='eval
19571 arg=$1;
19572 case $arg in #(
19573 *"$as_nl"*)
19574 expr "X$arg" : "X\\(.*\\)$as_nl";
19575 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19576 esac;
19577 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19579 export as_echo_n_body
19580 as_echo_n='sh -c $as_echo_n_body as_echo'
19582 export as_echo_body
19583 as_echo='sh -c $as_echo_body as_echo'
19586 # The user is always right.
19587 if test "${PATH_SEPARATOR+set}" != set; then
19588 PATH_SEPARATOR=:
19589 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19590 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19591 PATH_SEPARATOR=';'
19596 # IFS
19597 # We need space, tab and new line, in precisely that order. Quoting is
19598 # there to prevent editors from complaining about space-tab.
19599 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19600 # splitting by setting IFS to empty value.)
19601 IFS=" "" $as_nl"
19603 # Find who we are. Look in the path if we contain no directory separator.
19604 as_myself=
19605 case $0 in #((
19606 *[\\/]* ) as_myself=$0 ;;
19607 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19608 for as_dir in $PATH
19610 IFS=$as_save_IFS
19611 test -z "$as_dir" && as_dir=.
19612 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19613 done
19614 IFS=$as_save_IFS
19617 esac
19618 # We did not find ourselves, most probably we were run as `sh COMMAND'
19619 # in which case we are not to be found in the path.
19620 if test "x$as_myself" = x; then
19621 as_myself=$0
19623 if test ! -f "$as_myself"; then
19624 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19625 exit 1
19628 # Unset variables that we do not need and which cause bugs (e.g. in
19629 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19630 # suppresses any "Segmentation fault" message there. '((' could
19631 # trigger a bug in pdksh 5.2.14.
19632 for as_var in BASH_ENV ENV MAIL MAILPATH
19633 do eval test x\${$as_var+set} = xset \
19634 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19635 done
19636 PS1='$ '
19637 PS2='> '
19638 PS4='+ '
19640 # NLS nuisances.
19641 LC_ALL=C
19642 export LC_ALL
19643 LANGUAGE=C
19644 export LANGUAGE
19646 # CDPATH.
19647 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19650 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19651 # ----------------------------------------
19652 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19653 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19654 # script with STATUS, using 1 if that was 0.
19655 as_fn_error ()
19657 as_status=$1; test $as_status -eq 0 && as_status=1
19658 if test "$4"; then
19659 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19660 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19662 $as_echo "$as_me: error: $2" >&2
19663 as_fn_exit $as_status
19664 } # as_fn_error
19667 # as_fn_set_status STATUS
19668 # -----------------------
19669 # Set $? to STATUS, without forking.
19670 as_fn_set_status ()
19672 return $1
19673 } # as_fn_set_status
19675 # as_fn_exit STATUS
19676 # -----------------
19677 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19678 as_fn_exit ()
19680 set +e
19681 as_fn_set_status $1
19682 exit $1
19683 } # as_fn_exit
19685 # as_fn_unset VAR
19686 # ---------------
19687 # Portably unset VAR.
19688 as_fn_unset ()
19690 { eval $1=; unset $1;}
19692 as_unset=as_fn_unset
19693 # as_fn_append VAR VALUE
19694 # ----------------------
19695 # Append the text in VALUE to the end of the definition contained in VAR. Take
19696 # advantage of any shell optimizations that allow amortized linear growth over
19697 # repeated appends, instead of the typical quadratic growth present in naive
19698 # implementations.
19699 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19700 eval 'as_fn_append ()
19702 eval $1+=\$2
19704 else
19705 as_fn_append ()
19707 eval $1=\$$1\$2
19709 fi # as_fn_append
19711 # as_fn_arith ARG...
19712 # ------------------
19713 # Perform arithmetic evaluation on the ARGs, and store the result in the
19714 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19715 # must be portable across $(()) and expr.
19716 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19717 eval 'as_fn_arith ()
19719 as_val=$(( $* ))
19721 else
19722 as_fn_arith ()
19724 as_val=`expr "$@" || test $? -eq 1`
19726 fi # as_fn_arith
19729 if expr a : '\(a\)' >/dev/null 2>&1 &&
19730 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19731 as_expr=expr
19732 else
19733 as_expr=false
19736 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19737 as_basename=basename
19738 else
19739 as_basename=false
19742 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19743 as_dirname=dirname
19744 else
19745 as_dirname=false
19748 as_me=`$as_basename -- "$0" ||
19749 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19750 X"$0" : 'X\(//\)$' \| \
19751 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19752 $as_echo X/"$0" |
19753 sed '/^.*\/\([^/][^/]*\)\/*$/{
19754 s//\1/
19757 /^X\/\(\/\/\)$/{
19758 s//\1/
19761 /^X\/\(\/\).*/{
19762 s//\1/
19765 s/.*/./; q'`
19767 # Avoid depending upon Character Ranges.
19768 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19769 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19770 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19771 as_cr_digits='0123456789'
19772 as_cr_alnum=$as_cr_Letters$as_cr_digits
19774 ECHO_C= ECHO_N= ECHO_T=
19775 case `echo -n x` in #(((((
19776 -n*)
19777 case `echo 'xy\c'` in
19778 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19779 xy) ECHO_C='\c';;
19780 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19781 ECHO_T=' ';;
19782 esac;;
19784 ECHO_N='-n';;
19785 esac
19787 rm -f conf$$ conf$$.exe conf$$.file
19788 if test -d conf$$.dir; then
19789 rm -f conf$$.dir/conf$$.file
19790 else
19791 rm -f conf$$.dir
19792 mkdir conf$$.dir 2>/dev/null
19794 if (echo >conf$$.file) 2>/dev/null; then
19795 if ln -s conf$$.file conf$$ 2>/dev/null; then
19796 as_ln_s='ln -s'
19797 # ... but there are two gotchas:
19798 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19799 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19800 # In both cases, we have to default to `cp -pR'.
19801 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19802 as_ln_s='cp -pR'
19803 elif ln conf$$.file conf$$ 2>/dev/null; then
19804 as_ln_s=ln
19805 else
19806 as_ln_s='cp -pR'
19808 else
19809 as_ln_s='cp -pR'
19811 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19812 rmdir conf$$.dir 2>/dev/null
19815 # as_fn_mkdir_p
19816 # -------------
19817 # Create "$as_dir" as a directory, including parents if necessary.
19818 as_fn_mkdir_p ()
19821 case $as_dir in #(
19822 -*) as_dir=./$as_dir;;
19823 esac
19824 test -d "$as_dir" || eval $as_mkdir_p || {
19825 as_dirs=
19826 while :; do
19827 case $as_dir in #(
19828 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19829 *) as_qdir=$as_dir;;
19830 esac
19831 as_dirs="'$as_qdir' $as_dirs"
19832 as_dir=`$as_dirname -- "$as_dir" ||
19833 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19834 X"$as_dir" : 'X\(//\)[^/]' \| \
19835 X"$as_dir" : 'X\(//\)$' \| \
19836 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19837 $as_echo X"$as_dir" |
19838 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19839 s//\1/
19842 /^X\(\/\/\)[^/].*/{
19843 s//\1/
19846 /^X\(\/\/\)$/{
19847 s//\1/
19850 /^X\(\/\).*/{
19851 s//\1/
19854 s/.*/./; q'`
19855 test -d "$as_dir" && break
19856 done
19857 test -z "$as_dirs" || eval "mkdir $as_dirs"
19858 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19861 } # as_fn_mkdir_p
19862 if mkdir -p . 2>/dev/null; then
19863 as_mkdir_p='mkdir -p "$as_dir"'
19864 else
19865 test -d ./-p && rmdir ./-p
19866 as_mkdir_p=false
19870 # as_fn_executable_p FILE
19871 # -----------------------
19872 # Test if FILE is an executable regular file.
19873 as_fn_executable_p ()
19875 test -f "$1" && test -x "$1"
19876 } # as_fn_executable_p
19877 as_test_x='test -x'
19878 as_executable_p=as_fn_executable_p
19880 # Sed expression to map a string onto a valid CPP name.
19881 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19883 # Sed expression to map a string onto a valid variable name.
19884 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19887 exec 6>&1
19888 ## ----------------------------------- ##
19889 ## Main body of $CONFIG_STATUS script. ##
19890 ## ----------------------------------- ##
19891 _ASEOF
19892 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19894 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19895 # Save the log message, to keep $0 and so on meaningful, and to
19896 # report actual input values of CONFIG_FILES etc. instead of their
19897 # values after options handling.
19898 ac_log="
19899 This file was extended by PostgreSQL $as_me 17devel, which was
19900 generated by GNU Autoconf 2.69. Invocation command line was
19902 CONFIG_FILES = $CONFIG_FILES
19903 CONFIG_HEADERS = $CONFIG_HEADERS
19904 CONFIG_LINKS = $CONFIG_LINKS
19905 CONFIG_COMMANDS = $CONFIG_COMMANDS
19906 $ $0 $@
19908 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19911 _ACEOF
19913 case $ac_config_files in *"
19914 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19915 esac
19917 case $ac_config_headers in *"
19918 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19919 esac
19922 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19923 # Files that config.status was made for.
19924 config_files="$ac_config_files"
19925 config_headers="$ac_config_headers"
19926 config_links="$ac_config_links"
19927 config_commands="$ac_config_commands"
19929 _ACEOF
19931 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19932 ac_cs_usage="\
19933 \`$as_me' instantiates files and other configuration actions
19934 from templates according to the current configuration. Unless the files
19935 and actions are specified as TAGs, all are instantiated by default.
19937 Usage: $0 [OPTION]... [TAG]...
19939 -h, --help print this help, then exit
19940 -V, --version print version number and configuration settings, then exit
19941 --config print configuration, then exit
19942 -q, --quiet, --silent
19943 do not print progress messages
19944 -d, --debug don't remove temporary files
19945 --recheck update $as_me by reconfiguring in the same conditions
19946 --file=FILE[:TEMPLATE]
19947 instantiate the configuration file FILE
19948 --header=FILE[:TEMPLATE]
19949 instantiate the configuration header FILE
19951 Configuration files:
19952 $config_files
19954 Configuration headers:
19955 $config_headers
19957 Configuration links:
19958 $config_links
19960 Configuration commands:
19961 $config_commands
19963 Report bugs to <pgsql-bugs@lists.postgresql.org>.
19964 PostgreSQL home page: <https://www.postgresql.org/>."
19966 _ACEOF
19967 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19968 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19969 ac_cs_version="\\
19970 PostgreSQL config.status 17devel
19971 configured by $0, generated by GNU Autoconf 2.69,
19972 with options \\"\$ac_cs_config\\"
19974 Copyright (C) 2012 Free Software Foundation, Inc.
19975 This config.status script is free software; the Free Software Foundation
19976 gives unlimited permission to copy, distribute and modify it."
19978 ac_pwd='$ac_pwd'
19979 srcdir='$srcdir'
19980 INSTALL='$INSTALL'
19981 MKDIR_P='$MKDIR_P'
19982 AWK='$AWK'
19983 test -n "\$AWK" || AWK=awk
19984 _ACEOF
19986 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19987 # The default lists apply if the user does not specify any file.
19988 ac_need_defaults=:
19989 while test $# != 0
19991 case $1 in
19992 --*=?*)
19993 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19994 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19995 ac_shift=:
19997 --*=)
19998 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19999 ac_optarg=
20000 ac_shift=:
20003 ac_option=$1
20004 ac_optarg=$2
20005 ac_shift=shift
20007 esac
20009 case $ac_option in
20010 # Handling of the options.
20011 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20012 ac_cs_recheck=: ;;
20013 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20014 $as_echo "$ac_cs_version"; exit ;;
20015 --config | --confi | --conf | --con | --co | --c )
20016 $as_echo "$ac_cs_config"; exit ;;
20017 --debug | --debu | --deb | --de | --d | -d )
20018 debug=: ;;
20019 --file | --fil | --fi | --f )
20020 $ac_shift
20021 case $ac_optarg in
20022 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20023 '') as_fn_error $? "missing file argument" ;;
20024 esac
20025 as_fn_append CONFIG_FILES " '$ac_optarg'"
20026 ac_need_defaults=false;;
20027 --header | --heade | --head | --hea )
20028 $ac_shift
20029 case $ac_optarg in
20030 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20031 esac
20032 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20033 ac_need_defaults=false;;
20034 --he | --h)
20035 # Conflict between --help and --header
20036 as_fn_error $? "ambiguous option: \`$1'
20037 Try \`$0 --help' for more information.";;
20038 --help | --hel | -h )
20039 $as_echo "$ac_cs_usage"; exit ;;
20040 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20041 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20042 ac_cs_silent=: ;;
20044 # This is an error.
20045 -*) as_fn_error $? "unrecognized option: \`$1'
20046 Try \`$0 --help' for more information." ;;
20048 *) as_fn_append ac_config_targets " $1"
20049 ac_need_defaults=false ;;
20051 esac
20052 shift
20053 done
20055 ac_configure_extra_args=
20057 if $ac_cs_silent; then
20058 exec 6>/dev/null
20059 ac_configure_extra_args="$ac_configure_extra_args --silent"
20062 _ACEOF
20063 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20064 if \$ac_cs_recheck; then
20065 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20066 shift
20067 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20068 CONFIG_SHELL='$SHELL'
20069 export CONFIG_SHELL
20070 exec "\$@"
20073 _ACEOF
20074 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20075 exec 5>>config.log
20077 echo
20078 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20079 ## Running $as_me. ##
20080 _ASBOX
20081 $as_echo "$ac_log"
20082 } >&5
20084 _ACEOF
20085 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20086 _ACEOF
20088 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20090 # Handling of arguments.
20091 for ac_config_target in $ac_config_targets
20093 case $ac_config_target in
20094 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
20095 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
20096 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
20097 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
20098 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
20099 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
20100 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
20101 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
20102 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
20103 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
20104 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
20106 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20107 esac
20108 done
20111 # If the user did not use the arguments to specify the items to instantiate,
20112 # then the envvar interface is used. Set only those that are not.
20113 # We use the long form for the default assignment because of an extremely
20114 # bizarre bug on SunOS 4.1.3.
20115 if $ac_need_defaults; then
20116 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20117 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20118 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20119 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20122 # Have a temporary directory for convenience. Make it in the build tree
20123 # simply because there is no reason against having it here, and in addition,
20124 # creating and moving files from /tmp can sometimes cause problems.
20125 # Hook for its removal unless debugging.
20126 # Note that there is a small window in which the directory will not be cleaned:
20127 # after its creation but before its name has been assigned to `$tmp'.
20128 $debug ||
20130 tmp= ac_tmp=
20131 trap 'exit_status=$?
20132 : "${ac_tmp:=$tmp}"
20133 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20135 trap 'as_fn_exit 1' 1 2 13 15
20137 # Create a (secure) tmp directory for tmp files.
20140 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20141 test -d "$tmp"
20142 } ||
20144 tmp=./conf$$-$RANDOM
20145 (umask 077 && mkdir "$tmp")
20146 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20147 ac_tmp=$tmp
20149 # Set up the scripts for CONFIG_FILES section.
20150 # No need to generate them if there are no CONFIG_FILES.
20151 # This happens for instance with `./config.status config.h'.
20152 if test -n "$CONFIG_FILES"; then
20155 ac_cr=`echo X | tr X '\015'`
20156 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20157 # But we know of no other shell where ac_cr would be empty at this
20158 # point, so we can use a bashism as a fallback.
20159 if test "x$ac_cr" = x; then
20160 eval ac_cr=\$\'\\r\'
20162 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20163 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20164 ac_cs_awk_cr='\\r'
20165 else
20166 ac_cs_awk_cr=$ac_cr
20169 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20170 _ACEOF
20174 echo "cat >conf$$subs.awk <<_ACEOF" &&
20175 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20176 echo "_ACEOF"
20177 } >conf$$subs.sh ||
20178 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20179 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20180 ac_delim='%!_!# '
20181 for ac_last_try in false false false false false :; do
20182 . ./conf$$subs.sh ||
20183 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20185 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20186 if test $ac_delim_n = $ac_delim_num; then
20187 break
20188 elif $ac_last_try; then
20189 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20190 else
20191 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20193 done
20194 rm -f conf$$subs.sh
20196 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20197 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20198 _ACEOF
20199 sed -n '
20201 s/^/S["/; s/!.*/"]=/
20204 s/^[^!]*!//
20205 :repl
20206 t repl
20207 s/'"$ac_delim"'$//
20208 t delim
20211 s/\(.\{148\}\)..*/\1/
20212 t more1
20213 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20216 b repl
20217 :more1
20218 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20221 s/.\{148\}//
20222 t nl
20223 :delim
20225 s/\(.\{148\}\)..*/\1/
20226 t more2
20227 s/["\\]/\\&/g; s/^/"/; s/$/"/
20230 :more2
20231 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20234 s/.\{148\}//
20235 t delim
20236 ' <conf$$subs.awk | sed '
20237 /^[^""]/{
20239 s/\n//
20241 ' >>$CONFIG_STATUS || ac_write_fail=1
20242 rm -f conf$$subs.awk
20243 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20244 _ACAWK
20245 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20246 for (key in S) S_is_set[key] = 1
20247 FS = "\a"
20251 line = $ 0
20252 nfields = split(line, field, "@")
20253 substed = 0
20254 len = length(field[1])
20255 for (i = 2; i < nfields; i++) {
20256 key = field[i]
20257 keylen = length(key)
20258 if (S_is_set[key]) {
20259 value = S[key]
20260 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20261 len += length(value) + length(field[++i])
20262 substed = 1
20263 } else
20264 len += 1 + keylen
20267 print line
20270 _ACAWK
20271 _ACEOF
20272 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20273 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20274 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20275 else
20277 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20278 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20279 _ACEOF
20281 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20282 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20283 # trailing colons and then remove the whole line if VPATH becomes empty
20284 # (actually we leave an empty line to preserve line numbers).
20285 if test "x$srcdir" = x.; then
20286 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20288 s///
20289 s/^/:/
20290 s/[ ]*$/:/
20291 s/:\$(srcdir):/:/g
20292 s/:\${srcdir}:/:/g
20293 s/:@srcdir@:/:/g
20294 s/^:*//
20295 s/:*$//
20297 s/\(=[ ]*\).*/\1/
20299 s/\n//
20300 s/^[^=]*=[ ]*$//
20304 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20305 fi # test -n "$CONFIG_FILES"
20307 # Set up the scripts for CONFIG_HEADERS section.
20308 # No need to generate them if there are no CONFIG_HEADERS.
20309 # This happens for instance with `./config.status Makefile'.
20310 if test -n "$CONFIG_HEADERS"; then
20311 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20312 BEGIN {
20313 _ACEOF
20315 # Transform confdefs.h into an awk script `defines.awk', embedded as
20316 # here-document in config.status, that substitutes the proper values into
20317 # config.h.in to produce config.h.
20319 # Create a delimiter string that does not exist in confdefs.h, to ease
20320 # handling of long lines.
20321 ac_delim='%!_!# '
20322 for ac_last_try in false false :; do
20323 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20324 if test -z "$ac_tt"; then
20325 break
20326 elif $ac_last_try; then
20327 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20328 else
20329 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20331 done
20333 # For the awk script, D is an array of macro values keyed by name,
20334 # likewise P contains macro parameters if any. Preserve backslash
20335 # newline sequences.
20337 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20338 sed -n '
20339 s/.\{148\}/&'"$ac_delim"'/g
20340 t rset
20341 :rset
20342 s/^[ ]*#[ ]*define[ ][ ]*/ /
20343 t def
20345 :def
20346 s/\\$//
20347 t bsnl
20348 s/["\\]/\\&/g
20349 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20350 D["\1"]=" \3"/p
20351 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20353 :bsnl
20354 s/["\\]/\\&/g
20355 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20356 D["\1"]=" \3\\\\\\n"\\/p
20357 t cont
20358 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20359 t cont
20361 :cont
20363 s/.\{148\}/&'"$ac_delim"'/g
20364 t clear
20365 :clear
20366 s/\\$//
20367 t bsnlc
20368 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20370 :bsnlc
20371 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20372 b cont
20373 ' <confdefs.h | sed '
20374 s/'"$ac_delim"'/"\\\
20375 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20377 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20378 for (key in D) D_is_set[key] = 1
20379 FS = "\a"
20381 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20382 line = \$ 0
20383 split(line, arg, " ")
20384 if (arg[1] == "#") {
20385 defundef = arg[2]
20386 mac1 = arg[3]
20387 } else {
20388 defundef = substr(arg[1], 2)
20389 mac1 = arg[2]
20391 split(mac1, mac2, "(") #)
20392 macro = mac2[1]
20393 prefix = substr(line, 1, index(line, defundef) - 1)
20394 if (D_is_set[macro]) {
20395 # Preserve the white space surrounding the "#".
20396 print prefix "define", macro P[macro] D[macro]
20397 next
20398 } else {
20399 # Replace #undef with comments. This is necessary, for example,
20400 # in the case of _POSIX_SOURCE, which is predefined and required
20401 # on some systems where configure will not decide to define it.
20402 if (defundef == "undef") {
20403 print "/*", prefix defundef, macro, "*/"
20404 next
20408 { print }
20409 _ACAWK
20410 _ACEOF
20411 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20412 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20413 fi # test -n "$CONFIG_HEADERS"
20416 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20417 shift
20418 for ac_tag
20420 case $ac_tag in
20421 :[FHLC]) ac_mode=$ac_tag; continue;;
20422 esac
20423 case $ac_mode$ac_tag in
20424 :[FHL]*:*);;
20425 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20426 :[FH]-) ac_tag=-:-;;
20427 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20428 esac
20429 ac_save_IFS=$IFS
20430 IFS=:
20431 set x $ac_tag
20432 IFS=$ac_save_IFS
20433 shift
20434 ac_file=$1
20435 shift
20437 case $ac_mode in
20438 :L) ac_source=$1;;
20439 :[FH])
20440 ac_file_inputs=
20441 for ac_f
20443 case $ac_f in
20444 -) ac_f="$ac_tmp/stdin";;
20445 *) # Look for the file first in the build tree, then in the source tree
20446 # (if the path is not absolute). The absolute path cannot be DOS-style,
20447 # because $ac_f cannot contain `:'.
20448 test -f "$ac_f" ||
20449 case $ac_f in
20450 [\\/$]*) false;;
20451 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20452 esac ||
20453 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20454 esac
20455 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20456 as_fn_append ac_file_inputs " '$ac_f'"
20457 done
20459 # Let's still pretend it is `configure' which instantiates (i.e., don't
20460 # use $as_me), people would be surprised to read:
20461 # /* config.h. Generated by config.status. */
20462 configure_input='Generated from '`
20463 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20464 `' by configure.'
20465 if test x"$ac_file" != x-; then
20466 configure_input="$ac_file. $configure_input"
20467 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20468 $as_echo "$as_me: creating $ac_file" >&6;}
20470 # Neutralize special characters interpreted by sed in replacement strings.
20471 case $configure_input in #(
20472 *\&* | *\|* | *\\* )
20473 ac_sed_conf_input=`$as_echo "$configure_input" |
20474 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20475 *) ac_sed_conf_input=$configure_input;;
20476 esac
20478 case $ac_tag in
20479 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20480 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20481 esac
20483 esac
20485 ac_dir=`$as_dirname -- "$ac_file" ||
20486 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20487 X"$ac_file" : 'X\(//\)[^/]' \| \
20488 X"$ac_file" : 'X\(//\)$' \| \
20489 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20490 $as_echo X"$ac_file" |
20491 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20492 s//\1/
20495 /^X\(\/\/\)[^/].*/{
20496 s//\1/
20499 /^X\(\/\/\)$/{
20500 s//\1/
20503 /^X\(\/\).*/{
20504 s//\1/
20507 s/.*/./; q'`
20508 as_dir="$ac_dir"; as_fn_mkdir_p
20509 ac_builddir=.
20511 case "$ac_dir" in
20512 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20514 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20515 # A ".." for each directory in $ac_dir_suffix.
20516 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20517 case $ac_top_builddir_sub in
20518 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20519 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20520 esac ;;
20521 esac
20522 ac_abs_top_builddir=$ac_pwd
20523 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20524 # for backward compatibility:
20525 ac_top_builddir=$ac_top_build_prefix
20527 case $srcdir in
20528 .) # We are building in place.
20529 ac_srcdir=.
20530 ac_top_srcdir=$ac_top_builddir_sub
20531 ac_abs_top_srcdir=$ac_pwd ;;
20532 [\\/]* | ?:[\\/]* ) # Absolute name.
20533 ac_srcdir=$srcdir$ac_dir_suffix;
20534 ac_top_srcdir=$srcdir
20535 ac_abs_top_srcdir=$srcdir ;;
20536 *) # Relative name.
20537 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20538 ac_top_srcdir=$ac_top_build_prefix$srcdir
20539 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20540 esac
20541 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20544 case $ac_mode in
20547 # CONFIG_FILE
20550 case $INSTALL in
20551 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20552 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20553 esac
20554 ac_MKDIR_P=$MKDIR_P
20555 case $MKDIR_P in
20556 [\\/$]* | ?:[\\/]* ) ;;
20557 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20558 esac
20559 _ACEOF
20561 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20562 # If the template does not know about datarootdir, expand it.
20563 # FIXME: This hack should be removed a few years after 2.60.
20564 ac_datarootdir_hack=; ac_datarootdir_seen=
20565 ac_sed_dataroot='
20566 /datarootdir/ {
20570 /@datadir@/p
20571 /@docdir@/p
20572 /@infodir@/p
20573 /@localedir@/p
20574 /@mandir@/p'
20575 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20576 *datarootdir*) ac_datarootdir_seen=yes;;
20577 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20578 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20579 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20580 _ACEOF
20581 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20582 ac_datarootdir_hack='
20583 s&@datadir@&$datadir&g
20584 s&@docdir@&$docdir&g
20585 s&@infodir@&$infodir&g
20586 s&@localedir@&$localedir&g
20587 s&@mandir@&$mandir&g
20588 s&\\\${datarootdir}&$datarootdir&g' ;;
20589 esac
20590 _ACEOF
20592 # Neutralize VPATH when `$srcdir' = `.'.
20593 # Shell code in configure.ac might set extrasub.
20594 # FIXME: do we really want to maintain this feature?
20595 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20596 ac_sed_extra="$ac_vpsub
20597 $extrasub
20598 _ACEOF
20599 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20601 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20602 s|@configure_input@|$ac_sed_conf_input|;t t
20603 s&@top_builddir@&$ac_top_builddir_sub&;t t
20604 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20605 s&@srcdir@&$ac_srcdir&;t t
20606 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20607 s&@top_srcdir@&$ac_top_srcdir&;t t
20608 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20609 s&@builddir@&$ac_builddir&;t t
20610 s&@abs_builddir@&$ac_abs_builddir&;t t
20611 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20612 s&@INSTALL@&$ac_INSTALL&;t t
20613 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20614 $ac_datarootdir_hack
20616 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20617 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20619 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20620 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20621 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20622 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20623 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20624 which seems to be undefined. Please make sure it is defined" >&5
20625 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20626 which seems to be undefined. Please make sure it is defined" >&2;}
20628 rm -f "$ac_tmp/stdin"
20629 case $ac_file in
20630 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20631 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20632 esac \
20633 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20637 # CONFIG_HEADER
20639 if test x"$ac_file" != x-; then
20641 $as_echo "/* $configure_input */" \
20642 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20643 } >"$ac_tmp/config.h" \
20644 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20645 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20646 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20647 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20648 else
20649 rm -f "$ac_file"
20650 mv "$ac_tmp/config.h" "$ac_file" \
20651 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20653 else
20654 $as_echo "/* $configure_input */" \
20655 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20656 || as_fn_error $? "could not create -" "$LINENO" 5
20661 # CONFIG_LINK
20664 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20666 else
20667 # Prefer the file from the source tree if names are identical.
20668 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20669 ac_source=$srcdir/$ac_source
20672 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20673 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20675 if test ! -r "$ac_source"; then
20676 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20678 rm -f "$ac_file"
20680 # Try a relative symlink, then a hard link, then a copy.
20681 case $ac_source in
20682 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20683 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20684 esac
20685 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20686 ln "$ac_source" "$ac_file" 2>/dev/null ||
20687 cp -p "$ac_source" "$ac_file" ||
20688 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20691 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20692 $as_echo "$as_me: executing $ac_file commands" >&6;}
20694 esac
20697 case $ac_file$ac_mode in
20698 "check_win32_symlinks":C)
20699 # Links sometimes fail undetected on Mingw -
20700 # so here we detect it and warn the user
20701 for FILE in $CONFIG_LINKS
20703 # test -e works for symlinks in the MinGW console
20704 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20705 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20706 done
20708 "src/include/pg_config.h":H)
20709 # Update timestamp for pg_config.h (see Makefile.global)
20710 echo >src/include/stamp-h
20712 "src/include/pg_config_ext.h":H)
20713 # Update timestamp for pg_config_ext.h (see Makefile.global)
20714 echo >src/include/stamp-ext-h
20716 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20718 esac
20719 done # for ac_tag
20722 as_fn_exit 0
20723 _ACEOF
20724 ac_clean_files=$ac_clean_files_save
20726 test $ac_write_fail = 0 ||
20727 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20730 # configure is writing to config.log, and then calls config.status.
20731 # config.status does its own redirection, appending to config.log.
20732 # Unfortunately, on DOS this fails, as config.log is still kept open
20733 # by configure, so config.status won't be able to write to it; its
20734 # output is simply discarded. So we exec the FD to /dev/null,
20735 # effectively closing config.log, so it can be properly (re)opened and
20736 # appended to by config.status. When coming back to configure, we
20737 # need to make the FD available again.
20738 if test "$no_create" != yes; then
20739 ac_cs_success=:
20740 ac_config_status_args=
20741 test "$silent" = yes &&
20742 ac_config_status_args="$ac_config_status_args --quiet"
20743 exec 5>/dev/null
20744 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20745 exec 5>>config.log
20746 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20747 # would make configure fail if this is the last instruction.
20748 $ac_cs_success || as_fn_exit 1
20750 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20751 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20752 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20756 # Ensure that any meson build directories would reconfigure and see that
20757 # there's a conflicting in-tree build and can error out.
20758 if test "$vpath_build"="no"; then
20759 touch meson.build