ATPrepAddPrimaryKey: ignore non-PK constraints
[pgsql.git] / configure
blobd47e0f8b260af4b51e1a4ca55c79a6f106e57da7
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
5127 # need clang to create some bitcode files
5129 if test -z "$CLANG"; then
5130 for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5132 # Extract the first word of "$ac_prog", so it can be a program name with args.
5133 set dummy $ac_prog; ac_word=$2
5134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5135 $as_echo_n "checking for $ac_word... " >&6; }
5136 if ${ac_cv_path_CLANG+:} false; then :
5137 $as_echo_n "(cached) " >&6
5138 else
5139 case $CLANG in
5140 [\\/]* | ?:[\\/]*)
5141 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5145 for as_dir in $PATH
5147 IFS=$as_save_IFS
5148 test -z "$as_dir" && as_dir=.
5149 for ac_exec_ext in '' $ac_executable_extensions; do
5150 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5151 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5152 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5153 break 2
5155 done
5156 done
5157 IFS=$as_save_IFS
5160 esac
5162 CLANG=$ac_cv_path_CLANG
5163 if test -n "$CLANG"; then
5164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5165 $as_echo "$CLANG" >&6; }
5166 else
5167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5168 $as_echo "no" >&6; }
5172 test -n "$CLANG" && break
5173 done
5175 else
5176 # Report the value of CLANG in configure's output in all cases.
5177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5178 $as_echo_n "checking for CLANG... " >&6; }
5179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5180 $as_echo "$CLANG" >&6; }
5183 if test -z "$CLANG"; then
5184 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5186 # make sure clang is executable
5187 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5188 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5190 # Could check clang version, but it doesn't seem that
5191 # important. Systems with a new enough LLVM version are usually
5192 # going to have a decent clang version too. It's also not entirely
5193 # clear what the minimum version is.
5195 # Collect compiler flags necessary to build the LLVM dependent
5196 # shared library.
5197 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5198 case $pgac_option in
5199 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5200 esac
5201 done
5203 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5204 case $pgac_option in
5205 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5206 esac
5207 done
5209 # ABI influencing options, standard influencing options
5210 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5211 case $pgac_option in
5212 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5213 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5214 esac
5215 done
5217 # Look for components we're interested in, collect necessary
5218 # libs. As some components are optional, we can't just list all of
5219 # them as it'd raise an error.
5220 pgac_components='';
5221 for pgac_component in `$LLVM_CONFIG --components`; do
5222 case $pgac_component in
5223 engine) pgac_components="$pgac_components $pgac_component";;
5224 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5225 orcjit) pgac_components="$pgac_components $pgac_component";;
5226 passes) pgac_components="$pgac_components $pgac_component";;
5227 native) pgac_components="$pgac_components $pgac_component";;
5228 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5229 esac
5230 done;
5232 # And then get the libraries that need to be linked in for the
5233 # selected components. They're large libraries, we only want to
5234 # link them into the LLVM using shared library.
5235 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5236 case $pgac_option in
5237 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5238 esac
5239 done
5241 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5251 fi # fi
5254 unset CFLAGS
5255 unset CXXFLAGS
5258 # Read the template
5260 . "$srcdir/src/template/$template" || exit
5262 # C[XX]FLAGS are selected so:
5263 # If the user specifies something in the environment, that is used.
5264 # else: If the template file set something, that is used.
5265 # else: If coverage was enabled, don't set anything.
5266 # else: If the compiler is GCC, then we use -O2.
5267 # else: If the compiler is something else, then we use -O, unless debugging.
5269 if test "$ac_env_CFLAGS_set" = set; then
5270 CFLAGS=$ac_env_CFLAGS_value
5271 elif test "${CFLAGS+set}" = set; then
5272 : # (keep what template set)
5273 elif test "$enable_coverage" = yes; then
5274 : # no optimization by default
5275 elif test "$GCC" = yes; then
5276 CFLAGS="-O2"
5277 else
5278 # if the user selected debug mode, don't use -O
5279 if test "$enable_debug" != yes; then
5280 CFLAGS="-O"
5284 if test "$ac_env_CXXFLAGS_set" = set; then
5285 CXXFLAGS=$ac_env_CXXFLAGS_value
5286 elif test "${CXXFLAGS+set}" = set; then
5287 : # (keep what template set)
5288 elif test "$enable_coverage" = yes; then
5289 : # no optimization by default
5290 elif test "$GCC" = yes; then
5291 CXXFLAGS="-O2"
5292 else
5293 # if the user selected debug mode, don't use -O
5294 if test "$enable_debug" != yes; then
5295 CXXFLAGS="-O"
5299 # When generating bitcode (for inlining) we always want to use -O2
5300 # even when --enable-debug is specified. The bitcode is not going to
5301 # be used for line-by-line debugging, and JIT inlining doesn't work
5302 # without at least -O1 (otherwise clang will emit 'noinline'
5303 # attributes everywhere), which is bad for testing. Still allow the
5304 # environment to override if done explicitly.
5305 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5306 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5307 else
5308 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5310 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5311 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5312 else
5313 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5316 # C[XX]FLAGS we determined above will be added back at the end
5317 user_CFLAGS=$CFLAGS
5318 CFLAGS=""
5319 user_CXXFLAGS=$CXXFLAGS
5320 CXXFLAGS=""
5321 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5322 BITCODE_CFLAGS=""
5323 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5324 BITCODE_CXXFLAGS=""
5326 # set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5327 if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5328 CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5330 if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5331 CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5334 # Some versions of GCC support some additional useful warning flags.
5335 # Check whether they are supported, and add them to CFLAGS if so.
5336 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5337 # but has its own. Also check other compiler-specific flags here.
5339 if test "$GCC" = yes -a "$ICC" = no; then
5340 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5341 CXXFLAGS="-Wall -Wpointer-arith"
5342 # These work in some but not all gcc versions
5343 save_CFLAGS=$CFLAGS
5345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5346 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5347 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5348 $as_echo_n "(cached) " >&6
5349 else
5350 pgac_save_CFLAGS=$CFLAGS
5351 pgac_save_CC=$CC
5352 CC=${CC}
5353 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5354 ac_save_c_werror_flag=$ac_c_werror_flag
5355 ac_c_werror_flag=yes
5356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5357 /* end confdefs.h. */
5360 main ()
5364 return 0;
5366 _ACEOF
5367 if ac_fn_c_try_compile "$LINENO"; then :
5368 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5369 else
5370 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5372 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5373 ac_c_werror_flag=$ac_save_c_werror_flag
5374 CFLAGS="$pgac_save_CFLAGS"
5375 CC="$pgac_save_CC"
5377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5378 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5379 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5380 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5384 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5385 # disable it, so AC_SUBST the negative form.
5386 PERMIT_DECLARATION_AFTER_STATEMENT=
5387 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5388 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5391 # Really don't want VLAs to be used in our dialect of C
5393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5394 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5395 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5396 $as_echo_n "(cached) " >&6
5397 else
5398 pgac_save_CFLAGS=$CFLAGS
5399 pgac_save_CC=$CC
5400 CC=${CC}
5401 CFLAGS="${CFLAGS} -Werror=vla"
5402 ac_save_c_werror_flag=$ac_c_werror_flag
5403 ac_c_werror_flag=yes
5404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5405 /* end confdefs.h. */
5408 main ()
5412 return 0;
5414 _ACEOF
5415 if ac_fn_c_try_compile "$LINENO"; then :
5416 pgac_cv_prog_CC_cflags__Werror_vla=yes
5417 else
5418 pgac_cv_prog_CC_cflags__Werror_vla=no
5420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5421 ac_c_werror_flag=$ac_save_c_werror_flag
5422 CFLAGS="$pgac_save_CFLAGS"
5423 CC="$pgac_save_CC"
5425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5426 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5427 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5428 CFLAGS="${CFLAGS} -Werror=vla"
5432 # On macOS, complain about usage of symbols newer than the deployment target
5434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS" >&5
5435 $as_echo_n "checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS... " >&6; }
5436 if ${pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new+:} false; then :
5437 $as_echo_n "(cached) " >&6
5438 else
5439 pgac_save_CFLAGS=$CFLAGS
5440 pgac_save_CC=$CC
5441 CC=${CC}
5442 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5443 ac_save_c_werror_flag=$ac_c_werror_flag
5444 ac_c_werror_flag=yes
5445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5446 /* end confdefs.h. */
5449 main ()
5453 return 0;
5455 _ACEOF
5456 if ac_fn_c_try_compile "$LINENO"; then :
5457 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=yes
5458 else
5459 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=no
5461 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5462 ac_c_werror_flag=$ac_save_c_werror_flag
5463 CFLAGS="$pgac_save_CFLAGS"
5464 CC="$pgac_save_CC"
5466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&5
5467 $as_echo "$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&6; }
5468 if test x"$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" = x"yes"; then
5469 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS" >&5
5474 $as_echo_n "checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS... " >&6; }
5475 if ${pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new+:} false; then :
5476 $as_echo_n "(cached) " >&6
5477 else
5478 pgac_save_CXXFLAGS=$CXXFLAGS
5479 pgac_save_CXX=$CXX
5480 CXX=${CXX}
5481 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5482 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5483 ac_cxx_werror_flag=yes
5484 ac_ext=cpp
5485 ac_cpp='$CXXCPP $CPPFLAGS'
5486 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5487 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5488 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5491 /* end confdefs.h. */
5494 main ()
5498 return 0;
5500 _ACEOF
5501 if ac_fn_cxx_try_compile "$LINENO"; then :
5502 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=yes
5503 else
5504 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=no
5506 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5507 ac_ext=c
5508 ac_cpp='$CPP $CPPFLAGS'
5509 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5510 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5511 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5513 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5514 CXXFLAGS="$pgac_save_CXXFLAGS"
5515 CXX="$pgac_save_CXX"
5517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&5
5518 $as_echo "$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&6; }
5519 if test x"$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" = x"yes"; then
5520 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5524 # -Wvla is not applicable for C++
5526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5527 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5528 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5529 $as_echo_n "(cached) " >&6
5530 else
5531 pgac_save_CFLAGS=$CFLAGS
5532 pgac_save_CC=$CC
5533 CC=${CC}
5534 CFLAGS="${CFLAGS} -Wendif-labels"
5535 ac_save_c_werror_flag=$ac_c_werror_flag
5536 ac_c_werror_flag=yes
5537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5538 /* end confdefs.h. */
5541 main ()
5545 return 0;
5547 _ACEOF
5548 if ac_fn_c_try_compile "$LINENO"; then :
5549 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5550 else
5551 pgac_cv_prog_CC_cflags__Wendif_labels=no
5553 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5554 ac_c_werror_flag=$ac_save_c_werror_flag
5555 CFLAGS="$pgac_save_CFLAGS"
5556 CC="$pgac_save_CC"
5558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5559 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5560 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5561 CFLAGS="${CFLAGS} -Wendif-labels"
5565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5566 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5567 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5568 $as_echo_n "(cached) " >&6
5569 else
5570 pgac_save_CXXFLAGS=$CXXFLAGS
5571 pgac_save_CXX=$CXX
5572 CXX=${CXX}
5573 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5574 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5575 ac_cxx_werror_flag=yes
5576 ac_ext=cpp
5577 ac_cpp='$CXXCPP $CPPFLAGS'
5578 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5579 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5580 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5583 /* end confdefs.h. */
5586 main ()
5590 return 0;
5592 _ACEOF
5593 if ac_fn_cxx_try_compile "$LINENO"; then :
5594 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5595 else
5596 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5599 ac_ext=c
5600 ac_cpp='$CPP $CPPFLAGS'
5601 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5602 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5603 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5605 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5606 CXXFLAGS="$pgac_save_CXXFLAGS"
5607 CXX="$pgac_save_CXX"
5609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5610 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5611 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5612 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5618 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5619 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5620 $as_echo_n "(cached) " >&6
5621 else
5622 pgac_save_CFLAGS=$CFLAGS
5623 pgac_save_CC=$CC
5624 CC=${CC}
5625 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5626 ac_save_c_werror_flag=$ac_c_werror_flag
5627 ac_c_werror_flag=yes
5628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5629 /* end confdefs.h. */
5632 main ()
5636 return 0;
5638 _ACEOF
5639 if ac_fn_c_try_compile "$LINENO"; then :
5640 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5641 else
5642 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5645 ac_c_werror_flag=$ac_save_c_werror_flag
5646 CFLAGS="$pgac_save_CFLAGS"
5647 CC="$pgac_save_CC"
5649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5650 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5651 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5652 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5657 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5658 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5659 $as_echo_n "(cached) " >&6
5660 else
5661 pgac_save_CXXFLAGS=$CXXFLAGS
5662 pgac_save_CXX=$CXX
5663 CXX=${CXX}
5664 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5665 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5666 ac_cxx_werror_flag=yes
5667 ac_ext=cpp
5668 ac_cpp='$CXXCPP $CPPFLAGS'
5669 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5670 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5671 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5674 /* end confdefs.h. */
5677 main ()
5681 return 0;
5683 _ACEOF
5684 if ac_fn_cxx_try_compile "$LINENO"; then :
5685 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5686 else
5687 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5690 ac_ext=c
5691 ac_cpp='$CPP $CPPFLAGS'
5692 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5693 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5694 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5696 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5697 CXXFLAGS="$pgac_save_CXXFLAGS"
5698 CXX="$pgac_save_CXX"
5700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5701 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5702 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5703 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5709 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5710 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5711 $as_echo_n "(cached) " >&6
5712 else
5713 pgac_save_CFLAGS=$CFLAGS
5714 pgac_save_CC=$CC
5715 CC=${CC}
5716 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5717 ac_save_c_werror_flag=$ac_c_werror_flag
5718 ac_c_werror_flag=yes
5719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5720 /* end confdefs.h. */
5723 main ()
5727 return 0;
5729 _ACEOF
5730 if ac_fn_c_try_compile "$LINENO"; then :
5731 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5732 else
5733 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5735 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5736 ac_c_werror_flag=$ac_save_c_werror_flag
5737 CFLAGS="$pgac_save_CFLAGS"
5738 CC="$pgac_save_CC"
5740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5741 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5742 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5743 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5748 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5749 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5750 $as_echo_n "(cached) " >&6
5751 else
5752 pgac_save_CXXFLAGS=$CXXFLAGS
5753 pgac_save_CXX=$CXX
5754 CXX=${CXX}
5755 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5756 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5757 ac_cxx_werror_flag=yes
5758 ac_ext=cpp
5759 ac_cpp='$CXXCPP $CPPFLAGS'
5760 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5761 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5762 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5765 /* end confdefs.h. */
5768 main ()
5772 return 0;
5774 _ACEOF
5775 if ac_fn_cxx_try_compile "$LINENO"; then :
5776 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5777 else
5778 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5781 ac_ext=c
5782 ac_cpp='$CPP $CPPFLAGS'
5783 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5784 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5785 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5787 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5788 CXXFLAGS="$pgac_save_CXXFLAGS"
5789 CXX="$pgac_save_CXX"
5791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5792 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5793 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5794 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5800 $as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5801 if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5802 $as_echo_n "(cached) " >&6
5803 else
5804 pgac_save_CFLAGS=$CFLAGS
5805 pgac_save_CC=$CC
5806 CC=${CC}
5807 CFLAGS="${CFLAGS} -Wcast-function-type"
5808 ac_save_c_werror_flag=$ac_c_werror_flag
5809 ac_c_werror_flag=yes
5810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5811 /* end confdefs.h. */
5814 main ()
5818 return 0;
5820 _ACEOF
5821 if ac_fn_c_try_compile "$LINENO"; then :
5822 pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5823 else
5824 pgac_cv_prog_CC_cflags__Wcast_function_type=no
5826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5827 ac_c_werror_flag=$ac_save_c_werror_flag
5828 CFLAGS="$pgac_save_CFLAGS"
5829 CC="$pgac_save_CC"
5831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5832 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5833 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5834 CFLAGS="${CFLAGS} -Wcast-function-type"
5838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5839 $as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5840 if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5841 $as_echo_n "(cached) " >&6
5842 else
5843 pgac_save_CXXFLAGS=$CXXFLAGS
5844 pgac_save_CXX=$CXX
5845 CXX=${CXX}
5846 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5847 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5848 ac_cxx_werror_flag=yes
5849 ac_ext=cpp
5850 ac_cpp='$CXXCPP $CPPFLAGS'
5851 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5852 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5853 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5856 /* end confdefs.h. */
5859 main ()
5863 return 0;
5865 _ACEOF
5866 if ac_fn_cxx_try_compile "$LINENO"; then :
5867 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5868 else
5869 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5872 ac_ext=c
5873 ac_cpp='$CPP $CPPFLAGS'
5874 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5875 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5876 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5878 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5879 CXXFLAGS="$pgac_save_CXXFLAGS"
5880 CXX="$pgac_save_CXX"
5882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5883 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5884 if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5885 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS" >&5
5891 $as_echo_n "checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS... " >&6; }
5892 if ${pgac_cv_prog_CC_cflags__Wshadow_compatible_local+:} false; then :
5893 $as_echo_n "(cached) " >&6
5894 else
5895 pgac_save_CFLAGS=$CFLAGS
5896 pgac_save_CC=$CC
5897 CC=${CC}
5898 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5899 ac_save_c_werror_flag=$ac_c_werror_flag
5900 ac_c_werror_flag=yes
5901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5902 /* end confdefs.h. */
5905 main ()
5909 return 0;
5911 _ACEOF
5912 if ac_fn_c_try_compile "$LINENO"; then :
5913 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=yes
5914 else
5915 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=no
5917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5918 ac_c_werror_flag=$ac_save_c_werror_flag
5919 CFLAGS="$pgac_save_CFLAGS"
5920 CC="$pgac_save_CC"
5922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&5
5923 $as_echo "$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&6; }
5924 if test x"$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" = x"yes"; then
5925 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS" >&5
5930 $as_echo_n "checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS... " >&6; }
5931 if ${pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local+:} false; then :
5932 $as_echo_n "(cached) " >&6
5933 else
5934 pgac_save_CXXFLAGS=$CXXFLAGS
5935 pgac_save_CXX=$CXX
5936 CXX=${CXX}
5937 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5938 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5939 ac_cxx_werror_flag=yes
5940 ac_ext=cpp
5941 ac_cpp='$CXXCPP $CPPFLAGS'
5942 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5943 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5944 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5947 /* end confdefs.h. */
5950 main ()
5954 return 0;
5956 _ACEOF
5957 if ac_fn_cxx_try_compile "$LINENO"; then :
5958 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=yes
5959 else
5960 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=no
5962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5963 ac_ext=c
5964 ac_cpp='$CPP $CPPFLAGS'
5965 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5966 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5967 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5969 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5970 CXXFLAGS="$pgac_save_CXXFLAGS"
5971 CXX="$pgac_save_CXX"
5973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&5
5974 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&6; }
5975 if test x"$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" = x"yes"; then
5976 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5980 # This was included in -Wall/-Wformat in older GCC versions
5982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5983 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5984 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5985 $as_echo_n "(cached) " >&6
5986 else
5987 pgac_save_CFLAGS=$CFLAGS
5988 pgac_save_CC=$CC
5989 CC=${CC}
5990 CFLAGS="${CFLAGS} -Wformat-security"
5991 ac_save_c_werror_flag=$ac_c_werror_flag
5992 ac_c_werror_flag=yes
5993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5994 /* end confdefs.h. */
5997 main ()
6001 return 0;
6003 _ACEOF
6004 if ac_fn_c_try_compile "$LINENO"; then :
6005 pgac_cv_prog_CC_cflags__Wformat_security=yes
6006 else
6007 pgac_cv_prog_CC_cflags__Wformat_security=no
6009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6010 ac_c_werror_flag=$ac_save_c_werror_flag
6011 CFLAGS="$pgac_save_CFLAGS"
6012 CC="$pgac_save_CC"
6014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
6015 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
6016 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
6017 CFLAGS="${CFLAGS} -Wformat-security"
6021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
6022 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
6023 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
6024 $as_echo_n "(cached) " >&6
6025 else
6026 pgac_save_CXXFLAGS=$CXXFLAGS
6027 pgac_save_CXX=$CXX
6028 CXX=${CXX}
6029 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6030 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6031 ac_cxx_werror_flag=yes
6032 ac_ext=cpp
6033 ac_cpp='$CXXCPP $CPPFLAGS'
6034 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6035 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6036 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6039 /* end confdefs.h. */
6042 main ()
6046 return 0;
6048 _ACEOF
6049 if ac_fn_cxx_try_compile "$LINENO"; then :
6050 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
6051 else
6052 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
6054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6055 ac_ext=c
6056 ac_cpp='$CPP $CPPFLAGS'
6057 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6058 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6059 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6061 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6062 CXXFLAGS="$pgac_save_CXXFLAGS"
6063 CXX="$pgac_save_CXX"
6065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
6066 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
6067 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
6068 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6072 # Disable strict-aliasing rules; needed for gcc 3.3+
6074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6075 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6076 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6077 $as_echo_n "(cached) " >&6
6078 else
6079 pgac_save_CFLAGS=$CFLAGS
6080 pgac_save_CC=$CC
6081 CC=${CC}
6082 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6083 ac_save_c_werror_flag=$ac_c_werror_flag
6084 ac_c_werror_flag=yes
6085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6086 /* end confdefs.h. */
6089 main ()
6093 return 0;
6095 _ACEOF
6096 if ac_fn_c_try_compile "$LINENO"; then :
6097 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6098 else
6099 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6102 ac_c_werror_flag=$ac_save_c_werror_flag
6103 CFLAGS="$pgac_save_CFLAGS"
6104 CC="$pgac_save_CC"
6106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6107 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6108 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6109 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6114 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6115 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6116 $as_echo_n "(cached) " >&6
6117 else
6118 pgac_save_CXXFLAGS=$CXXFLAGS
6119 pgac_save_CXX=$CXX
6120 CXX=${CXX}
6121 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6122 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6123 ac_cxx_werror_flag=yes
6124 ac_ext=cpp
6125 ac_cpp='$CXXCPP $CPPFLAGS'
6126 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6127 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6128 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6131 /* end confdefs.h. */
6134 main ()
6138 return 0;
6140 _ACEOF
6141 if ac_fn_cxx_try_compile "$LINENO"; then :
6142 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6143 else
6144 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6147 ac_ext=c
6148 ac_cpp='$CPP $CPPFLAGS'
6149 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6150 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6151 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6153 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6154 CXXFLAGS="$pgac_save_CXXFLAGS"
6155 CXX="$pgac_save_CXX"
6157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6158 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6159 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6160 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6164 # Disable optimizations that assume no overflow; needed for gcc 4.3+
6166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
6167 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
6168 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
6169 $as_echo_n "(cached) " >&6
6170 else
6171 pgac_save_CFLAGS=$CFLAGS
6172 pgac_save_CC=$CC
6173 CC=${CC}
6174 CFLAGS="${CFLAGS} -fwrapv"
6175 ac_save_c_werror_flag=$ac_c_werror_flag
6176 ac_c_werror_flag=yes
6177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6178 /* end confdefs.h. */
6181 main ()
6185 return 0;
6187 _ACEOF
6188 if ac_fn_c_try_compile "$LINENO"; then :
6189 pgac_cv_prog_CC_cflags__fwrapv=yes
6190 else
6191 pgac_cv_prog_CC_cflags__fwrapv=no
6193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6194 ac_c_werror_flag=$ac_save_c_werror_flag
6195 CFLAGS="$pgac_save_CFLAGS"
6196 CC="$pgac_save_CC"
6198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
6199 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
6200 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
6201 CFLAGS="${CFLAGS} -fwrapv"
6205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
6206 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
6207 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
6208 $as_echo_n "(cached) " >&6
6209 else
6210 pgac_save_CXXFLAGS=$CXXFLAGS
6211 pgac_save_CXX=$CXX
6212 CXX=${CXX}
6213 CXXFLAGS="${CXXFLAGS} -fwrapv"
6214 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6215 ac_cxx_werror_flag=yes
6216 ac_ext=cpp
6217 ac_cpp='$CXXCPP $CPPFLAGS'
6218 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6219 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6220 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6223 /* end confdefs.h. */
6226 main ()
6230 return 0;
6232 _ACEOF
6233 if ac_fn_cxx_try_compile "$LINENO"; then :
6234 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6235 else
6236 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6239 ac_ext=c
6240 ac_cpp='$CPP $CPPFLAGS'
6241 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6242 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6243 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6245 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6246 CXXFLAGS="$pgac_save_CXXFLAGS"
6247 CXX="$pgac_save_CXX"
6249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6250 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6251 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6252 CXXFLAGS="${CXXFLAGS} -fwrapv"
6256 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6259 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6260 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6261 $as_echo_n "(cached) " >&6
6262 else
6263 pgac_save_CFLAGS=$CFLAGS
6264 pgac_save_CC=$CC
6265 CC=${CC}
6266 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6267 ac_save_c_werror_flag=$ac_c_werror_flag
6268 ac_c_werror_flag=yes
6269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6270 /* end confdefs.h. */
6273 main ()
6277 return 0;
6279 _ACEOF
6280 if ac_fn_c_try_compile "$LINENO"; then :
6281 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6282 else
6283 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6286 ac_c_werror_flag=$ac_save_c_werror_flag
6287 CFLAGS="$pgac_save_CFLAGS"
6288 CC="$pgac_save_CC"
6290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6291 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6292 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6293 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6298 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6299 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6300 $as_echo_n "(cached) " >&6
6301 else
6302 pgac_save_CXXFLAGS=$CXXFLAGS
6303 pgac_save_CXX=$CXX
6304 CXX=${CXX}
6305 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6306 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6307 ac_cxx_werror_flag=yes
6308 ac_ext=cpp
6309 ac_cpp='$CXXCPP $CPPFLAGS'
6310 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6311 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6312 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6315 /* end confdefs.h. */
6318 main ()
6322 return 0;
6324 _ACEOF
6325 if ac_fn_cxx_try_compile "$LINENO"; then :
6326 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6327 else
6328 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6331 ac_ext=c
6332 ac_cpp='$CPP $CPPFLAGS'
6333 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6334 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6335 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6337 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6338 CXXFLAGS="$pgac_save_CXXFLAGS"
6339 CXX="$pgac_save_CXX"
6341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6342 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6343 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6344 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6348 # Optimization flags for specific files that benefit from loop unrolling
6349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6350 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6351 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6352 $as_echo_n "(cached) " >&6
6353 else
6354 pgac_save_CFLAGS=$CFLAGS
6355 pgac_save_CC=$CC
6356 CC=${CC}
6357 CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6358 ac_save_c_werror_flag=$ac_c_werror_flag
6359 ac_c_werror_flag=yes
6360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6361 /* end confdefs.h. */
6364 main ()
6368 return 0;
6370 _ACEOF
6371 if ac_fn_c_try_compile "$LINENO"; then :
6372 pgac_cv_prog_CC_cflags__funroll_loops=yes
6373 else
6374 pgac_cv_prog_CC_cflags__funroll_loops=no
6376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6377 ac_c_werror_flag=$ac_save_c_werror_flag
6378 CFLAGS="$pgac_save_CFLAGS"
6379 CC="$pgac_save_CC"
6381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6382 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6383 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6384 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6388 # Optimization flags for specific files that benefit from vectorization
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6390 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6391 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6392 $as_echo_n "(cached) " >&6
6393 else
6394 pgac_save_CFLAGS=$CFLAGS
6395 pgac_save_CC=$CC
6396 CC=${CC}
6397 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6398 ac_save_c_werror_flag=$ac_c_werror_flag
6399 ac_c_werror_flag=yes
6400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6401 /* end confdefs.h. */
6404 main ()
6408 return 0;
6410 _ACEOF
6411 if ac_fn_c_try_compile "$LINENO"; then :
6412 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6413 else
6414 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6416 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6417 ac_c_werror_flag=$ac_save_c_werror_flag
6418 CFLAGS="$pgac_save_CFLAGS"
6419 CC="$pgac_save_CC"
6421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6422 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6423 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6424 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6429 # The following tests want to suppress various unhelpful warnings by adding
6430 # -Wno-foo switches. But gcc won't complain about unrecognized -Wno-foo
6431 # switches, so we have to test for the positive form and if that works,
6432 # add the negative form. Note that tests of this form typically need to
6433 # be duplicated in the BITCODE_CFLAGS setup stanza below.
6435 # Suppress clang's unhelpful unused-command-line-argument warnings.
6436 NOT_THE_CFLAGS=""
6437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6438 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6439 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6440 $as_echo_n "(cached) " >&6
6441 else
6442 pgac_save_CFLAGS=$CFLAGS
6443 pgac_save_CC=$CC
6444 CC=${CC}
6445 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6446 ac_save_c_werror_flag=$ac_c_werror_flag
6447 ac_c_werror_flag=yes
6448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6449 /* end confdefs.h. */
6452 main ()
6456 return 0;
6458 _ACEOF
6459 if ac_fn_c_try_compile "$LINENO"; then :
6460 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6461 else
6462 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6465 ac_c_werror_flag=$ac_save_c_werror_flag
6466 CFLAGS="$pgac_save_CFLAGS"
6467 CC="$pgac_save_CC"
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6470 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6471 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6472 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6476 if test -n "$NOT_THE_CFLAGS"; then
6477 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6479 # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
6480 # of warnings when building plperl because of usages in the Perl headers.
6481 NOT_THE_CFLAGS=""
6482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
6483 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
6484 if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then :
6485 $as_echo_n "(cached) " >&6
6486 else
6487 pgac_save_CFLAGS=$CFLAGS
6488 pgac_save_CC=$CC
6489 CC=${CC}
6490 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6491 ac_save_c_werror_flag=$ac_c_werror_flag
6492 ac_c_werror_flag=yes
6493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6494 /* end confdefs.h. */
6497 main ()
6501 return 0;
6503 _ACEOF
6504 if ac_fn_c_try_compile "$LINENO"; then :
6505 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes
6506 else
6507 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no
6509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6510 ac_c_werror_flag=$ac_save_c_werror_flag
6511 CFLAGS="$pgac_save_CFLAGS"
6512 CC="$pgac_save_CC"
6514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5
6515 $as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; }
6516 if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then
6517 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6521 if test -n "$NOT_THE_CFLAGS"; then
6522 CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
6524 # Similarly disable useless truncation warnings from gcc 8+
6525 NOT_THE_CFLAGS=""
6526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6527 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6528 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6529 $as_echo_n "(cached) " >&6
6530 else
6531 pgac_save_CFLAGS=$CFLAGS
6532 pgac_save_CC=$CC
6533 CC=${CC}
6534 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6535 ac_save_c_werror_flag=$ac_c_werror_flag
6536 ac_c_werror_flag=yes
6537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6538 /* end confdefs.h. */
6541 main ()
6545 return 0;
6547 _ACEOF
6548 if ac_fn_c_try_compile "$LINENO"; then :
6549 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6550 else
6551 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6553 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6554 ac_c_werror_flag=$ac_save_c_werror_flag
6555 CFLAGS="$pgac_save_CFLAGS"
6556 CC="$pgac_save_CC"
6558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6559 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6560 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6561 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6565 if test -n "$NOT_THE_CFLAGS"; then
6566 CFLAGS="$CFLAGS -Wno-format-truncation"
6568 NOT_THE_CFLAGS=""
6569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6570 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6571 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6572 $as_echo_n "(cached) " >&6
6573 else
6574 pgac_save_CFLAGS=$CFLAGS
6575 pgac_save_CC=$CC
6576 CC=${CC}
6577 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6578 ac_save_c_werror_flag=$ac_c_werror_flag
6579 ac_c_werror_flag=yes
6580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6581 /* end confdefs.h. */
6584 main ()
6588 return 0;
6590 _ACEOF
6591 if ac_fn_c_try_compile "$LINENO"; then :
6592 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6593 else
6594 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6596 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6597 ac_c_werror_flag=$ac_save_c_werror_flag
6598 CFLAGS="$pgac_save_CFLAGS"
6599 CC="$pgac_save_CC"
6601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6602 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6603 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6604 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6608 if test -n "$NOT_THE_CFLAGS"; then
6609 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6611 # Suppress clang 16's strict warnings about function casts
6612 NOT_THE_CFLAGS=""
6613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS" >&5
6614 $as_echo_n "checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS... " >&6; }
6615 if ${pgac_cv_prog_CC_cflags__Wcast_function_type_strict+:} false; then :
6616 $as_echo_n "(cached) " >&6
6617 else
6618 pgac_save_CFLAGS=$CFLAGS
6619 pgac_save_CC=$CC
6620 CC=${CC}
6621 CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6622 ac_save_c_werror_flag=$ac_c_werror_flag
6623 ac_c_werror_flag=yes
6624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6625 /* end confdefs.h. */
6628 main ()
6632 return 0;
6634 _ACEOF
6635 if ac_fn_c_try_compile "$LINENO"; then :
6636 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=yes
6637 else
6638 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=no
6640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6641 ac_c_werror_flag=$ac_save_c_werror_flag
6642 CFLAGS="$pgac_save_CFLAGS"
6643 CC="$pgac_save_CC"
6645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&5
6646 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&6; }
6647 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" = x"yes"; then
6648 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6652 if test -n "$NOT_THE_CFLAGS"; then
6653 CFLAGS="$CFLAGS -Wno-cast-function-type-strict"
6655 elif test "$ICC" = yes; then
6656 # Intel's compiler has a bug/misoptimization in checking for
6657 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6660 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6661 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6662 $as_echo_n "(cached) " >&6
6663 else
6664 pgac_save_CFLAGS=$CFLAGS
6665 pgac_save_CC=$CC
6666 CC=${CC}
6667 CFLAGS="${CFLAGS} -mp1"
6668 ac_save_c_werror_flag=$ac_c_werror_flag
6669 ac_c_werror_flag=yes
6670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6671 /* end confdefs.h. */
6674 main ()
6678 return 0;
6680 _ACEOF
6681 if ac_fn_c_try_compile "$LINENO"; then :
6682 pgac_cv_prog_CC_cflags__mp1=yes
6683 else
6684 pgac_cv_prog_CC_cflags__mp1=no
6686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6687 ac_c_werror_flag=$ac_save_c_werror_flag
6688 CFLAGS="$pgac_save_CFLAGS"
6689 CC="$pgac_save_CC"
6691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6692 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6693 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6694 CFLAGS="${CFLAGS} -mp1"
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6699 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6700 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6701 $as_echo_n "(cached) " >&6
6702 else
6703 pgac_save_CXXFLAGS=$CXXFLAGS
6704 pgac_save_CXX=$CXX
6705 CXX=${CXX}
6706 CXXFLAGS="${CXXFLAGS} -mp1"
6707 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6708 ac_cxx_werror_flag=yes
6709 ac_ext=cpp
6710 ac_cpp='$CXXCPP $CPPFLAGS'
6711 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6712 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6713 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6716 /* end confdefs.h. */
6719 main ()
6723 return 0;
6725 _ACEOF
6726 if ac_fn_cxx_try_compile "$LINENO"; then :
6727 pgac_cv_prog_CXX_cxxflags__mp1=yes
6728 else
6729 pgac_cv_prog_CXX_cxxflags__mp1=no
6731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6732 ac_ext=c
6733 ac_cpp='$CPP $CPPFLAGS'
6734 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6735 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6736 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6738 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6739 CXXFLAGS="$pgac_save_CXXFLAGS"
6740 CXX="$pgac_save_CXX"
6742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6743 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6744 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6745 CXXFLAGS="${CXXFLAGS} -mp1"
6749 # Make sure strict aliasing is off (though this is said to be the default)
6751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6752 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6753 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6754 $as_echo_n "(cached) " >&6
6755 else
6756 pgac_save_CFLAGS=$CFLAGS
6757 pgac_save_CC=$CC
6758 CC=${CC}
6759 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6760 ac_save_c_werror_flag=$ac_c_werror_flag
6761 ac_c_werror_flag=yes
6762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6763 /* end confdefs.h. */
6766 main ()
6770 return 0;
6772 _ACEOF
6773 if ac_fn_c_try_compile "$LINENO"; then :
6774 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6775 else
6776 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6779 ac_c_werror_flag=$ac_save_c_werror_flag
6780 CFLAGS="$pgac_save_CFLAGS"
6781 CC="$pgac_save_CC"
6783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6784 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6785 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6786 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6791 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6792 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6793 $as_echo_n "(cached) " >&6
6794 else
6795 pgac_save_CXXFLAGS=$CXXFLAGS
6796 pgac_save_CXX=$CXX
6797 CXX=${CXX}
6798 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6799 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6800 ac_cxx_werror_flag=yes
6801 ac_ext=cpp
6802 ac_cpp='$CXXCPP $CPPFLAGS'
6803 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6804 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6805 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6808 /* end confdefs.h. */
6811 main ()
6815 return 0;
6817 _ACEOF
6818 if ac_fn_cxx_try_compile "$LINENO"; then :
6819 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6820 else
6821 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6823 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6824 ac_ext=c
6825 ac_cpp='$CPP $CPPFLAGS'
6826 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6827 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6828 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6830 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6831 CXXFLAGS="$pgac_save_CXXFLAGS"
6832 CXX="$pgac_save_CXX"
6834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6835 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6836 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6837 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6841 elif test "$PORTNAME" = "aix"; then
6842 # AIX's xlc has to have strict aliasing turned off too
6844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6845 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6846 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6847 $as_echo_n "(cached) " >&6
6848 else
6849 pgac_save_CFLAGS=$CFLAGS
6850 pgac_save_CC=$CC
6851 CC=${CC}
6852 CFLAGS="${CFLAGS} -qnoansialias"
6853 ac_save_c_werror_flag=$ac_c_werror_flag
6854 ac_c_werror_flag=yes
6855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6856 /* end confdefs.h. */
6859 main ()
6863 return 0;
6865 _ACEOF
6866 if ac_fn_c_try_compile "$LINENO"; then :
6867 pgac_cv_prog_CC_cflags__qnoansialias=yes
6868 else
6869 pgac_cv_prog_CC_cflags__qnoansialias=no
6871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6872 ac_c_werror_flag=$ac_save_c_werror_flag
6873 CFLAGS="$pgac_save_CFLAGS"
6874 CC="$pgac_save_CC"
6876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6877 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6878 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6879 CFLAGS="${CFLAGS} -qnoansialias"
6883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6884 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6885 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6886 $as_echo_n "(cached) " >&6
6887 else
6888 pgac_save_CXXFLAGS=$CXXFLAGS
6889 pgac_save_CXX=$CXX
6890 CXX=${CXX}
6891 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6892 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6893 ac_cxx_werror_flag=yes
6894 ac_ext=cpp
6895 ac_cpp='$CXXCPP $CPPFLAGS'
6896 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6897 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6898 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6901 /* end confdefs.h. */
6904 main ()
6908 return 0;
6910 _ACEOF
6911 if ac_fn_cxx_try_compile "$LINENO"; then :
6912 pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6913 else
6914 pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6917 ac_ext=c
6918 ac_cpp='$CPP $CPPFLAGS'
6919 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6920 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6921 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6923 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6924 CXXFLAGS="$pgac_save_CXXFLAGS"
6925 CXX="$pgac_save_CXX"
6927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6928 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6929 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6930 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6936 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6937 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6938 $as_echo_n "(cached) " >&6
6939 else
6940 pgac_save_CFLAGS=$CFLAGS
6941 pgac_save_CC=$CC
6942 CC=${CC}
6943 CFLAGS="${CFLAGS} -qlonglong"
6944 ac_save_c_werror_flag=$ac_c_werror_flag
6945 ac_c_werror_flag=yes
6946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6947 /* end confdefs.h. */
6950 main ()
6954 return 0;
6956 _ACEOF
6957 if ac_fn_c_try_compile "$LINENO"; then :
6958 pgac_cv_prog_CC_cflags__qlonglong=yes
6959 else
6960 pgac_cv_prog_CC_cflags__qlonglong=no
6962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6963 ac_c_werror_flag=$ac_save_c_werror_flag
6964 CFLAGS="$pgac_save_CFLAGS"
6965 CC="$pgac_save_CC"
6967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6968 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6969 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6970 CFLAGS="${CFLAGS} -qlonglong"
6974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6975 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6976 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6977 $as_echo_n "(cached) " >&6
6978 else
6979 pgac_save_CXXFLAGS=$CXXFLAGS
6980 pgac_save_CXX=$CXX
6981 CXX=${CXX}
6982 CXXFLAGS="${CXXFLAGS} -qlonglong"
6983 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6984 ac_cxx_werror_flag=yes
6985 ac_ext=cpp
6986 ac_cpp='$CXXCPP $CPPFLAGS'
6987 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6988 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6989 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6992 /* end confdefs.h. */
6995 main ()
6999 return 0;
7001 _ACEOF
7002 if ac_fn_cxx_try_compile "$LINENO"; then :
7003 pgac_cv_prog_CXX_cxxflags__qlonglong=yes
7004 else
7005 pgac_cv_prog_CXX_cxxflags__qlonglong=no
7007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7008 ac_ext=c
7009 ac_cpp='$CPP $CPPFLAGS'
7010 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7011 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7012 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7014 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7015 CXXFLAGS="$pgac_save_CXXFLAGS"
7016 CXX="$pgac_save_CXX"
7018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
7019 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
7020 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
7021 CXXFLAGS="${CXXFLAGS} -qlonglong"
7027 # If the compiler knows how to hide symbols, add the switch needed for that to
7028 # CFLAGS_SL_MODULE and define HAVE_VISIBILITY_ATTRIBUTE.
7030 # This is done separately from the above because -fvisibility is supported by
7031 # quite a few different compilers, making the required repetition bothersome.
7033 # We might need to add a separate test to check if
7034 # __attribute__((visibility("hidden"))) is supported, if we encounter a
7035 # compiler that supports one of the supported variants of -fvisibility=hidden
7036 # but uses a different syntax to mark a symbol as exported.
7037 if test "$GCC" = yes -o "$SUN_STUDIO_CC" = yes ; then
7038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE" >&5
7039 $as_echo_n "checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
7040 if ${pgac_cv_prog_CC_cflags__fvisibility_hidden+:} false; then :
7041 $as_echo_n "(cached) " >&6
7042 else
7043 pgac_save_CFLAGS=$CFLAGS
7044 pgac_save_CC=$CC
7045 CC=${CC}
7046 CFLAGS="${CFLAGS_SL_MODULE} -fvisibility=hidden"
7047 ac_save_c_werror_flag=$ac_c_werror_flag
7048 ac_c_werror_flag=yes
7049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7050 /* end confdefs.h. */
7053 main ()
7057 return 0;
7059 _ACEOF
7060 if ac_fn_c_try_compile "$LINENO"; then :
7061 pgac_cv_prog_CC_cflags__fvisibility_hidden=yes
7062 else
7063 pgac_cv_prog_CC_cflags__fvisibility_hidden=no
7065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7066 ac_c_werror_flag=$ac_save_c_werror_flag
7067 CFLAGS="$pgac_save_CFLAGS"
7068 CC="$pgac_save_CC"
7070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fvisibility_hidden" >&5
7071 $as_echo "$pgac_cv_prog_CC_cflags__fvisibility_hidden" >&6; }
7072 if test x"$pgac_cv_prog_CC_cflags__fvisibility_hidden" = x"yes"; then
7073 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -fvisibility=hidden"
7077 # For C++ we additionally want -fvisibility-inlines-hidden
7078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
7079 $as_echo_n "checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
7080 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_hidden+:} false; then :
7081 $as_echo_n "(cached) " >&6
7082 else
7083 pgac_save_CXXFLAGS=$CXXFLAGS
7084 pgac_save_CXX=$CXX
7085 CXX=${CXX}
7086 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
7087 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7088 ac_cxx_werror_flag=yes
7089 ac_ext=cpp
7090 ac_cpp='$CXXCPP $CPPFLAGS'
7091 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7092 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7093 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7096 /* end confdefs.h. */
7099 main ()
7103 return 0;
7105 _ACEOF
7106 if ac_fn_cxx_try_compile "$LINENO"; then :
7107 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=yes
7108 else
7109 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=no
7111 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7112 ac_ext=c
7113 ac_cpp='$CPP $CPPFLAGS'
7114 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7115 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7116 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7118 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7119 CXXFLAGS="$pgac_save_CXXFLAGS"
7120 CXX="$pgac_save_CXX"
7122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&5
7123 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&6; }
7124 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" = x"yes"; then
7125 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
7128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE" >&5
7129 $as_echo_n "checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE... " >&6; }
7130 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden+:} false; then :
7131 $as_echo_n "(cached) " >&6
7132 else
7133 pgac_save_CXXFLAGS=$CXXFLAGS
7134 pgac_save_CXX=$CXX
7135 CXX=${CXX}
7136 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
7137 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7138 ac_cxx_werror_flag=yes
7139 ac_ext=cpp
7140 ac_cpp='$CXXCPP $CPPFLAGS'
7141 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7142 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7143 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7146 /* end confdefs.h. */
7149 main ()
7153 return 0;
7155 _ACEOF
7156 if ac_fn_cxx_try_compile "$LINENO"; then :
7157 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=yes
7158 else
7159 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=no
7161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7162 ac_ext=c
7163 ac_cpp='$CPP $CPPFLAGS'
7164 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7165 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7166 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7168 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7169 CXXFLAGS="$pgac_save_CXXFLAGS"
7170 CXX="$pgac_save_CXX"
7172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&5
7173 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&6; }
7174 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" = x"yes"; then
7175 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
7178 have_visibility_attribute=$pgac_cv_prog_CC_cflags__fvisibility_hidden
7179 elif test "$PORTNAME" = "aix"; then
7180 # Note that xlc accepts -fvisibility=hidden as a file.
7181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qvisibility=hidden, for CFLAGS_SL_MODULE" >&5
7182 $as_echo_n "checking whether ${CC} supports -qvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
7183 if ${pgac_cv_prog_CC_cflags__qvisibility_hidden+:} false; then :
7184 $as_echo_n "(cached) " >&6
7185 else
7186 pgac_save_CFLAGS=$CFLAGS
7187 pgac_save_CC=$CC
7188 CC=${CC}
7189 CFLAGS="${CFLAGS_SL_MODULE} -qvisibility=hidden"
7190 ac_save_c_werror_flag=$ac_c_werror_flag
7191 ac_c_werror_flag=yes
7192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7193 /* end confdefs.h. */
7196 main ()
7200 return 0;
7202 _ACEOF
7203 if ac_fn_c_try_compile "$LINENO"; then :
7204 pgac_cv_prog_CC_cflags__qvisibility_hidden=yes
7205 else
7206 pgac_cv_prog_CC_cflags__qvisibility_hidden=no
7208 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7209 ac_c_werror_flag=$ac_save_c_werror_flag
7210 CFLAGS="$pgac_save_CFLAGS"
7211 CC="$pgac_save_CC"
7213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qvisibility_hidden" >&5
7214 $as_echo "$pgac_cv_prog_CC_cflags__qvisibility_hidden" >&6; }
7215 if test x"$pgac_cv_prog_CC_cflags__qvisibility_hidden" = x"yes"; then
7216 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -qvisibility=hidden"
7220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
7221 $as_echo_n "checking whether ${CXX} supports -qvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
7222 if ${pgac_cv_prog_CXX_cxxflags__qvisibility_hidden+:} false; then :
7223 $as_echo_n "(cached) " >&6
7224 else
7225 pgac_save_CXXFLAGS=$CXXFLAGS
7226 pgac_save_CXX=$CXX
7227 CXX=${CXX}
7228 CXXFLAGS="${CXXFLAGS_SL_MODULE} -qvisibility=hidden"
7229 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7230 ac_cxx_werror_flag=yes
7231 ac_ext=cpp
7232 ac_cpp='$CXXCPP $CPPFLAGS'
7233 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7234 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7235 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7238 /* end confdefs.h. */
7241 main ()
7245 return 0;
7247 _ACEOF
7248 if ac_fn_cxx_try_compile "$LINENO"; then :
7249 pgac_cv_prog_CXX_cxxflags__qvisibility_hidden=yes
7250 else
7251 pgac_cv_prog_CXX_cxxflags__qvisibility_hidden=no
7253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7254 ac_ext=c
7255 ac_cpp='$CPP $CPPFLAGS'
7256 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7257 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7258 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7260 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7261 CXXFLAGS="$pgac_save_CXXFLAGS"
7262 CXX="$pgac_save_CXX"
7264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" >&5
7265 $as_echo "$pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" >&6; }
7266 if test x"$pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" = x"yes"; then
7267 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -qvisibility=hidden"
7270 have_visibility_attribute=$pgac_cv_prog_CC_cflags__qvisibility_hidden
7271 # Old xlc versions (<13.1) don't have support for -qvisibility. Use expfull to force
7272 # all extension module symbols to be exported.
7273 if test "$pgac_cv_prog_CC_cflags__qvisibility_hidden" != "yes"; then
7274 CFLAGS_SL_MODULE="$CFLAGS_SL_MODULE -Wl,-b,expfull"
7278 if test "$have_visibility_attribute" = "yes"; then
7280 $as_echo "#define HAVE_VISIBILITY_ATTRIBUTE 1" >>confdefs.h
7289 # Determine flags used to emit bitcode for JIT inlining.
7290 # 1. We must duplicate any behaviour-changing compiler flags used above,
7291 # to keep compatibility with the compiler used for normal Postgres code.
7292 # 2. We don't bother to duplicate extra-warnings switches --- seeing a
7293 # warning in the main build is enough.
7294 # 3. But we must duplicate -Wno-warning flags, else we'll see those anyway.
7295 if test "$with_llvm" = yes ; then
7296 CLANGXX="$CLANG -xc++"
7298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
7299 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
7300 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
7301 $as_echo_n "(cached) " >&6
7302 else
7303 pgac_save_CFLAGS=$CFLAGS
7304 pgac_save_CC=$CC
7305 CC=${CLANG}
7306 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7307 ac_save_c_werror_flag=$ac_c_werror_flag
7308 ac_c_werror_flag=yes
7309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7310 /* end confdefs.h. */
7313 main ()
7317 return 0;
7319 _ACEOF
7320 if ac_fn_c_try_compile "$LINENO"; then :
7321 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
7322 else
7323 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
7325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7326 ac_c_werror_flag=$ac_save_c_werror_flag
7327 CFLAGS="$pgac_save_CFLAGS"
7328 CC="$pgac_save_CC"
7330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
7331 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
7332 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
7333 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
7337 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
7338 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
7339 $as_echo_n "(cached) " >&6
7340 else
7341 pgac_save_CXXFLAGS=$CXXFLAGS
7342 pgac_save_CXX=$CXX
7343 CXX=${CLANGXX}
7344 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7345 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7346 ac_cxx_werror_flag=yes
7347 ac_ext=cpp
7348 ac_cpp='$CXXCPP $CPPFLAGS'
7349 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7350 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7351 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7354 /* end confdefs.h. */
7357 main ()
7361 return 0;
7363 _ACEOF
7364 if ac_fn_cxx_try_compile "$LINENO"; then :
7365 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
7366 else
7367 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
7369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7370 ac_ext=c
7371 ac_cpp='$CPP $CPPFLAGS'
7372 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7373 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7374 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7376 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7377 CXXFLAGS="$pgac_save_CXXFLAGS"
7378 CXX="$pgac_save_CXX"
7380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
7381 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
7382 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
7383 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
7387 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
7388 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
7389 $as_echo_n "(cached) " >&6
7390 else
7391 pgac_save_CFLAGS=$CFLAGS
7392 pgac_save_CC=$CC
7393 CC=${CLANG}
7394 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7395 ac_save_c_werror_flag=$ac_c_werror_flag
7396 ac_c_werror_flag=yes
7397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7398 /* end confdefs.h. */
7401 main ()
7405 return 0;
7407 _ACEOF
7408 if ac_fn_c_try_compile "$LINENO"; then :
7409 pgac_cv_prog_CLANG_cflags__fwrapv=yes
7410 else
7411 pgac_cv_prog_CLANG_cflags__fwrapv=no
7413 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7414 ac_c_werror_flag=$ac_save_c_werror_flag
7415 CFLAGS="$pgac_save_CFLAGS"
7416 CC="$pgac_save_CC"
7418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
7419 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
7420 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
7421 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
7425 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
7426 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
7427 $as_echo_n "(cached) " >&6
7428 else
7429 pgac_save_CXXFLAGS=$CXXFLAGS
7430 pgac_save_CXX=$CXX
7431 CXX=${CLANGXX}
7432 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7433 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7434 ac_cxx_werror_flag=yes
7435 ac_ext=cpp
7436 ac_cpp='$CXXCPP $CPPFLAGS'
7437 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7438 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7439 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7442 /* end confdefs.h. */
7445 main ()
7449 return 0;
7451 _ACEOF
7452 if ac_fn_cxx_try_compile "$LINENO"; then :
7453 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
7454 else
7455 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
7457 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7458 ac_ext=c
7459 ac_cpp='$CPP $CPPFLAGS'
7460 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7461 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7462 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7464 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7465 CXXFLAGS="$pgac_save_CXXFLAGS"
7466 CXX="$pgac_save_CXX"
7468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
7469 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
7470 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
7471 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
7475 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
7476 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
7477 $as_echo_n "(cached) " >&6
7478 else
7479 pgac_save_CFLAGS=$CFLAGS
7480 pgac_save_CC=$CC
7481 CC=${CLANG}
7482 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7483 ac_save_c_werror_flag=$ac_c_werror_flag
7484 ac_c_werror_flag=yes
7485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7486 /* end confdefs.h. */
7489 main ()
7493 return 0;
7495 _ACEOF
7496 if ac_fn_c_try_compile "$LINENO"; then :
7497 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7498 else
7499 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7501 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7502 ac_c_werror_flag=$ac_save_c_werror_flag
7503 CFLAGS="$pgac_save_CFLAGS"
7504 CC="$pgac_save_CC"
7506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7507 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7508 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7509 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7513 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7514 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7515 $as_echo_n "(cached) " >&6
7516 else
7517 pgac_save_CXXFLAGS=$CXXFLAGS
7518 pgac_save_CXX=$CXX
7519 CXX=${CLANGXX}
7520 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7521 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7522 ac_cxx_werror_flag=yes
7523 ac_ext=cpp
7524 ac_cpp='$CXXCPP $CPPFLAGS'
7525 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7526 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7527 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7530 /* end confdefs.h. */
7533 main ()
7537 return 0;
7539 _ACEOF
7540 if ac_fn_cxx_try_compile "$LINENO"; then :
7541 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7542 else
7543 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7545 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7546 ac_ext=c
7547 ac_cpp='$CPP $CPPFLAGS'
7548 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7549 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7550 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7552 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7553 CXXFLAGS="$pgac_save_CXXFLAGS"
7554 CXX="$pgac_save_CXX"
7556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7557 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7558 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7559 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS" >&5
7564 $as_echo_n "checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS... " >&6; }
7565 if ${pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers+:} false; then :
7566 $as_echo_n "(cached) " >&6
7567 else
7568 pgac_save_CFLAGS=$CFLAGS
7569 pgac_save_CC=$CC
7570 CC=${CLANG}
7571 CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7572 ac_save_c_werror_flag=$ac_c_werror_flag
7573 ac_c_werror_flag=yes
7574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7575 /* end confdefs.h. */
7578 main ()
7582 return 0;
7584 _ACEOF
7585 if ac_fn_c_try_compile "$LINENO"; then :
7586 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=yes
7587 else
7588 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=no
7590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7591 ac_c_werror_flag=$ac_save_c_werror_flag
7592 CFLAGS="$pgac_save_CFLAGS"
7593 CC="$pgac_save_CC"
7595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&5
7596 $as_echo "$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&6; }
7597 if test x"$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" = x"yes"; then
7598 BITCODE_CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS" >&5
7602 $as_echo_n "checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS... " >&6; }
7603 if ${pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers+:} false; then :
7604 $as_echo_n "(cached) " >&6
7605 else
7606 pgac_save_CXXFLAGS=$CXXFLAGS
7607 pgac_save_CXX=$CXX
7608 CXX=${CLANGXX}
7609 CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7610 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7611 ac_cxx_werror_flag=yes
7612 ac_ext=cpp
7613 ac_cpp='$CXXCPP $CPPFLAGS'
7614 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7615 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7616 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7619 /* end confdefs.h. */
7622 main ()
7626 return 0;
7628 _ACEOF
7629 if ac_fn_cxx_try_compile "$LINENO"; then :
7630 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=yes
7631 else
7632 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=no
7634 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7635 ac_ext=c
7636 ac_cpp='$CPP $CPPFLAGS'
7637 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7638 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7639 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7641 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7642 CXXFLAGS="$pgac_save_CXXFLAGS"
7643 CXX="$pgac_save_CXX"
7645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&5
7646 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&6; }
7647 if test x"$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" = x"yes"; then
7648 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7652 NOT_THE_CFLAGS=""
7653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
7654 $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
7655 if ${pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument+:} false; then :
7656 $as_echo_n "(cached) " >&6
7657 else
7658 pgac_save_CFLAGS=$CFLAGS
7659 pgac_save_CC=$CC
7660 CC=${CLANG}
7661 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7662 ac_save_c_werror_flag=$ac_c_werror_flag
7663 ac_c_werror_flag=yes
7664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7665 /* end confdefs.h. */
7668 main ()
7672 return 0;
7674 _ACEOF
7675 if ac_fn_c_try_compile "$LINENO"; then :
7676 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=yes
7677 else
7678 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=no
7680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7681 ac_c_werror_flag=$ac_save_c_werror_flag
7682 CFLAGS="$pgac_save_CFLAGS"
7683 CC="$pgac_save_CC"
7685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&5
7686 $as_echo "$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&6; }
7687 if test x"$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" = x"yes"; then
7688 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7691 if test -n "$NOT_THE_CFLAGS"; then
7692 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-unused-command-line-argument"
7694 NOT_THE_CFLAGS=""
7695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
7696 $as_echo_n "checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
7697 if ${pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro+:} false; then :
7698 $as_echo_n "(cached) " >&6
7699 else
7700 pgac_save_CFLAGS=$CFLAGS
7701 pgac_save_CC=$CC
7702 CC=${CLANG}
7703 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7704 ac_save_c_werror_flag=$ac_c_werror_flag
7705 ac_c_werror_flag=yes
7706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7707 /* end confdefs.h. */
7710 main ()
7714 return 0;
7716 _ACEOF
7717 if ac_fn_c_try_compile "$LINENO"; then :
7718 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=yes
7719 else
7720 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=no
7722 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7723 ac_c_werror_flag=$ac_save_c_werror_flag
7724 CFLAGS="$pgac_save_CFLAGS"
7725 CC="$pgac_save_CC"
7727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&5
7728 $as_echo "$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&6; }
7729 if test x"$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" = x"yes"; then
7730 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7733 if test -n "$NOT_THE_CFLAGS"; then
7734 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
7736 NOT_THE_CFLAGS=""
7737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
7738 $as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
7739 if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :
7740 $as_echo_n "(cached) " >&6
7741 else
7742 pgac_save_CFLAGS=$CFLAGS
7743 pgac_save_CC=$CC
7744 CC=${CLANG}
7745 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7746 ac_save_c_werror_flag=$ac_c_werror_flag
7747 ac_c_werror_flag=yes
7748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7749 /* end confdefs.h. */
7752 main ()
7756 return 0;
7758 _ACEOF
7759 if ac_fn_c_try_compile "$LINENO"; then :
7760 pgac_cv_prog_CLANG_cflags__Wformat_truncation=yes
7761 else
7762 pgac_cv_prog_CLANG_cflags__Wformat_truncation=no
7764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7765 ac_c_werror_flag=$ac_save_c_werror_flag
7766 CFLAGS="$pgac_save_CFLAGS"
7767 CC="$pgac_save_CC"
7769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&5
7770 $as_echo "$pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&6; }
7771 if test x"$pgac_cv_prog_CLANG_cflags__Wformat_truncation" = x"yes"; then
7772 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7775 if test -n "$NOT_THE_CFLAGS"; then
7776 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"
7778 NOT_THE_CFLAGS=""
7779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
7780 $as_echo_n "checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
7781 if ${pgac_cv_prog_CLANG_cflags__Wstringop_truncation+:} false; then :
7782 $as_echo_n "(cached) " >&6
7783 else
7784 pgac_save_CFLAGS=$CFLAGS
7785 pgac_save_CC=$CC
7786 CC=${CLANG}
7787 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7788 ac_save_c_werror_flag=$ac_c_werror_flag
7789 ac_c_werror_flag=yes
7790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7791 /* end confdefs.h. */
7794 main ()
7798 return 0;
7800 _ACEOF
7801 if ac_fn_c_try_compile "$LINENO"; then :
7802 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=yes
7803 else
7804 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=no
7806 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7807 ac_c_werror_flag=$ac_save_c_werror_flag
7808 CFLAGS="$pgac_save_CFLAGS"
7809 CC="$pgac_save_CC"
7811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&5
7812 $as_echo "$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&6; }
7813 if test x"$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" = x"yes"; then
7814 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7817 if test -n "$NOT_THE_CFLAGS"; then
7818 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-stringop-truncation"
7822 # supply -g if --enable-debug
7823 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7824 CFLAGS="$CFLAGS -g"
7827 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7828 CXXFLAGS="$CXXFLAGS -g"
7831 # enable code coverage if --enable-coverage
7832 if test "$enable_coverage" = yes; then
7833 if test "$GCC" = yes; then
7834 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7835 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7836 else
7837 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7841 # enable profiling if --enable-profiling
7842 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7843 if test "$GCC" = yes; then
7845 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7847 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7848 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7849 else
7850 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7854 # On Solaris, we need this #define to get POSIX-conforming versions
7855 # of many interfaces (sigwait, getpwuid_r, ...).
7856 if test "$PORTNAME" = "solaris"; then
7857 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
7860 # We already have this in Makefile.win32, but configure needs it too
7861 if test "$PORTNAME" = "win32"; then
7862 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7865 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7866 # user-specified flags (if any) at the end. This lets users override
7867 # the automatic additions.
7868 CFLAGS="$CFLAGS $user_CFLAGS"
7869 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7870 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7871 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7876 # The template file must set up CFLAGS_SL; we don't support user override
7879 # Check if the compiler still works with the final flag settings
7880 # (note, we're not checking that for CXX, which is optional)
7881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7882 $as_echo_n "checking whether the C compiler still works... " >&6; }
7883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7884 /* end confdefs.h. */
7887 main ()
7889 return 0;
7891 return 0;
7893 _ACEOF
7894 if ac_fn_c_try_link "$LINENO"; then :
7895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7896 $as_echo "yes" >&6; }
7897 else
7898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7899 $as_echo "no" >&6; }
7900 as_fn_error $? "cannot proceed" "$LINENO" 5
7902 rm -f core conftest.err conftest.$ac_objext \
7903 conftest$ac_exeext conftest.$ac_ext
7905 # Defend against gcc -ffast-math
7906 if test "$GCC" = yes; then
7907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7908 /* end confdefs.h. */
7911 main ()
7913 #ifdef __FAST_MATH__
7914 choke me
7915 #endif
7917 return 0;
7919 _ACEOF
7920 if ac_fn_c_try_compile "$LINENO"; then :
7922 else
7923 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7928 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7929 # versions of clang do not understand -fexcess-precision=standard, the use of
7930 # x87 floating point operations leads to problems like isinf possibly returning
7931 # false for a value that is infinite when converted from the 80bit register to
7932 # the 8byte memory representation.
7934 # Only perform the test if the compiler doesn't understand
7935 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7936 # automatically.
7937 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7939 /* end confdefs.h. */
7942 main ()
7945 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7946 choke me
7947 #endif
7950 return 0;
7952 _ACEOF
7953 if ac_fn_c_try_compile "$LINENO"; then :
7955 else
7956 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7961 ac_ext=c
7962 ac_cpp='$CPP $CPPFLAGS'
7963 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7964 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7965 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7967 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7968 # On Suns, sometimes $CPP names a directory.
7969 if test -n "$CPP" && test -d "$CPP"; then
7970 CPP=
7972 if test -z "$CPP"; then
7973 if ${ac_cv_prog_CPP+:} false; then :
7974 $as_echo_n "(cached) " >&6
7975 else
7976 # Double quotes because CPP needs to be expanded
7977 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7979 ac_preproc_ok=false
7980 for ac_c_preproc_warn_flag in '' yes
7982 # Use a header file that comes with gcc, so configuring glibc
7983 # with a fresh cross-compiler works.
7984 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7985 # <limits.h> exists even on freestanding compilers.
7986 # On the NeXT, cc -E runs the code through the compiler's parser,
7987 # not just through cpp. "Syntax error" is here to catch this case.
7988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7989 /* end confdefs.h. */
7990 #ifdef __STDC__
7991 # include <limits.h>
7992 #else
7993 # include <assert.h>
7994 #endif
7995 Syntax error
7996 _ACEOF
7997 if ac_fn_c_try_cpp "$LINENO"; then :
7999 else
8000 # Broken: fails on valid input.
8001 continue
8003 rm -f conftest.err conftest.i conftest.$ac_ext
8005 # OK, works on sane cases. Now check whether nonexistent headers
8006 # can be detected and how.
8007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8008 /* end confdefs.h. */
8009 #include <ac_nonexistent.h>
8010 _ACEOF
8011 if ac_fn_c_try_cpp "$LINENO"; then :
8012 # Broken: success on invalid input.
8013 continue
8014 else
8015 # Passes both tests.
8016 ac_preproc_ok=:
8017 break
8019 rm -f conftest.err conftest.i conftest.$ac_ext
8021 done
8022 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8023 rm -f conftest.i conftest.err conftest.$ac_ext
8024 if $ac_preproc_ok; then :
8025 break
8028 done
8029 ac_cv_prog_CPP=$CPP
8032 CPP=$ac_cv_prog_CPP
8033 else
8034 ac_cv_prog_CPP=$CPP
8036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
8037 $as_echo "$CPP" >&6; }
8038 ac_preproc_ok=false
8039 for ac_c_preproc_warn_flag in '' yes
8041 # Use a header file that comes with gcc, so configuring glibc
8042 # with a fresh cross-compiler works.
8043 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8044 # <limits.h> exists even on freestanding compilers.
8045 # On the NeXT, cc -E runs the code through the compiler's parser,
8046 # not just through cpp. "Syntax error" is here to catch this case.
8047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8048 /* end confdefs.h. */
8049 #ifdef __STDC__
8050 # include <limits.h>
8051 #else
8052 # include <assert.h>
8053 #endif
8054 Syntax error
8055 _ACEOF
8056 if ac_fn_c_try_cpp "$LINENO"; then :
8058 else
8059 # Broken: fails on valid input.
8060 continue
8062 rm -f conftest.err conftest.i conftest.$ac_ext
8064 # OK, works on sane cases. Now check whether nonexistent headers
8065 # can be detected and how.
8066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8067 /* end confdefs.h. */
8068 #include <ac_nonexistent.h>
8069 _ACEOF
8070 if ac_fn_c_try_cpp "$LINENO"; then :
8071 # Broken: success on invalid input.
8072 continue
8073 else
8074 # Passes both tests.
8075 ac_preproc_ok=:
8076 break
8078 rm -f conftest.err conftest.i conftest.$ac_ext
8080 done
8081 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8082 rm -f conftest.i conftest.err conftest.$ac_ext
8083 if $ac_preproc_ok; then :
8085 else
8086 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8087 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8088 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
8089 See \`config.log' for more details" "$LINENO" 5; }
8092 ac_ext=c
8093 ac_cpp='$CPP $CPPFLAGS'
8094 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8095 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8096 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8102 # Set up TAS assembly code if needed; the template file has now had its
8103 # chance to request this.
8105 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
8108 if test "$need_tas" = yes ; then
8109 TAS=tas.o
8110 else
8111 TAS=""
8116 cat >>confdefs.h <<_ACEOF
8117 #define DLSUFFIX "$DLSUFFIX"
8118 _ACEOF
8122 # Set up pkg_config in case we need it below
8131 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8132 if test -n "$ac_tool_prefix"; then
8133 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8134 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
8135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8136 $as_echo_n "checking for $ac_word... " >&6; }
8137 if ${ac_cv_path_PKG_CONFIG+:} false; then :
8138 $as_echo_n "(cached) " >&6
8139 else
8140 case $PKG_CONFIG in
8141 [\\/]* | ?:[\\/]*)
8142 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8145 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8146 for as_dir in $PATH
8148 IFS=$as_save_IFS
8149 test -z "$as_dir" && as_dir=.
8150 for ac_exec_ext in '' $ac_executable_extensions; do
8151 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8152 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8153 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8154 break 2
8156 done
8157 done
8158 IFS=$as_save_IFS
8161 esac
8163 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8164 if test -n "$PKG_CONFIG"; then
8165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8166 $as_echo "$PKG_CONFIG" >&6; }
8167 else
8168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8169 $as_echo "no" >&6; }
8174 if test -z "$ac_cv_path_PKG_CONFIG"; then
8175 ac_pt_PKG_CONFIG=$PKG_CONFIG
8176 # Extract the first word of "pkg-config", so it can be a program name with args.
8177 set dummy pkg-config; ac_word=$2
8178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8179 $as_echo_n "checking for $ac_word... " >&6; }
8180 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
8181 $as_echo_n "(cached) " >&6
8182 else
8183 case $ac_pt_PKG_CONFIG in
8184 [\\/]* | ?:[\\/]*)
8185 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8189 for as_dir in $PATH
8191 IFS=$as_save_IFS
8192 test -z "$as_dir" && as_dir=.
8193 for ac_exec_ext in '' $ac_executable_extensions; do
8194 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8195 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8196 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8197 break 2
8199 done
8200 done
8201 IFS=$as_save_IFS
8204 esac
8206 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8207 if test -n "$ac_pt_PKG_CONFIG"; then
8208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8209 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
8210 else
8211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8212 $as_echo "no" >&6; }
8215 if test "x$ac_pt_PKG_CONFIG" = x; then
8216 PKG_CONFIG=""
8217 else
8218 case $cross_compiling:$ac_tool_warned in
8219 yes:)
8220 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8221 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8222 ac_tool_warned=yes ;;
8223 esac
8224 PKG_CONFIG=$ac_pt_PKG_CONFIG
8226 else
8227 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8231 if test -n "$PKG_CONFIG"; then
8232 _pkg_min_version=0.9.0
8233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
8234 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
8235 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8237 $as_echo "yes" >&6; }
8238 else
8239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8240 $as_echo "no" >&6; }
8241 PKG_CONFIG=""
8246 # Automatic dependency tracking
8250 # Check whether --enable-depend was given.
8251 if test "${enable_depend+set}" = set; then :
8252 enableval=$enable_depend;
8253 case $enableval in
8254 yes)
8255 autodepend=yes
8261 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
8263 esac
8265 else
8266 enable_depend=no
8275 # Enable assert checks
8279 # Check whether --enable-cassert was given.
8280 if test "${enable_cassert+set}" = set; then :
8281 enableval=$enable_cassert;
8282 case $enableval in
8283 yes)
8285 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
8292 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
8294 esac
8296 else
8297 enable_cassert=no
8305 # Include directories
8307 ac_save_IFS=$IFS
8308 IFS="${IFS}${PATH_SEPARATOR}"
8309 # SRCH_INC comes from the template file
8310 for dir in $with_includes $SRCH_INC; do
8311 if test -d "$dir"; then
8312 INCLUDES="$INCLUDES -I$dir"
8313 else
8314 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
8315 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
8317 done
8318 IFS=$ac_save_IFS
8323 # Library directories
8325 ac_save_IFS=$IFS
8326 IFS="${IFS}${PATH_SEPARATOR}"
8327 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
8328 for dir in $LIBRARY_DIRS $SRCH_LIB; do
8329 if test -d "$dir"; then
8330 LIBDIRS="$LIBDIRS -L$dir"
8331 else
8332 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
8333 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
8335 done
8336 IFS=$ac_save_IFS
8339 # ICU
8341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
8342 $as_echo_n "checking whether to build with ICU support... " >&6; }
8346 # Check whether --with-icu was given.
8347 if test "${with_icu+set}" = set; then :
8348 withval=$with_icu;
8349 case $withval in
8350 yes)
8352 $as_echo "#define USE_ICU 1" >>confdefs.h
8359 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
8361 esac
8363 else
8364 with_icu=yes
8366 $as_echo "#define USE_ICU 1" >>confdefs.h
8371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
8372 $as_echo "$with_icu" >&6; }
8375 if test "$with_icu" = yes; then
8377 pkg_failed=no
8378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
8379 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
8381 if test -n "$ICU_CFLAGS"; then
8382 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
8383 elif test -n "$PKG_CONFIG"; then
8384 if test -n "$PKG_CONFIG" && \
8385 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8386 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8387 ac_status=$?
8388 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8389 test $ac_status = 0; }; then
8390 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
8391 test "x$?" != "x0" && pkg_failed=yes
8392 else
8393 pkg_failed=yes
8395 else
8396 pkg_failed=untried
8398 if test -n "$ICU_LIBS"; then
8399 pkg_cv_ICU_LIBS="$ICU_LIBS"
8400 elif test -n "$PKG_CONFIG"; then
8401 if test -n "$PKG_CONFIG" && \
8402 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8403 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8404 ac_status=$?
8405 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8406 test $ac_status = 0; }; then
8407 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
8408 test "x$?" != "x0" && pkg_failed=yes
8409 else
8410 pkg_failed=yes
8412 else
8413 pkg_failed=untried
8418 if test $pkg_failed = yes; then
8419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8420 $as_echo "no" >&6; }
8422 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8423 _pkg_short_errors_supported=yes
8424 else
8425 _pkg_short_errors_supported=no
8427 if test $_pkg_short_errors_supported = yes; then
8428 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8429 else
8430 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8432 # Put the nasty error message in config.log where it belongs
8433 echo "$ICU_PKG_ERRORS" >&5
8435 as_fn_error $? "ICU library not found
8436 If you have ICU already installed, see config.log for details on the
8437 failure. It is possible the compiler isn't looking in the proper directory.
8438 Use --without-icu to disable ICU support." "$LINENO" 5
8439 elif test $pkg_failed = untried; then
8440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8441 $as_echo "no" >&6; }
8442 as_fn_error $? "ICU library not found
8443 If you have ICU already installed, see config.log for details on the
8444 failure. It is possible the compiler isn't looking in the proper directory.
8445 Use --without-icu to disable ICU support." "$LINENO" 5
8446 else
8447 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
8448 ICU_LIBS=$pkg_cv_ICU_LIBS
8449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8450 $as_echo "yes" >&6; }
8456 # Optionally build Tcl modules (PL/Tcl)
8458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
8459 $as_echo_n "checking whether to build with Tcl... " >&6; }
8463 # Check whether --with-tcl was given.
8464 if test "${with_tcl+set}" = set; then :
8465 withval=$with_tcl;
8466 case $withval in
8467 yes)
8474 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
8476 esac
8478 else
8479 with_tcl=no
8484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
8485 $as_echo "$with_tcl" >&6; }
8488 # We see if the path to the Tcl/Tk configuration scripts is specified.
8489 # This will override the use of tclsh to find the paths to search.
8494 # Check whether --with-tclconfig was given.
8495 if test "${with_tclconfig+set}" = set; then :
8496 withval=$with_tclconfig;
8497 case $withval in
8498 yes)
8499 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8502 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8507 esac
8514 # Optionally build Perl modules (PL/Perl)
8516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
8517 $as_echo_n "checking whether to build Perl modules... " >&6; }
8521 # Check whether --with-perl was given.
8522 if test "${with_perl+set}" = set; then :
8523 withval=$with_perl;
8524 case $withval in
8525 yes)
8532 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
8534 esac
8536 else
8537 with_perl=no
8542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
8543 $as_echo "$with_perl" >&6; }
8547 # Optionally build Python modules (PL/Python)
8549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
8550 $as_echo_n "checking whether to build Python modules... " >&6; }
8554 # Check whether --with-python was given.
8555 if test "${with_python+set}" = set; then :
8556 withval=$with_python;
8557 case $withval in
8558 yes)
8565 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
8567 esac
8569 else
8570 with_python=no
8575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8576 $as_echo "$with_python" >&6; }
8580 # GSSAPI
8582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
8583 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
8587 # Check whether --with-gssapi was given.
8588 if test "${with_gssapi+set}" = set; then :
8589 withval=$with_gssapi;
8590 case $withval in
8591 yes)
8594 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
8596 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
8603 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
8605 esac
8607 else
8608 with_gssapi=no
8613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8614 $as_echo "$with_gssapi" >&6; }
8622 # Kerberos configuration parameters
8627 # Check whether --with-krb-srvnam was given.
8628 if test "${with_krb_srvnam+set}" = set; then :
8629 withval=$with_krb_srvnam;
8630 case $withval in
8631 yes)
8632 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8635 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8640 esac
8642 else
8643 with_krb_srvnam="postgres"
8649 cat >>confdefs.h <<_ACEOF
8650 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8651 _ACEOF
8656 # PAM
8658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8659 $as_echo_n "checking whether to build with PAM support... " >&6; }
8663 # Check whether --with-pam was given.
8664 if test "${with_pam+set}" = set; then :
8665 withval=$with_pam;
8666 case $withval in
8667 yes)
8669 $as_echo "#define USE_PAM 1" >>confdefs.h
8676 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8678 esac
8680 else
8681 with_pam=no
8686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8687 $as_echo "$with_pam" >&6; }
8691 # BSD AUTH
8693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8694 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8698 # Check whether --with-bsd-auth was given.
8699 if test "${with_bsd_auth+set}" = set; then :
8700 withval=$with_bsd_auth;
8701 case $withval in
8702 yes)
8704 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8711 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8713 esac
8715 else
8716 with_bsd_auth=no
8721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8722 $as_echo "$with_bsd_auth" >&6; }
8726 # LDAP
8728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8729 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8733 # Check whether --with-ldap was given.
8734 if test "${with_ldap+set}" = set; then :
8735 withval=$with_ldap;
8736 case $withval in
8737 yes)
8739 $as_echo "#define USE_LDAP 1" >>confdefs.h
8746 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8748 esac
8750 else
8751 with_ldap=no
8756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8757 $as_echo "$with_ldap" >&6; }
8762 # Bonjour
8764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8765 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8769 # Check whether --with-bonjour was given.
8770 if test "${with_bonjour+set}" = set; then :
8771 withval=$with_bonjour;
8772 case $withval in
8773 yes)
8775 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8782 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8784 esac
8786 else
8787 with_bonjour=no
8792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8793 $as_echo "$with_bonjour" >&6; }
8797 # SELinux
8799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8800 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8804 # Check whether --with-selinux was given.
8805 if test "${with_selinux+set}" = set; then :
8806 withval=$with_selinux;
8807 case $withval in
8808 yes)
8815 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8817 esac
8819 else
8820 with_selinux=no
8826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8827 $as_echo "$with_selinux" >&6; }
8830 # Systemd
8832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8833 $as_echo_n "checking whether to build with systemd support... " >&6; }
8837 # Check whether --with-systemd was given.
8838 if test "${with_systemd+set}" = set; then :
8839 withval=$with_systemd;
8840 case $withval in
8841 yes)
8843 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8850 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8852 esac
8854 else
8855 with_systemd=no
8861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8862 $as_echo "$with_systemd" >&6; }
8865 # Readline
8870 # Check whether --with-readline was given.
8871 if test "${with_readline+set}" = set; then :
8872 withval=$with_readline;
8873 case $withval in
8874 yes)
8881 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8883 esac
8885 else
8886 with_readline=yes
8891 # readline on MinGW has problems with backslashes in psql and other bugs.
8892 # This is particularly a problem with non-US code pages.
8893 # Therefore disable its use until we understand the cause. 2004-07-20
8894 if test "$PORTNAME" = "win32"; then
8895 if test "$with_readline" = yes; then
8896 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8897 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8898 with_readline=no
8905 # Prefer libedit
8910 # Check whether --with-libedit-preferred was given.
8911 if test "${with_libedit_preferred+set}" = set; then :
8912 withval=$with_libedit_preferred;
8913 case $withval in
8914 yes)
8921 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8923 esac
8925 else
8926 with_libedit_preferred=no
8934 # UUID library
8936 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8937 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8938 # UUID library. More than one of these might be present on a given platform,
8939 # so we make the user say which one she wants.
8944 # Check whether --with-uuid was given.
8945 if test "${with_uuid+set}" = set; then :
8946 withval=$with_uuid;
8947 case $withval in
8948 yes)
8949 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8952 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8957 esac
8962 if test x"$with_uuid" = x"" ; then
8963 with_uuid=no
8968 # Check whether --with-ossp-uuid was given.
8969 if test "${with_ossp_uuid+set}" = set; then :
8970 withval=$with_ossp_uuid;
8971 case $withval in
8972 yes)
8979 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8981 esac
8983 else
8984 with_ossp_uuid=no
8989 if test "$with_ossp_uuid" = yes ; then
8990 with_uuid=ossp
8993 if test "$with_uuid" != no ; then
8994 if test "$with_uuid" = bsd ; then
8996 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8998 elif test "$with_uuid" = e2fs ; then
9000 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
9002 elif test "$with_uuid" = ossp ; then
9004 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
9006 else
9007 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
9014 # XML
9016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
9017 $as_echo_n "checking whether to build with XML support... " >&6; }
9021 # Check whether --with-libxml was given.
9022 if test "${with_libxml+set}" = set; then :
9023 withval=$with_libxml;
9024 case $withval in
9025 yes)
9027 $as_echo "#define USE_LIBXML 1" >>confdefs.h
9034 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
9036 esac
9038 else
9039 with_libxml=no
9044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
9045 $as_echo "$with_libxml" >&6; }
9048 if test "$with_libxml" = yes ; then
9049 # Check pkg-config, then xml2-config. But for backwards compatibility,
9050 # setting XML2_CONFIG overrides pkg-config.
9051 have_libxml2_pkg_config=no
9052 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
9054 pkg_failed=no
9055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
9056 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
9058 if test -n "$XML2_CFLAGS"; then
9059 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
9060 elif test -n "$PKG_CONFIG"; then
9061 if test -n "$PKG_CONFIG" && \
9062 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
9063 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
9064 ac_status=$?
9065 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9066 test $ac_status = 0; }; then
9067 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
9068 test "x$?" != "x0" && pkg_failed=yes
9069 else
9070 pkg_failed=yes
9072 else
9073 pkg_failed=untried
9075 if test -n "$XML2_LIBS"; then
9076 pkg_cv_XML2_LIBS="$XML2_LIBS"
9077 elif test -n "$PKG_CONFIG"; then
9078 if test -n "$PKG_CONFIG" && \
9079 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
9080 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
9081 ac_status=$?
9082 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9083 test $ac_status = 0; }; then
9084 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
9085 test "x$?" != "x0" && pkg_failed=yes
9086 else
9087 pkg_failed=yes
9089 else
9090 pkg_failed=untried
9095 if test $pkg_failed = yes; then
9096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9097 $as_echo "no" >&6; }
9099 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9100 _pkg_short_errors_supported=yes
9101 else
9102 _pkg_short_errors_supported=no
9104 if test $_pkg_short_errors_supported = yes; then
9105 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
9106 else
9107 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
9109 # Put the nasty error message in config.log where it belongs
9110 echo "$XML2_PKG_ERRORS" >&5
9112 # do nothing
9113 elif test $pkg_failed = untried; then
9114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9115 $as_echo "no" >&6; }
9116 # do nothing
9117 else
9118 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
9119 XML2_LIBS=$pkg_cv_XML2_LIBS
9120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9121 $as_echo "yes" >&6; }
9122 have_libxml2_pkg_config=yes
9125 if test "$have_libxml2_pkg_config" = no ; then
9126 if test -z "$XML2_CONFIG"; then
9127 for ac_prog in xml2-config
9129 # Extract the first word of "$ac_prog", so it can be a program name with args.
9130 set dummy $ac_prog; ac_word=$2
9131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9132 $as_echo_n "checking for $ac_word... " >&6; }
9133 if ${ac_cv_path_XML2_CONFIG+:} false; then :
9134 $as_echo_n "(cached) " >&6
9135 else
9136 case $XML2_CONFIG in
9137 [\\/]* | ?:[\\/]*)
9138 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
9141 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9142 for as_dir in $PATH
9144 IFS=$as_save_IFS
9145 test -z "$as_dir" && as_dir=.
9146 for ac_exec_ext in '' $ac_executable_extensions; do
9147 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9148 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9149 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9150 break 2
9152 done
9153 done
9154 IFS=$as_save_IFS
9157 esac
9159 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
9160 if test -n "$XML2_CONFIG"; then
9161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
9162 $as_echo "$XML2_CONFIG" >&6; }
9163 else
9164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9165 $as_echo "no" >&6; }
9169 test -n "$XML2_CONFIG" && break
9170 done
9172 else
9173 # Report the value of XML2_CONFIG in configure's output in all cases.
9174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
9175 $as_echo_n "checking for XML2_CONFIG... " >&6; }
9176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
9177 $as_echo "$XML2_CONFIG" >&6; }
9180 if test -n "$XML2_CONFIG"; then
9181 XML2_CFLAGS=`$XML2_CONFIG --cflags`
9182 XML2_LIBS=`$XML2_CONFIG --libs`
9185 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
9186 for pgac_option in $XML2_CFLAGS; do
9187 case $pgac_option in
9188 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9189 esac
9190 done
9191 for pgac_option in $XML2_LIBS; do
9192 case $pgac_option in
9193 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9194 esac
9195 done
9200 # XSLT
9205 # Check whether --with-libxslt was given.
9206 if test "${with_libxslt+set}" = set; then :
9207 withval=$with_libxslt;
9208 case $withval in
9209 yes)
9211 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
9218 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
9220 esac
9222 else
9223 with_libxslt=no
9233 # tzdata
9238 # Check whether --with-system-tzdata was given.
9239 if test "${with_system_tzdata+set}" = set; then :
9240 withval=$with_system_tzdata;
9241 case $withval in
9242 yes)
9243 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
9246 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
9251 esac
9259 # Zlib
9264 # Check whether --with-zlib was given.
9265 if test "${with_zlib+set}" = set; then :
9266 withval=$with_zlib;
9267 case $withval in
9268 yes)
9275 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
9277 esac
9279 else
9280 with_zlib=yes
9288 # LZ4
9290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
9291 $as_echo_n "checking whether to build with LZ4 support... " >&6; }
9295 # Check whether --with-lz4 was given.
9296 if test "${with_lz4+set}" = set; then :
9297 withval=$with_lz4;
9298 case $withval in
9299 yes)
9301 $as_echo "#define USE_LZ4 1" >>confdefs.h
9308 as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
9310 esac
9312 else
9313 with_lz4=no
9318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
9319 $as_echo "$with_lz4" >&6; }
9322 if test "$with_lz4" = yes; then
9324 pkg_failed=no
9325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
9326 $as_echo_n "checking for liblz4... " >&6; }
9328 if test -n "$LZ4_CFLAGS"; then
9329 pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
9330 elif test -n "$PKG_CONFIG"; then
9331 if test -n "$PKG_CONFIG" && \
9332 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9333 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9334 ac_status=$?
9335 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9336 test $ac_status = 0; }; then
9337 pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
9338 test "x$?" != "x0" && pkg_failed=yes
9339 else
9340 pkg_failed=yes
9342 else
9343 pkg_failed=untried
9345 if test -n "$LZ4_LIBS"; then
9346 pkg_cv_LZ4_LIBS="$LZ4_LIBS"
9347 elif test -n "$PKG_CONFIG"; then
9348 if test -n "$PKG_CONFIG" && \
9349 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9350 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9351 ac_status=$?
9352 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9353 test $ac_status = 0; }; then
9354 pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
9355 test "x$?" != "x0" && pkg_failed=yes
9356 else
9357 pkg_failed=yes
9359 else
9360 pkg_failed=untried
9365 if test $pkg_failed = yes; then
9366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9367 $as_echo "no" >&6; }
9369 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9370 _pkg_short_errors_supported=yes
9371 else
9372 _pkg_short_errors_supported=no
9374 if test $_pkg_short_errors_supported = yes; then
9375 LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
9376 else
9377 LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
9379 # Put the nasty error message in config.log where it belongs
9380 echo "$LZ4_PKG_ERRORS" >&5
9382 as_fn_error $? "Package requirements (liblz4) were not met:
9384 $LZ4_PKG_ERRORS
9386 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9387 installed software in a non-standard prefix.
9389 Alternatively, you may set the environment variables LZ4_CFLAGS
9390 and LZ4_LIBS to avoid the need to call pkg-config.
9391 See the pkg-config man page for more details." "$LINENO" 5
9392 elif test $pkg_failed = untried; then
9393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9394 $as_echo "no" >&6; }
9395 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9396 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9397 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9398 is in your PATH or set the PKG_CONFIG environment variable to the full
9399 path to pkg-config.
9401 Alternatively, you may set the environment variables LZ4_CFLAGS
9402 and LZ4_LIBS to avoid the need to call pkg-config.
9403 See the pkg-config man page for more details.
9405 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9406 See \`config.log' for more details" "$LINENO" 5; }
9407 else
9408 LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
9409 LZ4_LIBS=$pkg_cv_LZ4_LIBS
9410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9411 $as_echo "yes" >&6; }
9414 # We only care about -I, -D, and -L switches;
9415 # note that -llz4 will be added by AC_CHECK_LIB below.
9416 for pgac_option in $LZ4_CFLAGS; do
9417 case $pgac_option in
9418 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9419 esac
9420 done
9421 for pgac_option in $LZ4_LIBS; do
9422 case $pgac_option in
9423 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9424 esac
9425 done
9429 # ZSTD
9431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ZSTD support" >&5
9432 $as_echo_n "checking whether to build with ZSTD support... " >&6; }
9436 # Check whether --with-zstd was given.
9437 if test "${with_zstd+set}" = set; then :
9438 withval=$with_zstd;
9439 case $withval in
9440 yes)
9442 $as_echo "#define USE_ZSTD 1" >>confdefs.h
9449 as_fn_error $? "no argument expected for --with-zstd option" "$LINENO" 5
9451 esac
9453 else
9454 with_zstd=no
9459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_zstd" >&5
9460 $as_echo "$with_zstd" >&6; }
9463 if test "$with_zstd" = yes; then
9465 pkg_failed=no
9466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd >= 1.4.0" >&5
9467 $as_echo_n "checking for libzstd >= 1.4.0... " >&6; }
9469 if test -n "$ZSTD_CFLAGS"; then
9470 pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
9471 elif test -n "$PKG_CONFIG"; then
9472 if test -n "$PKG_CONFIG" && \
9473 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9474 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9475 ac_status=$?
9476 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9477 test $ac_status = 0; }; then
9478 pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd >= 1.4.0" 2>/dev/null`
9479 test "x$?" != "x0" && pkg_failed=yes
9480 else
9481 pkg_failed=yes
9483 else
9484 pkg_failed=untried
9486 if test -n "$ZSTD_LIBS"; then
9487 pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
9488 elif test -n "$PKG_CONFIG"; then
9489 if test -n "$PKG_CONFIG" && \
9490 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9491 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9492 ac_status=$?
9493 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9494 test $ac_status = 0; }; then
9495 pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd >= 1.4.0" 2>/dev/null`
9496 test "x$?" != "x0" && pkg_failed=yes
9497 else
9498 pkg_failed=yes
9500 else
9501 pkg_failed=untried
9506 if test $pkg_failed = yes; then
9507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9508 $as_echo "no" >&6; }
9510 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9511 _pkg_short_errors_supported=yes
9512 else
9513 _pkg_short_errors_supported=no
9515 if test $_pkg_short_errors_supported = yes; then
9516 ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9517 else
9518 ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9520 # Put the nasty error message in config.log where it belongs
9521 echo "$ZSTD_PKG_ERRORS" >&5
9523 as_fn_error $? "Package requirements (libzstd >= 1.4.0) were not met:
9525 $ZSTD_PKG_ERRORS
9527 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9528 installed software in a non-standard prefix.
9530 Alternatively, you may set the environment variables ZSTD_CFLAGS
9531 and ZSTD_LIBS to avoid the need to call pkg-config.
9532 See the pkg-config man page for more details." "$LINENO" 5
9533 elif test $pkg_failed = untried; then
9534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9535 $as_echo "no" >&6; }
9536 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9537 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9538 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9539 is in your PATH or set the PKG_CONFIG environment variable to the full
9540 path to pkg-config.
9542 Alternatively, you may set the environment variables ZSTD_CFLAGS
9543 and ZSTD_LIBS to avoid the need to call pkg-config.
9544 See the pkg-config man page for more details.
9546 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9547 See \`config.log' for more details" "$LINENO" 5; }
9548 else
9549 ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
9550 ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
9551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9552 $as_echo "yes" >&6; }
9555 # We only care about -I, -D, and -L switches;
9556 # note that -lzstd will be added by AC_CHECK_LIB below.
9557 for pgac_option in $ZSTD_CFLAGS; do
9558 case $pgac_option in
9559 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9560 esac
9561 done
9562 for pgac_option in $ZSTD_LIBS; do
9563 case $pgac_option in
9564 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9565 esac
9566 done
9569 # Assignments
9572 CPPFLAGS="$CPPFLAGS $INCLUDES"
9573 LDFLAGS="$LDFLAGS $LIBDIRS"
9579 if test -n "$ac_tool_prefix"; then
9580 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9581 set dummy ${ac_tool_prefix}strip; ac_word=$2
9582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9583 $as_echo_n "checking for $ac_word... " >&6; }
9584 if ${ac_cv_prog_STRIP+:} false; then :
9585 $as_echo_n "(cached) " >&6
9586 else
9587 if test -n "$STRIP"; then
9588 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9589 else
9590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9591 for as_dir in $PATH
9593 IFS=$as_save_IFS
9594 test -z "$as_dir" && as_dir=.
9595 for ac_exec_ext in '' $ac_executable_extensions; do
9596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9597 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9599 break 2
9601 done
9602 done
9603 IFS=$as_save_IFS
9607 STRIP=$ac_cv_prog_STRIP
9608 if test -n "$STRIP"; then
9609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9610 $as_echo "$STRIP" >&6; }
9611 else
9612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9613 $as_echo "no" >&6; }
9618 if test -z "$ac_cv_prog_STRIP"; then
9619 ac_ct_STRIP=$STRIP
9620 # Extract the first word of "strip", so it can be a program name with args.
9621 set dummy strip; ac_word=$2
9622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9623 $as_echo_n "checking for $ac_word... " >&6; }
9624 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9625 $as_echo_n "(cached) " >&6
9626 else
9627 if test -n "$ac_ct_STRIP"; then
9628 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9629 else
9630 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9631 for as_dir in $PATH
9633 IFS=$as_save_IFS
9634 test -z "$as_dir" && as_dir=.
9635 for ac_exec_ext in '' $ac_executable_extensions; do
9636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9637 ac_cv_prog_ac_ct_STRIP="strip"
9638 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9639 break 2
9641 done
9642 done
9643 IFS=$as_save_IFS
9647 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9648 if test -n "$ac_ct_STRIP"; then
9649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9650 $as_echo "$ac_ct_STRIP" >&6; }
9651 else
9652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9653 $as_echo "no" >&6; }
9656 if test "x$ac_ct_STRIP" = x; then
9657 STRIP=":"
9658 else
9659 case $cross_compiling:$ac_tool_warned in
9660 yes:)
9661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9662 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9663 ac_tool_warned=yes ;;
9664 esac
9665 STRIP=$ac_ct_STRIP
9667 else
9668 STRIP="$ac_cv_prog_STRIP"
9672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9673 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9674 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9675 STRIP_STATIC_LIB="$STRIP --strip-unneeded"
9676 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9678 $as_echo "yes" >&6; }
9679 else
9680 case $host_os in
9681 darwin*)
9682 STRIP="$STRIP -x"
9683 STRIP_STATIC_LIB=$STRIP
9684 STRIP_SHARED_LIB=$STRIP
9685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9686 $as_echo "yes" >&6; }
9689 STRIP_STATIC_LIB=:
9690 STRIP_SHARED_LIB=:
9691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9692 $as_echo "no" >&6; }
9694 esac
9699 if test -n "$ac_tool_prefix"; then
9700 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9701 set dummy ${ac_tool_prefix}ar; ac_word=$2
9702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9703 $as_echo_n "checking for $ac_word... " >&6; }
9704 if ${ac_cv_prog_AR+:} false; then :
9705 $as_echo_n "(cached) " >&6
9706 else
9707 if test -n "$AR"; then
9708 ac_cv_prog_AR="$AR" # Let the user override the test.
9709 else
9710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9711 for as_dir in $PATH
9713 IFS=$as_save_IFS
9714 test -z "$as_dir" && as_dir=.
9715 for ac_exec_ext in '' $ac_executable_extensions; do
9716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9717 ac_cv_prog_AR="${ac_tool_prefix}ar"
9718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9719 break 2
9721 done
9722 done
9723 IFS=$as_save_IFS
9727 AR=$ac_cv_prog_AR
9728 if test -n "$AR"; then
9729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9730 $as_echo "$AR" >&6; }
9731 else
9732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9733 $as_echo "no" >&6; }
9738 if test -z "$ac_cv_prog_AR"; then
9739 ac_ct_AR=$AR
9740 # Extract the first word of "ar", so it can be a program name with args.
9741 set dummy ar; ac_word=$2
9742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9743 $as_echo_n "checking for $ac_word... " >&6; }
9744 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9745 $as_echo_n "(cached) " >&6
9746 else
9747 if test -n "$ac_ct_AR"; then
9748 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9749 else
9750 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9751 for as_dir in $PATH
9753 IFS=$as_save_IFS
9754 test -z "$as_dir" && as_dir=.
9755 for ac_exec_ext in '' $ac_executable_extensions; do
9756 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9757 ac_cv_prog_ac_ct_AR="ar"
9758 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9759 break 2
9761 done
9762 done
9763 IFS=$as_save_IFS
9767 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9768 if test -n "$ac_ct_AR"; then
9769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9770 $as_echo "$ac_ct_AR" >&6; }
9771 else
9772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9773 $as_echo "no" >&6; }
9776 if test "x$ac_ct_AR" = x; then
9777 AR="ar"
9778 else
9779 case $cross_compiling:$ac_tool_warned in
9780 yes:)
9781 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9782 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9783 ac_tool_warned=yes ;;
9784 esac
9785 AR=$ac_ct_AR
9787 else
9788 AR="$ac_cv_prog_AR"
9791 if test "$PORTNAME" = "win32"; then
9792 if test -n "$ac_tool_prefix"; then
9793 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9794 set dummy ${ac_tool_prefix}windres; ac_word=$2
9795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9796 $as_echo_n "checking for $ac_word... " >&6; }
9797 if ${ac_cv_prog_WINDRES+:} false; then :
9798 $as_echo_n "(cached) " >&6
9799 else
9800 if test -n "$WINDRES"; then
9801 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9802 else
9803 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9804 for as_dir in $PATH
9806 IFS=$as_save_IFS
9807 test -z "$as_dir" && as_dir=.
9808 for ac_exec_ext in '' $ac_executable_extensions; do
9809 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9810 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9811 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9812 break 2
9814 done
9815 done
9816 IFS=$as_save_IFS
9820 WINDRES=$ac_cv_prog_WINDRES
9821 if test -n "$WINDRES"; then
9822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9823 $as_echo "$WINDRES" >&6; }
9824 else
9825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9826 $as_echo "no" >&6; }
9831 if test -z "$ac_cv_prog_WINDRES"; then
9832 ac_ct_WINDRES=$WINDRES
9833 # Extract the first word of "windres", so it can be a program name with args.
9834 set dummy windres; ac_word=$2
9835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9836 $as_echo_n "checking for $ac_word... " >&6; }
9837 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9838 $as_echo_n "(cached) " >&6
9839 else
9840 if test -n "$ac_ct_WINDRES"; then
9841 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9842 else
9843 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9844 for as_dir in $PATH
9846 IFS=$as_save_IFS
9847 test -z "$as_dir" && as_dir=.
9848 for ac_exec_ext in '' $ac_executable_extensions; do
9849 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9850 ac_cv_prog_ac_ct_WINDRES="windres"
9851 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9852 break 2
9854 done
9855 done
9856 IFS=$as_save_IFS
9860 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9861 if test -n "$ac_ct_WINDRES"; then
9862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9863 $as_echo "$ac_ct_WINDRES" >&6; }
9864 else
9865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9866 $as_echo "no" >&6; }
9869 if test "x$ac_ct_WINDRES" = x; then
9870 WINDRES="windres"
9871 else
9872 case $cross_compiling:$ac_tool_warned in
9873 yes:)
9874 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9875 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9876 ac_tool_warned=yes ;;
9877 esac
9878 WINDRES=$ac_ct_WINDRES
9880 else
9881 WINDRES="$ac_cv_prog_WINDRES"
9886 # Find a good install program. We prefer a C program (faster),
9887 # so one script is as good as another. But avoid the broken or
9888 # incompatible versions:
9889 # SysV /etc/install, /usr/sbin/install
9890 # SunOS /usr/etc/install
9891 # IRIX /sbin/install
9892 # AIX /bin/install
9893 # AmigaOS /C/install, which installs bootblocks on floppy discs
9894 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9895 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9896 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9897 # OS/2's system install, which has a completely different semantic
9898 # ./install, which can be erroneously created by make from ./install.sh.
9899 # Reject install programs that cannot install multiple files.
9900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9901 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9902 if test -z "$INSTALL"; then
9903 if ${ac_cv_path_install+:} false; then :
9904 $as_echo_n "(cached) " >&6
9905 else
9906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9907 for as_dir in $PATH
9909 IFS=$as_save_IFS
9910 test -z "$as_dir" && as_dir=.
9911 # Account for people who put trailing slashes in PATH elements.
9912 case $as_dir/ in #((
9913 ./ | .// | /[cC]/* | \
9914 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9915 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9916 /usr/ucb/* ) ;;
9918 # OSF1 and SCO ODT 3.0 have their own names for install.
9919 # Don't use installbsd from OSF since it installs stuff as root
9920 # by default.
9921 for ac_prog in ginstall scoinst install; do
9922 for ac_exec_ext in '' $ac_executable_extensions; do
9923 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9924 if test $ac_prog = install &&
9925 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9926 # AIX install. It has an incompatible calling convention.
9928 elif test $ac_prog = install &&
9929 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9930 # program-specific install script used by HP pwplus--don't use.
9932 else
9933 rm -rf conftest.one conftest.two conftest.dir
9934 echo one > conftest.one
9935 echo two > conftest.two
9936 mkdir conftest.dir
9937 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9938 test -s conftest.one && test -s conftest.two &&
9939 test -s conftest.dir/conftest.one &&
9940 test -s conftest.dir/conftest.two
9941 then
9942 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9943 break 3
9947 done
9948 done
9950 esac
9952 done
9953 IFS=$as_save_IFS
9955 rm -rf conftest.one conftest.two conftest.dir
9958 if test "${ac_cv_path_install+set}" = set; then
9959 INSTALL=$ac_cv_path_install
9960 else
9961 # As a last resort, use the slow shell script. Don't cache a
9962 # value for INSTALL within a source directory, because that will
9963 # break other packages using the cache if that directory is
9964 # removed, or if the value is a relative name.
9965 INSTALL=$ac_install_sh
9968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9969 $as_echo "$INSTALL" >&6; }
9971 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9972 # It thinks the first close brace ends the variable substitution.
9973 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9975 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9977 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9979 # When Autoconf chooses install-sh as install program it tries to generate
9980 # a relative path to it in each makefile where it substitutes it. This clashes
9981 # with our Makefile.global concept. This workaround helps.
9982 case $INSTALL in
9983 *install-sh*) install_bin='';;
9984 *) install_bin=$INSTALL;;
9985 esac
9988 if test -z "$TAR"; then
9989 for ac_prog in tar
9991 # Extract the first word of "$ac_prog", so it can be a program name with args.
9992 set dummy $ac_prog; ac_word=$2
9993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9994 $as_echo_n "checking for $ac_word... " >&6; }
9995 if ${ac_cv_path_TAR+:} false; then :
9996 $as_echo_n "(cached) " >&6
9997 else
9998 case $TAR in
9999 [\\/]* | ?:[\\/]*)
10000 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10003 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10004 for as_dir in $PATH
10006 IFS=$as_save_IFS
10007 test -z "$as_dir" && as_dir=.
10008 for ac_exec_ext in '' $ac_executable_extensions; do
10009 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10010 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10011 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10012 break 2
10014 done
10015 done
10016 IFS=$as_save_IFS
10019 esac
10021 TAR=$ac_cv_path_TAR
10022 if test -n "$TAR"; then
10023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10024 $as_echo "$TAR" >&6; }
10025 else
10026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10027 $as_echo "no" >&6; }
10031 test -n "$TAR" && break
10032 done
10034 else
10035 # Report the value of TAR in configure's output in all cases.
10036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10037 $as_echo_n "checking for TAR... " >&6; }
10038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10039 $as_echo "$TAR" >&6; }
10042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
10043 $as_echo_n "checking whether ln -s works... " >&6; }
10044 LN_S=$as_ln_s
10045 if test "$LN_S" = "ln -s"; then
10046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10047 $as_echo "yes" >&6; }
10048 else
10049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
10050 $as_echo "no, using $LN_S" >&6; }
10053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
10054 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
10055 if test -z "$MKDIR_P"; then
10056 if ${ac_cv_path_mkdir+:} false; then :
10057 $as_echo_n "(cached) " >&6
10058 else
10059 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10060 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
10062 IFS=$as_save_IFS
10063 test -z "$as_dir" && as_dir=.
10064 for ac_prog in mkdir gmkdir; do
10065 for ac_exec_ext in '' $ac_executable_extensions; do
10066 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
10067 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
10068 'mkdir (GNU coreutils) '* | \
10069 'mkdir (coreutils) '* | \
10070 'mkdir (fileutils) '4.1*)
10071 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
10072 break 3;;
10073 esac
10074 done
10075 done
10076 done
10077 IFS=$as_save_IFS
10081 test -d ./--version && rmdir ./--version
10082 if test "${ac_cv_path_mkdir+set}" = set; then
10083 MKDIR_P="$ac_cv_path_mkdir -p"
10084 else
10085 # As a last resort, use the slow shell script. Don't cache a
10086 # value for MKDIR_P within a source directory, because that will
10087 # break other packages using the cache if that directory is
10088 # removed, or if the value is a relative name.
10089 MKDIR_P="$ac_install_sh -d"
10092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
10093 $as_echo "$MKDIR_P" >&6; }
10095 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
10096 # a relative path to it in each makefile where it substitutes it. This clashes
10097 # with our Makefile.global concept. This workaround helps.
10098 case $MKDIR_P in
10099 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
10100 esac
10102 if test -z "$BISON"; then
10103 for ac_prog in bison
10105 # Extract the first word of "$ac_prog", so it can be a program name with args.
10106 set dummy $ac_prog; ac_word=$2
10107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10108 $as_echo_n "checking for $ac_word... " >&6; }
10109 if ${ac_cv_path_BISON+:} false; then :
10110 $as_echo_n "(cached) " >&6
10111 else
10112 case $BISON in
10113 [\\/]* | ?:[\\/]*)
10114 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
10117 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10118 for as_dir in $PATH
10120 IFS=$as_save_IFS
10121 test -z "$as_dir" && as_dir=.
10122 for ac_exec_ext in '' $ac_executable_extensions; do
10123 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10124 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
10125 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10126 break 2
10128 done
10129 done
10130 IFS=$as_save_IFS
10133 esac
10135 BISON=$ac_cv_path_BISON
10136 if test -n "$BISON"; then
10137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10138 $as_echo "$BISON" >&6; }
10139 else
10140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10141 $as_echo "no" >&6; }
10145 test -n "$BISON" && break
10146 done
10148 else
10149 # Report the value of BISON in configure's output in all cases.
10150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
10151 $as_echo_n "checking for BISON... " >&6; }
10152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10153 $as_echo "$BISON" >&6; }
10157 if test "$BISON"; then
10158 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
10159 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
10160 $as_echo "$as_me: using $pgac_bison_version" >&6;}
10161 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 2.3) exit 0; else exit 1;}'
10162 then
10163 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10164 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10165 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." >&5
10166 $as_echo "$as_me: WARNING:
10167 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10168 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." >&2;}
10169 BISON=""
10171 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
10172 # of the now preferred %name-prefix "base_yy", but the latter
10173 # doesn't work with Bison 2.3 or less. So for now we silence the
10174 # deprecation warnings.
10175 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
10176 then
10177 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
10181 if test -z "$BISON"; then
10182 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10183 *** Without Bison you will not be able to build PostgreSQL from Git nor
10184 *** change any of the parser definition files. You can obtain Bison from
10185 *** a GNU mirror site. (If you are using the official distribution of
10186 *** PostgreSQL then you do not need to worry about this, because the Bison
10187 *** output is pre-generated.)" >&5
10188 $as_echo "$as_me: WARNING:
10189 *** Without Bison you will not be able to build PostgreSQL from Git nor
10190 *** change any of the parser definition files. You can obtain Bison from
10191 *** a GNU mirror site. (If you are using the official distribution of
10192 *** PostgreSQL then you do not need to worry about this, because the Bison
10193 *** output is pre-generated.)" >&2;}
10197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
10198 $as_echo_n "checking for flex... " >&6; }
10199 if ${pgac_cv_path_flex+:} false; then :
10200 $as_echo_n "(cached) " >&6
10201 else
10202 # Let the user override the test
10203 if test -n "$FLEX"; then
10204 pgac_cv_path_flex=$FLEX
10205 else
10206 pgac_save_IFS=$IFS
10207 IFS=$PATH_SEPARATOR
10208 for pgac_dir in $PATH; do
10209 IFS=$pgac_save_IFS
10210 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
10211 pgac_dir=`pwd`
10213 for pgac_prog in flex lex; do
10214 pgac_candidate="$pgac_dir/$pgac_prog"
10215 if test -f "$pgac_candidate" \
10216 && $pgac_candidate --version </dev/null >/dev/null 2>&1
10217 then
10218 echo '%%' > conftest.l
10219 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
10220 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
10221 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;}'
10222 then
10223 pgac_cv_path_flex=$pgac_candidate
10224 break 2
10225 else
10226 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10227 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10228 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." >&5
10229 $as_echo "$as_me: WARNING:
10230 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10231 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." >&2;}
10235 done
10236 done
10237 rm -f conftest.l lex.yy.c
10238 : ${pgac_cv_path_flex=no}
10242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
10243 $as_echo "$pgac_cv_path_flex" >&6; }
10244 if test x"$pgac_cv_path_flex" = x"no"; then
10245 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10246 *** Without Flex you will not be able to build PostgreSQL from Git nor
10247 *** change any of the scanner definition files. You can obtain Flex from
10248 *** a GNU mirror site. (If you are using the official distribution of
10249 *** PostgreSQL then you do not need to worry about this because the Flex
10250 *** output is pre-generated.)" >&5
10251 $as_echo "$as_me: WARNING:
10252 *** Without Flex you will not be able to build PostgreSQL from Git nor
10253 *** change any of the scanner definition files. You can obtain Flex from
10254 *** a GNU mirror site. (If you are using the official distribution of
10255 *** PostgreSQL then you do not need to worry about this because the Flex
10256 *** output is pre-generated.)" >&2;}
10258 FLEX=
10259 else
10260 FLEX=$pgac_cv_path_flex
10261 pgac_flex_version=`$FLEX --version 2>/dev/null`
10262 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
10263 $as_echo "$as_me: using $pgac_flex_version" >&6;}
10270 if test -z "$PERL"; then
10271 for ac_prog in perl
10273 # Extract the first word of "$ac_prog", so it can be a program name with args.
10274 set dummy $ac_prog; ac_word=$2
10275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10276 $as_echo_n "checking for $ac_word... " >&6; }
10277 if ${ac_cv_path_PERL+:} false; then :
10278 $as_echo_n "(cached) " >&6
10279 else
10280 case $PERL in
10281 [\\/]* | ?:[\\/]*)
10282 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
10285 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10286 for as_dir in $PATH
10288 IFS=$as_save_IFS
10289 test -z "$as_dir" && as_dir=.
10290 for ac_exec_ext in '' $ac_executable_extensions; do
10291 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10292 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
10293 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10294 break 2
10296 done
10297 done
10298 IFS=$as_save_IFS
10301 esac
10303 PERL=$ac_cv_path_PERL
10304 if test -n "$PERL"; then
10305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10306 $as_echo "$PERL" >&6; }
10307 else
10308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10309 $as_echo "no" >&6; }
10313 test -n "$PERL" && break
10314 done
10316 else
10317 # Report the value of PERL in configure's output in all cases.
10318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
10319 $as_echo_n "checking for PERL... " >&6; }
10320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10321 $as_echo "$PERL" >&6; }
10325 if test "$PERL"; then
10326 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'`
10327 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
10328 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
10329 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
10330 $AWK '{ if ($1 == 5 && ($2 >= 14)) exit 1; else exit 0;}'
10331 then
10332 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10333 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10334 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." >&5
10335 $as_echo "$as_me: WARNING:
10336 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10337 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." >&2;}
10338 PERL=""
10342 if test -z "$PERL"; then
10343 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10344 *** Without Perl you will not be able to build PostgreSQL from Git.
10345 *** You can obtain Perl from any CPAN mirror site.
10346 *** (If you are using the official distribution of PostgreSQL then you do not
10347 *** need to worry about this, because the Perl output is pre-generated.)" >&5
10348 $as_echo "$as_me: WARNING:
10349 *** Without Perl you will not be able to build PostgreSQL from Git.
10350 *** You can obtain Perl from any CPAN mirror site.
10351 *** (If you are using the official distribution of PostgreSQL then you do not
10352 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
10355 if test "$with_perl" = yes; then
10356 if test -z "$PERL"; then
10357 as_fn_error $? "Perl not found" "$LINENO" 5
10360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
10361 $as_echo_n "checking for Perl archlibexp... " >&6; }
10362 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
10363 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
10364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
10365 $as_echo "$perl_archlibexp" >&6; }
10366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
10367 $as_echo_n "checking for Perl privlibexp... " >&6; }
10368 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
10369 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
10370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
10371 $as_echo "$perl_privlibexp" >&6; }
10372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
10373 $as_echo_n "checking for Perl useshrplib... " >&6; }
10374 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
10375 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
10376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
10377 $as_echo "$perl_useshrplib" >&6; }
10378 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
10379 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
10380 You might have to rebuild your Perl installation. Refer to the
10381 documentation for details. Use --without-perl to disable building
10382 PL/Perl." "$LINENO" 5
10384 # On most platforms, archlibexp is also where the Perl include files live ...
10385 perl_includespec="-I$perl_archlibexp/CORE"
10386 # ... but on newer macOS versions, we must use -iwithsysroot to look
10387 # under $PG_SYSROOT
10388 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
10389 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
10390 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
10394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
10395 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
10396 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10398 $as_echo "$perl_ccflags" >&6; }
10399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10400 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10401 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10403 $as_echo "$perl_embed_ccflags" >&6; }
10406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10407 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10408 if test "$PORTNAME" = "win32" ; then
10409 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10410 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10411 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10412 else
10413 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10414 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10415 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10418 else
10419 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10420 pgac_tmp2=`$PERL -MConfig -e 'print "$Config{ccdlflags} $Config{ldflags}"'`
10421 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%"`
10423 if test -z "$perl_embed_ldflags" ; then
10424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10425 $as_echo "no" >&6; }
10426 as_fn_error $? "could not determine flags for linking embedded Perl.
10427 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10428 installed." "$LINENO" 5
10429 else
10430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10431 $as_echo "$perl_embed_ldflags" >&6; }
10436 if test "$with_python" = yes; then
10437 if test -z "$PYTHON"; then
10438 for ac_prog in python3 python
10440 # Extract the first word of "$ac_prog", so it can be a program name with args.
10441 set dummy $ac_prog; ac_word=$2
10442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10443 $as_echo_n "checking for $ac_word... " >&6; }
10444 if ${ac_cv_path_PYTHON+:} false; then :
10445 $as_echo_n "(cached) " >&6
10446 else
10447 case $PYTHON in
10448 [\\/]* | ?:[\\/]*)
10449 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10452 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10453 for as_dir in $PATH
10455 IFS=$as_save_IFS
10456 test -z "$as_dir" && as_dir=.
10457 for ac_exec_ext in '' $ac_executable_extensions; do
10458 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10459 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10460 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10461 break 2
10463 done
10464 done
10465 IFS=$as_save_IFS
10468 esac
10470 PYTHON=$ac_cv_path_PYTHON
10471 if test -n "$PYTHON"; then
10472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10473 $as_echo "$PYTHON" >&6; }
10474 else
10475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10476 $as_echo "no" >&6; }
10480 test -n "$PYTHON" && break
10481 done
10483 else
10484 # Report the value of PYTHON in configure's output in all cases.
10485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10486 $as_echo_n "checking for PYTHON... " >&6; }
10487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10488 $as_echo "$PYTHON" >&6; }
10491 if test x"$PYTHON" = x""; then
10492 as_fn_error $? "Python not found" "$LINENO" 5
10496 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10497 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10498 $as_echo "$as_me: using python $python_fullversion" >&6;}
10499 # python_fullversion is typically n.n.n plus some trailing junk
10500 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10501 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10502 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10503 # Reject unsupported Python versions as soon as practical.
10504 if test "$python_majorversion" -lt 3; then
10505 as_fn_error $? "Python version $python_version is too old (version 3 or later is required)" "$LINENO" 5
10508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
10509 $as_echo_n "checking for Python sysconfig module... " >&6; }
10510 if "${PYTHON}" -c 'import sysconfig' 2>&5
10511 then
10512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10513 $as_echo "yes" >&6; }
10514 else
10515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10516 $as_echo "no" >&6; }
10517 as_fn_error $? "sysconfig module not found" "$LINENO" 5
10520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10521 $as_echo_n "checking Python configuration directory... " >&6; }
10522 python_configdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBPL'))))"`
10523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10524 $as_echo "$python_configdir" >&6; }
10526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directory" >&5
10527 $as_echo_n "checking Python include directory... " >&6; }
10528 python_includespec=`${PYTHON} -c "import sysconfig; print('-I' + sysconfig.get_config_var('INCLUDEPY'))"`
10529 if test "$PORTNAME" = win32 ; then
10530 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10533 $as_echo "$python_includespec" >&6; }
10537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10538 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10540 python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10541 python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
10543 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10544 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10545 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10546 then
10547 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10548 found_shlib=1
10549 else
10550 # Otherwise, guess the base name of the shlib.
10551 # LDVERSION was added in Python 3.2, before that use VERSION,
10552 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10553 python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
10554 if test x"${python_ldversion}" != x""; then
10555 ldlibrary="python${python_ldversion}"
10556 else
10557 python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
10558 if test x"${python_version_var}" != x""; then
10559 ldlibrary="python${python_version_var}"
10560 else
10561 ldlibrary="python${python_version}"
10564 # Search for a likely-looking file.
10565 found_shlib=0
10566 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10568 if test -e "$d/lib${ldlibrary}${DLSUFFIX}"; then
10569 python_libdir="$d"
10570 found_shlib=1
10571 break 2
10573 done
10574 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10575 # (".so.n.n") as well. However, check this only after failing to find
10576 # ".so" anywhere, because yet other platforms (Debian) put the .so
10577 # symlink in a different directory from the underlying versioned shlib.
10578 if test "$found_shlib" != 1; then
10579 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10581 for f in "$d/lib${ldlibrary}.so."* ; do
10582 if test -e "$f"; then
10583 python_libdir="$d"
10584 found_shlib=1
10585 break 2
10587 done
10588 done
10590 # As usual, Windows has its own ideas. Possible default library
10591 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10592 # and the "lib" prefix might not be there.
10593 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10594 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10596 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10597 if test -e "$f"; then
10598 python_libdir="$d"
10599 found_shlib=1
10600 break 2
10602 done
10603 done
10606 if test "$found_shlib" != 1; then
10607 as_fn_error $? "could not find shared library for Python
10608 You might have to rebuild your Python installation. Refer to the
10609 documentation for details. Use --without-python to disable building
10610 PL/Python." "$LINENO" 5
10612 python_libspec="-L${python_libdir} -l${ldlibrary}"
10614 python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10617 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10623 if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then
10624 if test -z "$ZIC"; then
10625 for ac_prog in zic
10627 # Extract the first word of "$ac_prog", so it can be a program name with args.
10628 set dummy $ac_prog; ac_word=$2
10629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10630 $as_echo_n "checking for $ac_word... " >&6; }
10631 if ${ac_cv_path_ZIC+:} false; then :
10632 $as_echo_n "(cached) " >&6
10633 else
10634 case $ZIC in
10635 [\\/]* | ?:[\\/]*)
10636 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10640 for as_dir in $PATH
10642 IFS=$as_save_IFS
10643 test -z "$as_dir" && as_dir=.
10644 for ac_exec_ext in '' $ac_executable_extensions; do
10645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10646 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10648 break 2
10650 done
10651 done
10652 IFS=$as_save_IFS
10655 esac
10657 ZIC=$ac_cv_path_ZIC
10658 if test -n "$ZIC"; then
10659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10660 $as_echo "$ZIC" >&6; }
10661 else
10662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10663 $as_echo "no" >&6; }
10667 test -n "$ZIC" && break
10668 done
10670 else
10671 # Report the value of ZIC in configure's output in all cases.
10672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10673 $as_echo_n "checking for ZIC... " >&6; }
10674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10675 $as_echo "$ZIC" >&6; }
10678 if test -z "$ZIC"; then
10679 as_fn_error $? "
10680 When cross-compiling, either use the option --with-system-tzdata to use
10681 existing time-zone data, or set the environment variable ZIC to a zic
10682 program to use during the build." "$LINENO" 5
10687 # Pthreads
10689 # For each platform, we need to know about any special compile and link
10690 # libraries, and whether the normal C function names are thread-safe.
10691 # WIN32 doesn't need the pthread tests; it always uses threads
10693 # These tests are run before the library-tests, because linking with the
10694 # other libraries can pull in the pthread functions as a side-effect. We
10695 # want to use the -pthread or similar flags directly, and not rely on
10696 # the side-effects of linking with some other library.
10698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10699 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10700 if ${ac_cv_path_SED+:} false; then :
10701 $as_echo_n "(cached) " >&6
10702 else
10703 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10704 for ac_i in 1 2 3 4 5 6 7; do
10705 ac_script="$ac_script$as_nl$ac_script"
10706 done
10707 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10708 { ac_script=; unset ac_script;}
10709 if test -z "$SED"; then
10710 ac_path_SED_found=false
10711 # Loop through the user's path and test for each of PROGNAME-LIST
10712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10713 for as_dir in $PATH
10715 IFS=$as_save_IFS
10716 test -z "$as_dir" && as_dir=.
10717 for ac_prog in sed gsed; do
10718 for ac_exec_ext in '' $ac_executable_extensions; do
10719 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10720 as_fn_executable_p "$ac_path_SED" || continue
10721 # Check for GNU ac_path_SED and select it if it is found.
10722 # Check for GNU $ac_path_SED
10723 case `"$ac_path_SED" --version 2>&1` in
10724 *GNU*)
10725 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10727 ac_count=0
10728 $as_echo_n 0123456789 >"conftest.in"
10729 while :
10731 cat "conftest.in" "conftest.in" >"conftest.tmp"
10732 mv "conftest.tmp" "conftest.in"
10733 cp "conftest.in" "conftest.nl"
10734 $as_echo '' >> "conftest.nl"
10735 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10736 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10737 as_fn_arith $ac_count + 1 && ac_count=$as_val
10738 if test $ac_count -gt ${ac_path_SED_max-0}; then
10739 # Best one so far, save it but keep looking for a better one
10740 ac_cv_path_SED="$ac_path_SED"
10741 ac_path_SED_max=$ac_count
10743 # 10*(2^10) chars as input seems more than enough
10744 test $ac_count -gt 10 && break
10745 done
10746 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10747 esac
10749 $ac_path_SED_found && break 3
10750 done
10751 done
10752 done
10753 IFS=$as_save_IFS
10754 if test -z "$ac_cv_path_SED"; then
10755 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10757 else
10758 ac_cv_path_SED=$SED
10762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10763 $as_echo "$ac_cv_path_SED" >&6; }
10764 SED="$ac_cv_path_SED"
10765 rm -f conftest.sed
10768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10769 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10770 if ${ac_cv_path_GREP+:} false; then :
10771 $as_echo_n "(cached) " >&6
10772 else
10773 if test -z "$GREP"; then
10774 ac_path_GREP_found=false
10775 # Loop through the user's path and test for each of PROGNAME-LIST
10776 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10777 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10779 IFS=$as_save_IFS
10780 test -z "$as_dir" && as_dir=.
10781 for ac_prog in grep ggrep; do
10782 for ac_exec_ext in '' $ac_executable_extensions; do
10783 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10784 as_fn_executable_p "$ac_path_GREP" || continue
10785 # Check for GNU ac_path_GREP and select it if it is found.
10786 # Check for GNU $ac_path_GREP
10787 case `"$ac_path_GREP" --version 2>&1` in
10788 *GNU*)
10789 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10791 ac_count=0
10792 $as_echo_n 0123456789 >"conftest.in"
10793 while :
10795 cat "conftest.in" "conftest.in" >"conftest.tmp"
10796 mv "conftest.tmp" "conftest.in"
10797 cp "conftest.in" "conftest.nl"
10798 $as_echo 'GREP' >> "conftest.nl"
10799 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10800 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10801 as_fn_arith $ac_count + 1 && ac_count=$as_val
10802 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10803 # Best one so far, save it but keep looking for a better one
10804 ac_cv_path_GREP="$ac_path_GREP"
10805 ac_path_GREP_max=$ac_count
10807 # 10*(2^10) chars as input seems more than enough
10808 test $ac_count -gt 10 && break
10809 done
10810 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10811 esac
10813 $ac_path_GREP_found && break 3
10814 done
10815 done
10816 done
10817 IFS=$as_save_IFS
10818 if test -z "$ac_cv_path_GREP"; then
10819 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10821 else
10822 ac_cv_path_GREP=$GREP
10826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10827 $as_echo "$ac_cv_path_GREP" >&6; }
10828 GREP="$ac_cv_path_GREP"
10831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10832 $as_echo_n "checking for egrep... " >&6; }
10833 if ${ac_cv_path_EGREP+:} false; then :
10834 $as_echo_n "(cached) " >&6
10835 else
10836 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10837 then ac_cv_path_EGREP="$GREP -E"
10838 else
10839 if test -z "$EGREP"; then
10840 ac_path_EGREP_found=false
10841 # Loop through the user's path and test for each of PROGNAME-LIST
10842 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10843 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10845 IFS=$as_save_IFS
10846 test -z "$as_dir" && as_dir=.
10847 for ac_prog in egrep; do
10848 for ac_exec_ext in '' $ac_executable_extensions; do
10849 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10850 as_fn_executable_p "$ac_path_EGREP" || continue
10851 # Check for GNU ac_path_EGREP and select it if it is found.
10852 # Check for GNU $ac_path_EGREP
10853 case `"$ac_path_EGREP" --version 2>&1` in
10854 *GNU*)
10855 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10857 ac_count=0
10858 $as_echo_n 0123456789 >"conftest.in"
10859 while :
10861 cat "conftest.in" "conftest.in" >"conftest.tmp"
10862 mv "conftest.tmp" "conftest.in"
10863 cp "conftest.in" "conftest.nl"
10864 $as_echo 'EGREP' >> "conftest.nl"
10865 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10866 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10867 as_fn_arith $ac_count + 1 && ac_count=$as_val
10868 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10869 # Best one so far, save it but keep looking for a better one
10870 ac_cv_path_EGREP="$ac_path_EGREP"
10871 ac_path_EGREP_max=$ac_count
10873 # 10*(2^10) chars as input seems more than enough
10874 test $ac_count -gt 10 && break
10875 done
10876 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10877 esac
10879 $ac_path_EGREP_found && break 3
10880 done
10881 done
10882 done
10883 IFS=$as_save_IFS
10884 if test -z "$ac_cv_path_EGREP"; then
10885 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10887 else
10888 ac_cv_path_EGREP=$EGREP
10893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10894 $as_echo "$ac_cv_path_EGREP" >&6; }
10895 EGREP="$ac_cv_path_EGREP"
10898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10899 $as_echo_n "checking for ANSI C header files... " >&6; }
10900 if ${ac_cv_header_stdc+:} false; then :
10901 $as_echo_n "(cached) " >&6
10902 else
10903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10904 /* end confdefs.h. */
10905 #include <stdlib.h>
10906 #include <stdarg.h>
10907 #include <string.h>
10908 #include <float.h>
10911 main ()
10915 return 0;
10917 _ACEOF
10918 if ac_fn_c_try_compile "$LINENO"; then :
10919 ac_cv_header_stdc=yes
10920 else
10921 ac_cv_header_stdc=no
10923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10925 if test $ac_cv_header_stdc = yes; then
10926 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10928 /* end confdefs.h. */
10929 #include <string.h>
10931 _ACEOF
10932 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10933 $EGREP "memchr" >/dev/null 2>&1; then :
10935 else
10936 ac_cv_header_stdc=no
10938 rm -f conftest*
10942 if test $ac_cv_header_stdc = yes; then
10943 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10945 /* end confdefs.h. */
10946 #include <stdlib.h>
10948 _ACEOF
10949 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10950 $EGREP "free" >/dev/null 2>&1; then :
10952 else
10953 ac_cv_header_stdc=no
10955 rm -f conftest*
10959 if test $ac_cv_header_stdc = yes; then
10960 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10961 if test "$cross_compiling" = yes; then :
10963 else
10964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10965 /* end confdefs.h. */
10966 #include <ctype.h>
10967 #include <stdlib.h>
10968 #if ((' ' & 0x0FF) == 0x020)
10969 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10970 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10971 #else
10972 # define ISLOWER(c) \
10973 (('a' <= (c) && (c) <= 'i') \
10974 || ('j' <= (c) && (c) <= 'r') \
10975 || ('s' <= (c) && (c) <= 'z'))
10976 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10977 #endif
10979 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10981 main ()
10983 int i;
10984 for (i = 0; i < 256; i++)
10985 if (XOR (islower (i), ISLOWER (i))
10986 || toupper (i) != TOUPPER (i))
10987 return 2;
10988 return 0;
10990 _ACEOF
10991 if ac_fn_c_try_run "$LINENO"; then :
10993 else
10994 ac_cv_header_stdc=no
10996 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10997 conftest.$ac_objext conftest.beam conftest.$ac_ext
11002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11003 $as_echo "$ac_cv_header_stdc" >&6; }
11004 if test $ac_cv_header_stdc = yes; then
11006 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
11010 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11011 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11012 inttypes.h stdint.h unistd.h
11013 do :
11014 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11015 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
11017 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11018 cat >>confdefs.h <<_ACEOF
11019 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11020 _ACEOF
11024 done
11027 if test "$PORTNAME" != "win32"; then :
11028 # then
11033 ac_ext=c
11034 ac_cpp='$CPP $CPPFLAGS'
11035 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11036 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11037 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11039 ax_pthread_ok=no
11041 # We used to check for pthread.h first, but this fails if pthread.h
11042 # requires special compiler flags (e.g. on Tru64 or Sequent).
11043 # It gets checked for in the link test anyway.
11045 # First of all, check if the user has set any of the PTHREAD_LIBS,
11046 # etcetera environment variables, and if threads linking works using
11047 # them:
11048 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
11049 ax_pthread_save_CC="$CC"
11050 ax_pthread_save_CFLAGS="$CFLAGS"
11051 ax_pthread_save_LIBS="$LIBS"
11052 if test "x$PTHREAD_CC" != "x"; then :
11053 CC="$PTHREAD_CC"
11055 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11056 LIBS="$PTHREAD_LIBS $LIBS"
11057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
11058 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
11059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11060 /* end confdefs.h. */
11062 /* Override any GCC internal prototype to avoid an error.
11063 Use char because int might match the return type of a GCC
11064 builtin and then its argument prototype would still apply. */
11065 #ifdef __cplusplus
11066 extern "C"
11067 #endif
11068 char pthread_join ();
11070 main ()
11072 return pthread_join ();
11074 return 0;
11076 _ACEOF
11077 if ac_fn_c_try_link "$LINENO"; then :
11078 ax_pthread_ok=yes
11080 rm -f core conftest.err conftest.$ac_objext \
11081 conftest$ac_exeext conftest.$ac_ext
11082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11083 $as_echo "$ax_pthread_ok" >&6; }
11084 if test "x$ax_pthread_ok" = "xno"; then
11085 PTHREAD_LIBS=""
11086 PTHREAD_CFLAGS=""
11088 CC="$ax_pthread_save_CC"
11089 CFLAGS="$ax_pthread_save_CFLAGS"
11090 LIBS="$ax_pthread_save_LIBS"
11093 # We must check for the threads library under a number of different
11094 # names; the ordering is very important because some systems
11095 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
11096 # libraries is broken (non-POSIX).
11098 # Create a list of thread flags to try. Items starting with a "-" are
11099 # C compiler flags, and other items are library names, except for "none"
11100 # which indicates that we try without any flags at all, and "pthread-config"
11101 # which is a program returning the flags for the Pth emulation library.
11103 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
11105 # The ordering *is* (sometimes) important. Some notes on the
11106 # individual items follow:
11108 # pthreads: AIX (must check this before -lpthread)
11109 # none: in case threads are in libc; should be tried before -Kthread and
11110 # other compiler flags to prevent continual compiler warnings
11111 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
11112 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
11113 # (Note: HP C rejects this with "bad form for `-t' option")
11114 # -pthreads: Solaris/gcc (Note: HP C also rejects)
11115 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
11116 # doesn't hurt to check since this sometimes defines pthreads and
11117 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
11118 # is present but should not be used directly; and before -mthreads,
11119 # because the compiler interprets this as "-mt" + "-hreads")
11120 # -mthreads: Mingw32/gcc, Lynx/gcc
11121 # pthread: Linux, etcetera
11122 # --thread-safe: KAI C++
11123 # pthread-config: use pthread-config program (for GNU Pth library)
11125 case $host_os in
11127 freebsd*)
11129 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
11130 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
11132 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
11135 hpux*)
11137 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
11138 # multi-threading and also sets -lpthread."
11140 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
11143 openedition*)
11145 # IBM z/OS requires a feature-test macro to be defined in order to
11146 # enable POSIX threads at all, so give the user a hint if this is
11147 # not set. (We don't define these ourselves, as they can affect
11148 # other portions of the system API in unpredictable ways.)
11150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11151 /* end confdefs.h. */
11153 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
11154 AX_PTHREAD_ZOS_MISSING
11155 # endif
11157 _ACEOF
11158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11159 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
11160 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
11161 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
11163 rm -f conftest*
11167 solaris*)
11169 # On Solaris (at least, for some versions), libc contains stubbed
11170 # (non-functional) versions of the pthreads routines, so link-based
11171 # tests will erroneously succeed. (N.B.: The stubs are missing
11172 # pthread_cleanup_push, or rather a function called by this macro,
11173 # so we could check for that, but who knows whether they'll stub
11174 # that too in a future libc.) So we'll check first for the
11175 # standard Solaris way of linking pthreads (-mt -lpthread).
11177 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
11179 esac
11181 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
11183 if test "x$GCC" = "xyes"; then :
11184 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
11187 # The presence of a feature test macro requesting re-entrant function
11188 # definitions is, on some systems, a strong hint that pthreads support is
11189 # correctly enabled
11191 case $host_os in
11192 darwin* | hpux* | linux* | osf* | solaris*)
11193 ax_pthread_check_macro="_REENTRANT"
11196 aix*)
11197 ax_pthread_check_macro="_THREAD_SAFE"
11201 ax_pthread_check_macro="--"
11203 esac
11204 if test "x$ax_pthread_check_macro" = "x--"; then :
11205 ax_pthread_check_cond=0
11206 else
11207 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
11210 # Are we compiling with Clang?
11212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
11213 $as_echo_n "checking whether $CC is Clang... " >&6; }
11214 if ${ax_cv_PTHREAD_CLANG+:} false; then :
11215 $as_echo_n "(cached) " >&6
11216 else
11217 ax_cv_PTHREAD_CLANG=no
11218 # Note that Autoconf sets GCC=yes for Clang as well as GCC
11219 if test "x$GCC" = "xyes"; then
11220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11221 /* end confdefs.h. */
11222 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
11223 # if defined(__clang__) && defined(__llvm__)
11224 AX_PTHREAD_CC_IS_CLANG
11225 # endif
11227 _ACEOF
11228 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11229 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
11230 ax_cv_PTHREAD_CLANG=yes
11232 rm -f conftest*
11237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
11238 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
11239 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
11241 ax_pthread_clang_warning=no
11243 # Clang needs special handling, because older versions handle the -pthread
11244 # option in a rather... idiosyncratic way
11246 if test "x$ax_pthread_clang" = "xyes"; then
11248 # Clang takes -pthread; it has never supported any other flag
11250 # (Note 1: This will need to be revisited if a system that Clang
11251 # supports has POSIX threads in a separate library. This tends not
11252 # to be the way of modern systems, but it's conceivable.)
11254 # (Note 2: On some systems, notably Darwin, -pthread is not needed
11255 # to get POSIX threads support; the API is always present and
11256 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
11257 # -pthread does define _REENTRANT, and while the Darwin headers
11258 # ignore this macro, third-party headers might not.)
11260 PTHREAD_CFLAGS="-pthread"
11261 PTHREAD_LIBS=
11263 ax_pthread_ok=yes
11265 # However, older versions of Clang make a point of warning the user
11266 # that, in an invocation where only linking and no compilation is
11267 # taking place, the -pthread option has no effect ("argument unused
11268 # during compilation"). They expect -pthread to be passed in only
11269 # when source code is being compiled.
11271 # Problem is, this is at odds with the way Automake and most other
11272 # C build frameworks function, which is that the same flags used in
11273 # compilation (CFLAGS) are also used in linking. Many systems
11274 # supported by AX_PTHREAD require exactly this for POSIX threads
11275 # support, and in fact it is often not straightforward to specify a
11276 # flag that is used only in the compilation phase and not in
11277 # linking. Such a scenario is extremely rare in practice.
11279 # Even though use of the -pthread flag in linking would only print
11280 # a warning, this can be a nuisance for well-run software projects
11281 # that build with -Werror. So if the active version of Clang has
11282 # this misfeature, we search for an option to squash it.
11284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
11285 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
11286 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
11287 $as_echo_n "(cached) " >&6
11288 else
11289 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
11290 # Create an alternate version of $ac_link that compiles and
11291 # links in two steps (.c -> .o, .o -> exe) instead of one
11292 # (.c -> exe), because the warning occurs only in the second
11293 # step
11294 ax_pthread_save_ac_link="$ac_link"
11295 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
11296 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
11297 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
11298 ax_pthread_save_CFLAGS="$CFLAGS"
11299 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
11300 if test "x$ax_pthread_try" = "xunknown"; then :
11301 break
11303 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
11304 ac_link="$ax_pthread_save_ac_link"
11305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11306 /* end confdefs.h. */
11307 int main(void){return 0;}
11308 _ACEOF
11309 if ac_fn_c_try_link "$LINENO"; then :
11310 ac_link="$ax_pthread_2step_ac_link"
11311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11312 /* end confdefs.h. */
11313 int main(void){return 0;}
11314 _ACEOF
11315 if ac_fn_c_try_link "$LINENO"; then :
11316 break
11318 rm -f core conftest.err conftest.$ac_objext \
11319 conftest$ac_exeext conftest.$ac_ext
11322 rm -f core conftest.err conftest.$ac_objext \
11323 conftest$ac_exeext conftest.$ac_ext
11324 done
11325 ac_link="$ax_pthread_save_ac_link"
11326 CFLAGS="$ax_pthread_save_CFLAGS"
11327 if test "x$ax_pthread_try" = "x"; then :
11328 ax_pthread_try=no
11330 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
11333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
11334 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
11336 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
11337 no | unknown) ;;
11338 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
11339 esac
11341 fi # $ax_pthread_clang = yes
11343 if test "x$ax_pthread_ok" = "xno"; then
11344 for ax_pthread_try_flag in $ax_pthread_flags; do
11346 case $ax_pthread_try_flag in
11347 none)
11348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
11349 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
11352 -mt,pthread)
11353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
11354 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
11355 PTHREAD_CFLAGS="-mt"
11356 PTHREAD_LIBS="-lpthread"
11360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
11361 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
11362 PTHREAD_CFLAGS="$ax_pthread_try_flag"
11365 pthread-config)
11366 # Extract the first word of "pthread-config", so it can be a program name with args.
11367 set dummy pthread-config; ac_word=$2
11368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11369 $as_echo_n "checking for $ac_word... " >&6; }
11370 if ${ac_cv_prog_ax_pthread_config+:} false; then :
11371 $as_echo_n "(cached) " >&6
11372 else
11373 if test -n "$ax_pthread_config"; then
11374 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
11375 else
11376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11377 for as_dir in $PATH
11379 IFS=$as_save_IFS
11380 test -z "$as_dir" && as_dir=.
11381 for ac_exec_ext in '' $ac_executable_extensions; do
11382 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11383 ac_cv_prog_ax_pthread_config="yes"
11384 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11385 break 2
11387 done
11388 done
11389 IFS=$as_save_IFS
11391 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
11394 ax_pthread_config=$ac_cv_prog_ax_pthread_config
11395 if test -n "$ax_pthread_config"; then
11396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11397 $as_echo "$ax_pthread_config" >&6; }
11398 else
11399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11400 $as_echo "no" >&6; }
11404 if test "x$ax_pthread_config" = "xno"; then :
11405 continue
11407 PTHREAD_CFLAGS="`pthread-config --cflags`"
11408 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11413 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11414 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11416 esac
11418 ax_pthread_save_CFLAGS="$CFLAGS"
11419 ax_pthread_save_LIBS="$LIBS"
11420 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11421 LIBS="$PTHREAD_LIBS $LIBS"
11423 # Check for various functions. We must include pthread.h,
11424 # since some functions may be macros. (On the Sequent, we
11425 # need a special flag -Kthread to make this header compile.)
11426 # We check for pthread_join because it is in -lpthread on IRIX
11427 # while pthread_create is in libc. We check for pthread_attr_init
11428 # due to DEC craziness with -lpthreads. We check for
11429 # pthread_cleanup_push because it is one of the few pthread
11430 # functions on Solaris that doesn't have a non-functional libc stub.
11431 # We try pthread_create on general principles.
11433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11434 /* end confdefs.h. */
11435 #include <pthread.h>
11436 # if $ax_pthread_check_cond
11437 # error "$ax_pthread_check_macro must be defined"
11438 # endif
11439 static void routine(void *a) { a = 0; }
11440 static void *start_routine(void *a) { return a; }
11442 main ()
11444 pthread_t th; pthread_attr_t attr;
11445 pthread_create(&th, 0, start_routine, 0);
11446 pthread_join(th, 0);
11447 pthread_attr_init(&attr);
11448 pthread_cleanup_push(routine, 0);
11449 pthread_cleanup_pop(0) /* ; */
11451 return 0;
11453 _ACEOF
11454 if ac_fn_c_try_link "$LINENO"; then :
11455 ax_pthread_ok=yes
11457 rm -f core conftest.err conftest.$ac_objext \
11458 conftest$ac_exeext conftest.$ac_ext
11460 CFLAGS="$ax_pthread_save_CFLAGS"
11461 LIBS="$ax_pthread_save_LIBS"
11463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11464 $as_echo "$ax_pthread_ok" >&6; }
11465 if test "x$ax_pthread_ok" = "xyes"; then :
11466 break
11469 PTHREAD_LIBS=""
11470 PTHREAD_CFLAGS=""
11471 done
11474 # Various other checks:
11475 if test "x$ax_pthread_ok" = "xyes"; then
11476 ax_pthread_save_CFLAGS="$CFLAGS"
11477 ax_pthread_save_LIBS="$LIBS"
11478 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11479 LIBS="$PTHREAD_LIBS $LIBS"
11481 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11483 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11484 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11485 $as_echo_n "(cached) " >&6
11486 else
11487 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11488 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11490 /* end confdefs.h. */
11491 #include <pthread.h>
11493 main ()
11495 int attr = $ax_pthread_attr; return attr /* ; */
11497 return 0;
11499 _ACEOF
11500 if ac_fn_c_try_link "$LINENO"; then :
11501 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11503 rm -f core conftest.err conftest.$ac_objext \
11504 conftest$ac_exeext conftest.$ac_ext
11505 done
11508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11509 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11510 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11511 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11512 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11514 cat >>confdefs.h <<_ACEOF
11515 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11516 _ACEOF
11518 ax_pthread_joinable_attr_defined=yes
11522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11523 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11524 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11525 $as_echo_n "(cached) " >&6
11526 else
11527 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11528 case $host_os in
11529 solaris*)
11530 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11532 esac
11535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11536 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11537 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11538 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11539 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11540 ax_pthread_special_flags_added=yes
11543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11544 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11545 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11546 $as_echo_n "(cached) " >&6
11547 else
11548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11549 /* end confdefs.h. */
11550 #include <pthread.h>
11552 main ()
11554 int i = PTHREAD_PRIO_INHERIT;
11556 return 0;
11558 _ACEOF
11559 if ac_fn_c_try_link "$LINENO"; then :
11560 ax_cv_PTHREAD_PRIO_INHERIT=yes
11561 else
11562 ax_cv_PTHREAD_PRIO_INHERIT=no
11564 rm -f core conftest.err conftest.$ac_objext \
11565 conftest$ac_exeext conftest.$ac_ext
11568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11569 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11570 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11571 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11573 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11575 ax_pthread_prio_inherit_defined=yes
11579 CFLAGS="$ax_pthread_save_CFLAGS"
11580 LIBS="$ax_pthread_save_LIBS"
11582 # More AIX lossage: compile with *_r variant
11583 if test "x$GCC" != "xyes"; then
11584 case $host_os in
11585 aix*)
11586 case "x/$CC" in #(
11587 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11588 #handle absolute path differently from PATH based program lookup
11589 case "x$CC" in #(
11590 x/*) :
11591 if as_fn_executable_p ${CC}_r; then :
11592 PTHREAD_CC="${CC}_r"
11593 fi ;; #(
11594 *) :
11595 for ac_prog in ${CC}_r
11597 # Extract the first word of "$ac_prog", so it can be a program name with args.
11598 set dummy $ac_prog; ac_word=$2
11599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11600 $as_echo_n "checking for $ac_word... " >&6; }
11601 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11602 $as_echo_n "(cached) " >&6
11603 else
11604 if test -n "$PTHREAD_CC"; then
11605 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11606 else
11607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11608 for as_dir in $PATH
11610 IFS=$as_save_IFS
11611 test -z "$as_dir" && as_dir=.
11612 for ac_exec_ext in '' $ac_executable_extensions; do
11613 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11614 ac_cv_prog_PTHREAD_CC="$ac_prog"
11615 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11616 break 2
11618 done
11619 done
11620 IFS=$as_save_IFS
11624 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11625 if test -n "$PTHREAD_CC"; then
11626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11627 $as_echo "$PTHREAD_CC" >&6; }
11628 else
11629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11630 $as_echo "no" >&6; }
11634 test -n "$PTHREAD_CC" && break
11635 done
11636 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11638 esac ;; #(
11639 *) :
11641 esac
11643 esac
11647 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11653 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11654 if test "x$ax_pthread_ok" = "xyes"; then
11656 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11659 else
11660 ax_pthread_ok=no
11663 ac_ext=c
11664 ac_cpp='$CPP $CPPFLAGS'
11665 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11666 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11667 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11669 # set thread flags
11671 # Some platforms use these, so just define them. They can't hurt if they
11672 # are not supported.
11673 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE"
11675 # Check for *_r functions
11676 _CFLAGS="$CFLAGS"
11677 _LIBS="$LIBS"
11678 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11679 LIBS="$LIBS $PTHREAD_LIBS"
11681 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11682 if test "x$ac_cv_header_pthread_h" = xyes; then :
11684 else
11685 as_fn_error $? "
11686 pthread.h not found" "$LINENO" 5
11691 for ac_func in strerror_r
11692 do :
11693 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
11694 if test "x$ac_cv_func_strerror_r" = xyes; then :
11695 cat >>confdefs.h <<_ACEOF
11696 #define HAVE_STRERROR_R 1
11697 _ACEOF
11700 done
11703 # Do test here with the proper thread flags
11704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11705 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11706 if ${pgac_cv_func_strerror_r_int+:} false; then :
11707 $as_echo_n "(cached) " >&6
11708 else
11709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11710 /* end confdefs.h. */
11711 #include <string.h>
11713 main ()
11715 char buf[100];
11716 switch (strerror_r(1, buf, sizeof(buf)))
11717 { case 0: break; default: break; }
11720 return 0;
11722 _ACEOF
11723 if ac_fn_c_try_compile "$LINENO"; then :
11724 pgac_cv_func_strerror_r_int=yes
11725 else
11726 pgac_cv_func_strerror_r_int=no
11728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11731 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11732 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11734 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11739 CFLAGS="$_CFLAGS"
11740 LIBS="$_LIBS"
11743 else
11744 # else
11745 # do not use values from template file
11746 PTHREAD_CFLAGS=
11747 PTHREAD_LIBS=
11749 fi # fi
11756 ## Libraries
11758 ## Most libraries are included only if they demonstrably provide a function
11759 ## we need, but libm is an exception: always include it, because there are
11760 ## too many compilers that play cute optimization games that will break
11761 ## probes for standard functions such as pow().
11764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11765 $as_echo_n "checking for main in -lm... " >&6; }
11766 if ${ac_cv_lib_m_main+:} false; then :
11767 $as_echo_n "(cached) " >&6
11768 else
11769 ac_check_lib_save_LIBS=$LIBS
11770 LIBS="-lm $LIBS"
11771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11772 /* end confdefs.h. */
11776 main ()
11778 return main ();
11780 return 0;
11782 _ACEOF
11783 if ac_fn_c_try_link "$LINENO"; then :
11784 ac_cv_lib_m_main=yes
11785 else
11786 ac_cv_lib_m_main=no
11788 rm -f core conftest.err conftest.$ac_objext \
11789 conftest$ac_exeext conftest.$ac_ext
11790 LIBS=$ac_check_lib_save_LIBS
11792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11793 $as_echo "$ac_cv_lib_m_main" >&6; }
11794 if test "x$ac_cv_lib_m_main" = xyes; then :
11795 cat >>confdefs.h <<_ACEOF
11796 #define HAVE_LIBM 1
11797 _ACEOF
11799 LIBS="-lm $LIBS"
11803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11804 $as_echo_n "checking for library containing setproctitle... " >&6; }
11805 if ${ac_cv_search_setproctitle+:} false; then :
11806 $as_echo_n "(cached) " >&6
11807 else
11808 ac_func_search_save_LIBS=$LIBS
11809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11810 /* end confdefs.h. */
11812 /* Override any GCC internal prototype to avoid an error.
11813 Use char because int might match the return type of a GCC
11814 builtin and then its argument prototype would still apply. */
11815 #ifdef __cplusplus
11816 extern "C"
11817 #endif
11818 char setproctitle ();
11820 main ()
11822 return setproctitle ();
11824 return 0;
11826 _ACEOF
11827 for ac_lib in '' util; do
11828 if test -z "$ac_lib"; then
11829 ac_res="none required"
11830 else
11831 ac_res=-l$ac_lib
11832 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11834 if ac_fn_c_try_link "$LINENO"; then :
11835 ac_cv_search_setproctitle=$ac_res
11837 rm -f core conftest.err conftest.$ac_objext \
11838 conftest$ac_exeext
11839 if ${ac_cv_search_setproctitle+:} false; then :
11840 break
11842 done
11843 if ${ac_cv_search_setproctitle+:} false; then :
11845 else
11846 ac_cv_search_setproctitle=no
11848 rm conftest.$ac_ext
11849 LIBS=$ac_func_search_save_LIBS
11851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11852 $as_echo "$ac_cv_search_setproctitle" >&6; }
11853 ac_res=$ac_cv_search_setproctitle
11854 if test "$ac_res" != no; then :
11855 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11859 # gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
11860 # when enabling asan the dlopen check doesn't notice that -ldl is actually
11861 # required. Just checking for dlsym() ought to suffice.
11862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
11863 $as_echo_n "checking for library containing dlsym... " >&6; }
11864 if ${ac_cv_search_dlsym+:} false; then :
11865 $as_echo_n "(cached) " >&6
11866 else
11867 ac_func_search_save_LIBS=$LIBS
11868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11869 /* end confdefs.h. */
11871 /* Override any GCC internal prototype to avoid an error.
11872 Use char because int might match the return type of a GCC
11873 builtin and then its argument prototype would still apply. */
11874 #ifdef __cplusplus
11875 extern "C"
11876 #endif
11877 char dlsym ();
11879 main ()
11881 return dlsym ();
11883 return 0;
11885 _ACEOF
11886 for ac_lib in '' dl; do
11887 if test -z "$ac_lib"; then
11888 ac_res="none required"
11889 else
11890 ac_res=-l$ac_lib
11891 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11893 if ac_fn_c_try_link "$LINENO"; then :
11894 ac_cv_search_dlsym=$ac_res
11896 rm -f core conftest.err conftest.$ac_objext \
11897 conftest$ac_exeext
11898 if ${ac_cv_search_dlsym+:} false; then :
11899 break
11901 done
11902 if ${ac_cv_search_dlsym+:} false; then :
11904 else
11905 ac_cv_search_dlsym=no
11907 rm conftest.$ac_ext
11908 LIBS=$ac_func_search_save_LIBS
11910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
11911 $as_echo "$ac_cv_search_dlsym" >&6; }
11912 ac_res=$ac_cv_search_dlsym
11913 if test "$ac_res" != no; then :
11914 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11919 $as_echo_n "checking for library containing socket... " >&6; }
11920 if ${ac_cv_search_socket+:} false; then :
11921 $as_echo_n "(cached) " >&6
11922 else
11923 ac_func_search_save_LIBS=$LIBS
11924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11925 /* end confdefs.h. */
11927 /* Override any GCC internal prototype to avoid an error.
11928 Use char because int might match the return type of a GCC
11929 builtin and then its argument prototype would still apply. */
11930 #ifdef __cplusplus
11931 extern "C"
11932 #endif
11933 char socket ();
11935 main ()
11937 return socket ();
11939 return 0;
11941 _ACEOF
11942 for ac_lib in '' socket ws2_32; do
11943 if test -z "$ac_lib"; then
11944 ac_res="none required"
11945 else
11946 ac_res=-l$ac_lib
11947 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11949 if ac_fn_c_try_link "$LINENO"; then :
11950 ac_cv_search_socket=$ac_res
11952 rm -f core conftest.err conftest.$ac_objext \
11953 conftest$ac_exeext
11954 if ${ac_cv_search_socket+:} false; then :
11955 break
11957 done
11958 if ${ac_cv_search_socket+:} false; then :
11960 else
11961 ac_cv_search_socket=no
11963 rm conftest.$ac_ext
11964 LIBS=$ac_func_search_save_LIBS
11966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11967 $as_echo "$ac_cv_search_socket" >&6; }
11968 ac_res=$ac_cv_search_socket
11969 if test "$ac_res" != no; then :
11970 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11975 $as_echo_n "checking for library containing getopt_long... " >&6; }
11976 if ${ac_cv_search_getopt_long+:} false; then :
11977 $as_echo_n "(cached) " >&6
11978 else
11979 ac_func_search_save_LIBS=$LIBS
11980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11981 /* end confdefs.h. */
11983 /* Override any GCC internal prototype to avoid an error.
11984 Use char because int might match the return type of a GCC
11985 builtin and then its argument prototype would still apply. */
11986 #ifdef __cplusplus
11987 extern "C"
11988 #endif
11989 char getopt_long ();
11991 main ()
11993 return getopt_long ();
11995 return 0;
11997 _ACEOF
11998 for ac_lib in '' getopt gnugetopt; do
11999 if test -z "$ac_lib"; then
12000 ac_res="none required"
12001 else
12002 ac_res=-l$ac_lib
12003 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12005 if ac_fn_c_try_link "$LINENO"; then :
12006 ac_cv_search_getopt_long=$ac_res
12008 rm -f core conftest.err conftest.$ac_objext \
12009 conftest$ac_exeext
12010 if ${ac_cv_search_getopt_long+:} false; then :
12011 break
12013 done
12014 if ${ac_cv_search_getopt_long+:} false; then :
12016 else
12017 ac_cv_search_getopt_long=no
12019 rm conftest.$ac_ext
12020 LIBS=$ac_func_search_save_LIBS
12022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
12023 $as_echo "$ac_cv_search_getopt_long" >&6; }
12024 ac_res=$ac_cv_search_getopt_long
12025 if test "$ac_res" != no; then :
12026 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
12031 $as_echo_n "checking for library containing shm_open... " >&6; }
12032 if ${ac_cv_search_shm_open+:} false; then :
12033 $as_echo_n "(cached) " >&6
12034 else
12035 ac_func_search_save_LIBS=$LIBS
12036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12037 /* end confdefs.h. */
12039 /* Override any GCC internal prototype to avoid an error.
12040 Use char because int might match the return type of a GCC
12041 builtin and then its argument prototype would still apply. */
12042 #ifdef __cplusplus
12043 extern "C"
12044 #endif
12045 char shm_open ();
12047 main ()
12049 return shm_open ();
12051 return 0;
12053 _ACEOF
12054 for ac_lib in '' rt; do
12055 if test -z "$ac_lib"; then
12056 ac_res="none required"
12057 else
12058 ac_res=-l$ac_lib
12059 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12061 if ac_fn_c_try_link "$LINENO"; then :
12062 ac_cv_search_shm_open=$ac_res
12064 rm -f core conftest.err conftest.$ac_objext \
12065 conftest$ac_exeext
12066 if ${ac_cv_search_shm_open+:} false; then :
12067 break
12069 done
12070 if ${ac_cv_search_shm_open+:} false; then :
12072 else
12073 ac_cv_search_shm_open=no
12075 rm conftest.$ac_ext
12076 LIBS=$ac_func_search_save_LIBS
12078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
12079 $as_echo "$ac_cv_search_shm_open" >&6; }
12080 ac_res=$ac_cv_search_shm_open
12081 if test "$ac_res" != no; then :
12082 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
12087 $as_echo_n "checking for library containing shm_unlink... " >&6; }
12088 if ${ac_cv_search_shm_unlink+:} false; then :
12089 $as_echo_n "(cached) " >&6
12090 else
12091 ac_func_search_save_LIBS=$LIBS
12092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12093 /* end confdefs.h. */
12095 /* Override any GCC internal prototype to avoid an error.
12096 Use char because int might match the return type of a GCC
12097 builtin and then its argument prototype would still apply. */
12098 #ifdef __cplusplus
12099 extern "C"
12100 #endif
12101 char shm_unlink ();
12103 main ()
12105 return shm_unlink ();
12107 return 0;
12109 _ACEOF
12110 for ac_lib in '' rt; do
12111 if test -z "$ac_lib"; then
12112 ac_res="none required"
12113 else
12114 ac_res=-l$ac_lib
12115 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12117 if ac_fn_c_try_link "$LINENO"; then :
12118 ac_cv_search_shm_unlink=$ac_res
12120 rm -f core conftest.err conftest.$ac_objext \
12121 conftest$ac_exeext
12122 if ${ac_cv_search_shm_unlink+:} false; then :
12123 break
12125 done
12126 if ${ac_cv_search_shm_unlink+:} false; then :
12128 else
12129 ac_cv_search_shm_unlink=no
12131 rm conftest.$ac_ext
12132 LIBS=$ac_func_search_save_LIBS
12134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
12135 $as_echo "$ac_cv_search_shm_unlink" >&6; }
12136 ac_res=$ac_cv_search_shm_unlink
12137 if test "$ac_res" != no; then :
12138 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
12143 $as_echo_n "checking for library containing clock_gettime... " >&6; }
12144 if ${ac_cv_search_clock_gettime+:} false; then :
12145 $as_echo_n "(cached) " >&6
12146 else
12147 ac_func_search_save_LIBS=$LIBS
12148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12149 /* end confdefs.h. */
12151 /* Override any GCC internal prototype to avoid an error.
12152 Use char because int might match the return type of a GCC
12153 builtin and then its argument prototype would still apply. */
12154 #ifdef __cplusplus
12155 extern "C"
12156 #endif
12157 char clock_gettime ();
12159 main ()
12161 return clock_gettime ();
12163 return 0;
12165 _ACEOF
12166 for ac_lib in '' rt; do
12167 if test -z "$ac_lib"; then
12168 ac_res="none required"
12169 else
12170 ac_res=-l$ac_lib
12171 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12173 if ac_fn_c_try_link "$LINENO"; then :
12174 ac_cv_search_clock_gettime=$ac_res
12176 rm -f core conftest.err conftest.$ac_objext \
12177 conftest$ac_exeext
12178 if ${ac_cv_search_clock_gettime+:} false; then :
12179 break
12181 done
12182 if ${ac_cv_search_clock_gettime+:} false; then :
12184 else
12185 ac_cv_search_clock_gettime=no
12187 rm conftest.$ac_ext
12188 LIBS=$ac_func_search_save_LIBS
12190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
12191 $as_echo "$ac_cv_search_clock_gettime" >&6; }
12192 ac_res=$ac_cv_search_clock_gettime
12193 if test "$ac_res" != no; then :
12194 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12198 # Cygwin:
12199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
12200 $as_echo_n "checking for library containing shmget... " >&6; }
12201 if ${ac_cv_search_shmget+:} false; then :
12202 $as_echo_n "(cached) " >&6
12203 else
12204 ac_func_search_save_LIBS=$LIBS
12205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12206 /* end confdefs.h. */
12208 /* Override any GCC internal prototype to avoid an error.
12209 Use char because int might match the return type of a GCC
12210 builtin and then its argument prototype would still apply. */
12211 #ifdef __cplusplus
12212 extern "C"
12213 #endif
12214 char shmget ();
12216 main ()
12218 return shmget ();
12220 return 0;
12222 _ACEOF
12223 for ac_lib in '' cygipc; do
12224 if test -z "$ac_lib"; then
12225 ac_res="none required"
12226 else
12227 ac_res=-l$ac_lib
12228 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12230 if ac_fn_c_try_link "$LINENO"; then :
12231 ac_cv_search_shmget=$ac_res
12233 rm -f core conftest.err conftest.$ac_objext \
12234 conftest$ac_exeext
12235 if ${ac_cv_search_shmget+:} false; then :
12236 break
12238 done
12239 if ${ac_cv_search_shmget+:} false; then :
12241 else
12242 ac_cv_search_shmget=no
12244 rm conftest.$ac_ext
12245 LIBS=$ac_func_search_save_LIBS
12247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
12248 $as_echo "$ac_cv_search_shmget" >&6; }
12249 ac_res=$ac_cv_search_shmget
12250 if test "$ac_res" != no; then :
12251 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12255 # *BSD:
12256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
12257 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
12258 if ${ac_cv_search_backtrace_symbols+:} false; then :
12259 $as_echo_n "(cached) " >&6
12260 else
12261 ac_func_search_save_LIBS=$LIBS
12262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12263 /* end confdefs.h. */
12265 /* Override any GCC internal prototype to avoid an error.
12266 Use char because int might match the return type of a GCC
12267 builtin and then its argument prototype would still apply. */
12268 #ifdef __cplusplus
12269 extern "C"
12270 #endif
12271 char backtrace_symbols ();
12273 main ()
12275 return backtrace_symbols ();
12277 return 0;
12279 _ACEOF
12280 for ac_lib in '' execinfo; do
12281 if test -z "$ac_lib"; then
12282 ac_res="none required"
12283 else
12284 ac_res=-l$ac_lib
12285 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12287 if ac_fn_c_try_link "$LINENO"; then :
12288 ac_cv_search_backtrace_symbols=$ac_res
12290 rm -f core conftest.err conftest.$ac_objext \
12291 conftest$ac_exeext
12292 if ${ac_cv_search_backtrace_symbols+:} false; then :
12293 break
12295 done
12296 if ${ac_cv_search_backtrace_symbols+:} false; then :
12298 else
12299 ac_cv_search_backtrace_symbols=no
12301 rm conftest.$ac_ext
12302 LIBS=$ac_func_search_save_LIBS
12304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
12305 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
12306 ac_res=$ac_cv_search_backtrace_symbols
12307 if test "$ac_res" != no; then :
12308 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
12314 $as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
12315 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12316 $as_echo_n "(cached) " >&6
12317 else
12318 ac_func_search_save_LIBS=$LIBS
12319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12320 /* end confdefs.h. */
12322 /* Override any GCC internal prototype to avoid an error.
12323 Use char because int might match the return type of a GCC
12324 builtin and then its argument prototype would still apply. */
12325 #ifdef __cplusplus
12326 extern "C"
12327 #endif
12328 char pthread_barrier_wait ();
12330 main ()
12332 return pthread_barrier_wait ();
12334 return 0;
12336 _ACEOF
12337 for ac_lib in '' pthread; do
12338 if test -z "$ac_lib"; then
12339 ac_res="none required"
12340 else
12341 ac_res=-l$ac_lib
12342 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12344 if ac_fn_c_try_link "$LINENO"; then :
12345 ac_cv_search_pthread_barrier_wait=$ac_res
12347 rm -f core conftest.err conftest.$ac_objext \
12348 conftest$ac_exeext
12349 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12350 break
12352 done
12353 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12355 else
12356 ac_cv_search_pthread_barrier_wait=no
12358 rm conftest.$ac_ext
12359 LIBS=$ac_func_search_save_LIBS
12361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_barrier_wait" >&5
12362 $as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
12363 ac_res=$ac_cv_search_pthread_barrier_wait
12364 if test "$ac_res" != no; then :
12365 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12370 if test "$with_readline" = yes; then
12373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
12374 $as_echo_n "checking for library containing readline... " >&6; }
12375 if ${pgac_cv_check_readline+:} false; then :
12376 $as_echo_n "(cached) " >&6
12377 else
12378 pgac_cv_check_readline=no
12379 pgac_save_LIBS=$LIBS
12380 if test x"$with_libedit_preferred" != x"yes"
12381 then READLINE_ORDER="-lreadline -ledit"
12382 else READLINE_ORDER="-ledit -lreadline"
12384 for pgac_rllib in $READLINE_ORDER ; do
12385 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
12386 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
12387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12388 /* end confdefs.h. */
12390 /* Override any GCC internal prototype to avoid an error.
12391 Use char because int might match the return type of a GCC
12392 builtin and then its argument prototype would still apply. */
12393 #ifdef __cplusplus
12394 extern "C"
12395 #endif
12396 char readline ();
12398 main ()
12400 return readline ();
12402 return 0;
12404 _ACEOF
12405 if ac_fn_c_try_link "$LINENO"; then :
12407 # Older NetBSD and OpenBSD have a broken linker that does not
12408 # recognize dependent libraries; assume curses is needed if we didn't
12409 # find any dependency.
12410 case $host_os in
12411 netbsd* | openbsd*)
12412 if test x"$pgac_lib" = x"" ; then
12413 pgac_lib=" -lcurses"
12414 fi ;;
12415 esac
12417 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12418 break
12421 rm -f core conftest.err conftest.$ac_objext \
12422 conftest$ac_exeext conftest.$ac_ext
12423 done
12424 if test "$pgac_cv_check_readline" != no ; then
12425 break
12427 done
12428 LIBS=$pgac_save_LIBS
12431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12432 $as_echo "$pgac_cv_check_readline" >&6; }
12433 if test "$pgac_cv_check_readline" != no ; then
12434 LIBS="$pgac_cv_check_readline $LIBS"
12436 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12441 if test x"$pgac_cv_check_readline" = x"no"; then
12442 as_fn_error $? "readline library not found
12443 If you have readline already installed, see config.log for details on the
12444 failure. It is possible the compiler isn't looking in the proper directory.
12445 Use --without-readline to disable readline support." "$LINENO" 5
12449 if test "$with_zlib" = yes; then
12450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12451 $as_echo_n "checking for inflate in -lz... " >&6; }
12452 if ${ac_cv_lib_z_inflate+:} false; then :
12453 $as_echo_n "(cached) " >&6
12454 else
12455 ac_check_lib_save_LIBS=$LIBS
12456 LIBS="-lz $LIBS"
12457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12458 /* end confdefs.h. */
12460 /* Override any GCC internal prototype to avoid an error.
12461 Use char because int might match the return type of a GCC
12462 builtin and then its argument prototype would still apply. */
12463 #ifdef __cplusplus
12464 extern "C"
12465 #endif
12466 char inflate ();
12468 main ()
12470 return inflate ();
12472 return 0;
12474 _ACEOF
12475 if ac_fn_c_try_link "$LINENO"; then :
12476 ac_cv_lib_z_inflate=yes
12477 else
12478 ac_cv_lib_z_inflate=no
12480 rm -f core conftest.err conftest.$ac_objext \
12481 conftest$ac_exeext conftest.$ac_ext
12482 LIBS=$ac_check_lib_save_LIBS
12484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12485 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12486 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12487 cat >>confdefs.h <<_ACEOF
12488 #define HAVE_LIBZ 1
12489 _ACEOF
12491 LIBS="-lz $LIBS"
12493 else
12494 as_fn_error $? "zlib library not found
12495 If you have zlib already installed, see config.log for details on the
12496 failure. It is possible the compiler isn't looking in the proper directory.
12497 Use --without-zlib to disable zlib support." "$LINENO" 5
12502 if test "$enable_spinlocks" = yes; then
12504 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
12506 else
12507 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12508 *** Not using spinlocks will cause poor performance." >&5
12509 $as_echo "$as_me: WARNING:
12510 *** Not using spinlocks will cause poor performance." >&2;}
12513 if test "$enable_atomics" = yes; then
12515 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
12517 else
12518 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12519 *** Not using atomic operations will cause poor performance." >&5
12520 $as_echo "$as_me: WARNING:
12521 *** Not using atomic operations will cause poor performance." >&2;}
12524 if test "$with_gssapi" = yes ; then
12525 if test "$PORTNAME" != "win32"; then
12526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_store_cred_into" >&5
12527 $as_echo_n "checking for library containing gss_store_cred_into... " >&6; }
12528 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12529 $as_echo_n "(cached) " >&6
12530 else
12531 ac_func_search_save_LIBS=$LIBS
12532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12533 /* end confdefs.h. */
12535 /* Override any GCC internal prototype to avoid an error.
12536 Use char because int might match the return type of a GCC
12537 builtin and then its argument prototype would still apply. */
12538 #ifdef __cplusplus
12539 extern "C"
12540 #endif
12541 char gss_store_cred_into ();
12543 main ()
12545 return gss_store_cred_into ();
12547 return 0;
12549 _ACEOF
12550 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12551 if test -z "$ac_lib"; then
12552 ac_res="none required"
12553 else
12554 ac_res=-l$ac_lib
12555 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12557 if ac_fn_c_try_link "$LINENO"; then :
12558 ac_cv_search_gss_store_cred_into=$ac_res
12560 rm -f core conftest.err conftest.$ac_objext \
12561 conftest$ac_exeext
12562 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12563 break
12565 done
12566 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12568 else
12569 ac_cv_search_gss_store_cred_into=no
12571 rm conftest.$ac_ext
12572 LIBS=$ac_func_search_save_LIBS
12574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_store_cred_into" >&5
12575 $as_echo "$ac_cv_search_gss_store_cred_into" >&6; }
12576 ac_res=$ac_cv_search_gss_store_cred_into
12577 if test "$ac_res" != no; then :
12578 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12580 else
12581 as_fn_error $? "could not find function 'gss_store_cred_into' required for GSSAPI" "$LINENO" 5
12584 else
12585 LIBS="$LIBS -lgssapi32"
12590 # SSL Library
12592 # There is currently only one supported SSL/TLS library: OpenSSL.
12597 # Check whether --with-ssl was given.
12598 if test "${with_ssl+set}" = set; then :
12599 withval=$with_ssl;
12600 case $withval in
12601 yes)
12602 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12605 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12610 esac
12615 if test x"$with_ssl" = x"" ; then
12616 with_ssl=no
12621 # Check whether --with-openssl was given.
12622 if test "${with_openssl+set}" = set; then :
12623 withval=$with_openssl;
12624 case $withval in
12625 yes)
12632 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12634 esac
12636 else
12637 with_openssl=no
12642 if test "$with_openssl" = yes ; then
12643 with_ssl=openssl
12646 if test "$with_ssl" = openssl ; then
12647 # Minimum required OpenSSL version is 1.0.2
12649 $as_echo "#define OPENSSL_API_COMPAT 0x10002000L" >>confdefs.h
12651 if test "$PORTNAME" != "win32"; then
12652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12653 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12654 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12655 $as_echo_n "(cached) " >&6
12656 else
12657 ac_check_lib_save_LIBS=$LIBS
12658 LIBS="-lcrypto $LIBS"
12659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12660 /* end confdefs.h. */
12662 /* Override any GCC internal prototype to avoid an error.
12663 Use char because int might match the return type of a GCC
12664 builtin and then its argument prototype would still apply. */
12665 #ifdef __cplusplus
12666 extern "C"
12667 #endif
12668 char CRYPTO_new_ex_data ();
12670 main ()
12672 return CRYPTO_new_ex_data ();
12674 return 0;
12676 _ACEOF
12677 if ac_fn_c_try_link "$LINENO"; then :
12678 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12679 else
12680 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12682 rm -f core conftest.err conftest.$ac_objext \
12683 conftest$ac_exeext conftest.$ac_ext
12684 LIBS=$ac_check_lib_save_LIBS
12686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12687 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12688 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12689 cat >>confdefs.h <<_ACEOF
12690 #define HAVE_LIBCRYPTO 1
12691 _ACEOF
12693 LIBS="-lcrypto $LIBS"
12695 else
12696 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12700 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12701 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12702 $as_echo_n "(cached) " >&6
12703 else
12704 ac_check_lib_save_LIBS=$LIBS
12705 LIBS="-lssl $LIBS"
12706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12707 /* end confdefs.h. */
12709 /* Override any GCC internal prototype to avoid an error.
12710 Use char because int might match the return type of a GCC
12711 builtin and then its argument prototype would still apply. */
12712 #ifdef __cplusplus
12713 extern "C"
12714 #endif
12715 char SSL_new ();
12717 main ()
12719 return SSL_new ();
12721 return 0;
12723 _ACEOF
12724 if ac_fn_c_try_link "$LINENO"; then :
12725 ac_cv_lib_ssl_SSL_new=yes
12726 else
12727 ac_cv_lib_ssl_SSL_new=no
12729 rm -f core conftest.err conftest.$ac_objext \
12730 conftest$ac_exeext conftest.$ac_ext
12731 LIBS=$ac_check_lib_save_LIBS
12733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12734 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12735 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12736 cat >>confdefs.h <<_ACEOF
12737 #define HAVE_LIBSSL 1
12738 _ACEOF
12740 LIBS="-lssl $LIBS"
12742 else
12743 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12746 else
12747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12748 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12749 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12750 $as_echo_n "(cached) " >&6
12751 else
12752 ac_func_search_save_LIBS=$LIBS
12753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12754 /* end confdefs.h. */
12756 /* Override any GCC internal prototype to avoid an error.
12757 Use char because int might match the return type of a GCC
12758 builtin and then its argument prototype would still apply. */
12759 #ifdef __cplusplus
12760 extern "C"
12761 #endif
12762 char CRYPTO_new_ex_data ();
12764 main ()
12766 return CRYPTO_new_ex_data ();
12768 return 0;
12770 _ACEOF
12771 for ac_lib in '' eay32 crypto; do
12772 if test -z "$ac_lib"; then
12773 ac_res="none required"
12774 else
12775 ac_res=-l$ac_lib
12776 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12778 if ac_fn_c_try_link "$LINENO"; then :
12779 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12781 rm -f core conftest.err conftest.$ac_objext \
12782 conftest$ac_exeext
12783 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12784 break
12786 done
12787 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12789 else
12790 ac_cv_search_CRYPTO_new_ex_data=no
12792 rm conftest.$ac_ext
12793 LIBS=$ac_func_search_save_LIBS
12795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12796 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12797 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12798 if test "$ac_res" != no; then :
12799 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12801 else
12802 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12806 $as_echo_n "checking for library containing SSL_new... " >&6; }
12807 if ${ac_cv_search_SSL_new+:} false; then :
12808 $as_echo_n "(cached) " >&6
12809 else
12810 ac_func_search_save_LIBS=$LIBS
12811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12812 /* end confdefs.h. */
12814 /* Override any GCC internal prototype to avoid an error.
12815 Use char because int might match the return type of a GCC
12816 builtin and then its argument prototype would still apply. */
12817 #ifdef __cplusplus
12818 extern "C"
12819 #endif
12820 char SSL_new ();
12822 main ()
12824 return SSL_new ();
12826 return 0;
12828 _ACEOF
12829 for ac_lib in '' ssleay32 ssl; do
12830 if test -z "$ac_lib"; then
12831 ac_res="none required"
12832 else
12833 ac_res=-l$ac_lib
12834 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12836 if ac_fn_c_try_link "$LINENO"; then :
12837 ac_cv_search_SSL_new=$ac_res
12839 rm -f core conftest.err conftest.$ac_objext \
12840 conftest$ac_exeext
12841 if ${ac_cv_search_SSL_new+:} false; then :
12842 break
12844 done
12845 if ${ac_cv_search_SSL_new+:} false; then :
12847 else
12848 ac_cv_search_SSL_new=no
12850 rm conftest.$ac_ext
12851 LIBS=$ac_func_search_save_LIBS
12853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12854 $as_echo "$ac_cv_search_SSL_new" >&6; }
12855 ac_res=$ac_cv_search_SSL_new
12856 if test "$ac_res" != no; then :
12857 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12859 else
12860 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12864 # Function introduced in OpenSSL 1.0.2, not in LibreSSL.
12865 for ac_func in SSL_CTX_set_cert_cb
12866 do :
12867 ac_fn_c_check_func "$LINENO" "SSL_CTX_set_cert_cb" "ac_cv_func_SSL_CTX_set_cert_cb"
12868 if test "x$ac_cv_func_SSL_CTX_set_cert_cb" = xyes; then :
12869 cat >>confdefs.h <<_ACEOF
12870 #define HAVE_SSL_CTX_SET_CERT_CB 1
12871 _ACEOF
12874 done
12876 # Functions introduced in OpenSSL 1.1.0. We used to check for
12877 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12878 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12879 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12880 # functions.
12881 for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free
12882 do :
12883 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12884 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12885 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12886 cat >>confdefs.h <<_ACEOF
12887 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12888 _ACEOF
12891 done
12893 # OpenSSL versions before 1.1.0 required setting callback functions, for
12894 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12895 # function was removed.
12896 for ac_func in CRYPTO_lock
12897 do :
12898 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12899 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12900 cat >>confdefs.h <<_ACEOF
12901 #define HAVE_CRYPTO_LOCK 1
12902 _ACEOF
12905 done
12907 # Function introduced in OpenSSL 1.1.1.
12908 for ac_func in X509_get_signature_info
12909 do :
12910 ac_fn_c_check_func "$LINENO" "X509_get_signature_info" "ac_cv_func_X509_get_signature_info"
12911 if test "x$ac_cv_func_X509_get_signature_info" = xyes; then :
12912 cat >>confdefs.h <<_ACEOF
12913 #define HAVE_X509_GET_SIGNATURE_INFO 1
12914 _ACEOF
12917 done
12920 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
12922 elif test "$with_ssl" != no ; then
12923 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
12927 if test "$with_pam" = yes ; then
12928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12929 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12930 if ${ac_cv_lib_pam_pam_start+:} false; then :
12931 $as_echo_n "(cached) " >&6
12932 else
12933 ac_check_lib_save_LIBS=$LIBS
12934 LIBS="-lpam $LIBS"
12935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12936 /* end confdefs.h. */
12938 /* Override any GCC internal prototype to avoid an error.
12939 Use char because int might match the return type of a GCC
12940 builtin and then its argument prototype would still apply. */
12941 #ifdef __cplusplus
12942 extern "C"
12943 #endif
12944 char pam_start ();
12946 main ()
12948 return pam_start ();
12950 return 0;
12952 _ACEOF
12953 if ac_fn_c_try_link "$LINENO"; then :
12954 ac_cv_lib_pam_pam_start=yes
12955 else
12956 ac_cv_lib_pam_pam_start=no
12958 rm -f core conftest.err conftest.$ac_objext \
12959 conftest$ac_exeext conftest.$ac_ext
12960 LIBS=$ac_check_lib_save_LIBS
12962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12963 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12964 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12965 cat >>confdefs.h <<_ACEOF
12966 #define HAVE_LIBPAM 1
12967 _ACEOF
12969 LIBS="-lpam $LIBS"
12971 else
12972 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12977 if test "$with_libxml" = yes ; then
12978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12979 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12980 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12981 $as_echo_n "(cached) " >&6
12982 else
12983 ac_check_lib_save_LIBS=$LIBS
12984 LIBS="-lxml2 $LIBS"
12985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12986 /* end confdefs.h. */
12988 /* Override any GCC internal prototype to avoid an error.
12989 Use char because int might match the return type of a GCC
12990 builtin and then its argument prototype would still apply. */
12991 #ifdef __cplusplus
12992 extern "C"
12993 #endif
12994 char xmlSaveToBuffer ();
12996 main ()
12998 return xmlSaveToBuffer ();
13000 return 0;
13002 _ACEOF
13003 if ac_fn_c_try_link "$LINENO"; then :
13004 ac_cv_lib_xml2_xmlSaveToBuffer=yes
13005 else
13006 ac_cv_lib_xml2_xmlSaveToBuffer=no
13008 rm -f core conftest.err conftest.$ac_objext \
13009 conftest$ac_exeext conftest.$ac_ext
13010 LIBS=$ac_check_lib_save_LIBS
13012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
13013 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
13014 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
13015 cat >>confdefs.h <<_ACEOF
13016 #define HAVE_LIBXML2 1
13017 _ACEOF
13019 LIBS="-lxml2 $LIBS"
13021 else
13022 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
13027 if test "$with_libxslt" = yes ; then
13028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
13029 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
13030 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
13031 $as_echo_n "(cached) " >&6
13032 else
13033 ac_check_lib_save_LIBS=$LIBS
13034 LIBS="-lxslt $LIBS"
13035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13036 /* end confdefs.h. */
13038 /* Override any GCC internal prototype to avoid an error.
13039 Use char because int might match the return type of a GCC
13040 builtin and then its argument prototype would still apply. */
13041 #ifdef __cplusplus
13042 extern "C"
13043 #endif
13044 char xsltCleanupGlobals ();
13046 main ()
13048 return xsltCleanupGlobals ();
13050 return 0;
13052 _ACEOF
13053 if ac_fn_c_try_link "$LINENO"; then :
13054 ac_cv_lib_xslt_xsltCleanupGlobals=yes
13055 else
13056 ac_cv_lib_xslt_xsltCleanupGlobals=no
13058 rm -f core conftest.err conftest.$ac_objext \
13059 conftest$ac_exeext conftest.$ac_ext
13060 LIBS=$ac_check_lib_save_LIBS
13062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
13063 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
13064 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
13065 cat >>confdefs.h <<_ACEOF
13066 #define HAVE_LIBXSLT 1
13067 _ACEOF
13069 LIBS="-lxslt $LIBS"
13071 else
13072 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
13077 if test "$with_lz4" = yes ; then
13078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
13079 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
13080 if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
13081 $as_echo_n "(cached) " >&6
13082 else
13083 ac_check_lib_save_LIBS=$LIBS
13084 LIBS="-llz4 $LIBS"
13085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13086 /* end confdefs.h. */
13088 /* Override any GCC internal prototype to avoid an error.
13089 Use char because int might match the return type of a GCC
13090 builtin and then its argument prototype would still apply. */
13091 #ifdef __cplusplus
13092 extern "C"
13093 #endif
13094 char LZ4_compress_default ();
13096 main ()
13098 return LZ4_compress_default ();
13100 return 0;
13102 _ACEOF
13103 if ac_fn_c_try_link "$LINENO"; then :
13104 ac_cv_lib_lz4_LZ4_compress_default=yes
13105 else
13106 ac_cv_lib_lz4_LZ4_compress_default=no
13108 rm -f core conftest.err conftest.$ac_objext \
13109 conftest$ac_exeext conftest.$ac_ext
13110 LIBS=$ac_check_lib_save_LIBS
13112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5
13113 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
13114 if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
13115 cat >>confdefs.h <<_ACEOF
13116 #define HAVE_LIBLZ4 1
13117 _ACEOF
13119 LIBS="-llz4 $LIBS"
13121 else
13122 as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
13127 if test "$with_zstd" = yes ; then
13128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5
13129 $as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; }
13130 if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then :
13131 $as_echo_n "(cached) " >&6
13132 else
13133 ac_check_lib_save_LIBS=$LIBS
13134 LIBS="-lzstd $LIBS"
13135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13136 /* end confdefs.h. */
13138 /* Override any GCC internal prototype to avoid an error.
13139 Use char because int might match the return type of a GCC
13140 builtin and then its argument prototype would still apply. */
13141 #ifdef __cplusplus
13142 extern "C"
13143 #endif
13144 char ZSTD_compress ();
13146 main ()
13148 return ZSTD_compress ();
13150 return 0;
13152 _ACEOF
13153 if ac_fn_c_try_link "$LINENO"; then :
13154 ac_cv_lib_zstd_ZSTD_compress=yes
13155 else
13156 ac_cv_lib_zstd_ZSTD_compress=no
13158 rm -f core conftest.err conftest.$ac_objext \
13159 conftest$ac_exeext conftest.$ac_ext
13160 LIBS=$ac_check_lib_save_LIBS
13162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5
13163 $as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; }
13164 if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then :
13165 cat >>confdefs.h <<_ACEOF
13166 #define HAVE_LIBZSTD 1
13167 _ACEOF
13169 LIBS="-lzstd $LIBS"
13171 else
13172 as_fn_error $? "library 'zstd' is required for ZSTD support" "$LINENO" 5
13177 # Note: We can test for libldap_r only after we know PTHREAD_LIBS;
13178 # also, on AIX, we may need to have openssl in LIBS for this step.
13179 if test "$with_ldap" = yes ; then
13180 _LIBS="$LIBS"
13181 if test "$PORTNAME" != "win32"; then
13182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
13183 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
13184 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
13185 $as_echo_n "(cached) " >&6
13186 else
13187 ac_check_lib_save_LIBS=$LIBS
13188 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
13189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13190 /* end confdefs.h. */
13192 /* Override any GCC internal prototype to avoid an error.
13193 Use char because int might match the return type of a GCC
13194 builtin and then its argument prototype would still apply. */
13195 #ifdef __cplusplus
13196 extern "C"
13197 #endif
13198 char ldap_bind ();
13200 main ()
13202 return ldap_bind ();
13204 return 0;
13206 _ACEOF
13207 if ac_fn_c_try_link "$LINENO"; then :
13208 ac_cv_lib_ldap_ldap_bind=yes
13209 else
13210 ac_cv_lib_ldap_ldap_bind=no
13212 rm -f core conftest.err conftest.$ac_objext \
13213 conftest$ac_exeext conftest.$ac_ext
13214 LIBS=$ac_check_lib_save_LIBS
13216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
13217 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
13218 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
13219 cat >>confdefs.h <<_ACEOF
13220 #define HAVE_LIBLDAP 1
13221 _ACEOF
13223 LIBS="-lldap $LIBS"
13225 else
13226 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
13229 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
13230 # This test is carried out against libldap.
13231 for ac_func in ldap_initialize
13232 do :
13233 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
13234 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
13235 cat >>confdefs.h <<_ACEOF
13236 #define HAVE_LDAP_INITIALIZE 1
13237 _ACEOF
13240 done
13242 # The separate ldap_r library only exists in OpenLDAP < 2.5, and if we
13243 # have 2.5 or later, we shouldn't even probe for ldap_r (we might find a
13244 # library from a separate OpenLDAP installation). The most reliable
13245 # way to check that is to check for a function introduced in 2.5.
13246 ac_fn_c_check_func "$LINENO" "ldap_verify_credentials" "ac_cv_func_ldap_verify_credentials"
13247 if test "x$ac_cv_func_ldap_verify_credentials" = xyes; then :
13248 thread_safe_libldap=yes
13249 else
13250 thread_safe_libldap=no
13253 if test "$thread_safe_libldap" = no; then
13254 # Use ldap_r for FE if available, else assume ldap is thread-safe.
13255 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
13256 LIBS="$_LIBS"
13257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
13258 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
13259 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
13260 $as_echo_n "(cached) " >&6
13261 else
13262 ac_check_lib_save_LIBS=$LIBS
13263 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
13264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13265 /* end confdefs.h. */
13267 /* Override any GCC internal prototype to avoid an error.
13268 Use char because int might match the return type of a GCC
13269 builtin and then its argument prototype would still apply. */
13270 #ifdef __cplusplus
13271 extern "C"
13272 #endif
13273 char ldap_bind ();
13275 main ()
13277 return ldap_bind ();
13279 return 0;
13281 _ACEOF
13282 if ac_fn_c_try_link "$LINENO"; then :
13283 ac_cv_lib_ldap_r_ldap_bind=yes
13284 else
13285 ac_cv_lib_ldap_r_ldap_bind=no
13287 rm -f core conftest.err conftest.$ac_objext \
13288 conftest$ac_exeext conftest.$ac_ext
13289 LIBS=$ac_check_lib_save_LIBS
13291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
13292 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
13293 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
13294 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
13295 else
13296 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13299 else
13300 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13302 else
13303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
13304 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
13305 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
13306 $as_echo_n "(cached) " >&6
13307 else
13308 ac_check_lib_save_LIBS=$LIBS
13309 LIBS="-lwldap32 $LIBS"
13310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13311 /* end confdefs.h. */
13313 /* Override any GCC internal prototype to avoid an error.
13314 Use char because int might match the return type of a GCC
13315 builtin and then its argument prototype would still apply. */
13316 #ifdef __cplusplus
13317 extern "C"
13318 #endif
13319 char ldap_bind ();
13321 main ()
13323 return ldap_bind ();
13325 return 0;
13327 _ACEOF
13328 if ac_fn_c_try_link "$LINENO"; then :
13329 ac_cv_lib_wldap32_ldap_bind=yes
13330 else
13331 ac_cv_lib_wldap32_ldap_bind=no
13333 rm -f core conftest.err conftest.$ac_objext \
13334 conftest$ac_exeext conftest.$ac_ext
13335 LIBS=$ac_check_lib_save_LIBS
13337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
13338 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
13339 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
13340 cat >>confdefs.h <<_ACEOF
13341 #define HAVE_LIBWLDAP32 1
13342 _ACEOF
13344 LIBS="-lwldap32 $LIBS"
13346 else
13347 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13350 LDAP_LIBS_FE="-lwldap32"
13351 LDAP_LIBS_BE="-lwldap32"
13353 LIBS="$_LIBS"
13358 # for contrib/sepgsql
13359 if test "$with_selinux" = yes; then
13360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
13361 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
13362 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
13363 $as_echo_n "(cached) " >&6
13364 else
13365 ac_check_lib_save_LIBS=$LIBS
13366 LIBS="-lselinux $LIBS"
13367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13368 /* end confdefs.h. */
13370 /* Override any GCC internal prototype to avoid an error.
13371 Use char because int might match the return type of a GCC
13372 builtin and then its argument prototype would still apply. */
13373 #ifdef __cplusplus
13374 extern "C"
13375 #endif
13376 char security_compute_create_name ();
13378 main ()
13380 return security_compute_create_name ();
13382 return 0;
13384 _ACEOF
13385 if ac_fn_c_try_link "$LINENO"; then :
13386 ac_cv_lib_selinux_security_compute_create_name=yes
13387 else
13388 ac_cv_lib_selinux_security_compute_create_name=no
13390 rm -f core conftest.err conftest.$ac_objext \
13391 conftest$ac_exeext conftest.$ac_ext
13392 LIBS=$ac_check_lib_save_LIBS
13394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
13395 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
13396 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
13397 cat >>confdefs.h <<_ACEOF
13398 #define HAVE_LIBSELINUX 1
13399 _ACEOF
13401 LIBS="-lselinux $LIBS"
13403 else
13404 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
13409 # for contrib/uuid-ossp
13410 if test "$with_uuid" = bsd ; then
13411 # On BSD, the UUID functions are in libc
13412 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
13413 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
13414 UUID_LIBS=""
13415 else
13416 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
13419 elif test "$with_uuid" = e2fs ; then
13420 # On macOS, the UUID functions are in libc
13421 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
13422 if test "x$ac_cv_func_uuid_generate" = xyes; then :
13423 UUID_LIBS=""
13424 else
13425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
13426 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
13427 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
13428 $as_echo_n "(cached) " >&6
13429 else
13430 ac_check_lib_save_LIBS=$LIBS
13431 LIBS="-luuid $LIBS"
13432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13433 /* end confdefs.h. */
13435 /* Override any GCC internal prototype to avoid an error.
13436 Use char because int might match the return type of a GCC
13437 builtin and then its argument prototype would still apply. */
13438 #ifdef __cplusplus
13439 extern "C"
13440 #endif
13441 char uuid_generate ();
13443 main ()
13445 return uuid_generate ();
13447 return 0;
13449 _ACEOF
13450 if ac_fn_c_try_link "$LINENO"; then :
13451 ac_cv_lib_uuid_uuid_generate=yes
13452 else
13453 ac_cv_lib_uuid_uuid_generate=no
13455 rm -f core conftest.err conftest.$ac_objext \
13456 conftest$ac_exeext conftest.$ac_ext
13457 LIBS=$ac_check_lib_save_LIBS
13459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13460 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13461 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13462 UUID_LIBS="-luuid"
13463 else
13464 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13469 elif test "$with_uuid" = ossp ; then
13470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13471 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13472 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13473 $as_echo_n "(cached) " >&6
13474 else
13475 ac_check_lib_save_LIBS=$LIBS
13476 LIBS="-lossp-uuid $LIBS"
13477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13478 /* end confdefs.h. */
13480 /* Override any GCC internal prototype to avoid an error.
13481 Use char because int might match the return type of a GCC
13482 builtin and then its argument prototype would still apply. */
13483 #ifdef __cplusplus
13484 extern "C"
13485 #endif
13486 char uuid_export ();
13488 main ()
13490 return uuid_export ();
13492 return 0;
13494 _ACEOF
13495 if ac_fn_c_try_link "$LINENO"; then :
13496 ac_cv_lib_ossp_uuid_uuid_export=yes
13497 else
13498 ac_cv_lib_ossp_uuid_uuid_export=no
13500 rm -f core conftest.err conftest.$ac_objext \
13501 conftest$ac_exeext conftest.$ac_ext
13502 LIBS=$ac_check_lib_save_LIBS
13504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13505 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13506 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13507 UUID_LIBS="-lossp-uuid"
13508 else
13509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13510 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13511 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13512 $as_echo_n "(cached) " >&6
13513 else
13514 ac_check_lib_save_LIBS=$LIBS
13515 LIBS="-luuid $LIBS"
13516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13517 /* end confdefs.h. */
13519 /* Override any GCC internal prototype to avoid an error.
13520 Use char because int might match the return type of a GCC
13521 builtin and then its argument prototype would still apply. */
13522 #ifdef __cplusplus
13523 extern "C"
13524 #endif
13525 char uuid_export ();
13527 main ()
13529 return uuid_export ();
13531 return 0;
13533 _ACEOF
13534 if ac_fn_c_try_link "$LINENO"; then :
13535 ac_cv_lib_uuid_uuid_export=yes
13536 else
13537 ac_cv_lib_uuid_uuid_export=no
13539 rm -f core conftest.err conftest.$ac_objext \
13540 conftest$ac_exeext conftest.$ac_ext
13541 LIBS=$ac_check_lib_save_LIBS
13543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13544 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13545 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13546 UUID_LIBS="-luuid"
13547 else
13548 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13558 ## Header files
13561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13562 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13563 if ${ac_cv_header_stdbool_h+:} false; then :
13564 $as_echo_n "(cached) " >&6
13565 else
13566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13567 /* end confdefs.h. */
13569 #include <stdbool.h>
13570 #ifndef bool
13571 "error: bool is not defined"
13572 #endif
13573 #ifndef false
13574 "error: false is not defined"
13575 #endif
13576 #if false
13577 "error: false is not 0"
13578 #endif
13579 #ifndef true
13580 "error: true is not defined"
13581 #endif
13582 #if true != 1
13583 "error: true is not 1"
13584 #endif
13585 #ifndef __bool_true_false_are_defined
13586 "error: __bool_true_false_are_defined is not defined"
13587 #endif
13589 struct s { _Bool s: 1; _Bool t; } s;
13591 char a[true == 1 ? 1 : -1];
13592 char b[false == 0 ? 1 : -1];
13593 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13594 char d[(bool) 0.5 == true ? 1 : -1];
13595 /* See body of main program for 'e'. */
13596 char f[(_Bool) 0.0 == false ? 1 : -1];
13597 char g[true];
13598 char h[sizeof (_Bool)];
13599 char i[sizeof s.t];
13600 enum { j = false, k = true, l = false * true, m = true * 256 };
13601 /* The following fails for
13602 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13603 _Bool n[m];
13604 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13605 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13606 /* Catch a bug in an HP-UX C compiler. See
13607 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13608 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13610 _Bool q = true;
13611 _Bool *pq = &q;
13614 main ()
13617 bool e = &s;
13618 *pq |= q;
13619 *pq |= ! q;
13620 /* Refer to every declared value, to avoid compiler optimizations. */
13621 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13622 + !m + !n + !o + !p + !q + !pq);
13625 return 0;
13627 _ACEOF
13628 if ac_fn_c_try_compile "$LINENO"; then :
13629 ac_cv_header_stdbool_h=yes
13630 else
13631 ac_cv_header_stdbool_h=no
13633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13636 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13637 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13638 if test "x$ac_cv_type__Bool" = xyes; then :
13640 cat >>confdefs.h <<_ACEOF
13641 #define HAVE__BOOL 1
13642 _ACEOF
13648 if test $ac_cv_header_stdbool_h = yes; then
13650 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13655 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
13656 do :
13657 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13658 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13659 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13660 cat >>confdefs.h <<_ACEOF
13661 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13662 _ACEOF
13666 done
13669 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13670 for ac_header in readline/readline.h
13671 do :
13672 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13673 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13674 cat >>confdefs.h <<_ACEOF
13675 #define HAVE_READLINE_READLINE_H 1
13676 _ACEOF
13678 else
13679 for ac_header in readline.h
13680 do :
13681 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13682 if test "x$ac_cv_header_readline_h" = xyes; then :
13683 cat >>confdefs.h <<_ACEOF
13684 #define HAVE_READLINE_H 1
13685 _ACEOF
13687 else
13688 as_fn_error $? "readline header not found
13689 If you have readline already installed, see config.log for details on the
13690 failure. It is possible the compiler isn't looking in the proper directory.
13691 Use --without-readline to disable readline support." "$LINENO" 5
13694 done
13698 done
13700 for ac_header in readline/history.h
13701 do :
13702 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13703 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13704 cat >>confdefs.h <<_ACEOF
13705 #define HAVE_READLINE_HISTORY_H 1
13706 _ACEOF
13708 else
13709 for ac_header in history.h
13710 do :
13711 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13712 if test "x$ac_cv_header_history_h" = xyes; then :
13713 cat >>confdefs.h <<_ACEOF
13714 #define HAVE_HISTORY_H 1
13715 _ACEOF
13717 else
13718 as_fn_error $? "history header not found
13719 If you have readline already installed, see config.log for details on the
13720 failure. It is possible the compiler isn't looking in the proper directory.
13721 Use --without-readline to disable readline support." "$LINENO" 5
13724 done
13728 done
13732 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13733 # Some installations of libedit usurp /usr/include/readline/, which seems
13734 # bad practice, since in combined installations readline will have its headers
13735 # there. We might have to resort to AC_EGREP checks to make sure we found
13736 # the proper header...
13737 for ac_header in editline/readline.h
13738 do :
13739 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13740 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13741 cat >>confdefs.h <<_ACEOF
13742 #define HAVE_EDITLINE_READLINE_H 1
13743 _ACEOF
13745 else
13746 for ac_header in readline.h
13747 do :
13748 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13749 if test "x$ac_cv_header_readline_h" = xyes; then :
13750 cat >>confdefs.h <<_ACEOF
13751 #define HAVE_READLINE_H 1
13752 _ACEOF
13754 else
13755 for ac_header in readline/readline.h
13756 do :
13757 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13758 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13759 cat >>confdefs.h <<_ACEOF
13760 #define HAVE_READLINE_READLINE_H 1
13761 _ACEOF
13763 else
13764 as_fn_error $? "readline header not found
13765 If you have libedit already installed, see config.log for details on the
13766 failure. It is possible the compiler isn't looking in the proper directory.
13767 Use --without-readline to disable libedit support." "$LINENO" 5
13770 done
13774 done
13778 done
13780 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13781 # not be there at all. Hence, don't complain if not found. We must check
13782 # though, since in yet other versions it is an independent header.
13783 for ac_header in editline/history.h
13784 do :
13785 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13786 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13787 cat >>confdefs.h <<_ACEOF
13788 #define HAVE_EDITLINE_HISTORY_H 1
13789 _ACEOF
13791 else
13792 for ac_header in history.h
13793 do :
13794 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13795 if test "x$ac_cv_header_history_h" = xyes; then :
13796 cat >>confdefs.h <<_ACEOF
13797 #define HAVE_HISTORY_H 1
13798 _ACEOF
13800 else
13801 for ac_header in readline/history.h
13802 do :
13803 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13804 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13805 cat >>confdefs.h <<_ACEOF
13806 #define HAVE_READLINE_HISTORY_H 1
13807 _ACEOF
13811 done
13815 done
13819 done
13823 if test "$with_zlib" = yes; then
13824 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13825 if test "x$ac_cv_header_zlib_h" = xyes; then :
13827 else
13828 as_fn_error $? "zlib header not found
13829 If you have zlib already installed, see config.log for details on the
13830 failure. It is possible the compiler isn't looking in the proper directory.
13831 Use --without-zlib to disable zlib support." "$LINENO" 5
13837 if test -z "$LZ4"; then
13838 for ac_prog in lz4
13840 # Extract the first word of "$ac_prog", so it can be a program name with args.
13841 set dummy $ac_prog; ac_word=$2
13842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13843 $as_echo_n "checking for $ac_word... " >&6; }
13844 if ${ac_cv_path_LZ4+:} false; then :
13845 $as_echo_n "(cached) " >&6
13846 else
13847 case $LZ4 in
13848 [\\/]* | ?:[\\/]*)
13849 ac_cv_path_LZ4="$LZ4" # Let the user override the test with a path.
13852 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13853 for as_dir in $PATH
13855 IFS=$as_save_IFS
13856 test -z "$as_dir" && as_dir=.
13857 for ac_exec_ext in '' $ac_executable_extensions; do
13858 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13859 ac_cv_path_LZ4="$as_dir/$ac_word$ac_exec_ext"
13860 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13861 break 2
13863 done
13864 done
13865 IFS=$as_save_IFS
13868 esac
13870 LZ4=$ac_cv_path_LZ4
13871 if test -n "$LZ4"; then
13872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13873 $as_echo "$LZ4" >&6; }
13874 else
13875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13876 $as_echo "no" >&6; }
13880 test -n "$LZ4" && break
13881 done
13883 else
13884 # Report the value of LZ4 in configure's output in all cases.
13885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4" >&5
13886 $as_echo_n "checking for LZ4... " >&6; }
13887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13888 $as_echo "$LZ4" >&6; }
13891 if test "$with_lz4" = yes; then
13892 ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
13893 if test "x$ac_cv_header_lz4_h" = xyes; then :
13895 else
13896 as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
13902 if test -z "$ZSTD"; then
13903 for ac_prog in zstd
13905 # Extract the first word of "$ac_prog", so it can be a program name with args.
13906 set dummy $ac_prog; ac_word=$2
13907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13908 $as_echo_n "checking for $ac_word... " >&6; }
13909 if ${ac_cv_path_ZSTD+:} false; then :
13910 $as_echo_n "(cached) " >&6
13911 else
13912 case $ZSTD in
13913 [\\/]* | ?:[\\/]*)
13914 ac_cv_path_ZSTD="$ZSTD" # Let the user override the test with a path.
13917 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13918 for as_dir in $PATH
13920 IFS=$as_save_IFS
13921 test -z "$as_dir" && as_dir=.
13922 for ac_exec_ext in '' $ac_executable_extensions; do
13923 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13924 ac_cv_path_ZSTD="$as_dir/$ac_word$ac_exec_ext"
13925 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13926 break 2
13928 done
13929 done
13930 IFS=$as_save_IFS
13933 esac
13935 ZSTD=$ac_cv_path_ZSTD
13936 if test -n "$ZSTD"; then
13937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13938 $as_echo "$ZSTD" >&6; }
13939 else
13940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13941 $as_echo "no" >&6; }
13945 test -n "$ZSTD" && break
13946 done
13948 else
13949 # Report the value of ZSTD in configure's output in all cases.
13950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD" >&5
13951 $as_echo_n "checking for ZSTD... " >&6; }
13952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13953 $as_echo "$ZSTD" >&6; }
13956 if test "$with_zstd" = yes; then
13957 ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default"
13958 if test "x$ac_cv_header_zstd_h" = xyes; then :
13960 else
13961 as_fn_error $? "zstd.h header file is required for ZSTD" "$LINENO" 5
13967 if test "$with_gssapi" = yes ; then
13968 for ac_header in gssapi/gssapi.h
13969 do :
13970 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13971 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13972 cat >>confdefs.h <<_ACEOF
13973 #define HAVE_GSSAPI_GSSAPI_H 1
13974 _ACEOF
13976 else
13977 for ac_header in gssapi.h
13978 do :
13979 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13980 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13981 cat >>confdefs.h <<_ACEOF
13982 #define HAVE_GSSAPI_H 1
13983 _ACEOF
13985 else
13986 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13989 done
13993 done
13995 for ac_header in gssapi/gssapi_ext.h
13996 do :
13997 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi_ext.h" "ac_cv_header_gssapi_gssapi_ext_h" "$ac_includes_default"
13998 if test "x$ac_cv_header_gssapi_gssapi_ext_h" = xyes; then :
13999 cat >>confdefs.h <<_ACEOF
14000 #define HAVE_GSSAPI_GSSAPI_EXT_H 1
14001 _ACEOF
14003 else
14004 for ac_header in gssapi_ext.h
14005 do :
14006 ac_fn_c_check_header_mongrel "$LINENO" "gssapi_ext.h" "ac_cv_header_gssapi_ext_h" "$ac_includes_default"
14007 if test "x$ac_cv_header_gssapi_ext_h" = xyes; then :
14008 cat >>confdefs.h <<_ACEOF
14009 #define HAVE_GSSAPI_EXT_H 1
14010 _ACEOF
14012 else
14013 as_fn_error $? "gssapi_ext.h header file is required for GSSAPI" "$LINENO" 5
14016 done
14020 done
14024 if test -z "$OPENSSL"; then
14025 for ac_prog in openssl
14027 # Extract the first word of "$ac_prog", so it can be a program name with args.
14028 set dummy $ac_prog; ac_word=$2
14029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14030 $as_echo_n "checking for $ac_word... " >&6; }
14031 if ${ac_cv_path_OPENSSL+:} false; then :
14032 $as_echo_n "(cached) " >&6
14033 else
14034 case $OPENSSL in
14035 [\\/]* | ?:[\\/]*)
14036 ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a path.
14039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14040 for as_dir in $PATH
14042 IFS=$as_save_IFS
14043 test -z "$as_dir" && as_dir=.
14044 for ac_exec_ext in '' $ac_executable_extensions; do
14045 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14046 ac_cv_path_OPENSSL="$as_dir/$ac_word$ac_exec_ext"
14047 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14048 break 2
14050 done
14051 done
14052 IFS=$as_save_IFS
14055 esac
14057 OPENSSL=$ac_cv_path_OPENSSL
14058 if test -n "$OPENSSL"; then
14059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
14060 $as_echo "$OPENSSL" >&6; }
14061 else
14062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14063 $as_echo "no" >&6; }
14067 test -n "$OPENSSL" && break
14068 done
14070 else
14071 # Report the value of OPENSSL in configure's output in all cases.
14072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
14073 $as_echo_n "checking for OPENSSL... " >&6; }
14074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
14075 $as_echo "$OPENSSL" >&6; }
14078 if test "$with_ssl" = openssl ; then
14079 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
14080 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
14082 else
14083 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
14087 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
14088 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
14090 else
14091 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
14097 if test "$with_pam" = yes ; then
14098 for ac_header in security/pam_appl.h
14099 do :
14100 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
14101 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
14102 cat >>confdefs.h <<_ACEOF
14103 #define HAVE_SECURITY_PAM_APPL_H 1
14104 _ACEOF
14106 else
14107 for ac_header in pam/pam_appl.h
14108 do :
14109 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
14110 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
14111 cat >>confdefs.h <<_ACEOF
14112 #define HAVE_PAM_PAM_APPL_H 1
14113 _ACEOF
14115 else
14116 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
14119 done
14123 done
14127 if test "$with_bsd_auth" = yes ; then
14128 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
14129 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
14131 else
14132 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
14138 if test "$with_systemd" = yes ; then
14139 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
14140 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
14142 else
14143 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
14149 if test "$with_libxml" = yes ; then
14150 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
14151 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
14153 else
14154 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
14160 if test "$with_libxslt" = yes ; then
14161 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
14162 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
14164 else
14165 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
14171 if test "$with_ldap" = yes ; then
14172 if test "$PORTNAME" != "win32"; then
14173 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
14174 if test "x$ac_cv_header_ldap_h" = xyes; then :
14176 else
14177 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
14181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
14182 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
14183 if ${pgac_cv_ldap_safe+:} false; then :
14184 $as_echo_n "(cached) " >&6
14185 else
14186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14187 /* end confdefs.h. */
14188 #include <ldap.h>
14189 #if !defined(LDAP_VENDOR_VERSION) || \
14190 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
14191 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
14192 choke me
14193 #endif
14195 main ()
14199 return 0;
14201 _ACEOF
14202 if ac_fn_c_try_compile "$LINENO"; then :
14203 pgac_cv_ldap_safe=yes
14204 else
14205 pgac_cv_ldap_safe=no
14207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
14210 $as_echo "$pgac_cv_ldap_safe" >&6; }
14212 if test "$pgac_cv_ldap_safe" != yes; then
14213 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14214 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14215 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14216 *** also uses LDAP will crash on exit." >&5
14217 $as_echo "$as_me: WARNING:
14218 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14219 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14220 *** also uses LDAP will crash on exit." >&2;}
14222 else
14223 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
14224 #include <windows.h>
14227 if test "x$ac_cv_header_winldap_h" = xyes; then :
14229 else
14230 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
14237 if test "$with_bonjour" = yes ; then
14238 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
14239 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
14241 else
14242 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
14248 # for contrib/uuid-ossp
14249 if test "$with_uuid" = bsd ; then
14250 for ac_header in uuid.h
14251 do :
14252 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14253 if test "x$ac_cv_header_uuid_h" = xyes; then :
14254 cat >>confdefs.h <<_ACEOF
14255 #define HAVE_UUID_H 1
14256 _ACEOF
14257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14258 /* end confdefs.h. */
14259 #include <uuid.h>
14261 _ACEOF
14262 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14263 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
14265 else
14266 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
14268 rm -f conftest*
14270 else
14271 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
14274 done
14276 elif test "$with_uuid" = e2fs ; then
14277 for ac_header in uuid/uuid.h
14278 do :
14279 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
14280 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
14281 cat >>confdefs.h <<_ACEOF
14282 #define HAVE_UUID_UUID_H 1
14283 _ACEOF
14284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14285 /* end confdefs.h. */
14286 #include <uuid/uuid.h>
14288 _ACEOF
14289 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14290 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14292 else
14293 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
14295 rm -f conftest*
14297 else
14298 for ac_header in uuid.h
14299 do :
14300 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14301 if test "x$ac_cv_header_uuid_h" = xyes; then :
14302 cat >>confdefs.h <<_ACEOF
14303 #define HAVE_UUID_H 1
14304 _ACEOF
14305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14306 /* end confdefs.h. */
14307 #include <uuid.h>
14309 _ACEOF
14310 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14311 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14313 else
14314 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
14316 rm -f conftest*
14318 else
14319 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
14322 done
14326 done
14328 elif test "$with_uuid" = ossp ; then
14329 for ac_header in ossp/uuid.h
14330 do :
14331 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
14332 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
14333 cat >>confdefs.h <<_ACEOF
14334 #define HAVE_OSSP_UUID_H 1
14335 _ACEOF
14336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14337 /* end confdefs.h. */
14338 #include <ossp/uuid.h>
14340 _ACEOF
14341 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14342 $EGREP "uuid_export" >/dev/null 2>&1; then :
14344 else
14345 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
14347 rm -f conftest*
14349 else
14350 for ac_header in uuid.h
14351 do :
14352 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14353 if test "x$ac_cv_header_uuid_h" = xyes; then :
14354 cat >>confdefs.h <<_ACEOF
14355 #define HAVE_UUID_H 1
14356 _ACEOF
14357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14358 /* end confdefs.h. */
14359 #include <uuid.h>
14361 _ACEOF
14362 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14363 $EGREP "uuid_export" >/dev/null 2>&1; then :
14365 else
14366 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
14368 rm -f conftest*
14370 else
14371 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
14374 done
14378 done
14382 if test "$PORTNAME" = "win32" ; then
14383 for ac_header in crtdefs.h
14384 do :
14385 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
14386 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
14387 cat >>confdefs.h <<_ACEOF
14388 #define HAVE_CRTDEFS_H 1
14389 _ACEOF
14393 done
14398 ## Types, structures, compiler characteristics
14401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14402 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14403 if ${ac_cv_c_bigendian+:} false; then :
14404 $as_echo_n "(cached) " >&6
14405 else
14406 ac_cv_c_bigendian=unknown
14407 # See if we're dealing with a universal compiler.
14408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14409 /* end confdefs.h. */
14410 #ifndef __APPLE_CC__
14411 not a universal capable compiler
14412 #endif
14413 typedef int dummy;
14415 _ACEOF
14416 if ac_fn_c_try_compile "$LINENO"; then :
14418 # Check for potential -arch flags. It is not universal unless
14419 # there are at least two -arch flags with different values.
14420 ac_arch=
14421 ac_prev=
14422 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14423 if test -n "$ac_prev"; then
14424 case $ac_word in
14425 i?86 | x86_64 | ppc | ppc64)
14426 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14427 ac_arch=$ac_word
14428 else
14429 ac_cv_c_bigendian=universal
14430 break
14433 esac
14434 ac_prev=
14435 elif test "x$ac_word" = "x-arch"; then
14436 ac_prev=arch
14438 done
14440 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14441 if test $ac_cv_c_bigendian = unknown; then
14442 # See if sys/param.h defines the BYTE_ORDER macro.
14443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14444 /* end confdefs.h. */
14445 #include <sys/types.h>
14446 #include <sys/param.h>
14449 main ()
14451 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14452 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14453 && LITTLE_ENDIAN)
14454 bogus endian macros
14455 #endif
14458 return 0;
14460 _ACEOF
14461 if ac_fn_c_try_compile "$LINENO"; then :
14462 # It does; now see whether it defined to BIG_ENDIAN or not.
14463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14464 /* end confdefs.h. */
14465 #include <sys/types.h>
14466 #include <sys/param.h>
14469 main ()
14471 #if BYTE_ORDER != BIG_ENDIAN
14472 not big endian
14473 #endif
14476 return 0;
14478 _ACEOF
14479 if ac_fn_c_try_compile "$LINENO"; then :
14480 ac_cv_c_bigendian=yes
14481 else
14482 ac_cv_c_bigendian=no
14484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14486 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14488 if test $ac_cv_c_bigendian = unknown; then
14489 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14491 /* end confdefs.h. */
14492 #include <limits.h>
14495 main ()
14497 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14498 bogus endian macros
14499 #endif
14502 return 0;
14504 _ACEOF
14505 if ac_fn_c_try_compile "$LINENO"; then :
14506 # It does; now see whether it defined to _BIG_ENDIAN or not.
14507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14508 /* end confdefs.h. */
14509 #include <limits.h>
14512 main ()
14514 #ifndef _BIG_ENDIAN
14515 not big endian
14516 #endif
14519 return 0;
14521 _ACEOF
14522 if ac_fn_c_try_compile "$LINENO"; then :
14523 ac_cv_c_bigendian=yes
14524 else
14525 ac_cv_c_bigendian=no
14527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14529 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14531 if test $ac_cv_c_bigendian = unknown; then
14532 # Compile a test program.
14533 if test "$cross_compiling" = yes; then :
14534 # Try to guess by grepping values from an object file.
14535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14536 /* end confdefs.h. */
14537 short int ascii_mm[] =
14538 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14539 short int ascii_ii[] =
14540 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14541 int use_ascii (int i) {
14542 return ascii_mm[i] + ascii_ii[i];
14544 short int ebcdic_ii[] =
14545 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14546 short int ebcdic_mm[] =
14547 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14548 int use_ebcdic (int i) {
14549 return ebcdic_mm[i] + ebcdic_ii[i];
14551 extern int foo;
14554 main ()
14556 return use_ascii (foo) == use_ebcdic (foo);
14558 return 0;
14560 _ACEOF
14561 if ac_fn_c_try_compile "$LINENO"; then :
14562 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14563 ac_cv_c_bigendian=yes
14565 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14566 if test "$ac_cv_c_bigendian" = unknown; then
14567 ac_cv_c_bigendian=no
14568 else
14569 # finding both strings is unlikely to happen, but who knows?
14570 ac_cv_c_bigendian=unknown
14574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14575 else
14576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14577 /* end confdefs.h. */
14578 $ac_includes_default
14580 main ()
14583 /* Are we little or big endian? From Harbison&Steele. */
14584 union
14586 long int l;
14587 char c[sizeof (long int)];
14588 } u;
14589 u.l = 1;
14590 return u.c[sizeof (long int) - 1] == 1;
14593 return 0;
14595 _ACEOF
14596 if ac_fn_c_try_run "$LINENO"; then :
14597 ac_cv_c_bigendian=no
14598 else
14599 ac_cv_c_bigendian=yes
14601 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14602 conftest.$ac_objext conftest.beam conftest.$ac_ext
14607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14608 $as_echo "$ac_cv_c_bigendian" >&6; }
14609 case $ac_cv_c_bigendian in #(
14610 yes)
14611 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14612 ;; #(
14614 ;; #(
14615 universal)
14617 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14619 ;; #(
14621 as_fn_error $? "unknown endianness
14622 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14623 esac
14625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14626 $as_echo_n "checking for inline... " >&6; }
14627 if ${ac_cv_c_inline+:} false; then :
14628 $as_echo_n "(cached) " >&6
14629 else
14630 ac_cv_c_inline=no
14631 for ac_kw in inline __inline__ __inline; do
14632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14633 /* end confdefs.h. */
14634 #ifndef __cplusplus
14635 typedef int foo_t;
14636 static $ac_kw foo_t static_foo () {return 0; }
14637 $ac_kw foo_t foo () {return 0; }
14638 #endif
14640 _ACEOF
14641 if ac_fn_c_try_compile "$LINENO"; then :
14642 ac_cv_c_inline=$ac_kw
14644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14645 test "$ac_cv_c_inline" != no && break
14646 done
14649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14650 $as_echo "$ac_cv_c_inline" >&6; }
14652 case $ac_cv_c_inline in
14653 inline | yes) ;;
14655 case $ac_cv_c_inline in
14656 no) ac_val=;;
14657 *) ac_val=$ac_cv_c_inline;;
14658 esac
14659 cat >>confdefs.h <<_ACEOF
14660 #ifndef __cplusplus
14661 #define inline $ac_val
14662 #endif
14663 _ACEOF
14665 esac
14667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14668 $as_echo_n "checking for printf format archetype... " >&6; }
14669 if ${pgac_cv_printf_archetype+:} false; then :
14670 $as_echo_n "(cached) " >&6
14671 else
14672 pgac_cv_printf_archetype=gnu_printf
14673 ac_save_c_werror_flag=$ac_c_werror_flag
14674 ac_c_werror_flag=yes
14675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14676 /* end confdefs.h. */
14677 extern void pgac_write(int ignore, const char *fmt,...)
14678 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14680 main ()
14682 pgac_write(0, "error %s: %m", "foo");
14684 return 0;
14686 _ACEOF
14687 if ac_fn_c_try_compile "$LINENO"; then :
14688 ac_archetype_ok=yes
14689 else
14690 ac_archetype_ok=no
14692 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14693 ac_c_werror_flag=$ac_save_c_werror_flag
14695 if [ "$ac_archetype_ok" = no ]; then
14696 pgac_cv_printf_archetype=__syslog__
14697 ac_save_c_werror_flag=$ac_c_werror_flag
14698 ac_c_werror_flag=yes
14699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14700 /* end confdefs.h. */
14701 extern void pgac_write(int ignore, const char *fmt,...)
14702 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14704 main ()
14706 pgac_write(0, "error %s: %m", "foo");
14708 return 0;
14710 _ACEOF
14711 if ac_fn_c_try_compile "$LINENO"; then :
14712 ac_archetype_ok=yes
14713 else
14714 ac_archetype_ok=no
14716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14717 ac_c_werror_flag=$ac_save_c_werror_flag
14719 if [ "$ac_archetype_ok" = no ]; then
14720 pgac_cv_printf_archetype=printf
14724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14725 $as_echo "$pgac_cv_printf_archetype" >&6; }
14727 cat >>confdefs.h <<_ACEOF
14728 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14729 _ACEOF
14732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14733 $as_echo_n "checking for _Static_assert... " >&6; }
14734 if ${pgac_cv__static_assert+:} false; then :
14735 $as_echo_n "(cached) " >&6
14736 else
14737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14738 /* end confdefs.h. */
14741 main ()
14743 ({ _Static_assert(1, "foo"); })
14745 return 0;
14747 _ACEOF
14748 if ac_fn_c_try_link "$LINENO"; then :
14749 pgac_cv__static_assert=yes
14750 else
14751 pgac_cv__static_assert=no
14753 rm -f core conftest.err conftest.$ac_objext \
14754 conftest$ac_exeext conftest.$ac_ext
14756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14757 $as_echo "$pgac_cv__static_assert" >&6; }
14758 if test x"$pgac_cv__static_assert" = xyes ; then
14760 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14764 $as_echo_n "checking for typeof... " >&6; }
14765 if ${pgac_cv_c_typeof+:} false; then :
14766 $as_echo_n "(cached) " >&6
14767 else
14768 pgac_cv_c_typeof=no
14769 for pgac_kw in typeof __typeof__ decltype; do
14770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14771 /* end confdefs.h. */
14774 main ()
14776 int x = 0;
14777 $pgac_kw(x) y;
14778 y = x;
14779 return y;
14781 return 0;
14783 _ACEOF
14784 if ac_fn_c_try_compile "$LINENO"; then :
14785 pgac_cv_c_typeof=$pgac_kw
14787 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14788 test "$pgac_cv_c_typeof" != no && break
14789 done
14791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14792 $as_echo "$pgac_cv_c_typeof" >&6; }
14793 if test "$pgac_cv_c_typeof" != no; then
14795 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14797 if test "$pgac_cv_c_typeof" != typeof; then
14799 cat >>confdefs.h <<_ACEOF
14800 #define typeof $pgac_cv_c_typeof
14801 _ACEOF
14805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14806 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14807 if ${pgac_cv__types_compatible+:} false; then :
14808 $as_echo_n "(cached) " >&6
14809 else
14810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14811 /* end confdefs.h. */
14814 main ()
14816 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14818 return 0;
14820 _ACEOF
14821 if ac_fn_c_try_compile "$LINENO"; then :
14822 pgac_cv__types_compatible=yes
14823 else
14824 pgac_cv__types_compatible=no
14826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14829 $as_echo "$pgac_cv__types_compatible" >&6; }
14830 if test x"$pgac_cv__types_compatible" = xyes ; then
14832 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14836 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14837 if ${pgac_cv__builtin_constant_p+:} false; then :
14838 $as_echo_n "(cached) " >&6
14839 else
14840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14841 /* end confdefs.h. */
14842 static int x;
14843 static int y[__builtin_constant_p(x) ? x : 1];
14844 static int z[__builtin_constant_p("string literal") ? 1 : x];
14847 _ACEOF
14848 if ac_fn_c_try_compile "$LINENO"; then :
14849 pgac_cv__builtin_constant_p=yes
14850 else
14851 pgac_cv__builtin_constant_p=no
14853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14856 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14857 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14859 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14863 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14864 if ${pgac_cv__builtin_unreachable+:} false; then :
14865 $as_echo_n "(cached) " >&6
14866 else
14867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14868 /* end confdefs.h. */
14871 main ()
14873 __builtin_unreachable();
14875 return 0;
14877 _ACEOF
14878 if ac_fn_c_try_link "$LINENO"; then :
14879 pgac_cv__builtin_unreachable=yes
14880 else
14881 pgac_cv__builtin_unreachable=no
14883 rm -f core conftest.err conftest.$ac_objext \
14884 conftest$ac_exeext conftest.$ac_ext
14886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14887 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14888 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14890 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14894 $as_echo_n "checking for computed goto support... " >&6; }
14895 if ${pgac_cv_computed_goto+:} false; then :
14896 $as_echo_n "(cached) " >&6
14897 else
14898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14899 /* end confdefs.h. */
14902 main ()
14904 void *labeladdrs[] = {&&my_label};
14905 goto *labeladdrs[0];
14906 my_label:
14907 return 1;
14910 return 0;
14912 _ACEOF
14913 if ac_fn_c_try_compile "$LINENO"; then :
14914 pgac_cv_computed_goto=yes
14915 else
14916 pgac_cv_computed_goto=no
14918 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14921 $as_echo "$pgac_cv_computed_goto" >&6; }
14922 if test x"$pgac_cv_computed_goto" = xyes ; then
14924 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14927 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14928 #include <time.h>
14931 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14933 cat >>confdefs.h <<_ACEOF
14934 #define HAVE_STRUCT_TM_TM_ZONE 1
14935 _ACEOF
14941 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14942 #include <sys/ipc.h>
14943 #include <sys/sem.h>
14946 if test "x$ac_cv_type_union_semun" = xyes; then :
14948 cat >>confdefs.h <<_ACEOF
14949 #define HAVE_UNION_SEMUN 1
14950 _ACEOF
14955 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/socket.h>
14957 if test "x$ac_cv_type_socklen_t" = xyes; then :
14959 cat >>confdefs.h <<_ACEOF
14960 #define HAVE_SOCKLEN_T 1
14961 _ACEOF
14966 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14967 #include <sys/socket.h>
14970 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14972 cat >>confdefs.h <<_ACEOF
14973 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14974 _ACEOF
14980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14981 $as_echo_n "checking for locale_t... " >&6; }
14982 if ${pgac_cv_type_locale_t+:} false; then :
14983 $as_echo_n "(cached) " >&6
14984 else
14985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14986 /* end confdefs.h. */
14987 #include <locale.h>
14988 locale_t x;
14990 main ()
14994 return 0;
14996 _ACEOF
14997 if ac_fn_c_try_compile "$LINENO"; then :
14998 pgac_cv_type_locale_t=yes
14999 else
15000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15001 /* end confdefs.h. */
15002 #include <xlocale.h>
15003 locale_t x;
15005 main ()
15009 return 0;
15011 _ACEOF
15012 if ac_fn_c_try_compile "$LINENO"; then :
15013 pgac_cv_type_locale_t='yes (in xlocale.h)'
15014 else
15015 pgac_cv_type_locale_t=no
15017 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15019 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
15022 $as_echo "$pgac_cv_type_locale_t" >&6; }
15023 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
15025 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
15029 # MSVC doesn't cope well with defining restrict to __restrict, the
15030 # spelling it understands, because it conflicts with
15031 # __declspec(restrict). Therefore we define pg_restrict to the
15032 # appropriate definition, which presumably won't conflict.
15034 # Allow platforms with buggy compilers to force restrict to not be
15035 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
15036 # template.
15037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
15038 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
15039 if ${ac_cv_c_restrict+:} false; then :
15040 $as_echo_n "(cached) " >&6
15041 else
15042 ac_cv_c_restrict=no
15043 # The order here caters to the fact that C++ does not require restrict.
15044 for ac_kw in __restrict __restrict__ _Restrict restrict; do
15045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15046 /* end confdefs.h. */
15047 typedef int * int_ptr;
15048 int foo (int_ptr $ac_kw ip) {
15049 return ip[0];
15052 main ()
15054 int s[1];
15055 int * $ac_kw t = s;
15056 t[0] = 0;
15057 return foo(t)
15059 return 0;
15061 _ACEOF
15062 if ac_fn_c_try_compile "$LINENO"; then :
15063 ac_cv_c_restrict=$ac_kw
15065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15066 test "$ac_cv_c_restrict" != no && break
15067 done
15070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
15071 $as_echo "$ac_cv_c_restrict" >&6; }
15073 case $ac_cv_c_restrict in
15074 restrict) ;;
15075 no) $as_echo "#define restrict /**/" >>confdefs.h
15077 *) cat >>confdefs.h <<_ACEOF
15078 #define restrict $ac_cv_c_restrict
15079 _ACEOF
15081 esac
15083 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
15084 pg_restrict=""
15085 else
15086 pg_restrict="$ac_cv_c_restrict"
15089 cat >>confdefs.h <<_ACEOF
15090 #define pg_restrict $pg_restrict
15091 _ACEOF
15094 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
15095 #include <getopt.h>
15096 #endif
15098 if test "x$ac_cv_type_struct_option" = xyes; then :
15100 cat >>confdefs.h <<_ACEOF
15101 #define HAVE_STRUCT_OPTION 1
15102 _ACEOF
15108 case $host_cpu in
15109 x86_64)
15110 # On x86_64, check if we can compile a popcntq instruction
15111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
15112 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
15113 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
15114 $as_echo_n "(cached) " >&6
15115 else
15116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15117 /* end confdefs.h. */
15120 main ()
15122 long long x = 1; long long r;
15123 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
15125 return 0;
15127 _ACEOF
15128 if ac_fn_c_try_compile "$LINENO"; then :
15129 pgac_cv_have_x86_64_popcntq=yes
15130 else
15131 pgac_cv_have_x86_64_popcntq=no
15133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
15136 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
15137 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
15139 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
15143 ppc*|powerpc*)
15144 # On PPC, check if compiler accepts "i"(x) when __builtin_constant_p(x).
15145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
15146 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
15147 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
15148 $as_echo_n "(cached) " >&6
15149 else
15150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15151 /* end confdefs.h. */
15152 static inline int
15153 addi(int ra, int si)
15155 int res = 0;
15156 if (__builtin_constant_p(si))
15157 __asm__ __volatile__(
15158 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
15159 return res;
15161 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
15163 main ()
15167 return 0;
15169 _ACEOF
15170 if ac_fn_c_try_compile "$LINENO"; then :
15171 pgac_cv_have_i_constraint__builtin_constant_p=yes
15172 else
15173 pgac_cv_have_i_constraint__builtin_constant_p=no
15175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
15178 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
15179 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
15181 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
15185 esac
15187 # Check largefile support. You might think this is a system service not a
15188 # compiler characteristic, but you'd be wrong. We must check this before
15189 # probing existence of related functions such as fseeko, since the largefile
15190 # defines can affect what is generated for that.
15191 if test "$PORTNAME" != "win32"; then
15192 # Check whether --enable-largefile was given.
15193 if test "${enable_largefile+set}" = set; then :
15194 enableval=$enable_largefile;
15197 if test "$enable_largefile" != no; then
15199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15200 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15201 if ${ac_cv_sys_largefile_CC+:} false; then :
15202 $as_echo_n "(cached) " >&6
15203 else
15204 ac_cv_sys_largefile_CC=no
15205 if test "$GCC" != yes; then
15206 ac_save_CC=$CC
15207 while :; do
15208 # IRIX 6.2 and later do not support large files by default,
15209 # so use the C compiler's -n32 option if that helps.
15210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15211 /* end confdefs.h. */
15212 #include <sys/types.h>
15213 /* Check that off_t can represent 2**63 - 1 correctly.
15214 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15215 since some C++ compilers masquerading as C compilers
15216 incorrectly reject 9223372036854775807. */
15217 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15218 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15219 && LARGE_OFF_T % 2147483647 == 1)
15220 ? 1 : -1];
15222 main ()
15226 return 0;
15228 _ACEOF
15229 if ac_fn_c_try_compile "$LINENO"; then :
15230 break
15232 rm -f core conftest.err conftest.$ac_objext
15233 CC="$CC -n32"
15234 if ac_fn_c_try_compile "$LINENO"; then :
15235 ac_cv_sys_largefile_CC=' -n32'; break
15237 rm -f core conftest.err conftest.$ac_objext
15238 break
15239 done
15240 CC=$ac_save_CC
15241 rm -f conftest.$ac_ext
15244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15245 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15246 if test "$ac_cv_sys_largefile_CC" != no; then
15247 CC=$CC$ac_cv_sys_largefile_CC
15250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15251 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15252 if ${ac_cv_sys_file_offset_bits+:} false; then :
15253 $as_echo_n "(cached) " >&6
15254 else
15255 while :; do
15256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15257 /* end confdefs.h. */
15258 #include <sys/types.h>
15259 /* Check that off_t can represent 2**63 - 1 correctly.
15260 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15261 since some C++ compilers masquerading as C compilers
15262 incorrectly reject 9223372036854775807. */
15263 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15264 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15265 && LARGE_OFF_T % 2147483647 == 1)
15266 ? 1 : -1];
15268 main ()
15272 return 0;
15274 _ACEOF
15275 if ac_fn_c_try_compile "$LINENO"; then :
15276 ac_cv_sys_file_offset_bits=no; break
15278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15280 /* end confdefs.h. */
15281 #define _FILE_OFFSET_BITS 64
15282 #include <sys/types.h>
15283 /* Check that off_t can represent 2**63 - 1 correctly.
15284 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15285 since some C++ compilers masquerading as C compilers
15286 incorrectly reject 9223372036854775807. */
15287 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15288 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15289 && LARGE_OFF_T % 2147483647 == 1)
15290 ? 1 : -1];
15292 main ()
15296 return 0;
15298 _ACEOF
15299 if ac_fn_c_try_compile "$LINENO"; then :
15300 ac_cv_sys_file_offset_bits=64; break
15302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15303 ac_cv_sys_file_offset_bits=unknown
15304 break
15305 done
15307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15308 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15309 case $ac_cv_sys_file_offset_bits in #(
15310 no | unknown) ;;
15312 cat >>confdefs.h <<_ACEOF
15313 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15314 _ACEOF
15316 esac
15317 rm -rf conftest*
15318 if test $ac_cv_sys_file_offset_bits = unknown; then
15319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15320 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15321 if ${ac_cv_sys_large_files+:} false; then :
15322 $as_echo_n "(cached) " >&6
15323 else
15324 while :; do
15325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15326 /* end confdefs.h. */
15327 #include <sys/types.h>
15328 /* Check that off_t can represent 2**63 - 1 correctly.
15329 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15330 since some C++ compilers masquerading as C compilers
15331 incorrectly reject 9223372036854775807. */
15332 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15333 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15334 && LARGE_OFF_T % 2147483647 == 1)
15335 ? 1 : -1];
15337 main ()
15341 return 0;
15343 _ACEOF
15344 if ac_fn_c_try_compile "$LINENO"; then :
15345 ac_cv_sys_large_files=no; break
15347 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15349 /* end confdefs.h. */
15350 #define _LARGE_FILES 1
15351 #include <sys/types.h>
15352 /* Check that off_t can represent 2**63 - 1 correctly.
15353 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15354 since some C++ compilers masquerading as C compilers
15355 incorrectly reject 9223372036854775807. */
15356 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15357 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15358 && LARGE_OFF_T % 2147483647 == 1)
15359 ? 1 : -1];
15361 main ()
15365 return 0;
15367 _ACEOF
15368 if ac_fn_c_try_compile "$LINENO"; then :
15369 ac_cv_sys_large_files=1; break
15371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15372 ac_cv_sys_large_files=unknown
15373 break
15374 done
15376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15377 $as_echo "$ac_cv_sys_large_files" >&6; }
15378 case $ac_cv_sys_large_files in #(
15379 no | unknown) ;;
15381 cat >>confdefs.h <<_ACEOF
15382 #define _LARGE_FILES $ac_cv_sys_large_files
15383 _ACEOF
15385 esac
15386 rm -rf conftest*
15395 # The cast to long int works around a bug in the HP C Compiler
15396 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15397 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15398 # This bug is HP SR number 8606223364.
15399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15400 $as_echo_n "checking size of off_t... " >&6; }
15401 if ${ac_cv_sizeof_off_t+:} false; then :
15402 $as_echo_n "(cached) " >&6
15403 else
15404 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
15406 else
15407 if test "$ac_cv_type_off_t" = yes; then
15408 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15409 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15410 as_fn_error 77 "cannot compute sizeof (off_t)
15411 See \`config.log' for more details" "$LINENO" 5; }
15412 else
15413 ac_cv_sizeof_off_t=0
15418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15419 $as_echo "$ac_cv_sizeof_off_t" >&6; }
15423 cat >>confdefs.h <<_ACEOF
15424 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15425 _ACEOF
15429 # If we don't have largefile support, can't handle segment size >= 2GB.
15430 if test "$ac_cv_sizeof_off_t" -lt 8; then
15431 if expr $RELSEG_SIZE '*' $blocksize '>=' 2 '*' 1024 '*' 1024; then
15432 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15436 # The cast to long int works around a bug in the HP C Compiler
15437 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15438 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15439 # This bug is HP SR number 8606223364.
15440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
15441 $as_echo_n "checking size of bool... " >&6; }
15442 if ${ac_cv_sizeof_bool+:} false; then :
15443 $as_echo_n "(cached) " >&6
15444 else
15445 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
15446 #include <stdbool.h>
15447 #endif
15448 "; then :
15450 else
15451 if test "$ac_cv_type_bool" = yes; then
15452 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15453 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15454 as_fn_error 77 "cannot compute sizeof (bool)
15455 See \`config.log' for more details" "$LINENO" 5; }
15456 else
15457 ac_cv_sizeof_bool=0
15462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15463 $as_echo "$ac_cv_sizeof_bool" >&6; }
15467 cat >>confdefs.h <<_ACEOF
15468 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15469 _ACEOF
15473 if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
15475 $as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
15481 ## Functions, global variables
15484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15485 $as_echo_n "checking for int timezone... " >&6; }
15486 if ${pgac_cv_var_int_timezone+:} false; then :
15487 $as_echo_n "(cached) " >&6
15488 else
15489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15490 /* end confdefs.h. */
15491 #include <time.h>
15492 int res;
15494 main ()
15496 #ifndef __CYGWIN__
15497 res = timezone / 60;
15498 #else
15499 res = _timezone / 60;
15500 #endif
15502 return 0;
15504 _ACEOF
15505 if ac_fn_c_try_link "$LINENO"; then :
15506 pgac_cv_var_int_timezone=yes
15507 else
15508 pgac_cv_var_int_timezone=no
15510 rm -f core conftest.err conftest.$ac_objext \
15511 conftest$ac_exeext conftest.$ac_ext
15513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15514 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15515 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15517 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15521 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15522 if ${pgac_cv_func_wcstombs_l+:} false; then :
15523 $as_echo_n "(cached) " >&6
15524 else
15525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15526 /* end confdefs.h. */
15527 #include <stdlib.h>
15528 #include <locale.h>
15530 main ()
15532 #ifndef wcstombs_l
15533 (void) wcstombs_l;
15534 #endif
15536 return 0;
15538 _ACEOF
15539 if ac_fn_c_try_compile "$LINENO"; then :
15540 pgac_cv_func_wcstombs_l='yes'
15541 else
15542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15543 /* end confdefs.h. */
15544 #include <stdlib.h>
15545 #include <locale.h>
15546 #include <xlocale.h>
15548 main ()
15550 #ifndef wcstombs_l
15551 (void) wcstombs_l;
15552 #endif
15554 return 0;
15556 _ACEOF
15557 if ac_fn_c_try_compile "$LINENO"; then :
15558 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15559 else
15560 pgac_cv_func_wcstombs_l='no'
15562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15567 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15568 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15570 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15574 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15575 # symbols that that library has no business exposing to the world. Pending
15576 # acquisition of a clue by those developers, ignore libedit (including its
15577 # possible alias of libreadline) while checking for everything else.
15578 LIBS_including_readline="$LIBS"
15579 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15581 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
15582 do :
15583 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15584 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15585 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15586 cat >>confdefs.h <<_ACEOF
15587 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15588 _ACEOF
15591 done
15594 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15596 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15597 if ${pgac_cv__builtin_bswap16+:} false; then :
15598 $as_echo_n "(cached) " >&6
15599 else
15600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15601 /* end confdefs.h. */
15604 call__builtin_bswap16(int x)
15606 return __builtin_bswap16(x);
15609 main ()
15613 return 0;
15615 _ACEOF
15616 if ac_fn_c_try_link "$LINENO"; then :
15617 pgac_cv__builtin_bswap16=yes
15618 else
15619 pgac_cv__builtin_bswap16=no
15621 rm -f core conftest.err conftest.$ac_objext \
15622 conftest$ac_exeext conftest.$ac_ext
15624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15625 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15626 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15628 cat >>confdefs.h <<_ACEOF
15629 #define HAVE__BUILTIN_BSWAP16 1
15630 _ACEOF
15633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15634 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15635 if ${pgac_cv__builtin_bswap32+:} false; then :
15636 $as_echo_n "(cached) " >&6
15637 else
15638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15639 /* end confdefs.h. */
15642 call__builtin_bswap32(int x)
15644 return __builtin_bswap32(x);
15647 main ()
15651 return 0;
15653 _ACEOF
15654 if ac_fn_c_try_link "$LINENO"; then :
15655 pgac_cv__builtin_bswap32=yes
15656 else
15657 pgac_cv__builtin_bswap32=no
15659 rm -f core conftest.err conftest.$ac_objext \
15660 conftest$ac_exeext conftest.$ac_ext
15662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15663 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15664 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15666 cat >>confdefs.h <<_ACEOF
15667 #define HAVE__BUILTIN_BSWAP32 1
15668 _ACEOF
15671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15672 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15673 if ${pgac_cv__builtin_bswap64+:} false; then :
15674 $as_echo_n "(cached) " >&6
15675 else
15676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15677 /* end confdefs.h. */
15680 call__builtin_bswap64(long int x)
15682 return __builtin_bswap64(x);
15685 main ()
15689 return 0;
15691 _ACEOF
15692 if ac_fn_c_try_link "$LINENO"; then :
15693 pgac_cv__builtin_bswap64=yes
15694 else
15695 pgac_cv__builtin_bswap64=no
15697 rm -f core conftest.err conftest.$ac_objext \
15698 conftest$ac_exeext conftest.$ac_ext
15700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15701 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15702 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15704 cat >>confdefs.h <<_ACEOF
15705 #define HAVE__BUILTIN_BSWAP64 1
15706 _ACEOF
15709 # We assume that we needn't test all widths of these explicitly:
15710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15711 $as_echo_n "checking for __builtin_clz... " >&6; }
15712 if ${pgac_cv__builtin_clz+:} false; then :
15713 $as_echo_n "(cached) " >&6
15714 else
15715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15716 /* end confdefs.h. */
15719 call__builtin_clz(unsigned int x)
15721 return __builtin_clz(x);
15724 main ()
15728 return 0;
15730 _ACEOF
15731 if ac_fn_c_try_link "$LINENO"; then :
15732 pgac_cv__builtin_clz=yes
15733 else
15734 pgac_cv__builtin_clz=no
15736 rm -f core conftest.err conftest.$ac_objext \
15737 conftest$ac_exeext conftest.$ac_ext
15739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15740 $as_echo "$pgac_cv__builtin_clz" >&6; }
15741 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15743 cat >>confdefs.h <<_ACEOF
15744 #define HAVE__BUILTIN_CLZ 1
15745 _ACEOF
15748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15749 $as_echo_n "checking for __builtin_ctz... " >&6; }
15750 if ${pgac_cv__builtin_ctz+:} false; then :
15751 $as_echo_n "(cached) " >&6
15752 else
15753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15754 /* end confdefs.h. */
15757 call__builtin_ctz(unsigned int x)
15759 return __builtin_ctz(x);
15762 main ()
15766 return 0;
15768 _ACEOF
15769 if ac_fn_c_try_link "$LINENO"; then :
15770 pgac_cv__builtin_ctz=yes
15771 else
15772 pgac_cv__builtin_ctz=no
15774 rm -f core conftest.err conftest.$ac_objext \
15775 conftest$ac_exeext conftest.$ac_ext
15777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15778 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15779 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15781 cat >>confdefs.h <<_ACEOF
15782 #define HAVE__BUILTIN_CTZ 1
15783 _ACEOF
15786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15787 $as_echo_n "checking for __builtin_popcount... " >&6; }
15788 if ${pgac_cv__builtin_popcount+:} false; then :
15789 $as_echo_n "(cached) " >&6
15790 else
15791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15792 /* end confdefs.h. */
15795 call__builtin_popcount(unsigned int x)
15797 return __builtin_popcount(x);
15800 main ()
15804 return 0;
15806 _ACEOF
15807 if ac_fn_c_try_link "$LINENO"; then :
15808 pgac_cv__builtin_popcount=yes
15809 else
15810 pgac_cv__builtin_popcount=no
15812 rm -f core conftest.err conftest.$ac_objext \
15813 conftest$ac_exeext conftest.$ac_ext
15815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15816 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15817 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15819 cat >>confdefs.h <<_ACEOF
15820 #define HAVE__BUILTIN_POPCOUNT 1
15821 _ACEOF
15824 # __builtin_frame_address may draw a diagnostic for non-constant argument,
15825 # so it needs a different test function.
15826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
15827 $as_echo_n "checking for __builtin_frame_address... " >&6; }
15828 if ${pgac_cv__builtin_frame_address+:} false; then :
15829 $as_echo_n "(cached) " >&6
15830 else
15831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15832 /* end confdefs.h. */
15834 void *
15835 call__builtin_frame_address(void)
15837 return __builtin_frame_address(0);
15840 main ()
15844 return 0;
15846 _ACEOF
15847 if ac_fn_c_try_link "$LINENO"; then :
15848 pgac_cv__builtin_frame_address=yes
15849 else
15850 pgac_cv__builtin_frame_address=no
15852 rm -f core conftest.err conftest.$ac_objext \
15853 conftest$ac_exeext conftest.$ac_ext
15855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5
15856 $as_echo "$pgac_cv__builtin_frame_address" >&6; }
15857 if test x"${pgac_cv__builtin_frame_address}" = xyes ; then
15859 cat >>confdefs.h <<_ACEOF
15860 #define HAVE__BUILTIN_FRAME_ADDRESS 1
15861 _ACEOF
15865 # We require 64-bit fseeko() to be available, but run this check anyway
15866 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
15867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15868 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15869 if ${ac_cv_sys_largefile_source+:} false; then :
15870 $as_echo_n "(cached) " >&6
15871 else
15872 while :; do
15873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15874 /* end confdefs.h. */
15875 #include <sys/types.h> /* for off_t */
15876 #include <stdio.h>
15878 main ()
15880 int (*fp) (FILE *, off_t, int) = fseeko;
15881 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15883 return 0;
15885 _ACEOF
15886 if ac_fn_c_try_link "$LINENO"; then :
15887 ac_cv_sys_largefile_source=no; break
15889 rm -f core conftest.err conftest.$ac_objext \
15890 conftest$ac_exeext conftest.$ac_ext
15891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15892 /* end confdefs.h. */
15893 #define _LARGEFILE_SOURCE 1
15894 #include <sys/types.h> /* for off_t */
15895 #include <stdio.h>
15897 main ()
15899 int (*fp) (FILE *, off_t, int) = fseeko;
15900 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15902 return 0;
15904 _ACEOF
15905 if ac_fn_c_try_link "$LINENO"; then :
15906 ac_cv_sys_largefile_source=1; break
15908 rm -f core conftest.err conftest.$ac_objext \
15909 conftest$ac_exeext conftest.$ac_ext
15910 ac_cv_sys_largefile_source=unknown
15911 break
15912 done
15914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15915 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15916 case $ac_cv_sys_largefile_source in #(
15917 no | unknown) ;;
15919 cat >>confdefs.h <<_ACEOF
15920 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15921 _ACEOF
15923 esac
15924 rm -rf conftest*
15926 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15927 # in glibc 2.1.3, but that breaks too many other things.
15928 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15929 if test $ac_cv_sys_largefile_source != unknown; then
15931 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15936 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15937 # by calling it, 2009-04-02
15938 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15939 # The Clang compiler raises a warning for an undeclared identifier that matches
15940 # a compiler builtin function. All extant Clang versions are affected, as of
15941 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
15942 # C and Objective C languages, but Clang does report an error under C++ and
15943 # Objective C++.
15945 # Passing -fno-builtin to the compiler would suppress this problem. That
15946 # strategy would have the advantage of being insensitive to stray warnings, but
15947 # it would make tests less realistic.
15948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15949 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15950 if ${ac_cv_c_decl_report+:} false; then :
15951 $as_echo_n "(cached) " >&6
15952 else
15953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15954 /* end confdefs.h. */
15957 main ()
15959 (void) strchr;
15961 return 0;
15963 _ACEOF
15964 if ac_fn_c_try_compile "$LINENO"; then :
15965 if test -s conftest.err; then :
15966 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15967 # valid AC_CHECK_DECL input. No library function is consistently available
15968 # on freestanding implementations, so test against a dummy declaration.
15969 # Include always-available headers on the off chance that they somehow
15970 # elicit warnings.
15971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15972 /* end confdefs.h. */
15973 #include <float.h>
15974 #include <limits.h>
15975 #include <stdarg.h>
15976 #include <stddef.h>
15977 extern void ac_decl (int, char *);
15979 main ()
15981 #ifdef __cplusplus
15982 (void) ac_decl ((int) 0, (char *) 0);
15983 (void) ac_decl;
15984 #else
15985 (void) ac_decl;
15986 #endif
15989 return 0;
15991 _ACEOF
15992 if ac_fn_c_try_compile "$LINENO"; then :
15993 if test -s conftest.err; then :
15994 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15995 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15996 as_fn_error $? "cannot detect from compiler exit status or warnings
15997 See \`config.log' for more details" "$LINENO" 5; }
15998 else
15999 ac_cv_c_decl_report=warning
16001 else
16002 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16003 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16004 as_fn_error $? "cannot compile a simple declaration test
16005 See \`config.log' for more details" "$LINENO" 5; }
16007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16008 else
16009 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16010 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16011 as_fn_error $? "compiler does not report undeclared identifiers
16012 See \`config.log' for more details" "$LINENO" 5; }
16014 else
16015 ac_cv_c_decl_report=error
16017 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
16020 $as_echo "$ac_cv_c_decl_report" >&6; }
16022 case $ac_cv_c_decl_report in
16023 warning) ac_c_decl_warn_flag=yes ;;
16024 *) ac_c_decl_warn_flag= ;;
16025 esac
16027 if test "$PORTNAME" != "solaris"; then :
16029 for ac_func in posix_fadvise
16030 do :
16031 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
16032 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
16033 cat >>confdefs.h <<_ACEOF
16034 #define HAVE_POSIX_FADVISE 1
16035 _ACEOF
16038 done
16040 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
16042 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
16043 ac_have_decl=1
16044 else
16045 ac_have_decl=0
16048 cat >>confdefs.h <<_ACEOF
16049 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
16050 _ACEOF
16053 fi # fi
16055 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
16057 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
16058 ac_have_decl=1
16059 else
16060 ac_have_decl=0
16063 cat >>confdefs.h <<_ACEOF
16064 #define HAVE_DECL_FDATASYNC $ac_have_decl
16065 _ACEOF
16067 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
16068 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
16069 ac_have_decl=1
16070 else
16071 ac_have_decl=0
16074 cat >>confdefs.h <<_ACEOF
16075 #define HAVE_DECL_STRLCAT $ac_have_decl
16076 _ACEOF
16077 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
16078 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
16079 ac_have_decl=1
16080 else
16081 ac_have_decl=0
16084 cat >>confdefs.h <<_ACEOF
16085 #define HAVE_DECL_STRLCPY $ac_have_decl
16086 _ACEOF
16087 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
16088 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
16089 ac_have_decl=1
16090 else
16091 ac_have_decl=0
16094 cat >>confdefs.h <<_ACEOF
16095 #define HAVE_DECL_STRNLEN $ac_have_decl
16096 _ACEOF
16099 # We can't use AC_REPLACE_FUNCS to replace these functions, because it
16100 # won't handle deployment target restrictions on macOS
16101 ac_fn_c_check_decl "$LINENO" "preadv" "ac_cv_have_decl_preadv" "#include <sys/uio.h>
16103 if test "x$ac_cv_have_decl_preadv" = xyes; then :
16104 ac_have_decl=1
16105 else
16106 ac_have_decl=0
16109 cat >>confdefs.h <<_ACEOF
16110 #define HAVE_DECL_PREADV $ac_have_decl
16111 _ACEOF
16112 if test $ac_have_decl = 1; then :
16114 else
16115 case " $LIBOBJS " in
16116 *" preadv.$ac_objext "* ) ;;
16117 *) LIBOBJS="$LIBOBJS preadv.$ac_objext"
16119 esac
16123 ac_fn_c_check_decl "$LINENO" "pwritev" "ac_cv_have_decl_pwritev" "#include <sys/uio.h>
16125 if test "x$ac_cv_have_decl_pwritev" = xyes; then :
16126 ac_have_decl=1
16127 else
16128 ac_have_decl=0
16131 cat >>confdefs.h <<_ACEOF
16132 #define HAVE_DECL_PWRITEV $ac_have_decl
16133 _ACEOF
16134 if test $ac_have_decl = 1; then :
16136 else
16137 case " $LIBOBJS " in
16138 *" pwritev.$ac_objext "* ) ;;
16139 *) LIBOBJS="$LIBOBJS pwritev.$ac_objext"
16141 esac
16146 # This is probably only present on macOS, but may as well check always
16147 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
16149 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
16150 ac_have_decl=1
16151 else
16152 ac_have_decl=0
16155 cat >>confdefs.h <<_ACEOF
16156 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
16157 _ACEOF
16160 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
16161 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
16162 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
16164 else
16165 case " $LIBOBJS " in
16166 *" explicit_bzero.$ac_objext "* ) ;;
16167 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
16169 esac
16173 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
16174 if test "x$ac_cv_func_getopt" = xyes; then :
16175 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
16177 else
16178 case " $LIBOBJS " in
16179 *" getopt.$ac_objext "* ) ;;
16180 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16182 esac
16186 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
16187 if test "x$ac_cv_func_getpeereid" = xyes; then :
16188 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16190 else
16191 case " $LIBOBJS " in
16192 *" getpeereid.$ac_objext "* ) ;;
16193 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
16195 esac
16199 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
16200 if test "x$ac_cv_func_inet_aton" = xyes; then :
16201 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
16203 else
16204 case " $LIBOBJS " in
16205 *" inet_aton.$ac_objext "* ) ;;
16206 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
16208 esac
16212 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
16213 if test "x$ac_cv_func_mkdtemp" = xyes; then :
16214 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
16216 else
16217 case " $LIBOBJS " in
16218 *" mkdtemp.$ac_objext "* ) ;;
16219 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
16221 esac
16225 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
16226 if test "x$ac_cv_func_strlcat" = xyes; then :
16227 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
16229 else
16230 case " $LIBOBJS " in
16231 *" strlcat.$ac_objext "* ) ;;
16232 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
16234 esac
16238 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
16239 if test "x$ac_cv_func_strlcpy" = xyes; then :
16240 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
16242 else
16243 case " $LIBOBJS " in
16244 *" strlcpy.$ac_objext "* ) ;;
16245 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
16247 esac
16251 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
16252 if test "x$ac_cv_func_strnlen" = xyes; then :
16253 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
16255 else
16256 case " $LIBOBJS " in
16257 *" strnlen.$ac_objext "* ) ;;
16258 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
16260 esac
16266 ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
16267 if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
16268 $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
16270 else
16271 case " $LIBOBJS " in
16272 *" pthread_barrier_wait.$ac_objext "* ) ;;
16273 *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
16275 esac
16281 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
16282 # Cygwin and (apparently, based on test results) Mingw both
16283 # have a broken strtof(), so substitute its implementation.
16284 # That's not a perfect fix, since it doesn't avoid double-rounding,
16285 # but we have no better options.
16286 case " $LIBOBJS " in
16287 *" strtof.$ac_objext "* ) ;;
16288 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16290 esac
16292 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
16293 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
16296 # Similarly, use system's getopt_long() only if system provides struct option.
16297 if test x"$ac_cv_type_struct_option" = xyes ; then
16298 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
16299 if test "x$ac_cv_func_getopt_long" = xyes; then :
16300 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
16302 else
16303 case " $LIBOBJS " in
16304 *" getopt_long.$ac_objext "* ) ;;
16305 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16307 esac
16312 else
16313 case " $LIBOBJS " in
16314 *" getopt_long.$ac_objext "* ) ;;
16315 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16317 esac
16321 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
16322 # (i.e., allow '-' as a flag character), so use our version on those platforms.
16323 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
16324 case " $LIBOBJS " in
16325 *" getopt.$ac_objext "* ) ;;
16326 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16328 esac
16332 # mingw has adopted a GNU-centric interpretation of optind/optreset,
16333 # so always use our version on Windows.
16334 if test "$PORTNAME" = "win32"; then
16335 case " $LIBOBJS " in
16336 *" getopt.$ac_objext "* ) ;;
16337 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16339 esac
16341 case " $LIBOBJS " in
16342 *" getopt_long.$ac_objext "* ) ;;
16343 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16345 esac
16349 # Win32 (really MinGW) support
16350 if test "$PORTNAME" = "win32"; then
16351 for ac_func in _configthreadlocale
16352 do :
16353 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16354 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16355 cat >>confdefs.h <<_ACEOF
16356 #define HAVE__CONFIGTHREADLOCALE 1
16357 _ACEOF
16360 done
16362 case " $LIBOBJS " in
16363 *" dirmod.$ac_objext "* ) ;;
16364 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16366 esac
16368 case " $LIBOBJS " in
16369 *" kill.$ac_objext "* ) ;;
16370 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16372 esac
16374 case " $LIBOBJS " in
16375 *" open.$ac_objext "* ) ;;
16376 *) LIBOBJS="$LIBOBJS open.$ac_objext"
16378 esac
16380 case " $LIBOBJS " in
16381 *" system.$ac_objext "* ) ;;
16382 *) LIBOBJS="$LIBOBJS system.$ac_objext"
16384 esac
16386 case " $LIBOBJS " in
16387 *" win32common.$ac_objext "* ) ;;
16388 *) LIBOBJS="$LIBOBJS win32common.$ac_objext"
16390 esac
16392 case " $LIBOBJS " in
16393 *" win32dlopen.$ac_objext "* ) ;;
16394 *) LIBOBJS="$LIBOBJS win32dlopen.$ac_objext"
16396 esac
16398 case " $LIBOBJS " in
16399 *" win32env.$ac_objext "* ) ;;
16400 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16402 esac
16404 case " $LIBOBJS " in
16405 *" win32error.$ac_objext "* ) ;;
16406 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16408 esac
16410 case " $LIBOBJS " in
16411 *" win32fdatasync.$ac_objext "* ) ;;
16412 *) LIBOBJS="$LIBOBJS win32fdatasync.$ac_objext"
16414 esac
16416 case " $LIBOBJS " in
16417 *" win32getrusage.$ac_objext "* ) ;;
16418 *) LIBOBJS="$LIBOBJS win32getrusage.$ac_objext"
16420 esac
16422 case " $LIBOBJS " in
16423 *" win32link.$ac_objext "* ) ;;
16424 *) LIBOBJS="$LIBOBJS win32link.$ac_objext"
16426 esac
16428 case " $LIBOBJS " in
16429 *" win32ntdll.$ac_objext "* ) ;;
16430 *) LIBOBJS="$LIBOBJS win32ntdll.$ac_objext"
16432 esac
16434 case " $LIBOBJS " in
16435 *" win32pread.$ac_objext "* ) ;;
16436 *) LIBOBJS="$LIBOBJS win32pread.$ac_objext"
16438 esac
16440 case " $LIBOBJS " in
16441 *" win32pwrite.$ac_objext "* ) ;;
16442 *) LIBOBJS="$LIBOBJS win32pwrite.$ac_objext"
16444 esac
16446 case " $LIBOBJS " in
16447 *" win32security.$ac_objext "* ) ;;
16448 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16450 esac
16452 case " $LIBOBJS " in
16453 *" win32setlocale.$ac_objext "* ) ;;
16454 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16456 esac
16458 case " $LIBOBJS " in
16459 *" win32stat.$ac_objext "* ) ;;
16460 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
16462 esac
16465 # Cygwin needs only a bit of that
16466 if test "$PORTNAME" = "cygwin"; then
16467 case " $LIBOBJS " in
16468 *" dirmod.$ac_objext "* ) ;;
16469 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16471 esac
16475 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16476 if test "x$ac_cv_func_syslog" = xyes; then :
16477 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16478 if test "x$ac_cv_header_syslog_h" = xyes; then :
16480 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16489 $as_echo_n "checking for opterr... " >&6; }
16490 if ${pgac_cv_var_int_opterr+:} false; then :
16491 $as_echo_n "(cached) " >&6
16492 else
16493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16494 /* end confdefs.h. */
16495 #include <unistd.h>
16497 main ()
16499 extern int opterr; opterr = 1;
16501 return 0;
16503 _ACEOF
16504 if ac_fn_c_try_link "$LINENO"; then :
16505 pgac_cv_var_int_opterr=yes
16506 else
16507 pgac_cv_var_int_opterr=no
16509 rm -f core conftest.err conftest.$ac_objext \
16510 conftest$ac_exeext conftest.$ac_ext
16512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16513 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16514 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16516 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16521 $as_echo_n "checking for optreset... " >&6; }
16522 if ${pgac_cv_var_int_optreset+:} false; then :
16523 $as_echo_n "(cached) " >&6
16524 else
16525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16526 /* end confdefs.h. */
16527 #include <unistd.h>
16529 main ()
16531 extern int optreset; optreset = 1;
16533 return 0;
16535 _ACEOF
16536 if ac_fn_c_try_link "$LINENO"; then :
16537 pgac_cv_var_int_optreset=yes
16538 else
16539 pgac_cv_var_int_optreset=no
16541 rm -f core conftest.err conftest.$ac_objext \
16542 conftest$ac_exeext conftest.$ac_ext
16544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16545 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16546 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16548 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16552 if test "$with_icu" = yes; then
16553 ac_save_CPPFLAGS=$CPPFLAGS
16554 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16556 # Verify we have ICU's header files
16557 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16558 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16560 else
16561 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16566 CPPFLAGS=$ac_save_CPPFLAGS
16569 if test "$with_llvm" = yes; then
16571 # Check which functionality is present
16572 SAVE_CPPFLAGS="$CPPFLAGS"
16573 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16574 ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16576 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16577 ac_have_decl=1
16578 else
16579 ac_have_decl=0
16582 cat >>confdefs.h <<_ACEOF
16583 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16584 _ACEOF
16586 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16588 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16589 ac_have_decl=1
16590 else
16591 ac_have_decl=0
16594 cat >>confdefs.h <<_ACEOF
16595 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16596 _ACEOF
16597 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16599 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16600 ac_have_decl=1
16601 else
16602 ac_have_decl=0
16605 cat >>confdefs.h <<_ACEOF
16606 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16607 _ACEOF
16609 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16611 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16612 ac_have_decl=1
16613 else
16614 ac_have_decl=0
16617 cat >>confdefs.h <<_ACEOF
16618 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16619 _ACEOF
16620 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16622 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16623 ac_have_decl=1
16624 else
16625 ac_have_decl=0
16628 cat >>confdefs.h <<_ACEOF
16629 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16630 _ACEOF
16632 CPPFLAGS="$SAVE_CPPFLAGS"
16636 # Lastly, restore full LIBS list and check for readline/libedit symbols
16637 LIBS="$LIBS_including_readline"
16639 if test "$with_readline" = yes; then
16640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
16641 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
16642 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
16643 $as_echo_n "(cached) " >&6
16644 else
16645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16646 /* end confdefs.h. */
16647 #include <stdio.h>
16648 #if defined(HAVE_READLINE_READLINE_H)
16649 #include <readline/readline.h>
16650 #elif defined(HAVE_EDITLINE_READLINE_H)
16651 #include <editline/readline.h>
16652 #elif defined(HAVE_READLINE_H)
16653 #include <readline.h>
16654 #endif
16657 main ()
16659 rl_completion_suppress_quote = 1;
16661 return 0;
16663 _ACEOF
16664 if ac_fn_c_try_link "$LINENO"; then :
16665 pgac_cv_var_rl_completion_suppress_quote=yes
16666 else
16667 pgac_cv_var_rl_completion_suppress_quote=no
16669 rm -f core conftest.err conftest.$ac_objext \
16670 conftest$ac_exeext conftest.$ac_ext
16672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
16673 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
16674 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
16676 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
16679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
16680 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
16681 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
16682 $as_echo_n "(cached) " >&6
16683 else
16684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16685 /* end confdefs.h. */
16686 #include <stdio.h>
16687 #if defined(HAVE_READLINE_READLINE_H)
16688 #include <readline/readline.h>
16689 #elif defined(HAVE_EDITLINE_READLINE_H)
16690 #include <editline/readline.h>
16691 #elif defined(HAVE_READLINE_H)
16692 #include <readline.h>
16693 #endif
16696 main ()
16698 rl_filename_quote_characters = "x";
16700 return 0;
16702 _ACEOF
16703 if ac_fn_c_try_link "$LINENO"; then :
16704 pgac_cv_var_rl_filename_quote_characters=yes
16705 else
16706 pgac_cv_var_rl_filename_quote_characters=no
16708 rm -f core conftest.err conftest.$ac_objext \
16709 conftest$ac_exeext conftest.$ac_ext
16711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
16712 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
16713 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
16715 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
16718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
16719 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
16720 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
16721 $as_echo_n "(cached) " >&6
16722 else
16723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16724 /* end confdefs.h. */
16725 #include <stdio.h>
16726 #if defined(HAVE_READLINE_READLINE_H)
16727 #include <readline/readline.h>
16728 #elif defined(HAVE_EDITLINE_READLINE_H)
16729 #include <editline/readline.h>
16730 #elif defined(HAVE_READLINE_H)
16731 #include <readline.h>
16732 #endif
16735 main ()
16737 rl_filename_quoting_function = 0;
16739 return 0;
16741 _ACEOF
16742 if ac_fn_c_try_link "$LINENO"; then :
16743 pgac_cv_var_rl_filename_quoting_function=yes
16744 else
16745 pgac_cv_var_rl_filename_quoting_function=no
16747 rm -f core conftest.err conftest.$ac_objext \
16748 conftest$ac_exeext conftest.$ac_ext
16750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
16751 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
16752 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
16754 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
16758 for ac_func in append_history history_truncate_file rl_completion_matches rl_filename_completion_function rl_reset_screen_size rl_variable_bind
16759 do :
16760 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16761 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16762 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16763 cat >>confdefs.h <<_ACEOF
16764 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16765 _ACEOF
16768 done
16773 # This test makes sure that run tests work at all. Sometimes a shared
16774 # library is found by the linker, but the runtime linker can't find it.
16775 # This check should come after all modifications of compiler or linker
16776 # variables, and before any other run tests.
16777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16778 $as_echo_n "checking test program... " >&6; }
16779 if test "$cross_compiling" = yes; then :
16780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16781 $as_echo "cross-compiling" >&6; }
16782 else
16783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16784 /* end confdefs.h. */
16785 int main() { return 0; }
16786 _ACEOF
16787 if ac_fn_c_try_run "$LINENO"; then :
16788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16789 $as_echo "ok" >&6; }
16790 else
16791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16792 $as_echo "failed" >&6; }
16793 as_fn_error $? "
16794 Could not execute a simple test program. This may be a problem
16795 related to locating shared libraries. Check the file 'config.log'
16796 for the exact reason." "$LINENO" 5
16798 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16799 conftest.$ac_objext conftest.beam conftest.$ac_ext
16803 # --------------------
16804 # Run tests below here
16805 # --------------------
16808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16809 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16810 if ${pgac_cv_type_long_int_64+:} false; then :
16811 $as_echo_n "(cached) " >&6
16812 else
16813 if test "$cross_compiling" = yes; then :
16814 # If cross-compiling, check the size reported by the compiler and
16815 # trust that the arithmetic works.
16816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16817 /* end confdefs.h. */
16820 main ()
16822 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16823 test_array [0] = 0;
16824 return test_array [0];
16827 return 0;
16829 _ACEOF
16830 if ac_fn_c_try_compile "$LINENO"; then :
16831 pgac_cv_type_long_int_64=yes
16832 else
16833 pgac_cv_type_long_int_64=no
16835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16836 else
16837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16838 /* end confdefs.h. */
16839 typedef long int ac_int64;
16842 * These are globals to discourage the compiler from folding all the
16843 * arithmetic tests down to compile-time constants.
16845 ac_int64 a = 20000001;
16846 ac_int64 b = 40000005;
16848 int does_int64_work()
16850 ac_int64 c,d;
16852 if (sizeof(ac_int64) != 8)
16853 return 0; /* definitely not the right size */
16855 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16856 c = a * b;
16857 d = (c + b) / b;
16858 if (d != a+1)
16859 return 0;
16860 return 1;
16864 main() {
16865 return (! does_int64_work());
16867 _ACEOF
16868 if ac_fn_c_try_run "$LINENO"; then :
16869 pgac_cv_type_long_int_64=yes
16870 else
16871 pgac_cv_type_long_int_64=no
16873 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16874 conftest.$ac_objext conftest.beam conftest.$ac_ext
16878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16879 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16881 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16882 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16884 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16889 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16890 pg_int64_type="long int"
16891 else
16892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16893 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16894 if ${pgac_cv_type_long_long_int_64+:} false; then :
16895 $as_echo_n "(cached) " >&6
16896 else
16897 if test "$cross_compiling" = yes; then :
16898 # If cross-compiling, check the size reported by the compiler and
16899 # trust that the arithmetic works.
16900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16901 /* end confdefs.h. */
16904 main ()
16906 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16907 test_array [0] = 0;
16908 return test_array [0];
16911 return 0;
16913 _ACEOF
16914 if ac_fn_c_try_compile "$LINENO"; then :
16915 pgac_cv_type_long_long_int_64=yes
16916 else
16917 pgac_cv_type_long_long_int_64=no
16919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16920 else
16921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16922 /* end confdefs.h. */
16923 typedef long long int ac_int64;
16926 * These are globals to discourage the compiler from folding all the
16927 * arithmetic tests down to compile-time constants.
16929 ac_int64 a = 20000001;
16930 ac_int64 b = 40000005;
16932 int does_int64_work()
16934 ac_int64 c,d;
16936 if (sizeof(ac_int64) != 8)
16937 return 0; /* definitely not the right size */
16939 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16940 c = a * b;
16941 d = (c + b) / b;
16942 if (d != a+1)
16943 return 0;
16944 return 1;
16948 main() {
16949 return (! does_int64_work());
16951 _ACEOF
16952 if ac_fn_c_try_run "$LINENO"; then :
16953 pgac_cv_type_long_long_int_64=yes
16954 else
16955 pgac_cv_type_long_long_int_64=no
16957 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16958 conftest.$ac_objext conftest.beam conftest.$ac_ext
16962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16963 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16965 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16966 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16968 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16972 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16973 pg_int64_type="long long int"
16974 else
16975 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16980 cat >>confdefs.h <<_ACEOF
16981 #define PG_INT64_TYPE $pg_int64_type
16982 _ACEOF
16985 # Select the printf length modifier that goes with that, too.
16986 if test x"$pg_int64_type" = x"long long int" ; then
16987 INT64_MODIFIER='"ll"'
16988 else
16989 INT64_MODIFIER='"l"'
16993 cat >>confdefs.h <<_ACEOF
16994 #define INT64_MODIFIER $INT64_MODIFIER
16995 _ACEOF
16998 # has to be down here, rather than with the other builtins, because
16999 # the test uses PG_INT64_TYPE.
17000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
17001 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
17002 if ${pgac_cv__builtin_op_overflow+:} false; then :
17003 $as_echo_n "(cached) " >&6
17004 else
17005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17006 /* end confdefs.h. */
17008 PG_INT64_TYPE a = 1;
17009 PG_INT64_TYPE b = 1;
17010 PG_INT64_TYPE result;
17011 int oflo;
17014 main ()
17016 oflo = __builtin_mul_overflow(a, b, &result);
17018 return 0;
17020 _ACEOF
17021 if ac_fn_c_try_link "$LINENO"; then :
17022 pgac_cv__builtin_op_overflow=yes
17023 else
17024 pgac_cv__builtin_op_overflow=no
17026 rm -f core conftest.err conftest.$ac_objext \
17027 conftest$ac_exeext conftest.$ac_ext
17029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
17030 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
17031 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
17033 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
17037 # Check size of void *, size_t (enables tweaks for > 32bit address space)
17038 # The cast to long int works around a bug in the HP C Compiler
17039 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17040 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17041 # This bug is HP SR number 8606223364.
17042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
17043 $as_echo_n "checking size of void *... " >&6; }
17044 if ${ac_cv_sizeof_void_p+:} false; then :
17045 $as_echo_n "(cached) " >&6
17046 else
17047 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
17049 else
17050 if test "$ac_cv_type_void_p" = yes; then
17051 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17052 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17053 as_fn_error 77 "cannot compute sizeof (void *)
17054 See \`config.log' for more details" "$LINENO" 5; }
17055 else
17056 ac_cv_sizeof_void_p=0
17061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
17062 $as_echo "$ac_cv_sizeof_void_p" >&6; }
17066 cat >>confdefs.h <<_ACEOF
17067 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
17068 _ACEOF
17071 # The cast to long int works around a bug in the HP C Compiler
17072 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17073 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17074 # This bug is HP SR number 8606223364.
17075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
17076 $as_echo_n "checking size of size_t... " >&6; }
17077 if ${ac_cv_sizeof_size_t+:} false; then :
17078 $as_echo_n "(cached) " >&6
17079 else
17080 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
17082 else
17083 if test "$ac_cv_type_size_t" = yes; then
17084 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17085 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17086 as_fn_error 77 "cannot compute sizeof (size_t)
17087 See \`config.log' for more details" "$LINENO" 5; }
17088 else
17089 ac_cv_sizeof_size_t=0
17094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
17095 $as_echo "$ac_cv_sizeof_size_t" >&6; }
17099 cat >>confdefs.h <<_ACEOF
17100 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
17101 _ACEOF
17104 # The cast to long int works around a bug in the HP C Compiler
17105 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17106 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17107 # This bug is HP SR number 8606223364.
17108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
17109 $as_echo_n "checking size of long... " >&6; }
17110 if ${ac_cv_sizeof_long+:} false; then :
17111 $as_echo_n "(cached) " >&6
17112 else
17113 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
17115 else
17116 if test "$ac_cv_type_long" = yes; then
17117 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17118 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17119 as_fn_error 77 "cannot compute sizeof (long)
17120 See \`config.log' for more details" "$LINENO" 5; }
17121 else
17122 ac_cv_sizeof_long=0
17127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
17128 $as_echo "$ac_cv_sizeof_long" >&6; }
17132 cat >>confdefs.h <<_ACEOF
17133 #define SIZEOF_LONG $ac_cv_sizeof_long
17134 _ACEOF
17138 # Determine memory alignment requirements for the basic C data types.
17140 # The cast to long int works around a bug in the HP C Compiler,
17141 # see AC_CHECK_SIZEOF for more information.
17142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
17143 $as_echo_n "checking alignment of short... " >&6; }
17144 if ${ac_cv_alignof_short+:} false; then :
17145 $as_echo_n "(cached) " >&6
17146 else
17147 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
17148 #ifndef offsetof
17149 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17150 #endif
17151 typedef struct { char x; short y; } ac__type_alignof_;"; then :
17153 else
17154 if test "$ac_cv_type_short" = yes; then
17155 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17156 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17157 as_fn_error 77 "cannot compute alignment of short
17158 See \`config.log' for more details" "$LINENO" 5; }
17159 else
17160 ac_cv_alignof_short=0
17165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
17166 $as_echo "$ac_cv_alignof_short" >&6; }
17170 cat >>confdefs.h <<_ACEOF
17171 #define ALIGNOF_SHORT $ac_cv_alignof_short
17172 _ACEOF
17175 # The cast to long int works around a bug in the HP C Compiler,
17176 # see AC_CHECK_SIZEOF for more information.
17177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
17178 $as_echo_n "checking alignment of int... " >&6; }
17179 if ${ac_cv_alignof_int+:} false; then :
17180 $as_echo_n "(cached) " >&6
17181 else
17182 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
17183 #ifndef offsetof
17184 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17185 #endif
17186 typedef struct { char x; int y; } ac__type_alignof_;"; then :
17188 else
17189 if test "$ac_cv_type_int" = yes; then
17190 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17191 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17192 as_fn_error 77 "cannot compute alignment of int
17193 See \`config.log' for more details" "$LINENO" 5; }
17194 else
17195 ac_cv_alignof_int=0
17200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
17201 $as_echo "$ac_cv_alignof_int" >&6; }
17205 cat >>confdefs.h <<_ACEOF
17206 #define ALIGNOF_INT $ac_cv_alignof_int
17207 _ACEOF
17210 # The cast to long int works around a bug in the HP C Compiler,
17211 # see AC_CHECK_SIZEOF for more information.
17212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17213 $as_echo_n "checking alignment of long... " >&6; }
17214 if ${ac_cv_alignof_long+:} false; then :
17215 $as_echo_n "(cached) " >&6
17216 else
17217 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
17218 #ifndef offsetof
17219 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17220 #endif
17221 typedef struct { char x; long y; } ac__type_alignof_;"; then :
17223 else
17224 if test "$ac_cv_type_long" = yes; then
17225 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17226 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17227 as_fn_error 77 "cannot compute alignment of long
17228 See \`config.log' for more details" "$LINENO" 5; }
17229 else
17230 ac_cv_alignof_long=0
17235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17236 $as_echo "$ac_cv_alignof_long" >&6; }
17240 cat >>confdefs.h <<_ACEOF
17241 #define ALIGNOF_LONG $ac_cv_alignof_long
17242 _ACEOF
17245 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17246 # The cast to long int works around a bug in the HP C Compiler,
17247 # see AC_CHECK_SIZEOF for more information.
17248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
17249 $as_echo_n "checking alignment of long long int... " >&6; }
17250 if ${ac_cv_alignof_long_long_int+:} false; then :
17251 $as_echo_n "(cached) " >&6
17252 else
17253 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
17254 #ifndef offsetof
17255 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17256 #endif
17257 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
17259 else
17260 if test "$ac_cv_type_long_long_int" = yes; then
17261 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17262 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17263 as_fn_error 77 "cannot compute alignment of long long int
17264 See \`config.log' for more details" "$LINENO" 5; }
17265 else
17266 ac_cv_alignof_long_long_int=0
17271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
17272 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
17276 cat >>confdefs.h <<_ACEOF
17277 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
17278 _ACEOF
17282 # The cast to long int works around a bug in the HP C Compiler,
17283 # see AC_CHECK_SIZEOF for more information.
17284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
17285 $as_echo_n "checking alignment of double... " >&6; }
17286 if ${ac_cv_alignof_double+:} false; then :
17287 $as_echo_n "(cached) " >&6
17288 else
17289 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
17290 #ifndef offsetof
17291 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17292 #endif
17293 typedef struct { char x; double y; } ac__type_alignof_;"; then :
17295 else
17296 if test "$ac_cv_type_double" = yes; then
17297 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17298 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17299 as_fn_error 77 "cannot compute alignment of double
17300 See \`config.log' for more details" "$LINENO" 5; }
17301 else
17302 ac_cv_alignof_double=0
17307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17308 $as_echo "$ac_cv_alignof_double" >&6; }
17312 cat >>confdefs.h <<_ACEOF
17313 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
17314 _ACEOF
17318 # Compute maximum alignment of any basic type.
17319 # We assume long's alignment is at least as strong as char, short, or int;
17320 # but we must check long long (if it is being used for int64) and double.
17321 # Note that we intentionally do not consider any types wider than 64 bits,
17322 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17323 # for disk and memory space.
17325 MAX_ALIGNOF=$ac_cv_alignof_long
17326 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17327 MAX_ALIGNOF=$ac_cv_alignof_double
17329 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17330 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17333 cat >>confdefs.h <<_ACEOF
17334 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17335 _ACEOF
17339 # Some platforms predefine the types int8, int16, etc. Only check
17340 # a (hopefully) representative subset.
17341 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17343 if test "x$ac_cv_type_int8" = xyes; then :
17345 cat >>confdefs.h <<_ACEOF
17346 #define HAVE_INT8 1
17347 _ACEOF
17351 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17353 if test "x$ac_cv_type_uint8" = xyes; then :
17355 cat >>confdefs.h <<_ACEOF
17356 #define HAVE_UINT8 1
17357 _ACEOF
17361 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17363 if test "x$ac_cv_type_int64" = xyes; then :
17365 cat >>confdefs.h <<_ACEOF
17366 #define HAVE_INT64 1
17367 _ACEOF
17371 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17373 if test "x$ac_cv_type_uint64" = xyes; then :
17375 cat >>confdefs.h <<_ACEOF
17376 #define HAVE_UINT64 1
17377 _ACEOF
17383 # Some compilers offer a 128-bit integer scalar type.
17384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17385 $as_echo_n "checking for __int128... " >&6; }
17386 if ${pgac_cv__128bit_int+:} false; then :
17387 $as_echo_n "(cached) " >&6
17388 else
17389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17390 /* end confdefs.h. */
17393 * We don't actually run this test, just link it to verify that any support
17394 * functions needed for __int128 are present.
17396 * These are globals to discourage the compiler from folding all the
17397 * arithmetic tests down to compile-time constants. We do not have
17398 * convenient support for 128bit literals at this point...
17400 __int128 a = 48828125;
17401 __int128 b = 97656250;
17404 main ()
17407 __int128 c,d;
17408 a = (a << 12) + 1; /* 200000000001 */
17409 b = (b << 12) + 5; /* 400000000005 */
17410 /* try the most relevant arithmetic ops */
17411 c = a * b;
17412 d = (c + b) / b;
17413 /* must use the results, else compiler may optimize arithmetic away */
17414 if (d != a+1)
17415 return 1;
17418 return 0;
17420 _ACEOF
17421 if ac_fn_c_try_link "$LINENO"; then :
17422 pgac_cv__128bit_int=yes
17423 else
17424 pgac_cv__128bit_int=no
17426 rm -f core conftest.err conftest.$ac_objext \
17427 conftest$ac_exeext conftest.$ac_ext
17429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17430 $as_echo "$pgac_cv__128bit_int" >&6; }
17431 if test x"$pgac_cv__128bit_int" = xyes ; then
17432 # Use of non-default alignment with __int128 tickles bugs in some compilers.
17433 # If not cross-compiling, we can test for bugs and disable use of __int128
17434 # with buggy compilers. If cross-compiling, hope for the best.
17435 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17437 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17438 if ${pgac_cv__128bit_int_bug+:} false; then :
17439 $as_echo_n "(cached) " >&6
17440 else
17441 if test "$cross_compiling" = yes; then :
17442 pgac_cv__128bit_int_bug="assuming ok"
17443 else
17444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17445 /* end confdefs.h. */
17447 /* This must match the corresponding code in c.h: */
17448 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17449 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17450 #elif defined(_MSC_VER)
17451 #define pg_attribute_aligned(a) __declspec(align(a))
17452 #endif
17453 typedef __int128 int128a
17454 #if defined(pg_attribute_aligned)
17455 pg_attribute_aligned(8)
17456 #endif
17458 int128a holder;
17459 void pass_by_val(void *buffer, int128a par) { holder = par; }
17462 main ()
17465 long int i64 = 97656225L << 12;
17466 int128a q;
17467 pass_by_val(main, (int128a) i64);
17468 q = (int128a) i64;
17469 if (q != holder)
17470 return 1;
17473 return 0;
17475 _ACEOF
17476 if ac_fn_c_try_run "$LINENO"; then :
17477 pgac_cv__128bit_int_bug=ok
17478 else
17479 pgac_cv__128bit_int_bug=broken
17481 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17482 conftest.$ac_objext conftest.beam conftest.$ac_ext
17486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17487 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17488 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17490 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17492 # The cast to long int works around a bug in the HP C Compiler,
17493 # see AC_CHECK_SIZEOF for more information.
17494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17495 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17496 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17497 $as_echo_n "(cached) " >&6
17498 else
17499 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
17500 #ifndef offsetof
17501 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17502 #endif
17503 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17505 else
17506 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17507 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17508 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17509 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17510 See \`config.log' for more details" "$LINENO" 5; }
17511 else
17512 ac_cv_alignof_PG_INT128_TYPE=0
17517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17518 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17522 cat >>confdefs.h <<_ACEOF
17523 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17524 _ACEOF
17530 # Check for various atomic operations now that we have checked how to declare
17531 # 64bit integers.
17532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17533 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17534 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17535 $as_echo_n "(cached) " >&6
17536 else
17537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17538 /* end confdefs.h. */
17541 main ()
17543 char lock = 0;
17544 __sync_lock_test_and_set(&lock, 1);
17545 __sync_lock_release(&lock);
17547 return 0;
17549 _ACEOF
17550 if ac_fn_c_try_link "$LINENO"; then :
17551 pgac_cv_gcc_sync_char_tas="yes"
17552 else
17553 pgac_cv_gcc_sync_char_tas="no"
17555 rm -f core conftest.err conftest.$ac_objext \
17556 conftest$ac_exeext conftest.$ac_ext
17558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17559 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17560 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17562 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17566 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17567 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17568 $as_echo_n "(cached) " >&6
17569 else
17570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17571 /* end confdefs.h. */
17574 main ()
17576 int lock = 0;
17577 __sync_lock_test_and_set(&lock, 1);
17578 __sync_lock_release(&lock);
17580 return 0;
17582 _ACEOF
17583 if ac_fn_c_try_link "$LINENO"; then :
17584 pgac_cv_gcc_sync_int32_tas="yes"
17585 else
17586 pgac_cv_gcc_sync_int32_tas="no"
17588 rm -f core conftest.err conftest.$ac_objext \
17589 conftest$ac_exeext conftest.$ac_ext
17591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17592 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17593 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17595 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17599 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17600 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17601 $as_echo_n "(cached) " >&6
17602 else
17603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17604 /* end confdefs.h. */
17607 main ()
17609 int val = 0;
17610 __sync_val_compare_and_swap(&val, 0, 37);
17612 return 0;
17614 _ACEOF
17615 if ac_fn_c_try_link "$LINENO"; then :
17616 pgac_cv_gcc_sync_int32_cas="yes"
17617 else
17618 pgac_cv_gcc_sync_int32_cas="no"
17620 rm -f core conftest.err conftest.$ac_objext \
17621 conftest$ac_exeext conftest.$ac_ext
17623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17624 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17625 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17627 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17631 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17632 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17633 $as_echo_n "(cached) " >&6
17634 else
17635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17636 /* end confdefs.h. */
17639 main ()
17641 PG_INT64_TYPE lock = 0;
17642 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17644 return 0;
17646 _ACEOF
17647 if ac_fn_c_try_link "$LINENO"; then :
17648 pgac_cv_gcc_sync_int64_cas="yes"
17649 else
17650 pgac_cv_gcc_sync_int64_cas="no"
17652 rm -f core conftest.err conftest.$ac_objext \
17653 conftest$ac_exeext conftest.$ac_ext
17655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17656 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17657 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17659 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17663 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17664 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17665 $as_echo_n "(cached) " >&6
17666 else
17667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17668 /* end confdefs.h. */
17671 main ()
17673 int val = 0;
17674 int expect = 0;
17675 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17677 return 0;
17679 _ACEOF
17680 if ac_fn_c_try_link "$LINENO"; then :
17681 pgac_cv_gcc_atomic_int32_cas="yes"
17682 else
17683 pgac_cv_gcc_atomic_int32_cas="no"
17685 rm -f core conftest.err conftest.$ac_objext \
17686 conftest$ac_exeext conftest.$ac_ext
17688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17689 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17690 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17692 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17696 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17697 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17698 $as_echo_n "(cached) " >&6
17699 else
17700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17701 /* end confdefs.h. */
17704 main ()
17706 PG_INT64_TYPE val = 0;
17707 PG_INT64_TYPE expect = 0;
17708 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17710 return 0;
17712 _ACEOF
17713 if ac_fn_c_try_link "$LINENO"; then :
17714 pgac_cv_gcc_atomic_int64_cas="yes"
17715 else
17716 pgac_cv_gcc_atomic_int64_cas="no"
17718 rm -f core conftest.err conftest.$ac_objext \
17719 conftest$ac_exeext conftest.$ac_ext
17721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17722 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17723 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17725 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17730 # Check for x86 cpuid instruction
17731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17732 $as_echo_n "checking for __get_cpuid... " >&6; }
17733 if ${pgac_cv__get_cpuid+:} false; then :
17734 $as_echo_n "(cached) " >&6
17735 else
17736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17737 /* end confdefs.h. */
17738 #include <cpuid.h>
17740 main ()
17742 unsigned int exx[4] = {0, 0, 0, 0};
17743 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17746 return 0;
17748 _ACEOF
17749 if ac_fn_c_try_link "$LINENO"; then :
17750 pgac_cv__get_cpuid="yes"
17751 else
17752 pgac_cv__get_cpuid="no"
17754 rm -f core conftest.err conftest.$ac_objext \
17755 conftest$ac_exeext conftest.$ac_ext
17757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17758 $as_echo "$pgac_cv__get_cpuid" >&6; }
17759 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17761 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17766 $as_echo_n "checking for __cpuid... " >&6; }
17767 if ${pgac_cv__cpuid+:} false; then :
17768 $as_echo_n "(cached) " >&6
17769 else
17770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17771 /* end confdefs.h. */
17772 #include <intrin.h>
17774 main ()
17776 unsigned int exx[4] = {0, 0, 0, 0};
17777 __get_cpuid(exx[0], 1);
17780 return 0;
17782 _ACEOF
17783 if ac_fn_c_try_link "$LINENO"; then :
17784 pgac_cv__cpuid="yes"
17785 else
17786 pgac_cv__cpuid="no"
17788 rm -f core conftest.err conftest.$ac_objext \
17789 conftest$ac_exeext conftest.$ac_ext
17791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17792 $as_echo "$pgac_cv__cpuid" >&6; }
17793 if test x"$pgac_cv__cpuid" = x"yes"; then
17795 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17799 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17801 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17802 # with the default compiler flags. If not, check if adding the -msse4.2
17803 # flag helps. CFLAGS_CRC is set to -msse4.2 if that's required.
17804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17805 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17806 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17807 $as_echo_n "(cached) " >&6
17808 else
17809 pgac_save_CFLAGS=$CFLAGS
17810 CFLAGS="$pgac_save_CFLAGS "
17811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17812 /* end confdefs.h. */
17813 #include <nmmintrin.h>
17815 main ()
17817 unsigned int crc = 0;
17818 crc = _mm_crc32_u8(crc, 0);
17819 crc = _mm_crc32_u32(crc, 0);
17820 /* return computed value, to prevent the above being optimized away */
17821 return crc == 0;
17823 return 0;
17825 _ACEOF
17826 if ac_fn_c_try_link "$LINENO"; then :
17827 pgac_cv_sse42_crc32_intrinsics_=yes
17828 else
17829 pgac_cv_sse42_crc32_intrinsics_=no
17831 rm -f core conftest.err conftest.$ac_objext \
17832 conftest$ac_exeext conftest.$ac_ext
17833 CFLAGS="$pgac_save_CFLAGS"
17835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17836 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17837 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17838 CFLAGS_CRC=""
17839 pgac_sse42_crc32_intrinsics=yes
17842 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17844 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17845 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17846 $as_echo_n "(cached) " >&6
17847 else
17848 pgac_save_CFLAGS=$CFLAGS
17849 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17851 /* end confdefs.h. */
17852 #include <nmmintrin.h>
17854 main ()
17856 unsigned int crc = 0;
17857 crc = _mm_crc32_u8(crc, 0);
17858 crc = _mm_crc32_u32(crc, 0);
17859 /* return computed value, to prevent the above being optimized away */
17860 return crc == 0;
17862 return 0;
17864 _ACEOF
17865 if ac_fn_c_try_link "$LINENO"; then :
17866 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17867 else
17868 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17870 rm -f core conftest.err conftest.$ac_objext \
17871 conftest$ac_exeext conftest.$ac_ext
17872 CFLAGS="$pgac_save_CFLAGS"
17874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17875 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17876 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17877 CFLAGS_CRC="-msse4.2"
17878 pgac_sse42_crc32_intrinsics=yes
17883 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17884 # define __SSE4_2__ in that case.
17885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17886 /* end confdefs.h. */
17889 main ()
17892 #ifndef __SSE4_2__
17893 #error __SSE4_2__ not defined
17894 #endif
17897 return 0;
17899 _ACEOF
17900 if ac_fn_c_try_compile "$LINENO"; then :
17901 SSE4_2_TARGETED=1
17903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17905 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17907 # First check if __crc32c* intrinsics can be used with the default compiler
17908 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17909 # CFLAGS_CRC is set if the extra flag is required.
17910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17911 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17912 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17913 $as_echo_n "(cached) " >&6
17914 else
17915 pgac_save_CFLAGS=$CFLAGS
17916 CFLAGS="$pgac_save_CFLAGS "
17917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17918 /* end confdefs.h. */
17919 #include <arm_acle.h>
17921 main ()
17923 unsigned int crc = 0;
17924 crc = __crc32cb(crc, 0);
17925 crc = __crc32ch(crc, 0);
17926 crc = __crc32cw(crc, 0);
17927 crc = __crc32cd(crc, 0);
17928 /* return computed value, to prevent the above being optimized away */
17929 return crc == 0;
17931 return 0;
17933 _ACEOF
17934 if ac_fn_c_try_link "$LINENO"; then :
17935 pgac_cv_armv8_crc32c_intrinsics_=yes
17936 else
17937 pgac_cv_armv8_crc32c_intrinsics_=no
17939 rm -f core conftest.err conftest.$ac_objext \
17940 conftest$ac_exeext conftest.$ac_ext
17941 CFLAGS="$pgac_save_CFLAGS"
17943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17944 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17945 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17946 CFLAGS_CRC=""
17947 pgac_armv8_crc32c_intrinsics=yes
17950 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17952 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17953 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17954 $as_echo_n "(cached) " >&6
17955 else
17956 pgac_save_CFLAGS=$CFLAGS
17957 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17959 /* end confdefs.h. */
17960 #include <arm_acle.h>
17962 main ()
17964 unsigned int crc = 0;
17965 crc = __crc32cb(crc, 0);
17966 crc = __crc32ch(crc, 0);
17967 crc = __crc32cw(crc, 0);
17968 crc = __crc32cd(crc, 0);
17969 /* return computed value, to prevent the above being optimized away */
17970 return crc == 0;
17972 return 0;
17974 _ACEOF
17975 if ac_fn_c_try_link "$LINENO"; then :
17976 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17977 else
17978 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17980 rm -f core conftest.err conftest.$ac_objext \
17981 conftest$ac_exeext conftest.$ac_ext
17982 CFLAGS="$pgac_save_CFLAGS"
17984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17985 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17986 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17987 CFLAGS_CRC="-march=armv8-a+crc"
17988 pgac_armv8_crc32c_intrinsics=yes
17993 # Check for LoongArch CRC intrinsics to do CRC calculations.
17995 # Check if __builtin_loongarch_crcc_* intrinsics can be used
17996 # with the default compiler flags.
17997 { $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
17998 $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; }
17999 if ${pgac_cv_loongarch_crc32c_intrinsics+:} false; then :
18000 $as_echo_n "(cached) " >&6
18001 else
18002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18003 /* end confdefs.h. */
18006 main ()
18008 unsigned int crc = 0;
18009 crc = __builtin_loongarch_crcc_w_b_w(0, crc);
18010 crc = __builtin_loongarch_crcc_w_h_w(0, crc);
18011 crc = __builtin_loongarch_crcc_w_w_w(0, crc);
18012 crc = __builtin_loongarch_crcc_w_d_w(0, crc);
18013 /* return computed value, to prevent the above being optimized away */
18014 return crc == 0;
18016 return 0;
18018 _ACEOF
18019 if ac_fn_c_try_link "$LINENO"; then :
18020 pgac_cv_loongarch_crc32c_intrinsics=yes
18021 else
18022 pgac_cv_loongarch_crc32c_intrinsics=no
18024 rm -f core conftest.err conftest.$ac_objext \
18025 conftest$ac_exeext conftest.$ac_ext
18027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_loongarch_crc32c_intrinsics" >&5
18028 $as_echo "$pgac_cv_loongarch_crc32c_intrinsics" >&6; }
18029 if test x"$pgac_cv_loongarch_crc32c_intrinsics" = x"yes"; then
18030 pgac_loongarch_crc32c_intrinsics=yes
18036 # Select CRC-32C implementation.
18038 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
18039 # use the special CRC instructions for calculating CRC-32C. If we're not
18040 # targeting such a processor, but we can nevertheless produce code that uses
18041 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
18042 # implementations and select which one to use at runtime, depending on whether
18043 # SSE 4.2 is supported by the processor we're running on.
18045 # Similarly, if we are targeting an ARM processor that has the CRC
18046 # instructions that are part of the ARMv8 CRC Extension, use them. And if
18047 # we're not targeting such a processor, but can nevertheless produce code that
18048 # uses the CRC instructions, compile both, and select at runtime.
18050 # You can skip the runtime check by setting the appropriate USE_*_CRC32 flag to 1
18051 # in the template or configure command line.
18053 # If we are targeting a LoongArch processor, CRC instructions are
18054 # always available (at least on 64 bit), so no runtime check is needed.
18055 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
18056 # Use Intel SSE 4.2 if available.
18057 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
18058 USE_SSE42_CRC32C=1
18059 else
18060 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
18061 # the runtime check.
18062 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
18063 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
18064 else
18065 # Use ARM CRC Extension if available.
18066 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_CRC" = x""; then
18067 USE_ARMV8_CRC32C=1
18068 else
18069 # ARM CRC Extension, with runtime check?
18070 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
18071 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
18072 else
18073 # LoongArch CRCC instructions.
18074 if test x"$pgac_loongarch_crc32c_intrinsics" = x"yes"; then
18075 USE_LOONGARCH_CRC32C=1
18076 else
18077 # fall back to slicing-by-8 algorithm, which doesn't require any
18078 # special CPU support.
18079 USE_SLICING_BY_8_CRC32C=1
18087 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
18088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
18089 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
18090 if test x"$USE_SSE42_CRC32C" = x"1"; then
18092 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
18094 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
18095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
18096 $as_echo "SSE 4.2" >&6; }
18097 else
18098 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18100 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18102 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
18103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
18104 $as_echo "SSE 4.2 with runtime check" >&6; }
18105 else
18106 if test x"$USE_ARMV8_CRC32C" = x"1"; then
18108 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
18110 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
18111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
18112 $as_echo "ARMv8 CRC instructions" >&6; }
18113 else
18114 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18116 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18118 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
18119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
18120 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
18121 else
18122 if test x"$USE_LOONGARCH_CRC32C" = x"1"; then
18124 $as_echo "#define USE_LOONGARCH_CRC32C 1" >>confdefs.h
18126 PG_CRC32C_OBJS="pg_crc32c_loongarch.o"
18127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: LoongArch CRCC instructions" >&5
18128 $as_echo "LoongArch CRCC instructions" >&6; }
18129 else
18131 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
18133 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
18134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
18135 $as_echo "slicing-by-8" >&6; }
18144 # Select semaphore implementation type.
18145 if test "$PORTNAME" != "win32"; then
18146 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
18147 # Need sem_open for this
18148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
18149 $as_echo_n "checking for library containing sem_open... " >&6; }
18150 if ${ac_cv_search_sem_open+:} false; then :
18151 $as_echo_n "(cached) " >&6
18152 else
18153 ac_func_search_save_LIBS=$LIBS
18154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18155 /* end confdefs.h. */
18157 /* Override any GCC internal prototype to avoid an error.
18158 Use char because int might match the return type of a GCC
18159 builtin and then its argument prototype would still apply. */
18160 #ifdef __cplusplus
18161 extern "C"
18162 #endif
18163 char sem_open ();
18165 main ()
18167 return sem_open ();
18169 return 0;
18171 _ACEOF
18172 for ac_lib in '' rt pthread; do
18173 if test -z "$ac_lib"; then
18174 ac_res="none required"
18175 else
18176 ac_res=-l$ac_lib
18177 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18179 if ac_fn_c_try_link "$LINENO"; then :
18180 ac_cv_search_sem_open=$ac_res
18182 rm -f core conftest.err conftest.$ac_objext \
18183 conftest$ac_exeext
18184 if ${ac_cv_search_sem_open+:} false; then :
18185 break
18187 done
18188 if ${ac_cv_search_sem_open+:} false; then :
18190 else
18191 ac_cv_search_sem_open=no
18193 rm conftest.$ac_ext
18194 LIBS=$ac_func_search_save_LIBS
18196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18197 $as_echo "$ac_cv_search_sem_open" >&6; }
18198 ac_res=$ac_cv_search_sem_open
18199 if test "$ac_res" != no; then :
18200 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18201 USE_NAMED_POSIX_SEMAPHORES=1
18205 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18206 # Need sem_init for this
18207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18208 $as_echo_n "checking for library containing sem_init... " >&6; }
18209 if ${ac_cv_search_sem_init+:} false; then :
18210 $as_echo_n "(cached) " >&6
18211 else
18212 ac_func_search_save_LIBS=$LIBS
18213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18214 /* end confdefs.h. */
18216 /* Override any GCC internal prototype to avoid an error.
18217 Use char because int might match the return type of a GCC
18218 builtin and then its argument prototype would still apply. */
18219 #ifdef __cplusplus
18220 extern "C"
18221 #endif
18222 char sem_init ();
18224 main ()
18226 return sem_init ();
18228 return 0;
18230 _ACEOF
18231 for ac_lib in '' rt pthread; do
18232 if test -z "$ac_lib"; then
18233 ac_res="none required"
18234 else
18235 ac_res=-l$ac_lib
18236 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18238 if ac_fn_c_try_link "$LINENO"; then :
18239 ac_cv_search_sem_init=$ac_res
18241 rm -f core conftest.err conftest.$ac_objext \
18242 conftest$ac_exeext
18243 if ${ac_cv_search_sem_init+:} false; then :
18244 break
18246 done
18247 if ${ac_cv_search_sem_init+:} false; then :
18249 else
18250 ac_cv_search_sem_init=no
18252 rm conftest.$ac_ext
18253 LIBS=$ac_func_search_save_LIBS
18255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18256 $as_echo "$ac_cv_search_sem_init" >&6; }
18257 ac_res=$ac_cv_search_sem_init
18258 if test "$ac_res" != no; then :
18259 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18260 USE_UNNAMED_POSIX_SEMAPHORES=1
18264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18265 $as_echo_n "checking which semaphore API to use... " >&6; }
18266 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18268 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18270 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18271 sematype="named POSIX"
18272 else
18273 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18275 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18277 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18278 sematype="unnamed POSIX"
18279 else
18281 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18283 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18284 sematype="System V"
18287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18288 $as_echo "$sematype" >&6; }
18289 else
18291 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18293 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18297 # Select shared-memory implementation type.
18298 if test "$PORTNAME" != "win32"; then
18300 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18302 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18303 else
18305 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18307 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18310 # Select random number source. If a TLS library is used then it will be the
18311 # first choice, else the native platform sources (Windows API or /dev/urandom)
18312 # will be used.
18313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18314 $as_echo_n "checking which random number source to use... " >&6; }
18315 if test x"$with_ssl" = x"openssl" ; then
18316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18317 $as_echo "OpenSSL" >&6; }
18318 elif test x"$PORTNAME" = x"win32" ; then
18319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18320 $as_echo "Windows native" >&6; }
18321 elif test x"$cross_compiling" = x"yes"; then
18322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming /dev/urandom" >&5
18323 $as_echo "assuming /dev/urandom" >&6; }
18324 else
18325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18326 $as_echo "/dev/urandom" >&6; }
18327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18328 $as_echo_n "checking for /dev/urandom... " >&6; }
18329 if ${ac_cv_file__dev_urandom+:} false; then :
18330 $as_echo_n "(cached) " >&6
18331 else
18332 test "$cross_compiling" = yes &&
18333 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18334 if test -r "/dev/urandom"; then
18335 ac_cv_file__dev_urandom=yes
18336 else
18337 ac_cv_file__dev_urandom=no
18340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18341 $as_echo "$ac_cv_file__dev_urandom" >&6; }
18342 if test "x$ac_cv_file__dev_urandom" = xyes; then :
18347 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
18348 as_fn_error $? "
18349 no source of strong random numbers was found
18350 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
18354 # If not set in template file, set bytes to use libc memset()
18355 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18356 MEMSET_LOOP_LIMIT=1024
18359 cat >>confdefs.h <<_ACEOF
18360 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18361 _ACEOF
18365 if test "$enable_nls" = yes ; then
18367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18368 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18369 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18370 $as_echo_n "(cached) " >&6
18371 else
18372 ac_func_search_save_LIBS=$LIBS
18373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18374 /* end confdefs.h. */
18376 /* Override any GCC internal prototype to avoid an error.
18377 Use char because int might match the return type of a GCC
18378 builtin and then its argument prototype would still apply. */
18379 #ifdef __cplusplus
18380 extern "C"
18381 #endif
18382 char bind_textdomain_codeset ();
18384 main ()
18386 return bind_textdomain_codeset ();
18388 return 0;
18390 _ACEOF
18391 for ac_lib in '' intl; do
18392 if test -z "$ac_lib"; then
18393 ac_res="none required"
18394 else
18395 ac_res=-l$ac_lib
18396 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18398 if ac_fn_c_try_link "$LINENO"; then :
18399 ac_cv_search_bind_textdomain_codeset=$ac_res
18401 rm -f core conftest.err conftest.$ac_objext \
18402 conftest$ac_exeext
18403 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18404 break
18406 done
18407 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18409 else
18410 ac_cv_search_bind_textdomain_codeset=no
18412 rm conftest.$ac_ext
18413 LIBS=$ac_func_search_save_LIBS
18415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18416 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18417 ac_res=$ac_cv_search_bind_textdomain_codeset
18418 if test "$ac_res" != no; then :
18419 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18421 else
18422 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18425 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18426 if test "x$ac_cv_header_libintl_h" = xyes; then :
18428 else
18429 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18433 if test -z "$MSGFMT"; then
18434 for ac_prog in msgfmt
18436 # Extract the first word of "$ac_prog", so it can be a program name with args.
18437 set dummy $ac_prog; ac_word=$2
18438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18439 $as_echo_n "checking for $ac_word... " >&6; }
18440 if ${ac_cv_path_MSGFMT+:} false; then :
18441 $as_echo_n "(cached) " >&6
18442 else
18443 case $MSGFMT in
18444 [\\/]* | ?:[\\/]*)
18445 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18449 for as_dir in $PATH
18451 IFS=$as_save_IFS
18452 test -z "$as_dir" && as_dir=.
18453 for ac_exec_ext in '' $ac_executable_extensions; do
18454 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18455 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18456 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18457 break 2
18459 done
18460 done
18461 IFS=$as_save_IFS
18464 esac
18466 MSGFMT=$ac_cv_path_MSGFMT
18467 if test -n "$MSGFMT"; then
18468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18469 $as_echo "$MSGFMT" >&6; }
18470 else
18471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18472 $as_echo "no" >&6; }
18476 test -n "$MSGFMT" && break
18477 done
18479 else
18480 # Report the value of MSGFMT in configure's output in all cases.
18481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18482 $as_echo_n "checking for MSGFMT... " >&6; }
18483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18484 $as_echo "$MSGFMT" >&6; }
18487 if test -z "$MSGFMT"; then
18488 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18491 $as_echo_n "checking for msgfmt flags... " >&6; }
18492 if ${pgac_cv_msgfmt_flags+:} false; then :
18493 $as_echo_n "(cached) " >&6
18494 else
18495 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18496 pgac_cv_msgfmt_flags=-c
18499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18500 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18501 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18503 if test -z "$MSGMERGE"; then
18504 for ac_prog in msgmerge
18506 # Extract the first word of "$ac_prog", so it can be a program name with args.
18507 set dummy $ac_prog; ac_word=$2
18508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18509 $as_echo_n "checking for $ac_word... " >&6; }
18510 if ${ac_cv_path_MSGMERGE+:} false; then :
18511 $as_echo_n "(cached) " >&6
18512 else
18513 case $MSGMERGE in
18514 [\\/]* | ?:[\\/]*)
18515 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18519 for as_dir in $PATH
18521 IFS=$as_save_IFS
18522 test -z "$as_dir" && as_dir=.
18523 for ac_exec_ext in '' $ac_executable_extensions; do
18524 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18525 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18526 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18527 break 2
18529 done
18530 done
18531 IFS=$as_save_IFS
18534 esac
18536 MSGMERGE=$ac_cv_path_MSGMERGE
18537 if test -n "$MSGMERGE"; then
18538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18539 $as_echo "$MSGMERGE" >&6; }
18540 else
18541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18542 $as_echo "no" >&6; }
18546 test -n "$MSGMERGE" && break
18547 done
18549 else
18550 # Report the value of MSGMERGE in configure's output in all cases.
18551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18552 $as_echo_n "checking for MSGMERGE... " >&6; }
18553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18554 $as_echo "$MSGMERGE" >&6; }
18557 if test -z "$XGETTEXT"; then
18558 for ac_prog in xgettext
18560 # Extract the first word of "$ac_prog", so it can be a program name with args.
18561 set dummy $ac_prog; ac_word=$2
18562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18563 $as_echo_n "checking for $ac_word... " >&6; }
18564 if ${ac_cv_path_XGETTEXT+:} false; then :
18565 $as_echo_n "(cached) " >&6
18566 else
18567 case $XGETTEXT in
18568 [\\/]* | ?:[\\/]*)
18569 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18572 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18573 for as_dir in $PATH
18575 IFS=$as_save_IFS
18576 test -z "$as_dir" && as_dir=.
18577 for ac_exec_ext in '' $ac_executable_extensions; do
18578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18579 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18580 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18581 break 2
18583 done
18584 done
18585 IFS=$as_save_IFS
18588 esac
18590 XGETTEXT=$ac_cv_path_XGETTEXT
18591 if test -n "$XGETTEXT"; then
18592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18593 $as_echo "$XGETTEXT" >&6; }
18594 else
18595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18596 $as_echo "no" >&6; }
18600 test -n "$XGETTEXT" && break
18601 done
18603 else
18604 # Report the value of XGETTEXT in configure's output in all cases.
18605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18606 $as_echo_n "checking for XGETTEXT... " >&6; }
18607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18608 $as_echo "$XGETTEXT" >&6; }
18614 # Check for Tcl configuration script tclConfig.sh
18615 if test "$with_tcl" = yes; then
18616 if test -z "$TCLSH"; then
18617 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18619 # Extract the first word of "$ac_prog", so it can be a program name with args.
18620 set dummy $ac_prog; ac_word=$2
18621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18622 $as_echo_n "checking for $ac_word... " >&6; }
18623 if ${ac_cv_path_TCLSH+:} false; then :
18624 $as_echo_n "(cached) " >&6
18625 else
18626 case $TCLSH in
18627 [\\/]* | ?:[\\/]*)
18628 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18631 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18632 for as_dir in $PATH
18634 IFS=$as_save_IFS
18635 test -z "$as_dir" && as_dir=.
18636 for ac_exec_ext in '' $ac_executable_extensions; do
18637 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18638 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18639 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18640 break 2
18642 done
18643 done
18644 IFS=$as_save_IFS
18647 esac
18649 TCLSH=$ac_cv_path_TCLSH
18650 if test -n "$TCLSH"; then
18651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18652 $as_echo "$TCLSH" >&6; }
18653 else
18654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18655 $as_echo "no" >&6; }
18659 test -n "$TCLSH" && break
18660 done
18662 else
18663 # Report the value of TCLSH in configure's output in all cases.
18664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18665 $as_echo_n "checking for TCLSH... " >&6; }
18666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18667 $as_echo "$TCLSH" >&6; }
18670 if test x"$TCLSH" = x""; then
18671 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18675 $as_echo_n "checking for tclConfig.sh... " >&6; }
18676 # Let user override test
18677 if test -z "$TCL_CONFIG_SH"; then
18678 pgac_test_dirs="$with_tclconfig"
18680 set X $pgac_test_dirs; shift
18681 if test $# -eq 0; then
18682 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18683 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18684 # On newer macOS, $auto_path frequently doesn't include the place
18685 # where tclConfig.sh actually lives. Append that to the end, so as not
18686 # to break cases where a non-default Tcl installation is being used.
18687 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18688 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18690 set X $pgac_test_dirs; shift
18693 for pgac_dir do
18694 if test -r "$pgac_dir/tclConfig.sh"; then
18695 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18696 break
18698 done
18701 if test -z "$TCL_CONFIG_SH"; then
18702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18703 $as_echo "no" >&6; }
18704 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18705 else
18706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18707 $as_echo "$TCL_CONFIG_SH" >&6; }
18712 . "$TCL_CONFIG_SH"
18713 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18714 eval TCL_LIBS=\"$TCL_LIBS\"
18715 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18716 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18718 if test "$TCL_SHARED_BUILD" != 1; then
18719 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18720 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18722 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18723 ac_save_CPPFLAGS=$CPPFLAGS
18724 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18725 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18726 if test "x$ac_cv_header_tcl_h" = xyes; then :
18728 else
18729 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18733 CPPFLAGS=$ac_save_CPPFLAGS
18736 # check for <perl.h>
18737 if test "$with_perl" = yes; then
18738 ac_save_CPPFLAGS=$CPPFLAGS
18739 CPPFLAGS="$CPPFLAGS $perl_includespec"
18740 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18742 if test "x$ac_cv_header_perl_h" = xyes; then :
18744 else
18745 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18749 # While we're at it, check that we can link to libperl.
18750 # On most platforms, if perl.h is there then libperl.so will be too, but at
18751 # this writing Debian packages them separately. There is no known reason to
18752 # waste cycles on separate probes for the Tcl or Python libraries, though.
18753 # On some Red Hat platforms, the link attempt can fail if we don't use
18754 # CFLAGS_SL while building the test program.
18755 ac_save_CFLAGS=$CFLAGS
18756 CFLAGS="$CFLAGS $CFLAGS_SL"
18757 pgac_save_LIBS=$LIBS
18758 LIBS="$perl_embed_ldflags"
18759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18760 $as_echo_n "checking for libperl... " >&6; }
18761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18762 /* end confdefs.h. */
18764 #include <EXTERN.h>
18765 #include <perl.h>
18768 main ()
18770 perl_alloc();
18772 return 0;
18774 _ACEOF
18775 if ac_fn_c_try_link "$LINENO"; then :
18776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18777 $as_echo "yes" >&6; }
18778 else
18779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18780 $as_echo "no" >&6; }
18781 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18783 rm -f core conftest.err conftest.$ac_objext \
18784 conftest$ac_exeext conftest.$ac_ext
18785 LIBS=$pgac_save_LIBS
18786 CFLAGS=$ac_save_CFLAGS
18787 CPPFLAGS=$ac_save_CPPFLAGS
18790 # check for <Python.h>
18791 if test "$with_python" = yes; then
18792 ac_save_CPPFLAGS=$CPPFLAGS
18793 CPPFLAGS="$python_includespec $CPPFLAGS"
18794 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18795 if test "x$ac_cv_header_Python_h" = xyes; then :
18797 else
18798 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18802 CPPFLAGS=$ac_save_CPPFLAGS
18806 # Check for documentation-building tools
18808 if test -z "$XMLLINT"; then
18809 for ac_prog in xmllint
18811 # Extract the first word of "$ac_prog", so it can be a program name with args.
18812 set dummy $ac_prog; ac_word=$2
18813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18814 $as_echo_n "checking for $ac_word... " >&6; }
18815 if ${ac_cv_path_XMLLINT+:} false; then :
18816 $as_echo_n "(cached) " >&6
18817 else
18818 case $XMLLINT in
18819 [\\/]* | ?:[\\/]*)
18820 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18823 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18824 for as_dir in $PATH
18826 IFS=$as_save_IFS
18827 test -z "$as_dir" && as_dir=.
18828 for ac_exec_ext in '' $ac_executable_extensions; do
18829 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18830 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18831 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18832 break 2
18834 done
18835 done
18836 IFS=$as_save_IFS
18839 esac
18841 XMLLINT=$ac_cv_path_XMLLINT
18842 if test -n "$XMLLINT"; then
18843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18844 $as_echo "$XMLLINT" >&6; }
18845 else
18846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18847 $as_echo "no" >&6; }
18851 test -n "$XMLLINT" && break
18852 done
18854 else
18855 # Report the value of XMLLINT in configure's output in all cases.
18856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18857 $as_echo_n "checking for XMLLINT... " >&6; }
18858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18859 $as_echo "$XMLLINT" >&6; }
18862 if test -z "$XSLTPROC"; then
18863 for ac_prog in xsltproc
18865 # Extract the first word of "$ac_prog", so it can be a program name with args.
18866 set dummy $ac_prog; ac_word=$2
18867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18868 $as_echo_n "checking for $ac_word... " >&6; }
18869 if ${ac_cv_path_XSLTPROC+:} false; then :
18870 $as_echo_n "(cached) " >&6
18871 else
18872 case $XSLTPROC in
18873 [\\/]* | ?:[\\/]*)
18874 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18878 for as_dir in $PATH
18880 IFS=$as_save_IFS
18881 test -z "$as_dir" && as_dir=.
18882 for ac_exec_ext in '' $ac_executable_extensions; do
18883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18884 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18886 break 2
18888 done
18889 done
18890 IFS=$as_save_IFS
18893 esac
18895 XSLTPROC=$ac_cv_path_XSLTPROC
18896 if test -n "$XSLTPROC"; then
18897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18898 $as_echo "$XSLTPROC" >&6; }
18899 else
18900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18901 $as_echo "no" >&6; }
18905 test -n "$XSLTPROC" && break
18906 done
18908 else
18909 # Report the value of XSLTPROC in configure's output in all cases.
18910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18911 $as_echo_n "checking for XSLTPROC... " >&6; }
18912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18913 $as_echo "$XSLTPROC" >&6; }
18916 if test -z "$FOP"; then
18917 for ac_prog in fop
18919 # Extract the first word of "$ac_prog", so it can be a program name with args.
18920 set dummy $ac_prog; ac_word=$2
18921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18922 $as_echo_n "checking for $ac_word... " >&6; }
18923 if ${ac_cv_path_FOP+:} false; then :
18924 $as_echo_n "(cached) " >&6
18925 else
18926 case $FOP in
18927 [\\/]* | ?:[\\/]*)
18928 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18931 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18932 for as_dir in $PATH
18934 IFS=$as_save_IFS
18935 test -z "$as_dir" && as_dir=.
18936 for ac_exec_ext in '' $ac_executable_extensions; do
18937 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18938 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18939 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18940 break 2
18942 done
18943 done
18944 IFS=$as_save_IFS
18947 esac
18949 FOP=$ac_cv_path_FOP
18950 if test -n "$FOP"; then
18951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18952 $as_echo "$FOP" >&6; }
18953 else
18954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18955 $as_echo "no" >&6; }
18959 test -n "$FOP" && break
18960 done
18962 else
18963 # Report the value of FOP in configure's output in all cases.
18964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18965 $as_echo_n "checking for FOP... " >&6; }
18966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18967 $as_echo "$FOP" >&6; }
18970 if test -z "$DBTOEPUB"; then
18971 for ac_prog in dbtoepub
18973 # Extract the first word of "$ac_prog", so it can be a program name with args.
18974 set dummy $ac_prog; ac_word=$2
18975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18976 $as_echo_n "checking for $ac_word... " >&6; }
18977 if ${ac_cv_path_DBTOEPUB+:} false; then :
18978 $as_echo_n "(cached) " >&6
18979 else
18980 case $DBTOEPUB in
18981 [\\/]* | ?:[\\/]*)
18982 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18986 for as_dir in $PATH
18988 IFS=$as_save_IFS
18989 test -z "$as_dir" && as_dir=.
18990 for ac_exec_ext in '' $ac_executable_extensions; do
18991 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18992 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18994 break 2
18996 done
18997 done
18998 IFS=$as_save_IFS
19001 esac
19003 DBTOEPUB=$ac_cv_path_DBTOEPUB
19004 if test -n "$DBTOEPUB"; then
19005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19006 $as_echo "$DBTOEPUB" >&6; }
19007 else
19008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19009 $as_echo "no" >&6; }
19013 test -n "$DBTOEPUB" && break
19014 done
19016 else
19017 # Report the value of DBTOEPUB in configure's output in all cases.
19018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
19019 $as_echo_n "checking for DBTOEPUB... " >&6; }
19020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19021 $as_echo "$DBTOEPUB" >&6; }
19026 # Check for test tools
19028 if test "$enable_tap_tests" = yes; then
19029 # Make sure we know where prove is.
19030 if test -z "$PROVE"; then
19031 for ac_prog in prove
19033 # Extract the first word of "$ac_prog", so it can be a program name with args.
19034 set dummy $ac_prog; ac_word=$2
19035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19036 $as_echo_n "checking for $ac_word... " >&6; }
19037 if ${ac_cv_path_PROVE+:} false; then :
19038 $as_echo_n "(cached) " >&6
19039 else
19040 case $PROVE in
19041 [\\/]* | ?:[\\/]*)
19042 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
19045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19046 for as_dir in $PATH
19048 IFS=$as_save_IFS
19049 test -z "$as_dir" && as_dir=.
19050 for ac_exec_ext in '' $ac_executable_extensions; do
19051 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19052 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
19053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19054 break 2
19056 done
19057 done
19058 IFS=$as_save_IFS
19061 esac
19063 PROVE=$ac_cv_path_PROVE
19064 if test -n "$PROVE"; then
19065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19066 $as_echo "$PROVE" >&6; }
19067 else
19068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19069 $as_echo "no" >&6; }
19073 test -n "$PROVE" && break
19074 done
19076 else
19077 # Report the value of PROVE in configure's output in all cases.
19078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
19079 $as_echo_n "checking for PROVE... " >&6; }
19080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19081 $as_echo "$PROVE" >&6; }
19084 if test -z "$PROVE"; then
19085 as_fn_error $? "prove not found" "$LINENO" 5
19087 # Check for necessary Perl modules. You might think we should use
19088 # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
19089 # installation than perl, eg on MSys, so we have to check using prove.
19090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
19091 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
19092 __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__
19093 modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
19094 if test $? -eq 0; then
19095 # log the module version details, but don't show them interactively
19096 echo "$modulestderr" >&5
19097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19098 $as_echo "yes" >&6; }
19099 else
19100 # on failure, though, show the results to the user
19101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modulestderr" >&5
19102 $as_echo "$modulestderr" >&6; }
19103 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
19107 # If compiler will take -Wl,--as-needed (or various platform-specific
19108 # spellings thereof) then add that to LDFLAGS. This is much easier than
19109 # trying to filter LIBS to the minimum for each executable.
19110 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
19111 # libreadline; therefore we postpone testing it until we know what library
19112 # dependencies readline has. The test code will try to link with $LIBS.
19113 if test "$with_readline" = yes; then
19114 link_test_func=readline
19115 else
19116 link_test_func=exit
19119 if test "$PORTNAME" = "darwin"; then
19120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS" >&5
19121 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS... " >&6; }
19122 if ${pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs+:} false; then :
19123 $as_echo_n "(cached) " >&6
19124 else
19125 pgac_save_LDFLAGS=$LDFLAGS
19126 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19127 if test "$cross_compiling" = yes; then :
19128 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs="assuming no"
19129 else
19130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19131 /* end confdefs.h. */
19132 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19134 main ()
19138 return 0;
19140 _ACEOF
19141 if ac_fn_c_try_run "$LINENO"; then :
19142 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=yes
19143 else
19144 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=no
19146 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19147 conftest.$ac_objext conftest.beam conftest.$ac_ext
19150 LDFLAGS="$pgac_save_LDFLAGS"
19152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&5
19153 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&6; }
19154 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" = x"yes"; then
19155 LDFLAGS="${LDFLAGS} -Wl,-dead_strip_dylibs"
19159 elif test "$PORTNAME" = "openbsd"; then
19160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS" >&5
19161 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS... " >&6; }
19162 if ${pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic+:} false; then :
19163 $as_echo_n "(cached) " >&6
19164 else
19165 pgac_save_LDFLAGS=$LDFLAGS
19166 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19167 if test "$cross_compiling" = yes; then :
19168 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic="assuming no"
19169 else
19170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19171 /* end confdefs.h. */
19172 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19174 main ()
19178 return 0;
19180 _ACEOF
19181 if ac_fn_c_try_run "$LINENO"; then :
19182 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=yes
19183 else
19184 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=no
19186 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19187 conftest.$ac_objext conftest.beam conftest.$ac_ext
19190 LDFLAGS="$pgac_save_LDFLAGS"
19192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&5
19193 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&6; }
19194 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" = x"yes"; then
19195 LDFLAGS="${LDFLAGS} -Wl,-Bdynamic"
19199 else
19200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed, for LDFLAGS" >&5
19201 $as_echo_n "checking whether $CC supports -Wl,--as-needed, for LDFLAGS... " >&6; }
19202 if ${pgac_cv_prog_cc_LDFLAGS__Wl___as_needed+:} false; then :
19203 $as_echo_n "(cached) " >&6
19204 else
19205 pgac_save_LDFLAGS=$LDFLAGS
19206 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19207 if test "$cross_compiling" = yes; then :
19208 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed="assuming no"
19209 else
19210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19211 /* end confdefs.h. */
19212 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19214 main ()
19218 return 0;
19220 _ACEOF
19221 if ac_fn_c_try_run "$LINENO"; then :
19222 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=yes
19223 else
19224 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=no
19226 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19227 conftest.$ac_objext conftest.beam conftest.$ac_ext
19230 LDFLAGS="$pgac_save_LDFLAGS"
19232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&5
19233 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&6; }
19234 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" = x"yes"; then
19235 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
19241 # For linkers that understand --export-dynamic, add that to the LDFLAGS_EX_BE
19242 # (backend specific ldflags). One some platforms this will always fail (e.g.,
19243 # windows), but on others it depends on the choice of linker (e.g., solaris).
19244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE" >&5
19245 $as_echo_n "checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE... " >&6; }
19246 if ${pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic+:} false; then :
19247 $as_echo_n "(cached) " >&6
19248 else
19249 pgac_save_LDFLAGS=$LDFLAGS
19250 LDFLAGS="$pgac_save_LDFLAGS -Wl,--export-dynamic"
19251 if test "$cross_compiling" = yes; then :
19252 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic="assuming no"
19253 else
19254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19255 /* end confdefs.h. */
19256 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19258 main ()
19262 return 0;
19264 _ACEOF
19265 if ac_fn_c_try_run "$LINENO"; then :
19266 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=yes
19267 else
19268 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=no
19270 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19271 conftest.$ac_objext conftest.beam conftest.$ac_ext
19274 LDFLAGS="$pgac_save_LDFLAGS"
19276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&5
19277 $as_echo "$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&6; }
19278 if test x"$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" = x"yes"; then
19279 LDFLAGS_EX_BE="${LDFLAGS_EX_BE} -Wl,--export-dynamic"
19284 # Create compiler version string
19285 if test x"$GCC" = x"yes" ; then
19286 cc_string=`${CC} --version | sed q`
19287 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19288 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19289 cc_string=`${CC} -V 2>&1 | sed q`
19290 else
19291 cc_string=$CC
19295 cat >>confdefs.h <<_ACEOF
19296 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19297 _ACEOF
19300 # Supply a numeric version string for use by 3rd party add-ons
19301 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19302 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
19303 $AWK '{printf "%d%04d", $1, $2}'`"
19305 cat >>confdefs.h <<_ACEOF
19306 #define PG_VERSION_NUM $PG_VERSION_NUM
19307 _ACEOF
19311 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19312 # literally, so that it's possible to override it at build time using
19313 # a command like "make ... PG_SYSROOT=path". This has to be done after
19314 # we've finished all configure checks that depend on CPPFLAGS.
19315 # The same for LDFLAGS, too.
19316 if test x"$PG_SYSROOT" != x; then
19317 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19318 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19323 # Begin output steps
19325 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19326 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19327 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19328 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19329 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19330 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19331 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19332 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19333 # Currently only used when LLVM is used
19334 if test "$with_llvm" = yes ; then
19335 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19336 $as_echo "$as_me: using CXX=$CXX" >&6;}
19337 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19338 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19339 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19340 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19341 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19342 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19343 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19344 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19347 # prepare build tree if outside source tree
19348 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19349 # Note 2: /bin/pwd might be better than shell's built-in at getting
19350 # a symlink-free name.
19351 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19352 vpath_build=no
19353 else
19354 vpath_build=yes
19355 if test "$no_create" != yes; then
19356 $as_echo_n "preparing build tree... " >&6
19357 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19358 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19359 || as_fn_error $? "failed" "$LINENO" 5
19360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19361 $as_echo "done" >&6; }
19367 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19370 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}"
19373 if test "$PORTNAME" = "win32"; then
19374 ac_config_commands="$ac_config_commands check_win32_symlinks"
19378 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19381 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19384 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19387 cat >confcache <<\_ACEOF
19388 # This file is a shell script that caches the results of configure
19389 # tests run on this system so they can be shared between configure
19390 # scripts and configure runs, see configure's option --config-cache.
19391 # It is not useful on other systems. If it contains results you don't
19392 # want to keep, you may remove or edit it.
19394 # config.status only pays attention to the cache file if you give it
19395 # the --recheck option to rerun configure.
19397 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19398 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19399 # following values.
19401 _ACEOF
19403 # The following way of writing the cache mishandles newlines in values,
19404 # but we know of no workaround that is simple, portable, and efficient.
19405 # So, we kill variables containing newlines.
19406 # Ultrix sh set writes to stderr and can't be redirected directly,
19407 # and sets the high bit in the cache file unless we assign to the vars.
19409 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19410 eval ac_val=\$$ac_var
19411 case $ac_val in #(
19412 *${as_nl}*)
19413 case $ac_var in #(
19414 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19415 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19416 esac
19417 case $ac_var in #(
19418 _ | IFS | as_nl) ;; #(
19419 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19420 *) { eval $ac_var=; unset $ac_var;} ;;
19421 esac ;;
19422 esac
19423 done
19425 (set) 2>&1 |
19426 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19427 *${as_nl}ac_space=\ *)
19428 # `set' does not quote correctly, so add quotes: double-quote
19429 # substitution turns \\\\ into \\, and sed turns \\ into \.
19430 sed -n \
19431 "s/'/'\\\\''/g;
19432 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19433 ;; #(
19435 # `set' quotes correctly as required by POSIX, so do not add quotes.
19436 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19438 esac |
19439 sort
19441 sed '
19442 /^ac_cv_env_/b end
19443 t clear
19444 :clear
19445 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19446 t end
19447 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19448 :end' >>confcache
19449 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19450 if test -w "$cache_file"; then
19451 if test "x$cache_file" != "x/dev/null"; then
19452 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19453 $as_echo "$as_me: updating cache $cache_file" >&6;}
19454 if test ! -f "$cache_file" || test -h "$cache_file"; then
19455 cat confcache >"$cache_file"
19456 else
19457 case $cache_file in #(
19458 */* | ?:*)
19459 mv -f confcache "$cache_file"$$ &&
19460 mv -f "$cache_file"$$ "$cache_file" ;; #(
19462 mv -f confcache "$cache_file" ;;
19463 esac
19466 else
19467 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19468 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19471 rm -f confcache
19473 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19474 # Let make expand exec_prefix.
19475 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19477 DEFS=-DHAVE_CONFIG_H
19479 ac_libobjs=
19480 ac_ltlibobjs=
19482 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19483 # 1. Remove the extension, and $U if already installed.
19484 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19485 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19486 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19487 # will be set to the directory where LIBOBJS objects are built.
19488 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19489 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19490 done
19491 LIBOBJS=$ac_libobjs
19493 LTLIBOBJS=$ac_ltlibobjs
19498 : "${CONFIG_STATUS=./config.status}"
19499 ac_write_fail=0
19500 ac_clean_files_save=$ac_clean_files
19501 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19502 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19503 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19504 as_write_fail=0
19505 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19506 #! $SHELL
19507 # Generated by $as_me.
19508 # Run this file to recreate the current configuration.
19509 # Compiler output produced by configure, useful for debugging
19510 # configure, is in config.log if it exists.
19512 debug=false
19513 ac_cs_recheck=false
19514 ac_cs_silent=false
19516 SHELL=\${CONFIG_SHELL-$SHELL}
19517 export SHELL
19518 _ASEOF
19519 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19520 ## -------------------- ##
19521 ## M4sh Initialization. ##
19522 ## -------------------- ##
19524 # Be more Bourne compatible
19525 DUALCASE=1; export DUALCASE # for MKS sh
19526 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19527 emulate sh
19528 NULLCMD=:
19529 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19530 # is contrary to our usage. Disable this feature.
19531 alias -g '${1+"$@"}'='"$@"'
19532 setopt NO_GLOB_SUBST
19533 else
19534 case `(set -o) 2>/dev/null` in #(
19535 *posix*) :
19536 set -o posix ;; #(
19537 *) :
19539 esac
19543 as_nl='
19545 export as_nl
19546 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19547 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19548 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19549 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19550 # Prefer a ksh shell builtin over an external printf program on Solaris,
19551 # but without wasting forks for bash or zsh.
19552 if test -z "$BASH_VERSION$ZSH_VERSION" \
19553 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19554 as_echo='print -r --'
19555 as_echo_n='print -rn --'
19556 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19557 as_echo='printf %s\n'
19558 as_echo_n='printf %s'
19559 else
19560 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19561 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19562 as_echo_n='/usr/ucb/echo -n'
19563 else
19564 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19565 as_echo_n_body='eval
19566 arg=$1;
19567 case $arg in #(
19568 *"$as_nl"*)
19569 expr "X$arg" : "X\\(.*\\)$as_nl";
19570 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19571 esac;
19572 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19574 export as_echo_n_body
19575 as_echo_n='sh -c $as_echo_n_body as_echo'
19577 export as_echo_body
19578 as_echo='sh -c $as_echo_body as_echo'
19581 # The user is always right.
19582 if test "${PATH_SEPARATOR+set}" != set; then
19583 PATH_SEPARATOR=:
19584 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19585 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19586 PATH_SEPARATOR=';'
19591 # IFS
19592 # We need space, tab and new line, in precisely that order. Quoting is
19593 # there to prevent editors from complaining about space-tab.
19594 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19595 # splitting by setting IFS to empty value.)
19596 IFS=" "" $as_nl"
19598 # Find who we are. Look in the path if we contain no directory separator.
19599 as_myself=
19600 case $0 in #((
19601 *[\\/]* ) as_myself=$0 ;;
19602 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19603 for as_dir in $PATH
19605 IFS=$as_save_IFS
19606 test -z "$as_dir" && as_dir=.
19607 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19608 done
19609 IFS=$as_save_IFS
19612 esac
19613 # We did not find ourselves, most probably we were run as `sh COMMAND'
19614 # in which case we are not to be found in the path.
19615 if test "x$as_myself" = x; then
19616 as_myself=$0
19618 if test ! -f "$as_myself"; then
19619 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19620 exit 1
19623 # Unset variables that we do not need and which cause bugs (e.g. in
19624 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19625 # suppresses any "Segmentation fault" message there. '((' could
19626 # trigger a bug in pdksh 5.2.14.
19627 for as_var in BASH_ENV ENV MAIL MAILPATH
19628 do eval test x\${$as_var+set} = xset \
19629 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19630 done
19631 PS1='$ '
19632 PS2='> '
19633 PS4='+ '
19635 # NLS nuisances.
19636 LC_ALL=C
19637 export LC_ALL
19638 LANGUAGE=C
19639 export LANGUAGE
19641 # CDPATH.
19642 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19645 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19646 # ----------------------------------------
19647 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19648 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19649 # script with STATUS, using 1 if that was 0.
19650 as_fn_error ()
19652 as_status=$1; test $as_status -eq 0 && as_status=1
19653 if test "$4"; then
19654 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19655 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19657 $as_echo "$as_me: error: $2" >&2
19658 as_fn_exit $as_status
19659 } # as_fn_error
19662 # as_fn_set_status STATUS
19663 # -----------------------
19664 # Set $? to STATUS, without forking.
19665 as_fn_set_status ()
19667 return $1
19668 } # as_fn_set_status
19670 # as_fn_exit STATUS
19671 # -----------------
19672 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19673 as_fn_exit ()
19675 set +e
19676 as_fn_set_status $1
19677 exit $1
19678 } # as_fn_exit
19680 # as_fn_unset VAR
19681 # ---------------
19682 # Portably unset VAR.
19683 as_fn_unset ()
19685 { eval $1=; unset $1;}
19687 as_unset=as_fn_unset
19688 # as_fn_append VAR VALUE
19689 # ----------------------
19690 # Append the text in VALUE to the end of the definition contained in VAR. Take
19691 # advantage of any shell optimizations that allow amortized linear growth over
19692 # repeated appends, instead of the typical quadratic growth present in naive
19693 # implementations.
19694 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19695 eval 'as_fn_append ()
19697 eval $1+=\$2
19699 else
19700 as_fn_append ()
19702 eval $1=\$$1\$2
19704 fi # as_fn_append
19706 # as_fn_arith ARG...
19707 # ------------------
19708 # Perform arithmetic evaluation on the ARGs, and store the result in the
19709 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19710 # must be portable across $(()) and expr.
19711 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19712 eval 'as_fn_arith ()
19714 as_val=$(( $* ))
19716 else
19717 as_fn_arith ()
19719 as_val=`expr "$@" || test $? -eq 1`
19721 fi # as_fn_arith
19724 if expr a : '\(a\)' >/dev/null 2>&1 &&
19725 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19726 as_expr=expr
19727 else
19728 as_expr=false
19731 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19732 as_basename=basename
19733 else
19734 as_basename=false
19737 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19738 as_dirname=dirname
19739 else
19740 as_dirname=false
19743 as_me=`$as_basename -- "$0" ||
19744 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19745 X"$0" : 'X\(//\)$' \| \
19746 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19747 $as_echo X/"$0" |
19748 sed '/^.*\/\([^/][^/]*\)\/*$/{
19749 s//\1/
19752 /^X\/\(\/\/\)$/{
19753 s//\1/
19756 /^X\/\(\/\).*/{
19757 s//\1/
19760 s/.*/./; q'`
19762 # Avoid depending upon Character Ranges.
19763 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19764 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19765 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19766 as_cr_digits='0123456789'
19767 as_cr_alnum=$as_cr_Letters$as_cr_digits
19769 ECHO_C= ECHO_N= ECHO_T=
19770 case `echo -n x` in #(((((
19771 -n*)
19772 case `echo 'xy\c'` in
19773 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19774 xy) ECHO_C='\c';;
19775 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19776 ECHO_T=' ';;
19777 esac;;
19779 ECHO_N='-n';;
19780 esac
19782 rm -f conf$$ conf$$.exe conf$$.file
19783 if test -d conf$$.dir; then
19784 rm -f conf$$.dir/conf$$.file
19785 else
19786 rm -f conf$$.dir
19787 mkdir conf$$.dir 2>/dev/null
19789 if (echo >conf$$.file) 2>/dev/null; then
19790 if ln -s conf$$.file conf$$ 2>/dev/null; then
19791 as_ln_s='ln -s'
19792 # ... but there are two gotchas:
19793 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19794 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19795 # In both cases, we have to default to `cp -pR'.
19796 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19797 as_ln_s='cp -pR'
19798 elif ln conf$$.file conf$$ 2>/dev/null; then
19799 as_ln_s=ln
19800 else
19801 as_ln_s='cp -pR'
19803 else
19804 as_ln_s='cp -pR'
19806 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19807 rmdir conf$$.dir 2>/dev/null
19810 # as_fn_mkdir_p
19811 # -------------
19812 # Create "$as_dir" as a directory, including parents if necessary.
19813 as_fn_mkdir_p ()
19816 case $as_dir in #(
19817 -*) as_dir=./$as_dir;;
19818 esac
19819 test -d "$as_dir" || eval $as_mkdir_p || {
19820 as_dirs=
19821 while :; do
19822 case $as_dir in #(
19823 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19824 *) as_qdir=$as_dir;;
19825 esac
19826 as_dirs="'$as_qdir' $as_dirs"
19827 as_dir=`$as_dirname -- "$as_dir" ||
19828 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19829 X"$as_dir" : 'X\(//\)[^/]' \| \
19830 X"$as_dir" : 'X\(//\)$' \| \
19831 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19832 $as_echo X"$as_dir" |
19833 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19834 s//\1/
19837 /^X\(\/\/\)[^/].*/{
19838 s//\1/
19841 /^X\(\/\/\)$/{
19842 s//\1/
19845 /^X\(\/\).*/{
19846 s//\1/
19849 s/.*/./; q'`
19850 test -d "$as_dir" && break
19851 done
19852 test -z "$as_dirs" || eval "mkdir $as_dirs"
19853 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19856 } # as_fn_mkdir_p
19857 if mkdir -p . 2>/dev/null; then
19858 as_mkdir_p='mkdir -p "$as_dir"'
19859 else
19860 test -d ./-p && rmdir ./-p
19861 as_mkdir_p=false
19865 # as_fn_executable_p FILE
19866 # -----------------------
19867 # Test if FILE is an executable regular file.
19868 as_fn_executable_p ()
19870 test -f "$1" && test -x "$1"
19871 } # as_fn_executable_p
19872 as_test_x='test -x'
19873 as_executable_p=as_fn_executable_p
19875 # Sed expression to map a string onto a valid CPP name.
19876 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19878 # Sed expression to map a string onto a valid variable name.
19879 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19882 exec 6>&1
19883 ## ----------------------------------- ##
19884 ## Main body of $CONFIG_STATUS script. ##
19885 ## ----------------------------------- ##
19886 _ASEOF
19887 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19889 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19890 # Save the log message, to keep $0 and so on meaningful, and to
19891 # report actual input values of CONFIG_FILES etc. instead of their
19892 # values after options handling.
19893 ac_log="
19894 This file was extended by PostgreSQL $as_me 17devel, which was
19895 generated by GNU Autoconf 2.69. Invocation command line was
19897 CONFIG_FILES = $CONFIG_FILES
19898 CONFIG_HEADERS = $CONFIG_HEADERS
19899 CONFIG_LINKS = $CONFIG_LINKS
19900 CONFIG_COMMANDS = $CONFIG_COMMANDS
19901 $ $0 $@
19903 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19906 _ACEOF
19908 case $ac_config_files in *"
19909 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19910 esac
19912 case $ac_config_headers in *"
19913 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19914 esac
19917 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19918 # Files that config.status was made for.
19919 config_files="$ac_config_files"
19920 config_headers="$ac_config_headers"
19921 config_links="$ac_config_links"
19922 config_commands="$ac_config_commands"
19924 _ACEOF
19926 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19927 ac_cs_usage="\
19928 \`$as_me' instantiates files and other configuration actions
19929 from templates according to the current configuration. Unless the files
19930 and actions are specified as TAGs, all are instantiated by default.
19932 Usage: $0 [OPTION]... [TAG]...
19934 -h, --help print this help, then exit
19935 -V, --version print version number and configuration settings, then exit
19936 --config print configuration, then exit
19937 -q, --quiet, --silent
19938 do not print progress messages
19939 -d, --debug don't remove temporary files
19940 --recheck update $as_me by reconfiguring in the same conditions
19941 --file=FILE[:TEMPLATE]
19942 instantiate the configuration file FILE
19943 --header=FILE[:TEMPLATE]
19944 instantiate the configuration header FILE
19946 Configuration files:
19947 $config_files
19949 Configuration headers:
19950 $config_headers
19952 Configuration links:
19953 $config_links
19955 Configuration commands:
19956 $config_commands
19958 Report bugs to <pgsql-bugs@lists.postgresql.org>.
19959 PostgreSQL home page: <https://www.postgresql.org/>."
19961 _ACEOF
19962 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19963 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19964 ac_cs_version="\\
19965 PostgreSQL config.status 17devel
19966 configured by $0, generated by GNU Autoconf 2.69,
19967 with options \\"\$ac_cs_config\\"
19969 Copyright (C) 2012 Free Software Foundation, Inc.
19970 This config.status script is free software; the Free Software Foundation
19971 gives unlimited permission to copy, distribute and modify it."
19973 ac_pwd='$ac_pwd'
19974 srcdir='$srcdir'
19975 INSTALL='$INSTALL'
19976 MKDIR_P='$MKDIR_P'
19977 AWK='$AWK'
19978 test -n "\$AWK" || AWK=awk
19979 _ACEOF
19981 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19982 # The default lists apply if the user does not specify any file.
19983 ac_need_defaults=:
19984 while test $# != 0
19986 case $1 in
19987 --*=?*)
19988 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19989 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19990 ac_shift=:
19992 --*=)
19993 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19994 ac_optarg=
19995 ac_shift=:
19998 ac_option=$1
19999 ac_optarg=$2
20000 ac_shift=shift
20002 esac
20004 case $ac_option in
20005 # Handling of the options.
20006 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20007 ac_cs_recheck=: ;;
20008 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20009 $as_echo "$ac_cs_version"; exit ;;
20010 --config | --confi | --conf | --con | --co | --c )
20011 $as_echo "$ac_cs_config"; exit ;;
20012 --debug | --debu | --deb | --de | --d | -d )
20013 debug=: ;;
20014 --file | --fil | --fi | --f )
20015 $ac_shift
20016 case $ac_optarg in
20017 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20018 '') as_fn_error $? "missing file argument" ;;
20019 esac
20020 as_fn_append CONFIG_FILES " '$ac_optarg'"
20021 ac_need_defaults=false;;
20022 --header | --heade | --head | --hea )
20023 $ac_shift
20024 case $ac_optarg in
20025 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20026 esac
20027 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20028 ac_need_defaults=false;;
20029 --he | --h)
20030 # Conflict between --help and --header
20031 as_fn_error $? "ambiguous option: \`$1'
20032 Try \`$0 --help' for more information.";;
20033 --help | --hel | -h )
20034 $as_echo "$ac_cs_usage"; exit ;;
20035 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20036 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20037 ac_cs_silent=: ;;
20039 # This is an error.
20040 -*) as_fn_error $? "unrecognized option: \`$1'
20041 Try \`$0 --help' for more information." ;;
20043 *) as_fn_append ac_config_targets " $1"
20044 ac_need_defaults=false ;;
20046 esac
20047 shift
20048 done
20050 ac_configure_extra_args=
20052 if $ac_cs_silent; then
20053 exec 6>/dev/null
20054 ac_configure_extra_args="$ac_configure_extra_args --silent"
20057 _ACEOF
20058 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20059 if \$ac_cs_recheck; then
20060 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20061 shift
20062 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20063 CONFIG_SHELL='$SHELL'
20064 export CONFIG_SHELL
20065 exec "\$@"
20068 _ACEOF
20069 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20070 exec 5>>config.log
20072 echo
20073 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20074 ## Running $as_me. ##
20075 _ASBOX
20076 $as_echo "$ac_log"
20077 } >&5
20079 _ACEOF
20080 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20081 _ACEOF
20083 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20085 # Handling of arguments.
20086 for ac_config_target in $ac_config_targets
20088 case $ac_config_target in
20089 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
20090 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
20091 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
20092 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
20093 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
20094 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
20095 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
20096 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
20097 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
20098 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
20099 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
20101 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20102 esac
20103 done
20106 # If the user did not use the arguments to specify the items to instantiate,
20107 # then the envvar interface is used. Set only those that are not.
20108 # We use the long form for the default assignment because of an extremely
20109 # bizarre bug on SunOS 4.1.3.
20110 if $ac_need_defaults; then
20111 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20112 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20113 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20114 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20117 # Have a temporary directory for convenience. Make it in the build tree
20118 # simply because there is no reason against having it here, and in addition,
20119 # creating and moving files from /tmp can sometimes cause problems.
20120 # Hook for its removal unless debugging.
20121 # Note that there is a small window in which the directory will not be cleaned:
20122 # after its creation but before its name has been assigned to `$tmp'.
20123 $debug ||
20125 tmp= ac_tmp=
20126 trap 'exit_status=$?
20127 : "${ac_tmp:=$tmp}"
20128 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20130 trap 'as_fn_exit 1' 1 2 13 15
20132 # Create a (secure) tmp directory for tmp files.
20135 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20136 test -d "$tmp"
20137 } ||
20139 tmp=./conf$$-$RANDOM
20140 (umask 077 && mkdir "$tmp")
20141 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20142 ac_tmp=$tmp
20144 # Set up the scripts for CONFIG_FILES section.
20145 # No need to generate them if there are no CONFIG_FILES.
20146 # This happens for instance with `./config.status config.h'.
20147 if test -n "$CONFIG_FILES"; then
20150 ac_cr=`echo X | tr X '\015'`
20151 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20152 # But we know of no other shell where ac_cr would be empty at this
20153 # point, so we can use a bashism as a fallback.
20154 if test "x$ac_cr" = x; then
20155 eval ac_cr=\$\'\\r\'
20157 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20158 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20159 ac_cs_awk_cr='\\r'
20160 else
20161 ac_cs_awk_cr=$ac_cr
20164 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20165 _ACEOF
20169 echo "cat >conf$$subs.awk <<_ACEOF" &&
20170 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20171 echo "_ACEOF"
20172 } >conf$$subs.sh ||
20173 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20174 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20175 ac_delim='%!_!# '
20176 for ac_last_try in false false false false false :; do
20177 . ./conf$$subs.sh ||
20178 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20180 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20181 if test $ac_delim_n = $ac_delim_num; then
20182 break
20183 elif $ac_last_try; then
20184 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20185 else
20186 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20188 done
20189 rm -f conf$$subs.sh
20191 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20192 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20193 _ACEOF
20194 sed -n '
20196 s/^/S["/; s/!.*/"]=/
20199 s/^[^!]*!//
20200 :repl
20201 t repl
20202 s/'"$ac_delim"'$//
20203 t delim
20206 s/\(.\{148\}\)..*/\1/
20207 t more1
20208 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20211 b repl
20212 :more1
20213 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20216 s/.\{148\}//
20217 t nl
20218 :delim
20220 s/\(.\{148\}\)..*/\1/
20221 t more2
20222 s/["\\]/\\&/g; s/^/"/; s/$/"/
20225 :more2
20226 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20229 s/.\{148\}//
20230 t delim
20231 ' <conf$$subs.awk | sed '
20232 /^[^""]/{
20234 s/\n//
20236 ' >>$CONFIG_STATUS || ac_write_fail=1
20237 rm -f conf$$subs.awk
20238 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20239 _ACAWK
20240 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20241 for (key in S) S_is_set[key] = 1
20242 FS = "\a"
20246 line = $ 0
20247 nfields = split(line, field, "@")
20248 substed = 0
20249 len = length(field[1])
20250 for (i = 2; i < nfields; i++) {
20251 key = field[i]
20252 keylen = length(key)
20253 if (S_is_set[key]) {
20254 value = S[key]
20255 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20256 len += length(value) + length(field[++i])
20257 substed = 1
20258 } else
20259 len += 1 + keylen
20262 print line
20265 _ACAWK
20266 _ACEOF
20267 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20268 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20269 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20270 else
20272 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20273 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20274 _ACEOF
20276 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20277 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20278 # trailing colons and then remove the whole line if VPATH becomes empty
20279 # (actually we leave an empty line to preserve line numbers).
20280 if test "x$srcdir" = x.; then
20281 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20283 s///
20284 s/^/:/
20285 s/[ ]*$/:/
20286 s/:\$(srcdir):/:/g
20287 s/:\${srcdir}:/:/g
20288 s/:@srcdir@:/:/g
20289 s/^:*//
20290 s/:*$//
20292 s/\(=[ ]*\).*/\1/
20294 s/\n//
20295 s/^[^=]*=[ ]*$//
20299 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20300 fi # test -n "$CONFIG_FILES"
20302 # Set up the scripts for CONFIG_HEADERS section.
20303 # No need to generate them if there are no CONFIG_HEADERS.
20304 # This happens for instance with `./config.status Makefile'.
20305 if test -n "$CONFIG_HEADERS"; then
20306 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20307 BEGIN {
20308 _ACEOF
20310 # Transform confdefs.h into an awk script `defines.awk', embedded as
20311 # here-document in config.status, that substitutes the proper values into
20312 # config.h.in to produce config.h.
20314 # Create a delimiter string that does not exist in confdefs.h, to ease
20315 # handling of long lines.
20316 ac_delim='%!_!# '
20317 for ac_last_try in false false :; do
20318 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20319 if test -z "$ac_tt"; then
20320 break
20321 elif $ac_last_try; then
20322 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20323 else
20324 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20326 done
20328 # For the awk script, D is an array of macro values keyed by name,
20329 # likewise P contains macro parameters if any. Preserve backslash
20330 # newline sequences.
20332 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20333 sed -n '
20334 s/.\{148\}/&'"$ac_delim"'/g
20335 t rset
20336 :rset
20337 s/^[ ]*#[ ]*define[ ][ ]*/ /
20338 t def
20340 :def
20341 s/\\$//
20342 t bsnl
20343 s/["\\]/\\&/g
20344 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20345 D["\1"]=" \3"/p
20346 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20348 :bsnl
20349 s/["\\]/\\&/g
20350 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20351 D["\1"]=" \3\\\\\\n"\\/p
20352 t cont
20353 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20354 t cont
20356 :cont
20358 s/.\{148\}/&'"$ac_delim"'/g
20359 t clear
20360 :clear
20361 s/\\$//
20362 t bsnlc
20363 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20365 :bsnlc
20366 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20367 b cont
20368 ' <confdefs.h | sed '
20369 s/'"$ac_delim"'/"\\\
20370 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20372 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20373 for (key in D) D_is_set[key] = 1
20374 FS = "\a"
20376 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20377 line = \$ 0
20378 split(line, arg, " ")
20379 if (arg[1] == "#") {
20380 defundef = arg[2]
20381 mac1 = arg[3]
20382 } else {
20383 defundef = substr(arg[1], 2)
20384 mac1 = arg[2]
20386 split(mac1, mac2, "(") #)
20387 macro = mac2[1]
20388 prefix = substr(line, 1, index(line, defundef) - 1)
20389 if (D_is_set[macro]) {
20390 # Preserve the white space surrounding the "#".
20391 print prefix "define", macro P[macro] D[macro]
20392 next
20393 } else {
20394 # Replace #undef with comments. This is necessary, for example,
20395 # in the case of _POSIX_SOURCE, which is predefined and required
20396 # on some systems where configure will not decide to define it.
20397 if (defundef == "undef") {
20398 print "/*", prefix defundef, macro, "*/"
20399 next
20403 { print }
20404 _ACAWK
20405 _ACEOF
20406 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20407 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20408 fi # test -n "$CONFIG_HEADERS"
20411 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20412 shift
20413 for ac_tag
20415 case $ac_tag in
20416 :[FHLC]) ac_mode=$ac_tag; continue;;
20417 esac
20418 case $ac_mode$ac_tag in
20419 :[FHL]*:*);;
20420 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20421 :[FH]-) ac_tag=-:-;;
20422 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20423 esac
20424 ac_save_IFS=$IFS
20425 IFS=:
20426 set x $ac_tag
20427 IFS=$ac_save_IFS
20428 shift
20429 ac_file=$1
20430 shift
20432 case $ac_mode in
20433 :L) ac_source=$1;;
20434 :[FH])
20435 ac_file_inputs=
20436 for ac_f
20438 case $ac_f in
20439 -) ac_f="$ac_tmp/stdin";;
20440 *) # Look for the file first in the build tree, then in the source tree
20441 # (if the path is not absolute). The absolute path cannot be DOS-style,
20442 # because $ac_f cannot contain `:'.
20443 test -f "$ac_f" ||
20444 case $ac_f in
20445 [\\/$]*) false;;
20446 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20447 esac ||
20448 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20449 esac
20450 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20451 as_fn_append ac_file_inputs " '$ac_f'"
20452 done
20454 # Let's still pretend it is `configure' which instantiates (i.e., don't
20455 # use $as_me), people would be surprised to read:
20456 # /* config.h. Generated by config.status. */
20457 configure_input='Generated from '`
20458 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20459 `' by configure.'
20460 if test x"$ac_file" != x-; then
20461 configure_input="$ac_file. $configure_input"
20462 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20463 $as_echo "$as_me: creating $ac_file" >&6;}
20465 # Neutralize special characters interpreted by sed in replacement strings.
20466 case $configure_input in #(
20467 *\&* | *\|* | *\\* )
20468 ac_sed_conf_input=`$as_echo "$configure_input" |
20469 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20470 *) ac_sed_conf_input=$configure_input;;
20471 esac
20473 case $ac_tag in
20474 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20475 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20476 esac
20478 esac
20480 ac_dir=`$as_dirname -- "$ac_file" ||
20481 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20482 X"$ac_file" : 'X\(//\)[^/]' \| \
20483 X"$ac_file" : 'X\(//\)$' \| \
20484 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20485 $as_echo X"$ac_file" |
20486 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20487 s//\1/
20490 /^X\(\/\/\)[^/].*/{
20491 s//\1/
20494 /^X\(\/\/\)$/{
20495 s//\1/
20498 /^X\(\/\).*/{
20499 s//\1/
20502 s/.*/./; q'`
20503 as_dir="$ac_dir"; as_fn_mkdir_p
20504 ac_builddir=.
20506 case "$ac_dir" in
20507 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20509 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20510 # A ".." for each directory in $ac_dir_suffix.
20511 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20512 case $ac_top_builddir_sub in
20513 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20514 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20515 esac ;;
20516 esac
20517 ac_abs_top_builddir=$ac_pwd
20518 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20519 # for backward compatibility:
20520 ac_top_builddir=$ac_top_build_prefix
20522 case $srcdir in
20523 .) # We are building in place.
20524 ac_srcdir=.
20525 ac_top_srcdir=$ac_top_builddir_sub
20526 ac_abs_top_srcdir=$ac_pwd ;;
20527 [\\/]* | ?:[\\/]* ) # Absolute name.
20528 ac_srcdir=$srcdir$ac_dir_suffix;
20529 ac_top_srcdir=$srcdir
20530 ac_abs_top_srcdir=$srcdir ;;
20531 *) # Relative name.
20532 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20533 ac_top_srcdir=$ac_top_build_prefix$srcdir
20534 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20535 esac
20536 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20539 case $ac_mode in
20542 # CONFIG_FILE
20545 case $INSTALL in
20546 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20547 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20548 esac
20549 ac_MKDIR_P=$MKDIR_P
20550 case $MKDIR_P in
20551 [\\/$]* | ?:[\\/]* ) ;;
20552 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20553 esac
20554 _ACEOF
20556 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20557 # If the template does not know about datarootdir, expand it.
20558 # FIXME: This hack should be removed a few years after 2.60.
20559 ac_datarootdir_hack=; ac_datarootdir_seen=
20560 ac_sed_dataroot='
20561 /datarootdir/ {
20565 /@datadir@/p
20566 /@docdir@/p
20567 /@infodir@/p
20568 /@localedir@/p
20569 /@mandir@/p'
20570 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20571 *datarootdir*) ac_datarootdir_seen=yes;;
20572 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20573 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20574 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20575 _ACEOF
20576 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20577 ac_datarootdir_hack='
20578 s&@datadir@&$datadir&g
20579 s&@docdir@&$docdir&g
20580 s&@infodir@&$infodir&g
20581 s&@localedir@&$localedir&g
20582 s&@mandir@&$mandir&g
20583 s&\\\${datarootdir}&$datarootdir&g' ;;
20584 esac
20585 _ACEOF
20587 # Neutralize VPATH when `$srcdir' = `.'.
20588 # Shell code in configure.ac might set extrasub.
20589 # FIXME: do we really want to maintain this feature?
20590 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20591 ac_sed_extra="$ac_vpsub
20592 $extrasub
20593 _ACEOF
20594 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20596 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20597 s|@configure_input@|$ac_sed_conf_input|;t t
20598 s&@top_builddir@&$ac_top_builddir_sub&;t t
20599 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20600 s&@srcdir@&$ac_srcdir&;t t
20601 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20602 s&@top_srcdir@&$ac_top_srcdir&;t t
20603 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20604 s&@builddir@&$ac_builddir&;t t
20605 s&@abs_builddir@&$ac_abs_builddir&;t t
20606 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20607 s&@INSTALL@&$ac_INSTALL&;t t
20608 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20609 $ac_datarootdir_hack
20611 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20612 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20614 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20615 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20616 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20617 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20618 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20619 which seems to be undefined. Please make sure it is defined" >&5
20620 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20621 which seems to be undefined. Please make sure it is defined" >&2;}
20623 rm -f "$ac_tmp/stdin"
20624 case $ac_file in
20625 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20626 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20627 esac \
20628 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20632 # CONFIG_HEADER
20634 if test x"$ac_file" != x-; then
20636 $as_echo "/* $configure_input */" \
20637 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20638 } >"$ac_tmp/config.h" \
20639 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20640 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20641 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20642 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20643 else
20644 rm -f "$ac_file"
20645 mv "$ac_tmp/config.h" "$ac_file" \
20646 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20648 else
20649 $as_echo "/* $configure_input */" \
20650 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20651 || as_fn_error $? "could not create -" "$LINENO" 5
20656 # CONFIG_LINK
20659 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20661 else
20662 # Prefer the file from the source tree if names are identical.
20663 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20664 ac_source=$srcdir/$ac_source
20667 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20668 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20670 if test ! -r "$ac_source"; then
20671 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20673 rm -f "$ac_file"
20675 # Try a relative symlink, then a hard link, then a copy.
20676 case $ac_source in
20677 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20678 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20679 esac
20680 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20681 ln "$ac_source" "$ac_file" 2>/dev/null ||
20682 cp -p "$ac_source" "$ac_file" ||
20683 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20686 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20687 $as_echo "$as_me: executing $ac_file commands" >&6;}
20689 esac
20692 case $ac_file$ac_mode in
20693 "check_win32_symlinks":C)
20694 # Links sometimes fail undetected on Mingw -
20695 # so here we detect it and warn the user
20696 for FILE in $CONFIG_LINKS
20698 # test -e works for symlinks in the MinGW console
20699 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20700 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20701 done
20703 "src/include/pg_config.h":H)
20704 # Update timestamp for pg_config.h (see Makefile.global)
20705 echo >src/include/stamp-h
20707 "src/include/pg_config_ext.h":H)
20708 # Update timestamp for pg_config_ext.h (see Makefile.global)
20709 echo >src/include/stamp-ext-h
20711 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20713 esac
20714 done # for ac_tag
20717 as_fn_exit 0
20718 _ACEOF
20719 ac_clean_files=$ac_clean_files_save
20721 test $ac_write_fail = 0 ||
20722 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20725 # configure is writing to config.log, and then calls config.status.
20726 # config.status does its own redirection, appending to config.log.
20727 # Unfortunately, on DOS this fails, as config.log is still kept open
20728 # by configure, so config.status won't be able to write to it; its
20729 # output is simply discarded. So we exec the FD to /dev/null,
20730 # effectively closing config.log, so it can be properly (re)opened and
20731 # appended to by config.status. When coming back to configure, we
20732 # need to make the FD available again.
20733 if test "$no_create" != yes; then
20734 ac_cs_success=:
20735 ac_config_status_args=
20736 test "$silent" = yes &&
20737 ac_config_status_args="$ac_config_status_args --quiet"
20738 exec 5>/dev/null
20739 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20740 exec 5>>config.log
20741 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20742 # would make configure fail if this is the last instruction.
20743 $ac_cs_success || as_fn_exit 1
20745 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20746 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20747 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20751 # Ensure that any meson build directories would reconfigure and see that
20752 # there's a conflicting in-tree build and can error out.
20753 if test "$vpath_build"="no"; then
20754 touch meson.build