Add temporal FOREIGN KEY contraints
[pgsql.git] / configure
blob53c8a1f2badec125ae6bab8106728bdd51cabdd5
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 18devel.
5 # Report bugs to <pgsql-bugs@lists.postgresql.org>.
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
14 # Copyright (c) 1996-2024, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22 emulate sh
23 NULLCMD=:
24 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
27 setopt NO_GLOB_SUBST
28 else
29 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
34 esac
38 as_nl='
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54 else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
86 # IFS
87 # We need space, tab and new line, in precisely that order. Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" "" $as_nl"
93 # Find who we are. Look in the path if we contain no directory separator.
94 as_myself=
95 case $0 in #((
96 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
104 IFS=$as_save_IFS
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111 as_myself=$0
113 if test ! -f "$as_myself"; then
114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there. '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139 # Use a proper internal environment variable to ensure we don't fall
140 # into an infinite loop, continuously re-executing ourselves.
141 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
142 _as_can_reexec=no; export _as_can_reexec;
143 # We cannot yet assume a decent shell, so we have to provide a
144 # neutralization value for shells without unset; and this also
145 # works around shells that cannot unset nonexistent variables.
146 # Preserve -v and -x to the replacement shell.
147 BASH_ENV=/dev/null
148 ENV=/dev/null
149 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
150 case $- in # ((((
151 *v*x* | *x*v* ) as_opts=-vx ;;
152 *v* ) as_opts=-v ;;
153 *x* ) as_opts=-x ;;
154 * ) as_opts= ;;
155 esac
156 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
157 # Admittedly, this is quite paranoid, since all the known shells bail
158 # out after a failed `exec'.
159 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 as_fn_exit 255
162 # We don't want this to propagate to other subprocesses.
163 { _as_can_reexec=; unset _as_can_reexec;}
164 if test "x$CONFIG_SHELL" = x; then
165 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166 emulate sh
167 NULLCMD=:
168 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
169 # is contrary to our usage. Disable this feature.
170 alias -g '\${1+\"\$@\"}'='\"\$@\"'
171 setopt NO_GLOB_SUBST
172 else
173 case \`(set -o) 2>/dev/null\` in #(
174 *posix*) :
175 set -o posix ;; #(
176 *) :
178 esac
181 as_required="as_fn_return () { (exit \$1); }
182 as_fn_success () { as_fn_return 0; }
183 as_fn_failure () { as_fn_return 1; }
184 as_fn_ret_success () { return 0; }
185 as_fn_ret_failure () { return 1; }
187 exitcode=0
188 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
194 else
195 exitcode=1; echo positional parameters were not saved.
197 test x\$exitcode = x0 || exit 1
198 test -x / || exit 1"
199 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
200 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
201 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
202 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
203 test \$(( 1 + 1 )) = 2 || exit 1"
204 if (eval "$as_required") 2>/dev/null; then :
205 as_have_required=yes
206 else
207 as_have_required=no
209 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
211 else
212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
213 as_found=false
214 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
216 IFS=$as_save_IFS
217 test -z "$as_dir" && as_dir=.
218 as_found=:
219 case $as_dir in #(
221 for as_base in sh bash ksh sh5; do
222 # Try only shells that exist, to save several forks.
223 as_shell=$as_dir/$as_base
224 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
225 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 CONFIG_SHELL=$as_shell as_have_required=yes
227 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
228 break 2
231 done;;
232 esac
233 as_found=false
234 done
235 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
236 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
237 CONFIG_SHELL=$SHELL as_have_required=yes
238 fi; }
239 IFS=$as_save_IFS
242 if test "x$CONFIG_SHELL" != x; then :
243 export CONFIG_SHELL
244 # We cannot yet assume a decent shell, so we have to provide a
245 # neutralization value for shells without unset; and this also
246 # works around shells that cannot unset nonexistent variables.
247 # Preserve -v and -x to the replacement shell.
248 BASH_ENV=/dev/null
249 ENV=/dev/null
250 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
251 case $- in # ((((
252 *v*x* | *x*v* ) as_opts=-vx ;;
253 *v* ) as_opts=-v ;;
254 *x* ) as_opts=-x ;;
255 * ) as_opts= ;;
256 esac
257 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
258 # Admittedly, this is quite paranoid, since all the known shells bail
259 # out after a failed `exec'.
260 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
261 exit 255
264 if test x$as_have_required = xno; then :
265 $as_echo "$0: This script requires a shell more modern than all"
266 $as_echo "$0: the shells that I found on your system."
267 if test x${ZSH_VERSION+set} = xset ; then
268 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
270 else
271 $as_echo "$0: Please tell bug-autoconf@gnu.org and
272 $0: pgsql-bugs@lists.postgresql.org about your system,
273 $0: including any error possibly output before this
274 $0: message. Then install a modern shell, or manually run
275 $0: the script under such a shell if you do have one."
277 exit 1
281 SHELL=${CONFIG_SHELL-/bin/sh}
282 export SHELL
283 # Unset more variables known to interfere with behavior of common tools.
284 CLICOLOR_FORCE= GREP_OPTIONS=
285 unset CLICOLOR_FORCE GREP_OPTIONS
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
295 { eval $1=; unset $1;}
297 as_unset=as_fn_unset
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
304 return $1
305 } # as_fn_set_status
307 # as_fn_exit STATUS
308 # -----------------
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310 as_fn_exit ()
312 set +e
313 as_fn_set_status $1
314 exit $1
315 } # as_fn_exit
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
323 case $as_dir in #(
324 -*) as_dir=./$as_dir;;
325 esac
326 test -d "$as_dir" || eval $as_mkdir_p || {
327 as_dirs=
328 while :; do
329 case $as_dir in #(
330 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331 *) as_qdir=$as_dir;;
332 esac
333 as_dirs="'$as_qdir' $as_dirs"
334 as_dir=`$as_dirname -- "$as_dir" ||
335 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
336 X"$as_dir" : 'X\(//\)[^/]' \| \
337 X"$as_dir" : 'X\(//\)$' \| \
338 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
339 $as_echo X"$as_dir" |
340 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
341 s//\1/
344 /^X\(\/\/\)[^/].*/{
345 s//\1/
348 /^X\(\/\/\)$/{
349 s//\1/
352 /^X\(\/\).*/{
353 s//\1/
356 s/.*/./; q'`
357 test -d "$as_dir" && break
358 done
359 test -z "$as_dirs" || eval "mkdir $as_dirs"
360 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
363 } # as_fn_mkdir_p
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
370 test -f "$1" && test -x "$1"
371 } # as_fn_executable_p
372 # as_fn_append VAR VALUE
373 # ----------------------
374 # Append the text in VALUE to the end of the definition contained in VAR. Take
375 # advantage of any shell optimizations that allow amortized linear growth over
376 # repeated appends, instead of the typical quadratic growth present in naive
377 # implementations.
378 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379 eval 'as_fn_append ()
381 eval $1+=\$2
383 else
384 as_fn_append ()
386 eval $1=\$$1\$2
388 fi # as_fn_append
390 # as_fn_arith ARG...
391 # ------------------
392 # Perform arithmetic evaluation on the ARGs, and store the result in the
393 # global $as_val. Take advantage of shells that can avoid forks. The arguments
394 # must be portable across $(()) and expr.
395 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
396 eval 'as_fn_arith ()
398 as_val=$(( $* ))
400 else
401 as_fn_arith ()
403 as_val=`expr "$@" || test $? -eq 1`
405 fi # as_fn_arith
408 # as_fn_error STATUS ERROR [LINENO LOG_FD]
409 # ----------------------------------------
410 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
411 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
412 # script with STATUS, using 1 if that was 0.
413 as_fn_error ()
415 as_status=$1; test $as_status -eq 0 && as_status=1
416 if test "$4"; then
417 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
418 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
420 $as_echo "$as_me: error: $2" >&2
421 as_fn_exit $as_status
422 } # as_fn_error
424 if expr a : '\(a\)' >/dev/null 2>&1 &&
425 test "X`expr 00001 : '.*\(...\)'`" = X001; then
426 as_expr=expr
427 else
428 as_expr=false
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432 as_basename=basename
433 else
434 as_basename=false
437 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
438 as_dirname=dirname
439 else
440 as_dirname=false
443 as_me=`$as_basename -- "$0" ||
444 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445 X"$0" : 'X\(//\)$' \| \
446 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
447 $as_echo X/"$0" |
448 sed '/^.*\/\([^/][^/]*\)\/*$/{
449 s//\1/
452 /^X\/\(\/\/\)$/{
453 s//\1/
456 /^X\/\(\/\).*/{
457 s//\1/
460 s/.*/./; q'`
462 # Avoid depending upon Character Ranges.
463 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466 as_cr_digits='0123456789'
467 as_cr_alnum=$as_cr_Letters$as_cr_digits
470 as_lineno_1=$LINENO as_lineno_1a=$LINENO
471 as_lineno_2=$LINENO as_lineno_2a=$LINENO
472 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
473 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
474 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
475 sed -n '
477 /[$]LINENO/=
478 ' <$as_myself |
479 sed '
480 s/[$]LINENO.*/&-/
481 t lineno
483 :lineno
485 :loop
486 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
487 t loop
488 s/-\n.*//
489 ' >$as_me.lineno &&
490 chmod +x "$as_me.lineno" ||
491 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
493 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
494 # already done that, so ensure we don't try to do so again and fall
495 # in an infinite loop. This has already happened in practice.
496 _as_can_reexec=no; export _as_can_reexec
497 # Don't try to exec as it changes $[0], causing all sort of problems
498 # (the dirname of $[0] is not the place where we might find the
499 # original and so on. Autoconf is especially sensitive to this).
500 . "./$as_me.lineno"
501 # Exit status is that of the last command.
502 exit
505 ECHO_C= ECHO_N= ECHO_T=
506 case `echo -n x` in #(((((
507 -n*)
508 case `echo 'xy\c'` in
509 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
510 xy) ECHO_C='\c';;
511 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
512 ECHO_T=' ';;
513 esac;;
515 ECHO_N='-n';;
516 esac
518 rm -f conf$$ conf$$.exe conf$$.file
519 if test -d conf$$.dir; then
520 rm -f conf$$.dir/conf$$.file
521 else
522 rm -f conf$$.dir
523 mkdir conf$$.dir 2>/dev/null
525 if (echo >conf$$.file) 2>/dev/null; then
526 if ln -s conf$$.file conf$$ 2>/dev/null; then
527 as_ln_s='ln -s'
528 # ... but there are two gotchas:
529 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
530 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
531 # In both cases, we have to default to `cp -pR'.
532 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
533 as_ln_s='cp -pR'
534 elif ln conf$$.file conf$$ 2>/dev/null; then
535 as_ln_s=ln
536 else
537 as_ln_s='cp -pR'
539 else
540 as_ln_s='cp -pR'
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
545 if mkdir -p . 2>/dev/null; then
546 as_mkdir_p='mkdir -p "$as_dir"'
547 else
548 test -d ./-p && rmdir ./-p
549 as_mkdir_p=false
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
555 # Sed expression to map a string onto a valid CPP name.
556 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
558 # Sed expression to map a string onto a valid variable name.
559 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
562 test -n "$DJDIR" || exec 7<&0 </dev/null
563 exec 6>&1
565 # Name of the host.
566 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
567 # so uname gets run too.
568 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
571 # Initializations.
573 ac_default_prefix=/usr/local
574 ac_clean_files=
575 ac_config_libobj_dir=.
576 LIBOBJS=
577 cross_compiling=no
578 subdirs=
579 MFLAGS=
580 MAKEFLAGS=
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='18devel'
586 PACKAGE_STRING='PostgreSQL 18devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
588 PACKAGE_URL='https://www.postgresql.org/'
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 # include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 # include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_SYSROOT
631 PG_VERSION_NUM
632 LDFLAGS_EX_BE
633 PROVE
634 DBTOEPUB
636 XSLTPROC
637 XMLLINT
638 TCL_SHARED_BUILD
639 TCL_LIB_SPEC
640 TCL_LIBS
641 TCL_INCLUDE_SPEC
642 TCL_CONFIG_SH
643 TCLSH
644 XGETTEXT
645 MSGMERGE
646 MSGFMT_FLAGS
647 MSGFMT
648 PG_CRC32C_OBJS
649 CFLAGS_CRC
650 PG_POPCNT_OBJS
651 CFLAGS_POPCNT
652 CFLAGS_XSAVE
653 LIBOBJS
654 OPENSSL
655 ZSTD
657 UUID_LIBS
658 LDAP_LIBS_BE
659 LDAP_LIBS_FE
660 with_ssl
661 PTHREAD_CFLAGS
662 PTHREAD_LIBS
663 PTHREAD_CC
664 ax_pthread_config
665 EGREP
666 GREP
669 python_additional_libs
670 python_libspec
671 python_libdir
672 python_includespec
673 python_version
674 python_majorversion
675 PYTHON
676 perl_embed_ldflags
677 perl_embed_ccflags
678 perl_includespec
679 perl_useshrplib
680 perl_privlibexp
681 perl_archlibexp
682 PERL
683 FLEXFLAGS
684 FLEX
685 BISONFLAGS
686 BISON
687 MKDIR_P
688 LN_S
690 install_bin
691 INSTALL_DATA
692 INSTALL_SCRIPT
693 INSTALL_PROGRAM
694 WINDRES
696 STRIP_SHARED_LIB
697 STRIP_STATIC_LIB
698 STRIP
699 LDFLAGS_SL
700 LDFLAGS_EX
701 ZSTD_LIBS
702 ZSTD_CFLAGS
703 with_zstd
704 LZ4_LIBS
705 LZ4_CFLAGS
706 with_lz4
707 with_zlib
708 with_system_tzdata
709 with_libxslt
710 XML2_LIBS
711 XML2_CFLAGS
712 XML2_CONFIG
713 with_libxml
714 with_uuid
715 with_readline
716 with_systemd
717 with_selinux
718 with_ldap
719 with_krb_srvnam
720 krb_srvtab
721 with_gssapi
722 with_python
723 with_perl
724 with_tcl
725 ICU_LIBS
726 ICU_CFLAGS
727 with_icu
728 INCLUDES
729 autodepend
730 PKG_CONFIG_LIBDIR
731 PKG_CONFIG_PATH
732 PKG_CONFIG
733 DLSUFFIX
737 CFLAGS_SL
738 BITCODE_CXXFLAGS
739 BITCODE_CFLAGS
740 CXXFLAGS_SL_MODULE
741 CFLAGS_SL_MODULE
742 CFLAGS_VECTORIZE
743 CFLAGS_UNROLL_LOOPS
744 PERMIT_MISSING_VARIABLE_DECLARATIONS
745 PERMIT_DECLARATION_AFTER_STATEMENT
746 LLVM_BINPATH
747 LLVM_CXXFLAGS
748 LLVM_CFLAGS
749 LLVM_CPPFLAGS
750 LLVM_LIBS
751 CLANG
752 LLVM_CONFIG
754 with_llvm
755 SUN_STUDIO_CC
756 ac_ct_CXX
757 CXXFLAGS
759 OBJEXT
760 EXEEXT
761 ac_ct_CC
762 CPPFLAGS
763 LDFLAGS
764 CFLAGS
766 enable_injection_points
767 enable_tap_tests
768 enable_dtrace
769 DTRACEFLAGS
770 DTRACE
771 enable_coverage
772 GENHTML
773 LCOV
774 GCOV
775 enable_debug
776 enable_rpath
777 default_port
778 WANTED_LANGUAGES
779 enable_nls
780 PORTNAME
781 host_os
782 host_vendor
783 host_cpu
784 host
785 build_os
786 build_vendor
787 build_cpu
788 build
789 PG_MAJORVERSION
790 target_alias
791 host_alias
792 build_alias
793 LIBS
794 ECHO_T
795 ECHO_N
796 ECHO_C
797 DEFS
798 mandir
799 localedir
800 libdir
801 psdir
802 pdfdir
803 dvidir
804 htmldir
805 infodir
806 docdir
807 oldincludedir
808 includedir
809 localstatedir
810 sharedstatedir
811 sysconfdir
812 datadir
813 datarootdir
814 libexecdir
815 sbindir
816 bindir
817 program_transform_name
818 prefix
819 exec_prefix
820 PACKAGE_URL
821 PACKAGE_BUGREPORT
822 PACKAGE_STRING
823 PACKAGE_VERSION
824 PACKAGE_TARNAME
825 PACKAGE_NAME
826 PATH_SEPARATOR
827 SHELL'
828 ac_subst_files=''
829 ac_user_opts='
830 enable_option_checking
831 with_extra_version
832 with_template
833 with_includes
834 with_libraries
835 with_libs
836 enable_integer_datetimes
837 enable_nls
838 with_pgport
839 enable_rpath
840 enable_debug
841 enable_profiling
842 enable_coverage
843 enable_dtrace
844 enable_tap_tests
845 enable_injection_points
846 with_blocksize
847 with_segsize
848 with_segsize_blocks
849 with_wal_blocksize
850 with_llvm
851 enable_depend
852 enable_cassert
853 with_icu
854 with_tcl
855 with_tclconfig
856 with_perl
857 with_python
858 with_gssapi
859 with_krb_srvnam
860 with_pam
861 with_bsd_auth
862 with_ldap
863 with_bonjour
864 with_selinux
865 with_systemd
866 with_readline
867 with_libedit_preferred
868 with_uuid
869 with_ossp_uuid
870 with_libxml
871 with_libxslt
872 with_system_tzdata
873 with_zlib
874 with_lz4
875 with_zstd
876 with_ssl
877 with_openssl
878 enable_largefile
880 ac_precious_vars='build_alias
881 host_alias
882 target_alias
884 CFLAGS
885 LDFLAGS
886 LIBS
887 CPPFLAGS
889 CXXFLAGS
891 LLVM_CONFIG
892 CLANG
894 PKG_CONFIG
895 PKG_CONFIG_PATH
896 PKG_CONFIG_LIBDIR
897 ICU_CFLAGS
898 ICU_LIBS
899 XML2_CONFIG
900 XML2_CFLAGS
901 XML2_LIBS
902 LZ4_CFLAGS
903 LZ4_LIBS
904 ZSTD_CFLAGS
905 ZSTD_LIBS
906 LDFLAGS_EX
907 LDFLAGS_SL
908 PERL
909 PYTHON
910 MSGFMT
911 TCLSH'
914 # Initialize some variables set by options.
915 ac_init_help=
916 ac_init_version=false
917 ac_unrecognized_opts=
918 ac_unrecognized_sep=
919 # The variables have the same names as the options, with
920 # dashes changed to underlines.
921 cache_file=/dev/null
922 exec_prefix=NONE
923 no_create=
924 no_recursion=
925 prefix=NONE
926 program_prefix=NONE
927 program_suffix=NONE
928 program_transform_name=s,x,x,
929 silent=
930 site=
931 srcdir=
932 verbose=
933 x_includes=NONE
934 x_libraries=NONE
936 # Installation directory options.
937 # These are left unexpanded so users can "make install exec_prefix=/foo"
938 # and all the variables that are supposed to be based on exec_prefix
939 # by default will actually change.
940 # Use braces instead of parens because sh, perl, etc. also accept them.
941 # (The list follows the same order as the GNU Coding Standards.)
942 bindir='${exec_prefix}/bin'
943 sbindir='${exec_prefix}/sbin'
944 libexecdir='${exec_prefix}/libexec'
945 datarootdir='${prefix}/share'
946 datadir='${datarootdir}'
947 sysconfdir='${prefix}/etc'
948 sharedstatedir='${prefix}/com'
949 localstatedir='${prefix}/var'
950 includedir='${prefix}/include'
951 oldincludedir='/usr/include'
952 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
953 infodir='${datarootdir}/info'
954 htmldir='${docdir}'
955 dvidir='${docdir}'
956 pdfdir='${docdir}'
957 psdir='${docdir}'
958 libdir='${exec_prefix}/lib'
959 localedir='${datarootdir}/locale'
960 mandir='${datarootdir}/man'
962 ac_prev=
963 ac_dashdash=
964 for ac_option
966 # If the previous option needs an argument, assign it.
967 if test -n "$ac_prev"; then
968 eval $ac_prev=\$ac_option
969 ac_prev=
970 continue
973 case $ac_option in
974 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
975 *=) ac_optarg= ;;
976 *) ac_optarg=yes ;;
977 esac
979 # Accept the important Cygnus configure options, so we can diagnose typos.
981 case $ac_dashdash$ac_option in
983 ac_dashdash=yes ;;
985 -bindir | --bindir | --bindi | --bind | --bin | --bi)
986 ac_prev=bindir ;;
987 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
988 bindir=$ac_optarg ;;
990 -build | --build | --buil | --bui | --bu)
991 ac_prev=build_alias ;;
992 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
993 build_alias=$ac_optarg ;;
995 -cache-file | --cache-file | --cache-fil | --cache-fi \
996 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
997 ac_prev=cache_file ;;
998 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
999 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1000 cache_file=$ac_optarg ;;
1002 --config-cache | -C)
1003 cache_file=config.cache ;;
1005 -datadir | --datadir | --datadi | --datad)
1006 ac_prev=datadir ;;
1007 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1008 datadir=$ac_optarg ;;
1010 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1011 | --dataroo | --dataro | --datar)
1012 ac_prev=datarootdir ;;
1013 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1014 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1015 datarootdir=$ac_optarg ;;
1017 -disable-* | --disable-*)
1018 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1019 # Reject names that are not valid shell variable names.
1020 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1021 as_fn_error $? "invalid feature name: $ac_useropt"
1022 ac_useropt_orig=$ac_useropt
1023 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1024 case $ac_user_opts in
1026 "enable_$ac_useropt"
1027 "*) ;;
1028 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1029 ac_unrecognized_sep=', ';;
1030 esac
1031 eval enable_$ac_useropt=no ;;
1033 -docdir | --docdir | --docdi | --doc | --do)
1034 ac_prev=docdir ;;
1035 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1036 docdir=$ac_optarg ;;
1038 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1039 ac_prev=dvidir ;;
1040 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1041 dvidir=$ac_optarg ;;
1043 -enable-* | --enable-*)
1044 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1045 # Reject names that are not valid shell variable names.
1046 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1047 as_fn_error $? "invalid feature name: $ac_useropt"
1048 ac_useropt_orig=$ac_useropt
1049 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1050 case $ac_user_opts in
1052 "enable_$ac_useropt"
1053 "*) ;;
1054 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1055 ac_unrecognized_sep=', ';;
1056 esac
1057 eval enable_$ac_useropt=\$ac_optarg ;;
1059 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1060 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1061 | --exec | --exe | --ex)
1062 ac_prev=exec_prefix ;;
1063 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1064 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1065 | --exec=* | --exe=* | --ex=*)
1066 exec_prefix=$ac_optarg ;;
1068 -gas | --gas | --ga | --g)
1069 # Obsolete; use --with-gas.
1070 with_gas=yes ;;
1072 -help | --help | --hel | --he | -h)
1073 ac_init_help=long ;;
1074 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1075 ac_init_help=recursive ;;
1076 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1077 ac_init_help=short ;;
1079 -host | --host | --hos | --ho)
1080 ac_prev=host_alias ;;
1081 -host=* | --host=* | --hos=* | --ho=*)
1082 host_alias=$ac_optarg ;;
1084 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1085 ac_prev=htmldir ;;
1086 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1087 | --ht=*)
1088 htmldir=$ac_optarg ;;
1090 -includedir | --includedir | --includedi | --included | --include \
1091 | --includ | --inclu | --incl | --inc)
1092 ac_prev=includedir ;;
1093 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1094 | --includ=* | --inclu=* | --incl=* | --inc=*)
1095 includedir=$ac_optarg ;;
1097 -infodir | --infodir | --infodi | --infod | --info | --inf)
1098 ac_prev=infodir ;;
1099 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1100 infodir=$ac_optarg ;;
1102 -libdir | --libdir | --libdi | --libd)
1103 ac_prev=libdir ;;
1104 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1105 libdir=$ac_optarg ;;
1107 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1108 | --libexe | --libex | --libe)
1109 ac_prev=libexecdir ;;
1110 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1111 | --libexe=* | --libex=* | --libe=*)
1112 libexecdir=$ac_optarg ;;
1114 -localedir | --localedir | --localedi | --localed | --locale)
1115 ac_prev=localedir ;;
1116 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1117 localedir=$ac_optarg ;;
1119 -localstatedir | --localstatedir | --localstatedi | --localstated \
1120 | --localstate | --localstat | --localsta | --localst | --locals)
1121 ac_prev=localstatedir ;;
1122 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1123 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1124 localstatedir=$ac_optarg ;;
1126 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1127 ac_prev=mandir ;;
1128 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1129 mandir=$ac_optarg ;;
1131 -nfp | --nfp | --nf)
1132 # Obsolete; use --without-fp.
1133 with_fp=no ;;
1135 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1136 | --no-cr | --no-c | -n)
1137 no_create=yes ;;
1139 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1140 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1141 no_recursion=yes ;;
1143 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1144 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1145 | --oldin | --oldi | --old | --ol | --o)
1146 ac_prev=oldincludedir ;;
1147 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1148 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1149 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1150 oldincludedir=$ac_optarg ;;
1152 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1153 ac_prev=prefix ;;
1154 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1155 prefix=$ac_optarg ;;
1157 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1158 | --program-pre | --program-pr | --program-p)
1159 ac_prev=program_prefix ;;
1160 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1161 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1162 program_prefix=$ac_optarg ;;
1164 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1165 | --program-suf | --program-su | --program-s)
1166 ac_prev=program_suffix ;;
1167 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1168 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1169 program_suffix=$ac_optarg ;;
1171 -program-transform-name | --program-transform-name \
1172 | --program-transform-nam | --program-transform-na \
1173 | --program-transform-n | --program-transform- \
1174 | --program-transform | --program-transfor \
1175 | --program-transfo | --program-transf \
1176 | --program-trans | --program-tran \
1177 | --progr-tra | --program-tr | --program-t)
1178 ac_prev=program_transform_name ;;
1179 -program-transform-name=* | --program-transform-name=* \
1180 | --program-transform-nam=* | --program-transform-na=* \
1181 | --program-transform-n=* | --program-transform-=* \
1182 | --program-transform=* | --program-transfor=* \
1183 | --program-transfo=* | --program-transf=* \
1184 | --program-trans=* | --program-tran=* \
1185 | --progr-tra=* | --program-tr=* | --program-t=*)
1186 program_transform_name=$ac_optarg ;;
1188 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1189 ac_prev=pdfdir ;;
1190 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1191 pdfdir=$ac_optarg ;;
1193 -psdir | --psdir | --psdi | --psd | --ps)
1194 ac_prev=psdir ;;
1195 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1196 psdir=$ac_optarg ;;
1198 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1199 | -silent | --silent | --silen | --sile | --sil)
1200 silent=yes ;;
1202 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1203 ac_prev=sbindir ;;
1204 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1205 | --sbi=* | --sb=*)
1206 sbindir=$ac_optarg ;;
1208 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1209 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1210 | --sharedst | --shareds | --shared | --share | --shar \
1211 | --sha | --sh)
1212 ac_prev=sharedstatedir ;;
1213 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1214 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1215 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1216 | --sha=* | --sh=*)
1217 sharedstatedir=$ac_optarg ;;
1219 -site | --site | --sit)
1220 ac_prev=site ;;
1221 -site=* | --site=* | --sit=*)
1222 site=$ac_optarg ;;
1224 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1225 ac_prev=srcdir ;;
1226 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1227 srcdir=$ac_optarg ;;
1229 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1230 | --syscon | --sysco | --sysc | --sys | --sy)
1231 ac_prev=sysconfdir ;;
1232 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1233 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1234 sysconfdir=$ac_optarg ;;
1236 -target | --target | --targe | --targ | --tar | --ta | --t)
1237 ac_prev=target_alias ;;
1238 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1239 target_alias=$ac_optarg ;;
1241 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1242 verbose=yes ;;
1244 -version | --version | --versio | --versi | --vers | -V)
1245 ac_init_version=: ;;
1247 -with-* | --with-*)
1248 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1249 # Reject names that are not valid shell variable names.
1250 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1251 as_fn_error $? "invalid package name: $ac_useropt"
1252 ac_useropt_orig=$ac_useropt
1253 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1254 case $ac_user_opts in
1256 "with_$ac_useropt"
1257 "*) ;;
1258 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1259 ac_unrecognized_sep=', ';;
1260 esac
1261 eval with_$ac_useropt=\$ac_optarg ;;
1263 -without-* | --without-*)
1264 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1265 # Reject names that are not valid shell variable names.
1266 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1267 as_fn_error $? "invalid package name: $ac_useropt"
1268 ac_useropt_orig=$ac_useropt
1269 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1270 case $ac_user_opts in
1272 "with_$ac_useropt"
1273 "*) ;;
1274 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1275 ac_unrecognized_sep=', ';;
1276 esac
1277 eval with_$ac_useropt=no ;;
1279 --x)
1280 # Obsolete; use --with-x.
1281 with_x=yes ;;
1283 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1284 | --x-incl | --x-inc | --x-in | --x-i)
1285 ac_prev=x_includes ;;
1286 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1287 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1288 x_includes=$ac_optarg ;;
1290 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1291 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1292 ac_prev=x_libraries ;;
1293 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1294 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1295 x_libraries=$ac_optarg ;;
1297 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1298 Try \`$0 --help' for more information"
1301 *=*)
1302 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1303 # Reject names that are not valid shell variable names.
1304 case $ac_envvar in #(
1305 '' | [0-9]* | *[!_$as_cr_alnum]* )
1306 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1307 esac
1308 eval $ac_envvar=\$ac_optarg
1309 export $ac_envvar ;;
1312 # FIXME: should be removed in autoconf 3.0.
1313 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1314 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1315 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1316 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1319 esac
1320 done
1322 if test -n "$ac_prev"; then
1323 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1324 as_fn_error $? "missing argument to $ac_option"
1327 if test -n "$ac_unrecognized_opts"; then
1328 case $enable_option_checking in
1329 no) ;;
1330 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1331 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1332 esac
1335 # Check all directory arguments for consistency.
1336 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1337 datadir sysconfdir sharedstatedir localstatedir includedir \
1338 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1339 libdir localedir mandir
1341 eval ac_val=\$$ac_var
1342 # Remove trailing slashes.
1343 case $ac_val in
1344 */ )
1345 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1346 eval $ac_var=\$ac_val;;
1347 esac
1348 # Be sure to have absolute directory names.
1349 case $ac_val in
1350 [\\/$]* | ?:[\\/]* ) continue;;
1351 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1352 esac
1353 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1354 done
1356 # There might be people who depend on the old broken behavior: `$host'
1357 # used to hold the argument of --host etc.
1358 # FIXME: To remove some day.
1359 build=$build_alias
1360 host=$host_alias
1361 target=$target_alias
1363 # FIXME: To remove some day.
1364 if test "x$host_alias" != x; then
1365 if test "x$build_alias" = x; then
1366 cross_compiling=maybe
1367 elif test "x$build_alias" != "x$host_alias"; then
1368 cross_compiling=yes
1372 ac_tool_prefix=
1373 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1375 test "$silent" = yes && exec 6>/dev/null
1378 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1379 ac_ls_di=`ls -di .` &&
1380 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1381 as_fn_error $? "working directory cannot be determined"
1382 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1383 as_fn_error $? "pwd does not report name of working directory"
1386 # Find the source files, if location was not specified.
1387 if test -z "$srcdir"; then
1388 ac_srcdir_defaulted=yes
1389 # Try the directory containing this script, then the parent directory.
1390 ac_confdir=`$as_dirname -- "$as_myself" ||
1391 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1392 X"$as_myself" : 'X\(//\)[^/]' \| \
1393 X"$as_myself" : 'X\(//\)$' \| \
1394 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1395 $as_echo X"$as_myself" |
1396 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1397 s//\1/
1400 /^X\(\/\/\)[^/].*/{
1401 s//\1/
1404 /^X\(\/\/\)$/{
1405 s//\1/
1408 /^X\(\/\).*/{
1409 s//\1/
1412 s/.*/./; q'`
1413 srcdir=$ac_confdir
1414 if test ! -r "$srcdir/$ac_unique_file"; then
1415 srcdir=..
1417 else
1418 ac_srcdir_defaulted=no
1420 if test ! -r "$srcdir/$ac_unique_file"; then
1421 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1422 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1424 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1425 ac_abs_confdir=`(
1426 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1427 pwd)`
1428 # When building in place, set srcdir=.
1429 if test "$ac_abs_confdir" = "$ac_pwd"; then
1430 srcdir=.
1432 # Remove unnecessary trailing slashes from srcdir.
1433 # Double slashes in file names in object file debugging info
1434 # mess up M-x gdb in Emacs.
1435 case $srcdir in
1436 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1437 esac
1438 for ac_var in $ac_precious_vars; do
1439 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1440 eval ac_env_${ac_var}_value=\$${ac_var}
1441 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1442 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1443 done
1446 # Report the --help message.
1448 if test "$ac_init_help" = "long"; then
1449 # Omit some internal or obsolete options to make the list less imposing.
1450 # This message is too long to be a string in the A/UX 3.1 sh.
1451 cat <<_ACEOF
1452 \`configure' configures PostgreSQL 18devel to adapt to many kinds of systems.
1454 Usage: $0 [OPTION]... [VAR=VALUE]...
1456 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1457 VAR=VALUE. See below for descriptions of some of the useful variables.
1459 Defaults for the options are specified in brackets.
1461 Configuration:
1462 -h, --help display this help and exit
1463 --help=short display options specific to this package
1464 --help=recursive display the short help of all the included packages
1465 -V, --version display version information and exit
1466 -q, --quiet, --silent do not print \`checking ...' messages
1467 --cache-file=FILE cache test results in FILE [disabled]
1468 -C, --config-cache alias for \`--cache-file=config.cache'
1469 -n, --no-create do not create output files
1470 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1472 Installation directories:
1473 --prefix=PREFIX install architecture-independent files in PREFIX
1474 [$ac_default_prefix]
1475 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1476 [PREFIX]
1478 By default, \`make install' will install all the files in
1479 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1480 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1481 for instance \`--prefix=\$HOME'.
1483 For better control, use the options below.
1485 Fine tuning of the installation directories:
1486 --bindir=DIR user executables [EPREFIX/bin]
1487 --sbindir=DIR system admin executables [EPREFIX/sbin]
1488 --libexecdir=DIR program executables [EPREFIX/libexec]
1489 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1490 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1491 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1492 --libdir=DIR object code libraries [EPREFIX/lib]
1493 --includedir=DIR C header files [PREFIX/include]
1494 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1495 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1496 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1497 --infodir=DIR info documentation [DATAROOTDIR/info]
1498 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1499 --mandir=DIR man documentation [DATAROOTDIR/man]
1500 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1501 --htmldir=DIR html documentation [DOCDIR]
1502 --dvidir=DIR dvi documentation [DOCDIR]
1503 --pdfdir=DIR pdf documentation [DOCDIR]
1504 --psdir=DIR ps documentation [DOCDIR]
1505 _ACEOF
1507 cat <<\_ACEOF
1509 System types:
1510 --build=BUILD configure for building on BUILD [guessed]
1511 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1512 _ACEOF
1515 if test -n "$ac_init_help"; then
1516 case $ac_init_help in
1517 short | recursive ) echo "Configuration of PostgreSQL 18devel:";;
1518 esac
1519 cat <<\_ACEOF
1521 Optional Features:
1522 --disable-option-checking ignore unrecognized --enable/--with options
1523 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1524 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1525 --disable-integer-datetimes
1526 obsolete option, no longer supported
1527 --enable-nls[=LANGUAGES]
1528 enable Native Language Support
1529 --disable-rpath do not embed shared library search path in
1530 executables
1531 --enable-debug build with debugging symbols (-g)
1532 --enable-profiling build with profiling enabled
1533 --enable-coverage build with coverage testing instrumentation
1534 --enable-dtrace build with DTrace support
1535 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1536 --enable-injection-points
1537 enable injection points (for testing)
1538 --enable-depend turn on automatic dependency tracking
1539 --enable-cassert enable assertion checks (for debugging)
1540 --disable-largefile omit support for large files
1542 Optional Packages:
1543 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1544 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1545 --with-extra-version=STRING
1546 append STRING to version
1547 --with-template=NAME override operating system template
1548 --with-includes=DIRS look for additional header files in DIRS
1549 --with-libraries=DIRS look for additional libraries in DIRS
1550 --with-libs=DIRS alternative spelling of --with-libraries
1551 --with-pgport=PORTNUM set default port number [5432]
1552 --with-blocksize=BLOCKSIZE
1553 set table block size in kB [8]
1554 --with-segsize=SEGSIZE set table segment size in GB [1]
1555 --with-segsize-blocks=SEGSIZE_BLOCKS
1556 set table segment size in blocks [0]
1557 --with-wal-blocksize=BLOCKSIZE
1558 set WAL block size in kB [8]
1559 --with-llvm build with LLVM based JIT support
1560 --without-icu build without ICU support
1561 --with-tcl build Tcl modules (PL/Tcl)
1562 --with-tclconfig=DIR tclConfig.sh is in DIR
1563 --with-perl build Perl modules (PL/Perl)
1564 --with-python build Python modules (PL/Python)
1565 --with-gssapi build with GSSAPI support
1566 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1567 [postgres]
1568 --with-pam build with PAM support
1569 --with-bsd-auth build with BSD Authentication support
1570 --with-ldap build with LDAP support
1571 --with-bonjour build with Bonjour support
1572 --with-selinux build with SELinux support
1573 --with-systemd build with systemd support
1574 --without-readline do not use GNU Readline nor BSD Libedit for editing
1575 --with-libedit-preferred
1576 prefer BSD Libedit over GNU Readline
1577 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1578 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1579 --with-libxml build with XML support
1580 --with-libxslt use XSLT support when building contrib/xml2
1581 --with-system-tzdata=DIR
1582 use system time zone data in DIR
1583 --without-zlib do not use Zlib
1584 --with-lz4 build with LZ4 support
1585 --with-zstd build with ZSTD support
1586 --with-ssl=LIB use LIB for SSL/TLS support (openssl)
1587 --with-openssl obsolete spelling of --with-ssl=openssl
1589 Some influential environment variables:
1590 CC C compiler command
1591 CFLAGS C compiler flags
1592 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1593 nonstandard directory <lib dir>
1594 LIBS libraries to pass to the linker, e.g. -l<library>
1595 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1596 you have headers in a nonstandard directory <include dir>
1597 CXX C++ compiler command
1598 CXXFLAGS C++ compiler flags
1599 LLVM_CONFIG path to llvm-config command
1600 CLANG path to clang compiler to generate bitcode
1601 CPP C preprocessor
1602 PKG_CONFIG path to pkg-config utility
1603 PKG_CONFIG_PATH
1604 directories to add to pkg-config's search path
1605 PKG_CONFIG_LIBDIR
1606 path overriding pkg-config's built-in search path
1607 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1608 ICU_LIBS linker flags for ICU, overriding pkg-config
1609 XML2_CONFIG path to xml2-config utility
1610 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1611 XML2_LIBS linker flags for XML2, overriding pkg-config
1612 LZ4_CFLAGS C compiler flags for LZ4, overriding pkg-config
1613 LZ4_LIBS linker flags for LZ4, overriding pkg-config
1614 ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
1615 ZSTD_LIBS linker flags for ZSTD, overriding pkg-config
1616 LDFLAGS_EX extra linker flags for linking executables only
1617 LDFLAGS_SL extra linker flags for linking shared libraries only
1618 PERL Perl program
1619 PYTHON Python program
1620 MSGFMT msgfmt program for NLS
1621 TCLSH Tcl interpreter program (tclsh)
1623 Use these variables to override the choices made by `configure' or to help
1624 it to find libraries and programs with nonstandard names/locations.
1626 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1627 PostgreSQL home page: <https://www.postgresql.org/>.
1628 _ACEOF
1629 ac_status=$?
1632 if test "$ac_init_help" = "recursive"; then
1633 # If there are subdirs, report their specific --help.
1634 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1635 test -d "$ac_dir" ||
1636 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1637 continue
1638 ac_builddir=.
1640 case "$ac_dir" in
1641 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1643 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1644 # A ".." for each directory in $ac_dir_suffix.
1645 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1646 case $ac_top_builddir_sub in
1647 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1648 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1649 esac ;;
1650 esac
1651 ac_abs_top_builddir=$ac_pwd
1652 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1653 # for backward compatibility:
1654 ac_top_builddir=$ac_top_build_prefix
1656 case $srcdir in
1657 .) # We are building in place.
1658 ac_srcdir=.
1659 ac_top_srcdir=$ac_top_builddir_sub
1660 ac_abs_top_srcdir=$ac_pwd ;;
1661 [\\/]* | ?:[\\/]* ) # Absolute name.
1662 ac_srcdir=$srcdir$ac_dir_suffix;
1663 ac_top_srcdir=$srcdir
1664 ac_abs_top_srcdir=$srcdir ;;
1665 *) # Relative name.
1666 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1667 ac_top_srcdir=$ac_top_build_prefix$srcdir
1668 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1669 esac
1670 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1672 cd "$ac_dir" || { ac_status=$?; continue; }
1673 # Check for guested configure.
1674 if test -f "$ac_srcdir/configure.gnu"; then
1675 echo &&
1676 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1677 elif test -f "$ac_srcdir/configure"; then
1678 echo &&
1679 $SHELL "$ac_srcdir/configure" --help=recursive
1680 else
1681 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1682 fi || ac_status=$?
1683 cd "$ac_pwd" || { ac_status=$?; break; }
1684 done
1687 test -n "$ac_init_help" && exit $ac_status
1688 if $ac_init_version; then
1689 cat <<\_ACEOF
1690 PostgreSQL configure 18devel
1691 generated by GNU Autoconf 2.69
1693 Copyright (C) 2012 Free Software Foundation, Inc.
1694 This configure script is free software; the Free Software Foundation
1695 gives unlimited permission to copy, distribute and modify it.
1697 Copyright (c) 1996-2024, PostgreSQL Global Development Group
1698 _ACEOF
1699 exit
1702 ## ------------------------ ##
1703 ## Autoconf initialization. ##
1704 ## ------------------------ ##
1706 # ac_fn_c_try_compile LINENO
1707 # --------------------------
1708 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1709 ac_fn_c_try_compile ()
1711 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1712 rm -f conftest.$ac_objext
1713 if { { ac_try="$ac_compile"
1714 case "(($ac_try" in
1715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1716 *) ac_try_echo=$ac_try;;
1717 esac
1718 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1719 $as_echo "$ac_try_echo"; } >&5
1720 (eval "$ac_compile") 2>conftest.err
1721 ac_status=$?
1722 if test -s conftest.err; then
1723 grep -v '^ *+' conftest.err >conftest.er1
1724 cat conftest.er1 >&5
1725 mv -f conftest.er1 conftest.err
1727 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1728 test $ac_status = 0; } && {
1729 test -z "$ac_c_werror_flag" ||
1730 test ! -s conftest.err
1731 } && test -s conftest.$ac_objext; then :
1732 ac_retval=0
1733 else
1734 $as_echo "$as_me: failed program was:" >&5
1735 sed 's/^/| /' conftest.$ac_ext >&5
1737 ac_retval=1
1739 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1740 as_fn_set_status $ac_retval
1742 } # ac_fn_c_try_compile
1744 # ac_fn_cxx_try_compile LINENO
1745 # ----------------------------
1746 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1747 ac_fn_cxx_try_compile ()
1749 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1750 rm -f conftest.$ac_objext
1751 if { { ac_try="$ac_compile"
1752 case "(($ac_try" in
1753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1754 *) ac_try_echo=$ac_try;;
1755 esac
1756 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1757 $as_echo "$ac_try_echo"; } >&5
1758 (eval "$ac_compile") 2>conftest.err
1759 ac_status=$?
1760 if test -s conftest.err; then
1761 grep -v '^ *+' conftest.err >conftest.er1
1762 cat conftest.er1 >&5
1763 mv -f conftest.er1 conftest.err
1765 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1766 test $ac_status = 0; } && {
1767 test -z "$ac_cxx_werror_flag" ||
1768 test ! -s conftest.err
1769 } && test -s conftest.$ac_objext; then :
1770 ac_retval=0
1771 else
1772 $as_echo "$as_me: failed program was:" >&5
1773 sed 's/^/| /' conftest.$ac_ext >&5
1775 ac_retval=1
1777 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1778 as_fn_set_status $ac_retval
1780 } # ac_fn_cxx_try_compile
1782 # ac_fn_c_try_link LINENO
1783 # -----------------------
1784 # Try to link conftest.$ac_ext, and return whether this succeeded.
1785 ac_fn_c_try_link ()
1787 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1788 rm -f conftest.$ac_objext conftest$ac_exeext
1789 if { { ac_try="$ac_link"
1790 case "(($ac_try" in
1791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1792 *) ac_try_echo=$ac_try;;
1793 esac
1794 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1795 $as_echo "$ac_try_echo"; } >&5
1796 (eval "$ac_link") 2>conftest.err
1797 ac_status=$?
1798 if test -s conftest.err; then
1799 grep -v '^ *+' conftest.err >conftest.er1
1800 cat conftest.er1 >&5
1801 mv -f conftest.er1 conftest.err
1803 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1804 test $ac_status = 0; } && {
1805 test -z "$ac_c_werror_flag" ||
1806 test ! -s conftest.err
1807 } && test -s conftest$ac_exeext && {
1808 test "$cross_compiling" = yes ||
1809 test -x conftest$ac_exeext
1810 }; then :
1811 ac_retval=0
1812 else
1813 $as_echo "$as_me: failed program was:" >&5
1814 sed 's/^/| /' conftest.$ac_ext >&5
1816 ac_retval=1
1818 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1819 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1820 # interfere with the next link command; also delete a directory that is
1821 # left behind by Apple's compiler. We do this before executing the actions.
1822 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1823 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1824 as_fn_set_status $ac_retval
1826 } # ac_fn_c_try_link
1828 # ac_fn_c_try_cpp LINENO
1829 # ----------------------
1830 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1831 ac_fn_c_try_cpp ()
1833 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1834 if { { ac_try="$ac_cpp conftest.$ac_ext"
1835 case "(($ac_try" in
1836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1837 *) ac_try_echo=$ac_try;;
1838 esac
1839 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1840 $as_echo "$ac_try_echo"; } >&5
1841 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1842 ac_status=$?
1843 if test -s conftest.err; then
1844 grep -v '^ *+' conftest.err >conftest.er1
1845 cat conftest.er1 >&5
1846 mv -f conftest.er1 conftest.err
1848 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1849 test $ac_status = 0; } > conftest.i && {
1850 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1851 test ! -s conftest.err
1852 }; then :
1853 ac_retval=0
1854 else
1855 $as_echo "$as_me: failed program was:" >&5
1856 sed 's/^/| /' conftest.$ac_ext >&5
1858 ac_retval=1
1860 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1861 as_fn_set_status $ac_retval
1863 } # ac_fn_c_try_cpp
1865 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1866 # -------------------------------------------------------
1867 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1868 # the include files in INCLUDES and setting the cache variable VAR
1869 # accordingly.
1870 ac_fn_c_check_header_mongrel ()
1872 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1873 if eval \${$3+:} false; then :
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1875 $as_echo_n "checking for $2... " >&6; }
1876 if eval \${$3+:} false; then :
1877 $as_echo_n "(cached) " >&6
1879 eval ac_res=\$$3
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1881 $as_echo "$ac_res" >&6; }
1882 else
1883 # Is the header compilable?
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1885 $as_echo_n "checking $2 usability... " >&6; }
1886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1887 /* end confdefs.h. */
1889 #include <$2>
1890 _ACEOF
1891 if ac_fn_c_try_compile "$LINENO"; then :
1892 ac_header_compiler=yes
1893 else
1894 ac_header_compiler=no
1896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1898 $as_echo "$ac_header_compiler" >&6; }
1900 # Is the header present?
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1902 $as_echo_n "checking $2 presence... " >&6; }
1903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1904 /* end confdefs.h. */
1905 #include <$2>
1906 _ACEOF
1907 if ac_fn_c_try_cpp "$LINENO"; then :
1908 ac_header_preproc=yes
1909 else
1910 ac_header_preproc=no
1912 rm -f conftest.err conftest.i conftest.$ac_ext
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1914 $as_echo "$ac_header_preproc" >&6; }
1916 # So? What about this header?
1917 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1918 yes:no: )
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1920 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1922 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1924 no:yes:* )
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1926 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1928 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1930 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1932 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1934 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1935 ( $as_echo "## ---------------------------------------------- ##
1936 ## Report this to pgsql-bugs@lists.postgresql.org ##
1937 ## ---------------------------------------------- ##"
1938 ) | sed "s/^/$as_me: WARNING: /" >&2
1940 esac
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1942 $as_echo_n "checking for $2... " >&6; }
1943 if eval \${$3+:} false; then :
1944 $as_echo_n "(cached) " >&6
1945 else
1946 eval "$3=\$ac_header_compiler"
1948 eval ac_res=\$$3
1949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1950 $as_echo "$ac_res" >&6; }
1952 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1954 } # ac_fn_c_check_header_mongrel
1956 # ac_fn_c_try_run LINENO
1957 # ----------------------
1958 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1959 # that executables *can* be run.
1960 ac_fn_c_try_run ()
1962 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1963 if { { ac_try="$ac_link"
1964 case "(($ac_try" in
1965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1966 *) ac_try_echo=$ac_try;;
1967 esac
1968 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1969 $as_echo "$ac_try_echo"; } >&5
1970 (eval "$ac_link") 2>&5
1971 ac_status=$?
1972 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1973 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1974 { { case "(($ac_try" in
1975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1976 *) ac_try_echo=$ac_try;;
1977 esac
1978 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1979 $as_echo "$ac_try_echo"; } >&5
1980 (eval "$ac_try") 2>&5
1981 ac_status=$?
1982 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1983 test $ac_status = 0; }; }; then :
1984 ac_retval=0
1985 else
1986 $as_echo "$as_me: program exited with status $ac_status" >&5
1987 $as_echo "$as_me: failed program was:" >&5
1988 sed 's/^/| /' conftest.$ac_ext >&5
1990 ac_retval=$ac_status
1992 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1993 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1994 as_fn_set_status $ac_retval
1996 } # ac_fn_c_try_run
1998 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1999 # -------------------------------------------------------
2000 # Tests whether HEADER exists and can be compiled using the include files in
2001 # INCLUDES, setting the cache variable VAR accordingly.
2002 ac_fn_c_check_header_compile ()
2004 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2006 $as_echo_n "checking for $2... " >&6; }
2007 if eval \${$3+:} false; then :
2008 $as_echo_n "(cached) " >&6
2009 else
2010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2011 /* end confdefs.h. */
2013 #include <$2>
2014 _ACEOF
2015 if ac_fn_c_try_compile "$LINENO"; then :
2016 eval "$3=yes"
2017 else
2018 eval "$3=no"
2020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2022 eval ac_res=\$$3
2023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2024 $as_echo "$ac_res" >&6; }
2025 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2027 } # ac_fn_c_check_header_compile
2029 # ac_fn_c_check_func LINENO FUNC VAR
2030 # ----------------------------------
2031 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2032 ac_fn_c_check_func ()
2034 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2036 $as_echo_n "checking for $2... " >&6; }
2037 if eval \${$3+:} false; then :
2038 $as_echo_n "(cached) " >&6
2039 else
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041 /* end confdefs.h. */
2042 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2043 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2044 #define $2 innocuous_$2
2046 /* System header to define __stub macros and hopefully few prototypes,
2047 which can conflict with char $2 (); below.
2048 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2049 <limits.h> exists even on freestanding compilers. */
2051 #ifdef __STDC__
2052 # include <limits.h>
2053 #else
2054 # include <assert.h>
2055 #endif
2057 #undef $2
2059 /* Override any GCC internal prototype to avoid an error.
2060 Use char because int might match the return type of a GCC
2061 builtin and then its argument prototype would still apply. */
2062 #ifdef __cplusplus
2063 extern "C"
2064 #endif
2065 char $2 ();
2066 /* The GNU C library defines this for functions which it implements
2067 to always fail with ENOSYS. Some functions are actually named
2068 something starting with __ and the normal name is an alias. */
2069 #if defined __stub_$2 || defined __stub___$2
2070 choke me
2071 #endif
2074 main ()
2076 return $2 ();
2078 return 0;
2080 _ACEOF
2081 if ac_fn_c_try_link "$LINENO"; then :
2082 eval "$3=yes"
2083 else
2084 eval "$3=no"
2086 rm -f core conftest.err conftest.$ac_objext \
2087 conftest$ac_exeext conftest.$ac_ext
2089 eval ac_res=\$$3
2090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2091 $as_echo "$ac_res" >&6; }
2092 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2094 } # ac_fn_c_check_func
2096 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2097 # -------------------------------------------
2098 # Tests whether TYPE exists after having included INCLUDES, setting cache
2099 # variable VAR accordingly.
2100 ac_fn_c_check_type ()
2102 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2104 $as_echo_n "checking for $2... " >&6; }
2105 if eval \${$3+:} false; then :
2106 $as_echo_n "(cached) " >&6
2107 else
2108 eval "$3=no"
2109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110 /* end confdefs.h. */
2113 main ()
2115 if (sizeof ($2))
2116 return 0;
2118 return 0;
2120 _ACEOF
2121 if ac_fn_c_try_compile "$LINENO"; then :
2122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123 /* end confdefs.h. */
2126 main ()
2128 if (sizeof (($2)))
2129 return 0;
2131 return 0;
2133 _ACEOF
2134 if ac_fn_c_try_compile "$LINENO"; then :
2136 else
2137 eval "$3=yes"
2139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143 eval ac_res=\$$3
2144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2145 $as_echo "$ac_res" >&6; }
2146 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2148 } # ac_fn_c_check_type
2150 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2151 # ----------------------------------------------------
2152 # Tries to find if the field MEMBER exists in type AGGR, after including
2153 # INCLUDES, setting cache variable VAR accordingly.
2154 ac_fn_c_check_member ()
2156 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2158 $as_echo_n "checking for $2.$3... " >&6; }
2159 if eval \${$4+:} false; then :
2160 $as_echo_n "(cached) " >&6
2161 else
2162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2163 /* end confdefs.h. */
2166 main ()
2168 static $2 ac_aggr;
2169 if (ac_aggr.$3)
2170 return 0;
2172 return 0;
2174 _ACEOF
2175 if ac_fn_c_try_compile "$LINENO"; then :
2176 eval "$4=yes"
2177 else
2178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2179 /* end confdefs.h. */
2182 main ()
2184 static $2 ac_aggr;
2185 if (sizeof ac_aggr.$3)
2186 return 0;
2188 return 0;
2190 _ACEOF
2191 if ac_fn_c_try_compile "$LINENO"; then :
2192 eval "$4=yes"
2193 else
2194 eval "$4=no"
2196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2200 eval ac_res=\$$4
2201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2202 $as_echo "$ac_res" >&6; }
2203 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2205 } # ac_fn_c_check_member
2207 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2208 # --------------------------------------------
2209 # Tries to find the compile-time value of EXPR in a program that includes
2210 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2211 # computed
2212 ac_fn_c_compute_int ()
2214 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2215 if test "$cross_compiling" = yes; then
2216 # Depending upon the size, compute the lo and hi bounds.
2217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2218 /* end confdefs.h. */
2221 main ()
2223 static int test_array [1 - 2 * !(($2) >= 0)];
2224 test_array [0] = 0;
2225 return test_array [0];
2228 return 0;
2230 _ACEOF
2231 if ac_fn_c_try_compile "$LINENO"; then :
2232 ac_lo=0 ac_mid=0
2233 while :; do
2234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2235 /* end confdefs.h. */
2238 main ()
2240 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2241 test_array [0] = 0;
2242 return test_array [0];
2245 return 0;
2247 _ACEOF
2248 if ac_fn_c_try_compile "$LINENO"; then :
2249 ac_hi=$ac_mid; break
2250 else
2251 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2252 if test $ac_lo -le $ac_mid; then
2253 ac_lo= ac_hi=
2254 break
2256 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2259 done
2260 else
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262 /* end confdefs.h. */
2265 main ()
2267 static int test_array [1 - 2 * !(($2) < 0)];
2268 test_array [0] = 0;
2269 return test_array [0];
2272 return 0;
2274 _ACEOF
2275 if ac_fn_c_try_compile "$LINENO"; then :
2276 ac_hi=-1 ac_mid=-1
2277 while :; do
2278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2279 /* end confdefs.h. */
2282 main ()
2284 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2285 test_array [0] = 0;
2286 return test_array [0];
2289 return 0;
2291 _ACEOF
2292 if ac_fn_c_try_compile "$LINENO"; then :
2293 ac_lo=$ac_mid; break
2294 else
2295 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2296 if test $ac_mid -le $ac_hi; then
2297 ac_lo= ac_hi=
2298 break
2300 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2303 done
2304 else
2305 ac_lo= ac_hi=
2307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2310 # Binary search between lo and hi bounds.
2311 while test "x$ac_lo" != "x$ac_hi"; do
2312 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2314 /* end confdefs.h. */
2317 main ()
2319 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2320 test_array [0] = 0;
2321 return test_array [0];
2324 return 0;
2326 _ACEOF
2327 if ac_fn_c_try_compile "$LINENO"; then :
2328 ac_hi=$ac_mid
2329 else
2330 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333 done
2334 case $ac_lo in #((
2335 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2336 '') ac_retval=1 ;;
2337 esac
2338 else
2339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2340 /* end confdefs.h. */
2342 static long int longval () { return $2; }
2343 static unsigned long int ulongval () { return $2; }
2344 #include <stdio.h>
2345 #include <stdlib.h>
2347 main ()
2350 FILE *f = fopen ("conftest.val", "w");
2351 if (! f)
2352 return 1;
2353 if (($2) < 0)
2355 long int i = longval ();
2356 if (i != ($2))
2357 return 1;
2358 fprintf (f, "%ld", i);
2360 else
2362 unsigned long int i = ulongval ();
2363 if (i != ($2))
2364 return 1;
2365 fprintf (f, "%lu", i);
2367 /* Do not output a trailing newline, as this causes \r\n confusion
2368 on some platforms. */
2369 return ferror (f) || fclose (f) != 0;
2372 return 0;
2374 _ACEOF
2375 if ac_fn_c_try_run "$LINENO"; then :
2376 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2377 else
2378 ac_retval=1
2380 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2381 conftest.$ac_objext conftest.beam conftest.$ac_ext
2382 rm -f conftest.val
2385 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2386 as_fn_set_status $ac_retval
2388 } # ac_fn_c_compute_int
2390 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2391 # ---------------------------------------------
2392 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2393 # accordingly.
2394 ac_fn_c_check_decl ()
2396 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2397 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2398 as_decl_name=`echo $2|sed 's/ *(.*//'`
2399 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2401 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2402 if eval \${$3+:} false; then :
2403 $as_echo_n "(cached) " >&6
2404 else
2405 ac_save_werror_flag=$ac_c_werror_flag
2406 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2408 /* end confdefs.h. */
2411 main ()
2413 #ifndef $as_decl_name
2414 #ifdef __cplusplus
2415 (void) $as_decl_use;
2416 #else
2417 (void) $as_decl_name;
2418 #endif
2419 #endif
2422 return 0;
2424 _ACEOF
2425 if ac_fn_c_try_compile "$LINENO"; then :
2426 eval "$3=yes"
2427 else
2428 eval "$3=no"
2430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2431 ac_c_werror_flag=$ac_save_werror_flag
2433 eval ac_res=\$$3
2434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2435 $as_echo "$ac_res" >&6; }
2436 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2438 } # ac_fn_c_check_decl
2439 cat >config.log <<_ACEOF
2440 This file contains any messages produced by compilers while
2441 running configure, to aid debugging if configure makes a mistake.
2443 It was created by PostgreSQL $as_me 18devel, which was
2444 generated by GNU Autoconf 2.69. Invocation command line was
2446 $ $0 $@
2448 _ACEOF
2449 exec 5>>config.log
2451 cat <<_ASUNAME
2452 ## --------- ##
2453 ## Platform. ##
2454 ## --------- ##
2456 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2457 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2458 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2459 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2460 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2462 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2463 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2465 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2466 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2467 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2468 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2469 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2470 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2471 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2473 _ASUNAME
2475 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2476 for as_dir in $PATH
2478 IFS=$as_save_IFS
2479 test -z "$as_dir" && as_dir=.
2480 $as_echo "PATH: $as_dir"
2481 done
2482 IFS=$as_save_IFS
2484 } >&5
2486 cat >&5 <<_ACEOF
2489 ## ----------- ##
2490 ## Core tests. ##
2491 ## ----------- ##
2493 _ACEOF
2496 # Keep a trace of the command line.
2497 # Strip out --no-create and --no-recursion so they do not pile up.
2498 # Strip out --silent because we don't want to record it for future runs.
2499 # Also quote any args containing shell meta-characters.
2500 # Make two passes to allow for proper duplicate-argument suppression.
2501 ac_configure_args=
2502 ac_configure_args0=
2503 ac_configure_args1=
2504 ac_must_keep_next=false
2505 for ac_pass in 1 2
2507 for ac_arg
2509 case $ac_arg in
2510 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2511 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2512 | -silent | --silent | --silen | --sile | --sil)
2513 continue ;;
2514 *\'*)
2515 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2516 esac
2517 case $ac_pass in
2518 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2520 as_fn_append ac_configure_args1 " '$ac_arg'"
2521 if test $ac_must_keep_next = true; then
2522 ac_must_keep_next=false # Got value, back to normal.
2523 else
2524 case $ac_arg in
2525 *=* | --config-cache | -C | -disable-* | --disable-* \
2526 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2527 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2528 | -with-* | --with-* | -without-* | --without-* | --x)
2529 case "$ac_configure_args0 " in
2530 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2531 esac
2533 -* ) ac_must_keep_next=true ;;
2534 esac
2536 as_fn_append ac_configure_args " '$ac_arg'"
2538 esac
2539 done
2540 done
2541 { ac_configure_args0=; unset ac_configure_args0;}
2542 { ac_configure_args1=; unset ac_configure_args1;}
2544 # When interrupted or exit'd, cleanup temporary files, and complete
2545 # config.log. We remove comments because anyway the quotes in there
2546 # would cause problems or look ugly.
2547 # WARNING: Use '\'' to represent an apostrophe within the trap.
2548 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2549 trap 'exit_status=$?
2550 # Save into config.log some information that might help in debugging.
2552 echo
2554 $as_echo "## ---------------- ##
2555 ## Cache variables. ##
2556 ## ---------------- ##"
2557 echo
2558 # The following way of writing the cache mishandles newlines in values,
2560 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2561 eval ac_val=\$$ac_var
2562 case $ac_val in #(
2563 *${as_nl}*)
2564 case $ac_var in #(
2565 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2566 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2567 esac
2568 case $ac_var in #(
2569 _ | IFS | as_nl) ;; #(
2570 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2571 *) { eval $ac_var=; unset $ac_var;} ;;
2572 esac ;;
2573 esac
2574 done
2575 (set) 2>&1 |
2576 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2577 *${as_nl}ac_space=\ *)
2578 sed -n \
2579 "s/'\''/'\''\\\\'\'''\''/g;
2580 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2581 ;; #(
2583 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2585 esac |
2586 sort
2588 echo
2590 $as_echo "## ----------------- ##
2591 ## Output variables. ##
2592 ## ----------------- ##"
2593 echo
2594 for ac_var in $ac_subst_vars
2596 eval ac_val=\$$ac_var
2597 case $ac_val in
2598 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2599 esac
2600 $as_echo "$ac_var='\''$ac_val'\''"
2601 done | sort
2602 echo
2604 if test -n "$ac_subst_files"; then
2605 $as_echo "## ------------------- ##
2606 ## File substitutions. ##
2607 ## ------------------- ##"
2608 echo
2609 for ac_var in $ac_subst_files
2611 eval ac_val=\$$ac_var
2612 case $ac_val in
2613 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2614 esac
2615 $as_echo "$ac_var='\''$ac_val'\''"
2616 done | sort
2617 echo
2620 if test -s confdefs.h; then
2621 $as_echo "## ----------- ##
2622 ## confdefs.h. ##
2623 ## ----------- ##"
2624 echo
2625 cat confdefs.h
2626 echo
2628 test "$ac_signal" != 0 &&
2629 $as_echo "$as_me: caught signal $ac_signal"
2630 $as_echo "$as_me: exit $exit_status"
2631 } >&5
2632 rm -f core *.core core.conftest.* &&
2633 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2634 exit $exit_status
2636 for ac_signal in 1 2 13 15; do
2637 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2638 done
2639 ac_signal=0
2641 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2642 rm -f -r conftest* confdefs.h
2644 $as_echo "/* confdefs.h */" > confdefs.h
2646 # Predefined preprocessor variables.
2648 cat >>confdefs.h <<_ACEOF
2649 #define PACKAGE_NAME "$PACKAGE_NAME"
2650 _ACEOF
2652 cat >>confdefs.h <<_ACEOF
2653 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2654 _ACEOF
2656 cat >>confdefs.h <<_ACEOF
2657 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2658 _ACEOF
2660 cat >>confdefs.h <<_ACEOF
2661 #define PACKAGE_STRING "$PACKAGE_STRING"
2662 _ACEOF
2664 cat >>confdefs.h <<_ACEOF
2665 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2666 _ACEOF
2668 cat >>confdefs.h <<_ACEOF
2669 #define PACKAGE_URL "$PACKAGE_URL"
2670 _ACEOF
2673 # Let the site file select an alternate cache file if it wants to.
2674 # Prefer an explicitly selected file to automatically selected ones.
2675 ac_site_file1=NONE
2676 ac_site_file2=NONE
2677 if test -n "$CONFIG_SITE"; then
2678 # We do not want a PATH search for config.site.
2679 case $CONFIG_SITE in #((
2680 -*) ac_site_file1=./$CONFIG_SITE;;
2681 */*) ac_site_file1=$CONFIG_SITE;;
2682 *) ac_site_file1=./$CONFIG_SITE;;
2683 esac
2684 elif test "x$prefix" != xNONE; then
2685 ac_site_file1=$prefix/share/config.site
2686 ac_site_file2=$prefix/etc/config.site
2687 else
2688 ac_site_file1=$ac_default_prefix/share/config.site
2689 ac_site_file2=$ac_default_prefix/etc/config.site
2691 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2693 test "x$ac_site_file" = xNONE && continue
2694 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2695 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2696 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2697 sed 's/^/| /' "$ac_site_file" >&5
2698 . "$ac_site_file" \
2699 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2700 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2701 as_fn_error $? "failed to load site script $ac_site_file
2702 See \`config.log' for more details" "$LINENO" 5; }
2704 done
2706 if test -r "$cache_file"; then
2707 # Some versions of bash will fail to source /dev/null (special files
2708 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2709 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2710 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2711 $as_echo "$as_me: loading cache $cache_file" >&6;}
2712 case $cache_file in
2713 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2714 *) . "./$cache_file";;
2715 esac
2717 else
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2719 $as_echo "$as_me: creating cache $cache_file" >&6;}
2720 >$cache_file
2723 # Check that the precious variables saved in the cache have kept the same
2724 # value.
2725 ac_cache_corrupted=false
2726 for ac_var in $ac_precious_vars; do
2727 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2728 eval ac_new_set=\$ac_env_${ac_var}_set
2729 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2730 eval ac_new_val=\$ac_env_${ac_var}_value
2731 case $ac_old_set,$ac_new_set in
2732 set,)
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2734 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2735 ac_cache_corrupted=: ;;
2736 ,set)
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2738 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2739 ac_cache_corrupted=: ;;
2740 ,);;
2742 if test "x$ac_old_val" != "x$ac_new_val"; then
2743 # differences in whitespace do not lead to failure.
2744 ac_old_val_w=`echo x $ac_old_val`
2745 ac_new_val_w=`echo x $ac_new_val`
2746 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2748 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2749 ac_cache_corrupted=:
2750 else
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2752 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2753 eval $ac_var=\$ac_old_val
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2756 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2758 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2759 fi;;
2760 esac
2761 # Pass precious variables to config.status.
2762 if test "$ac_new_set" = set; then
2763 case $ac_new_val in
2764 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2765 *) ac_arg=$ac_var=$ac_new_val ;;
2766 esac
2767 case " $ac_configure_args " in
2768 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2769 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2770 esac
2772 done
2773 if $ac_cache_corrupted; then
2774 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2775 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2776 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2777 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2778 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2780 ## -------------------- ##
2781 ## Main body of script. ##
2782 ## -------------------- ##
2784 ac_ext=c
2785 ac_cpp='$CPP $CPPFLAGS'
2786 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2787 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2788 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2795 ac_aux_dir=
2796 for ac_dir in config "$srcdir"/config; do
2797 if test -f "$ac_dir/install-sh"; then
2798 ac_aux_dir=$ac_dir
2799 ac_install_sh="$ac_aux_dir/install-sh -c"
2800 break
2801 elif test -f "$ac_dir/install.sh"; then
2802 ac_aux_dir=$ac_dir
2803 ac_install_sh="$ac_aux_dir/install.sh -c"
2804 break
2805 elif test -f "$ac_dir/shtool"; then
2806 ac_aux_dir=$ac_dir
2807 ac_install_sh="$ac_aux_dir/shtool install -c"
2808 break
2810 done
2811 if test -z "$ac_aux_dir"; then
2812 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2815 # These three variables are undocumented and unsupported,
2816 # and are intended to be withdrawn in a future Autoconf release.
2817 # They can cause serious problems if a builder's source tree is in a directory
2818 # whose full name contains unusual characters.
2819 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2820 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2821 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2826 cat >>confdefs.h <<_ACEOF
2827 #define CONFIGURE_ARGS "$ac_configure_args"
2828 _ACEOF
2831 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2832 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2833 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2836 cat >>confdefs.h <<_ACEOF
2837 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2838 _ACEOF
2841 cat >>confdefs.h <<_ACEOF
2842 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2843 _ACEOF
2846 cat >>confdefs.h <<_ACEOF
2847 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2848 _ACEOF
2854 # Check whether --with-extra-version was given.
2855 if test "${with_extra_version+set}" = set; then :
2856 withval=$with_extra_version;
2857 case $withval in
2858 yes)
2859 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2862 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2865 PG_VERSION="$PACKAGE_VERSION$withval"
2867 esac
2869 else
2870 PG_VERSION="$PACKAGE_VERSION"
2875 cat >>confdefs.h <<_ACEOF
2876 #define PG_VERSION "$PG_VERSION"
2877 _ACEOF
2880 # Make sure we can run config.sub.
2881 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2882 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2885 $as_echo_n "checking build system type... " >&6; }
2886 if ${ac_cv_build+:} false; then :
2887 $as_echo_n "(cached) " >&6
2888 else
2889 ac_build_alias=$build_alias
2890 test "x$ac_build_alias" = x &&
2891 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2892 test "x$ac_build_alias" = x &&
2893 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2894 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2895 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2899 $as_echo "$ac_cv_build" >&6; }
2900 case $ac_cv_build in
2901 *-*-*) ;;
2902 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2903 esac
2904 build=$ac_cv_build
2905 ac_save_IFS=$IFS; IFS='-'
2906 set x $ac_cv_build
2907 shift
2908 build_cpu=$1
2909 build_vendor=$2
2910 shift; shift
2911 # Remember, the first character of IFS is used to create $*,
2912 # except with old shells:
2913 build_os=$*
2914 IFS=$ac_save_IFS
2915 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2919 $as_echo_n "checking host system type... " >&6; }
2920 if ${ac_cv_host+:} false; then :
2921 $as_echo_n "(cached) " >&6
2922 else
2923 if test "x$host_alias" = x; then
2924 ac_cv_host=$ac_cv_build
2925 else
2926 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2927 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2932 $as_echo "$ac_cv_host" >&6; }
2933 case $ac_cv_host in
2934 *-*-*) ;;
2935 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2936 esac
2937 host=$ac_cv_host
2938 ac_save_IFS=$IFS; IFS='-'
2939 set x $ac_cv_host
2940 shift
2941 host_cpu=$1
2942 host_vendor=$2
2943 shift; shift
2944 # Remember, the first character of IFS is used to create $*,
2945 # except with old shells:
2946 host_os=$*
2947 IFS=$ac_save_IFS
2948 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2952 template=
2953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2954 $as_echo_n "checking which template to use... " >&6; }
2959 # Check whether --with-template was given.
2960 if test "${with_template+set}" = set; then :
2961 withval=$with_template;
2962 case $withval in
2963 yes)
2964 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2967 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2971 case $withval in
2972 list) echo; ls "$srcdir/src/template"; exit;;
2973 *) if test -f "$srcdir/src/template/$with_template" ; then
2974 template=$withval
2975 else
2976 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2977 fi;;
2978 esac
2981 esac
2983 else
2985 # --with-template not given
2987 case $host_os in
2988 cygwin*|msys*) template=cygwin ;;
2989 darwin*) template=darwin ;;
2990 dragonfly*) template=netbsd ;;
2991 freebsd*) template=freebsd ;;
2992 linux*|gnu*|k*bsd*-gnu)
2993 template=linux ;;
2994 mingw*) template=win32 ;;
2995 netbsd*) template=netbsd ;;
2996 openbsd*) template=openbsd ;;
2997 solaris*) template=solaris ;;
2998 esac
3000 if test x"$template" = x"" ; then
3001 as_fn_error $? "
3002 *******************************************************************
3003 PostgreSQL has apparently not been ported to your platform yet.
3004 To try a manual configuration, look into the src/template directory
3005 for a similar platform and use the '--with-template=' option.
3007 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
3008 rectifying this. Include the above 'checking host system type...'
3009 line.
3010 *******************************************************************
3011 " "$LINENO" 5
3019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3020 $as_echo "$template" >&6; }
3022 PORTNAME=$template
3025 # Initialize default assumption that we do not need separate assembly code
3026 # for TAS (test-and-set). This can be overridden by the template file
3027 # when it's executed.
3028 need_tas=no
3029 tas_file=dummy.s
3031 # Default, works for most platforms, override in template file if needed
3032 DLSUFFIX=".so"
3037 ## Command line options
3041 # Add non-standard directories to the include path
3046 # Check whether --with-includes was given.
3047 if test "${with_includes+set}" = set; then :
3048 withval=$with_includes;
3049 case $withval in
3050 yes)
3051 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3054 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3059 esac
3067 # Add non-standard directories to the library search path
3072 # Check whether --with-libraries was given.
3073 if test "${with_libraries+set}" = set; then :
3074 withval=$with_libraries;
3075 case $withval in
3076 yes)
3077 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3080 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3083 LIBRARY_DIRS=$withval
3085 esac
3094 # Check whether --with-libs was given.
3095 if test "${with_libs+set}" = set; then :
3096 withval=$with_libs;
3097 case $withval in
3098 yes)
3099 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3102 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3105 LIBRARY_DIRS=$withval
3107 esac
3115 # 64-bit integer date/time storage is now the only option, but to avoid
3116 # unnecessary breakage of build scripts, continue to accept an explicit
3117 # "--enable-integer-datetimes" switch.
3121 # Check whether --enable-integer-datetimes was given.
3122 if test "${enable_integer_datetimes+set}" = set; then :
3123 enableval=$enable_integer_datetimes;
3124 case $enableval in
3125 yes)
3129 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3132 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3134 esac
3136 else
3137 enable_integer_datetimes=yes
3145 # NLS
3147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3148 $as_echo_n "checking whether NLS is wanted... " >&6; }
3151 # Check whether --enable-nls was given.
3152 if test "${enable_nls+set}" = set; then :
3153 enableval=$enable_nls;
3154 case $enableval in
3155 yes)
3162 enable_nls=yes
3163 WANTED_LANGUAGES=$enableval
3165 esac
3167 else
3168 enable_nls=no
3173 if test "$enable_nls" = yes; then
3175 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3180 $as_echo "$enable_nls" >&6; }
3185 # Default port number (--with-pgport), default 5432
3187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3188 $as_echo_n "checking for default port number... " >&6; }
3192 # Check whether --with-pgport was given.
3193 if test "${with_pgport+set}" = set; then :
3194 withval=$with_pgport;
3195 case $withval in
3196 yes)
3197 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3200 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3203 default_port=$withval
3205 esac
3207 else
3208 default_port=5432
3212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3213 $as_echo "$default_port" >&6; }
3214 # Need both of these because some places want an integer and some a string
3216 cat >>confdefs.h <<_ACEOF
3217 #define DEF_PGPORT ${default_port}
3218 _ACEOF
3221 cat >>confdefs.h <<_ACEOF
3222 #define DEF_PGPORT_STR "${default_port}"
3223 _ACEOF
3227 # It's worth validating port; you can get very confusing errors otherwise
3228 if test x"$default_port" = x""; then
3229 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3230 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3231 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3232 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3233 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3234 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3235 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3239 # '-rpath'-like feature can be disabled
3243 # Check whether --enable-rpath was given.
3244 if test "${enable_rpath+set}" = set; then :
3245 enableval=$enable_rpath;
3246 case $enableval in
3247 yes)
3254 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3256 esac
3258 else
3259 enable_rpath=yes
3267 # --enable-debug adds -g to compiler flags
3271 # Check whether --enable-debug was given.
3272 if test "${enable_debug+set}" = set; then :
3273 enableval=$enable_debug;
3274 case $enableval in
3275 yes)
3282 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3284 esac
3286 else
3287 enable_debug=no
3295 # --enable-profiling enables gcc profiling
3299 # Check whether --enable-profiling was given.
3300 if test "${enable_profiling+set}" = set; then :
3301 enableval=$enable_profiling;
3302 case $enableval in
3303 yes)
3310 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3312 esac
3314 else
3315 enable_profiling=no
3322 # --enable-coverage enables generation of code coverage metrics with gcov
3326 # Check whether --enable-coverage was given.
3327 if test "${enable_coverage+set}" = set; then :
3328 enableval=$enable_coverage;
3329 case $enableval in
3330 yes)
3331 if test -z "$GCOV"; then
3332 for ac_prog in gcov
3334 # Extract the first word of "$ac_prog", so it can be a program name with args.
3335 set dummy $ac_prog; ac_word=$2
3336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3337 $as_echo_n "checking for $ac_word... " >&6; }
3338 if ${ac_cv_path_GCOV+:} false; then :
3339 $as_echo_n "(cached) " >&6
3340 else
3341 case $GCOV in
3342 [\\/]* | ?:[\\/]*)
3343 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3346 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3347 for as_dir in $PATH
3349 IFS=$as_save_IFS
3350 test -z "$as_dir" && as_dir=.
3351 for ac_exec_ext in '' $ac_executable_extensions; do
3352 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3353 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3354 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3355 break 2
3357 done
3358 done
3359 IFS=$as_save_IFS
3362 esac
3364 GCOV=$ac_cv_path_GCOV
3365 if test -n "$GCOV"; then
3366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3367 $as_echo "$GCOV" >&6; }
3368 else
3369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3370 $as_echo "no" >&6; }
3374 test -n "$GCOV" && break
3375 done
3377 else
3378 # Report the value of GCOV in configure's output in all cases.
3379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3380 $as_echo_n "checking for GCOV... " >&6; }
3381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3382 $as_echo "$GCOV" >&6; }
3385 if test -z "$GCOV"; then
3386 as_fn_error $? "gcov not found" "$LINENO" 5
3388 if test -z "$LCOV"; then
3389 for ac_prog in lcov
3391 # Extract the first word of "$ac_prog", so it can be a program name with args.
3392 set dummy $ac_prog; ac_word=$2
3393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3394 $as_echo_n "checking for $ac_word... " >&6; }
3395 if ${ac_cv_path_LCOV+:} false; then :
3396 $as_echo_n "(cached) " >&6
3397 else
3398 case $LCOV in
3399 [\\/]* | ?:[\\/]*)
3400 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3403 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3404 for as_dir in $PATH
3406 IFS=$as_save_IFS
3407 test -z "$as_dir" && as_dir=.
3408 for ac_exec_ext in '' $ac_executable_extensions; do
3409 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3410 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3411 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3412 break 2
3414 done
3415 done
3416 IFS=$as_save_IFS
3419 esac
3421 LCOV=$ac_cv_path_LCOV
3422 if test -n "$LCOV"; then
3423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3424 $as_echo "$LCOV" >&6; }
3425 else
3426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3427 $as_echo "no" >&6; }
3431 test -n "$LCOV" && break
3432 done
3434 else
3435 # Report the value of LCOV in configure's output in all cases.
3436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3437 $as_echo_n "checking for LCOV... " >&6; }
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3439 $as_echo "$LCOV" >&6; }
3442 if test -z "$LCOV"; then
3443 as_fn_error $? "lcov not found" "$LINENO" 5
3445 if test -z "$GENHTML"; then
3446 for ac_prog in genhtml
3448 # Extract the first word of "$ac_prog", so it can be a program name with args.
3449 set dummy $ac_prog; ac_word=$2
3450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3451 $as_echo_n "checking for $ac_word... " >&6; }
3452 if ${ac_cv_path_GENHTML+:} false; then :
3453 $as_echo_n "(cached) " >&6
3454 else
3455 case $GENHTML in
3456 [\\/]* | ?:[\\/]*)
3457 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3461 for as_dir in $PATH
3463 IFS=$as_save_IFS
3464 test -z "$as_dir" && as_dir=.
3465 for ac_exec_ext in '' $ac_executable_extensions; do
3466 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3467 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3468 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3469 break 2
3471 done
3472 done
3473 IFS=$as_save_IFS
3476 esac
3478 GENHTML=$ac_cv_path_GENHTML
3479 if test -n "$GENHTML"; then
3480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3481 $as_echo "$GENHTML" >&6; }
3482 else
3483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3484 $as_echo "no" >&6; }
3488 test -n "$GENHTML" && break
3489 done
3491 else
3492 # Report the value of GENHTML in configure's output in all cases.
3493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3494 $as_echo_n "checking for GENHTML... " >&6; }
3495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3496 $as_echo "$GENHTML" >&6; }
3499 if test -z "$GENHTML"; then
3500 as_fn_error $? "genhtml not found" "$LINENO" 5
3507 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3509 esac
3511 else
3512 enable_coverage=no
3520 # DTrace
3524 # Check whether --enable-dtrace was given.
3525 if test "${enable_dtrace+set}" = set; then :
3526 enableval=$enable_dtrace;
3527 case $enableval in
3528 yes)
3529 if test -z "$DTRACE"; then
3530 for ac_prog in dtrace
3532 # Extract the first word of "$ac_prog", so it can be a program name with args.
3533 set dummy $ac_prog; ac_word=$2
3534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3535 $as_echo_n "checking for $ac_word... " >&6; }
3536 if ${ac_cv_path_DTRACE+:} false; then :
3537 $as_echo_n "(cached) " >&6
3538 else
3539 case $DTRACE in
3540 [\\/]* | ?:[\\/]*)
3541 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3545 for as_dir in $PATH
3547 IFS=$as_save_IFS
3548 test -z "$as_dir" && as_dir=.
3549 for ac_exec_ext in '' $ac_executable_extensions; do
3550 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3551 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3552 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3553 break 2
3555 done
3556 done
3557 IFS=$as_save_IFS
3560 esac
3562 DTRACE=$ac_cv_path_DTRACE
3563 if test -n "$DTRACE"; then
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3565 $as_echo "$DTRACE" >&6; }
3566 else
3567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3568 $as_echo "no" >&6; }
3572 test -n "$DTRACE" && break
3573 done
3575 else
3576 # Report the value of DTRACE in configure's output in all cases.
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3578 $as_echo_n "checking for DTRACE... " >&6; }
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3580 $as_echo "$DTRACE" >&6; }
3583 if test -z "$DTRACE"; then
3584 as_fn_error $? "dtrace not found" "$LINENO" 5
3592 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3594 esac
3596 else
3597 enable_dtrace=no
3605 # TAP tests
3609 # Check whether --enable-tap-tests was given.
3610 if test "${enable_tap_tests+set}" = set; then :
3611 enableval=$enable_tap_tests;
3612 case $enableval in
3613 yes)
3620 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3622 esac
3624 else
3625 enable_tap_tests=no
3633 # Injection points
3637 # Check whether --enable-injection-points was given.
3638 if test "${enable_injection_points+set}" = set; then :
3639 enableval=$enable_injection_points;
3640 case $enableval in
3641 yes)
3643 $as_echo "#define USE_INJECTION_POINTS 1" >>confdefs.h
3650 as_fn_error $? "no argument expected for --enable-injection-points option" "$LINENO" 5
3652 esac
3654 else
3655 enable_injection_points=no
3663 # Block size
3665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3666 $as_echo_n "checking for block size... " >&6; }
3670 # Check whether --with-blocksize was given.
3671 if test "${with_blocksize+set}" = set; then :
3672 withval=$with_blocksize;
3673 case $withval in
3674 yes)
3675 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3678 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3681 blocksize=$withval
3683 esac
3685 else
3686 blocksize=8
3690 case ${blocksize} in
3691 1) BLCKSZ=1024;;
3692 2) BLCKSZ=2048;;
3693 4) BLCKSZ=4096;;
3694 8) BLCKSZ=8192;;
3695 16) BLCKSZ=16384;;
3696 32) BLCKSZ=32768;;
3697 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3698 esac
3699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3700 $as_echo "${blocksize}kB" >&6; }
3703 cat >>confdefs.h <<_ACEOF
3704 #define BLCKSZ ${BLCKSZ}
3705 _ACEOF
3709 # Relation segment size
3714 # Check whether --with-segsize was given.
3715 if test "${with_segsize+set}" = set; then :
3716 withval=$with_segsize;
3717 case $withval in
3718 yes)
3719 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3722 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3725 segsize=$withval
3727 esac
3729 else
3730 segsize=1
3737 # Check whether --with-segsize-blocks was given.
3738 if test "${with_segsize_blocks+set}" = set; then :
3739 withval=$with_segsize_blocks;
3740 case $withval in
3741 yes)
3742 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3745 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3748 segsize_blocks=$withval
3750 esac
3752 else
3753 segsize_blocks=0
3758 # If --with-segsize-blocks is non-zero, it is used, --with-segsize
3759 # otherwise. segsize-blocks is only really useful for developers wanting to
3760 # test segment related code. Warn if both are used.
3761 if test $segsize_blocks -ne 0 -a $segsize -ne 1; then
3762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&5
3763 $as_echo "$as_me: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&2;}
3766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3767 $as_echo_n "checking for segment size... " >&6; }
3768 if test $segsize_blocks -eq 0; then
3769 # this expression is set up to avoid unnecessary integer overflow
3770 # blocksize is already guaranteed to be a factor of 1024
3771 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3772 test $? -eq 0 || exit 1
3773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3774 $as_echo "${segsize}GB" >&6; }
3775 else
3776 RELSEG_SIZE=$segsize_blocks
3777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${RELSEG_SIZE} blocks" >&5
3778 $as_echo "${RELSEG_SIZE} blocks" >&6; }
3782 cat >>confdefs.h <<_ACEOF
3783 #define RELSEG_SIZE ${RELSEG_SIZE}
3784 _ACEOF
3788 # WAL block size
3790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3791 $as_echo_n "checking for WAL block size... " >&6; }
3795 # Check whether --with-wal-blocksize was given.
3796 if test "${with_wal_blocksize+set}" = set; then :
3797 withval=$with_wal_blocksize;
3798 case $withval in
3799 yes)
3800 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3803 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3806 wal_blocksize=$withval
3808 esac
3810 else
3811 wal_blocksize=8
3815 case ${wal_blocksize} in
3816 1) XLOG_BLCKSZ=1024;;
3817 2) XLOG_BLCKSZ=2048;;
3818 4) XLOG_BLCKSZ=4096;;
3819 8) XLOG_BLCKSZ=8192;;
3820 16) XLOG_BLCKSZ=16384;;
3821 32) XLOG_BLCKSZ=32768;;
3822 64) XLOG_BLCKSZ=65536;;
3823 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3824 esac
3825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3826 $as_echo "${wal_blocksize}kB" >&6; }
3829 cat >>confdefs.h <<_ACEOF
3830 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3831 _ACEOF
3835 # C compiler
3838 # If you don't specify a list of compilers to test, the AC_PROG_CC and
3839 # AC_PROG_CXX macros test for a long list of unsupported compilers.
3840 pgac_cc_list="gcc cc"
3841 pgac_cxx_list="g++ c++"
3843 ac_ext=c
3844 ac_cpp='$CPP $CPPFLAGS'
3845 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3846 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3847 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3848 if test -n "$ac_tool_prefix"; then
3849 for ac_prog in $pgac_cc_list
3851 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3852 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3854 $as_echo_n "checking for $ac_word... " >&6; }
3855 if ${ac_cv_prog_CC+:} false; then :
3856 $as_echo_n "(cached) " >&6
3857 else
3858 if test -n "$CC"; then
3859 ac_cv_prog_CC="$CC" # Let the user override the test.
3860 else
3861 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3862 for as_dir in $PATH
3864 IFS=$as_save_IFS
3865 test -z "$as_dir" && as_dir=.
3866 for ac_exec_ext in '' $ac_executable_extensions; do
3867 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3868 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3869 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3870 break 2
3872 done
3873 done
3874 IFS=$as_save_IFS
3878 CC=$ac_cv_prog_CC
3879 if test -n "$CC"; then
3880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3881 $as_echo "$CC" >&6; }
3882 else
3883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3884 $as_echo "no" >&6; }
3888 test -n "$CC" && break
3889 done
3891 if test -z "$CC"; then
3892 ac_ct_CC=$CC
3893 for ac_prog in $pgac_cc_list
3895 # Extract the first word of "$ac_prog", so it can be a program name with args.
3896 set dummy $ac_prog; ac_word=$2
3897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3898 $as_echo_n "checking for $ac_word... " >&6; }
3899 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3900 $as_echo_n "(cached) " >&6
3901 else
3902 if test -n "$ac_ct_CC"; then
3903 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3904 else
3905 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3906 for as_dir in $PATH
3908 IFS=$as_save_IFS
3909 test -z "$as_dir" && as_dir=.
3910 for ac_exec_ext in '' $ac_executable_extensions; do
3911 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3912 ac_cv_prog_ac_ct_CC="$ac_prog"
3913 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3914 break 2
3916 done
3917 done
3918 IFS=$as_save_IFS
3922 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3923 if test -n "$ac_ct_CC"; then
3924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3925 $as_echo "$ac_ct_CC" >&6; }
3926 else
3927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3928 $as_echo "no" >&6; }
3932 test -n "$ac_ct_CC" && break
3933 done
3935 if test "x$ac_ct_CC" = x; then
3936 CC=""
3937 else
3938 case $cross_compiling:$ac_tool_warned in
3939 yes:)
3940 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3941 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3942 ac_tool_warned=yes ;;
3943 esac
3944 CC=$ac_ct_CC
3949 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3950 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3951 as_fn_error $? "no acceptable C compiler found in \$PATH
3952 See \`config.log' for more details" "$LINENO" 5; }
3954 # Provide some information about the compiler.
3955 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3956 set X $ac_compile
3957 ac_compiler=$2
3958 for ac_option in --version -v -V -qversion; do
3959 { { ac_try="$ac_compiler $ac_option >&5"
3960 case "(($ac_try" in
3961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3962 *) ac_try_echo=$ac_try;;
3963 esac
3964 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3965 $as_echo "$ac_try_echo"; } >&5
3966 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3967 ac_status=$?
3968 if test -s conftest.err; then
3969 sed '10a\
3970 ... rest of stderr output deleted ...
3971 10q' conftest.err >conftest.er1
3972 cat conftest.er1 >&5
3974 rm -f conftest.er1 conftest.err
3975 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3976 test $ac_status = 0; }
3977 done
3979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3980 /* end confdefs.h. */
3983 main ()
3987 return 0;
3989 _ACEOF
3990 ac_clean_files_save=$ac_clean_files
3991 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3992 # Try to create an executable without -o first, disregard a.out.
3993 # It will help us diagnose broken compilers, and finding out an intuition
3994 # of exeext.
3995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3996 $as_echo_n "checking whether the C compiler works... " >&6; }
3997 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3999 # The possible output files:
4000 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4002 ac_rmfiles=
4003 for ac_file in $ac_files
4005 case $ac_file in
4006 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4007 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4008 esac
4009 done
4010 rm -f $ac_rmfiles
4012 if { { ac_try="$ac_link_default"
4013 case "(($ac_try" in
4014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4015 *) ac_try_echo=$ac_try;;
4016 esac
4017 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4018 $as_echo "$ac_try_echo"; } >&5
4019 (eval "$ac_link_default") 2>&5
4020 ac_status=$?
4021 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4022 test $ac_status = 0; }; then :
4023 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4024 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4025 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4026 # so that the user can short-circuit this test for compilers unknown to
4027 # Autoconf.
4028 for ac_file in $ac_files ''
4030 test -f "$ac_file" || continue
4031 case $ac_file in
4032 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4034 [ab].out )
4035 # We found the default executable, but exeext='' is most
4036 # certainly right.
4037 break;;
4038 *.* )
4039 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4040 then :; else
4041 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4043 # We set ac_cv_exeext here because the later test for it is not
4044 # safe: cross compilers may not add the suffix if given an `-o'
4045 # argument, so we may need to know it at that point already.
4046 # Even if this section looks crufty: it has the advantage of
4047 # actually working.
4048 break;;
4050 break;;
4051 esac
4052 done
4053 test "$ac_cv_exeext" = no && ac_cv_exeext=
4055 else
4056 ac_file=''
4058 if test -z "$ac_file"; then :
4059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4060 $as_echo "no" >&6; }
4061 $as_echo "$as_me: failed program was:" >&5
4062 sed 's/^/| /' conftest.$ac_ext >&5
4064 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4065 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4066 as_fn_error 77 "C compiler cannot create executables
4067 See \`config.log' for more details" "$LINENO" 5; }
4068 else
4069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4070 $as_echo "yes" >&6; }
4072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4073 $as_echo_n "checking for C compiler default output file name... " >&6; }
4074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4075 $as_echo "$ac_file" >&6; }
4076 ac_exeext=$ac_cv_exeext
4078 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4079 ac_clean_files=$ac_clean_files_save
4080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4081 $as_echo_n "checking for suffix of executables... " >&6; }
4082 if { { ac_try="$ac_link"
4083 case "(($ac_try" in
4084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4085 *) ac_try_echo=$ac_try;;
4086 esac
4087 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4088 $as_echo "$ac_try_echo"; } >&5
4089 (eval "$ac_link") 2>&5
4090 ac_status=$?
4091 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4092 test $ac_status = 0; }; then :
4093 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4094 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4095 # work properly (i.e., refer to `conftest.exe'), while it won't with
4096 # `rm'.
4097 for ac_file in conftest.exe conftest conftest.*; do
4098 test -f "$ac_file" || continue
4099 case $ac_file in
4100 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4101 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4102 break;;
4103 * ) break;;
4104 esac
4105 done
4106 else
4107 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4108 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4109 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4110 See \`config.log' for more details" "$LINENO" 5; }
4112 rm -f conftest conftest$ac_cv_exeext
4113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4114 $as_echo "$ac_cv_exeext" >&6; }
4116 rm -f conftest.$ac_ext
4117 EXEEXT=$ac_cv_exeext
4118 ac_exeext=$EXEEXT
4119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4120 /* end confdefs.h. */
4121 #include <stdio.h>
4123 main ()
4125 FILE *f = fopen ("conftest.out", "w");
4126 return ferror (f) || fclose (f) != 0;
4129 return 0;
4131 _ACEOF
4132 ac_clean_files="$ac_clean_files conftest.out"
4133 # Check that the compiler produces executables we can run. If not, either
4134 # the compiler is broken, or we cross compile.
4135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4136 $as_echo_n "checking whether we are cross compiling... " >&6; }
4137 if test "$cross_compiling" != yes; then
4138 { { ac_try="$ac_link"
4139 case "(($ac_try" in
4140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4141 *) ac_try_echo=$ac_try;;
4142 esac
4143 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4144 $as_echo "$ac_try_echo"; } >&5
4145 (eval "$ac_link") 2>&5
4146 ac_status=$?
4147 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4148 test $ac_status = 0; }
4149 if { ac_try='./conftest$ac_cv_exeext'
4150 { { case "(($ac_try" in
4151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4152 *) ac_try_echo=$ac_try;;
4153 esac
4154 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4155 $as_echo "$ac_try_echo"; } >&5
4156 (eval "$ac_try") 2>&5
4157 ac_status=$?
4158 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4159 test $ac_status = 0; }; }; then
4160 cross_compiling=no
4161 else
4162 if test "$cross_compiling" = maybe; then
4163 cross_compiling=yes
4164 else
4165 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4166 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4167 as_fn_error $? "cannot run C compiled programs.
4168 If you meant to cross compile, use \`--host'.
4169 See \`config.log' for more details" "$LINENO" 5; }
4173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4174 $as_echo "$cross_compiling" >&6; }
4176 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4177 ac_clean_files=$ac_clean_files_save
4178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4179 $as_echo_n "checking for suffix of object files... " >&6; }
4180 if ${ac_cv_objext+:} false; then :
4181 $as_echo_n "(cached) " >&6
4182 else
4183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4184 /* end confdefs.h. */
4187 main ()
4191 return 0;
4193 _ACEOF
4194 rm -f conftest.o conftest.obj
4195 if { { ac_try="$ac_compile"
4196 case "(($ac_try" in
4197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4198 *) ac_try_echo=$ac_try;;
4199 esac
4200 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4201 $as_echo "$ac_try_echo"; } >&5
4202 (eval "$ac_compile") 2>&5
4203 ac_status=$?
4204 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4205 test $ac_status = 0; }; then :
4206 for ac_file in conftest.o conftest.obj conftest.*; do
4207 test -f "$ac_file" || continue;
4208 case $ac_file in
4209 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4210 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4211 break;;
4212 esac
4213 done
4214 else
4215 $as_echo "$as_me: failed program was:" >&5
4216 sed 's/^/| /' conftest.$ac_ext >&5
4218 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4219 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4220 as_fn_error $? "cannot compute suffix of object files: cannot compile
4221 See \`config.log' for more details" "$LINENO" 5; }
4223 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4226 $as_echo "$ac_cv_objext" >&6; }
4227 OBJEXT=$ac_cv_objext
4228 ac_objext=$OBJEXT
4229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4230 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4231 if ${ac_cv_c_compiler_gnu+:} false; then :
4232 $as_echo_n "(cached) " >&6
4233 else
4234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4235 /* end confdefs.h. */
4238 main ()
4240 #ifndef __GNUC__
4241 choke me
4242 #endif
4245 return 0;
4247 _ACEOF
4248 if ac_fn_c_try_compile "$LINENO"; then :
4249 ac_compiler_gnu=yes
4250 else
4251 ac_compiler_gnu=no
4253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4254 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4258 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4259 if test $ac_compiler_gnu = yes; then
4260 GCC=yes
4261 else
4262 GCC=
4264 ac_test_CFLAGS=${CFLAGS+set}
4265 ac_save_CFLAGS=$CFLAGS
4266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4267 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4268 if ${ac_cv_prog_cc_g+:} false; then :
4269 $as_echo_n "(cached) " >&6
4270 else
4271 ac_save_c_werror_flag=$ac_c_werror_flag
4272 ac_c_werror_flag=yes
4273 ac_cv_prog_cc_g=no
4274 CFLAGS="-g"
4275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4276 /* end confdefs.h. */
4279 main ()
4283 return 0;
4285 _ACEOF
4286 if ac_fn_c_try_compile "$LINENO"; then :
4287 ac_cv_prog_cc_g=yes
4288 else
4289 CFLAGS=""
4290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4291 /* end confdefs.h. */
4294 main ()
4298 return 0;
4300 _ACEOF
4301 if ac_fn_c_try_compile "$LINENO"; then :
4303 else
4304 ac_c_werror_flag=$ac_save_c_werror_flag
4305 CFLAGS="-g"
4306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4307 /* end confdefs.h. */
4310 main ()
4314 return 0;
4316 _ACEOF
4317 if ac_fn_c_try_compile "$LINENO"; then :
4318 ac_cv_prog_cc_g=yes
4320 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4322 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4325 ac_c_werror_flag=$ac_save_c_werror_flag
4327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4328 $as_echo "$ac_cv_prog_cc_g" >&6; }
4329 if test "$ac_test_CFLAGS" = set; then
4330 CFLAGS=$ac_save_CFLAGS
4331 elif test $ac_cv_prog_cc_g = yes; then
4332 if test "$GCC" = yes; then
4333 CFLAGS="-g -O2"
4334 else
4335 CFLAGS="-g"
4337 else
4338 if test "$GCC" = yes; then
4339 CFLAGS="-O2"
4340 else
4341 CFLAGS=
4344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4345 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4346 if ${ac_cv_prog_cc_c89+:} false; then :
4347 $as_echo_n "(cached) " >&6
4348 else
4349 ac_cv_prog_cc_c89=no
4350 ac_save_CC=$CC
4351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4352 /* end confdefs.h. */
4353 #include <stdarg.h>
4354 #include <stdio.h>
4355 struct stat;
4356 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4357 struct buf { int x; };
4358 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4359 static char *e (p, i)
4360 char **p;
4361 int i;
4363 return p[i];
4365 static char *f (char * (*g) (char **, int), char **p, ...)
4367 char *s;
4368 va_list v;
4369 va_start (v,p);
4370 s = g (p, va_arg (v,int));
4371 va_end (v);
4372 return s;
4375 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4376 function prototypes and stuff, but not '\xHH' hex character constants.
4377 These don't provoke an error unfortunately, instead are silently treated
4378 as 'x'. The following induces an error, until -std is added to get
4379 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4380 array size at least. It's necessary to write '\x00'==0 to get something
4381 that's true only with -std. */
4382 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4384 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4385 inside strings and character constants. */
4386 #define FOO(x) 'x'
4387 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4389 int test (int i, double x);
4390 struct s1 {int (*f) (int a);};
4391 struct s2 {int (*f) (double a);};
4392 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4393 int argc;
4394 char **argv;
4396 main ()
4398 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4400 return 0;
4402 _ACEOF
4403 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4404 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4406 CC="$ac_save_CC $ac_arg"
4407 if ac_fn_c_try_compile "$LINENO"; then :
4408 ac_cv_prog_cc_c89=$ac_arg
4410 rm -f core conftest.err conftest.$ac_objext
4411 test "x$ac_cv_prog_cc_c89" != "xno" && break
4412 done
4413 rm -f conftest.$ac_ext
4414 CC=$ac_save_CC
4417 # AC_CACHE_VAL
4418 case "x$ac_cv_prog_cc_c89" in
4420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4421 $as_echo "none needed" >&6; } ;;
4422 xno)
4423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4424 $as_echo "unsupported" >&6; } ;;
4426 CC="$CC $ac_cv_prog_cc_c89"
4427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4428 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4429 esac
4430 if test "x$ac_cv_prog_cc_c89" != xno; then :
4434 ac_ext=c
4435 ac_cpp='$CPP $CPPFLAGS'
4436 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4437 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4438 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4441 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4442 if ${ac_cv_prog_cc_c99+:} false; then :
4443 $as_echo_n "(cached) " >&6
4444 else
4445 ac_cv_prog_cc_c99=no
4446 ac_save_CC=$CC
4447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4448 /* end confdefs.h. */
4449 #include <stdarg.h>
4450 #include <stdbool.h>
4451 #include <stdlib.h>
4452 #include <wchar.h>
4453 #include <stdio.h>
4455 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4456 #define debug(...) fprintf (stderr, __VA_ARGS__)
4457 #define showlist(...) puts (#__VA_ARGS__)
4458 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4459 static void
4460 test_varargs_macros (void)
4462 int x = 1234;
4463 int y = 5678;
4464 debug ("Flag");
4465 debug ("X = %d\n", x);
4466 showlist (The first, second, and third items.);
4467 report (x>y, "x is %d but y is %d", x, y);
4470 // Check long long types.
4471 #define BIG64 18446744073709551615ull
4472 #define BIG32 4294967295ul
4473 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4474 #if !BIG_OK
4475 your preprocessor is broken;
4476 #endif
4477 #if BIG_OK
4478 #else
4479 your preprocessor is broken;
4480 #endif
4481 static long long int bignum = -9223372036854775807LL;
4482 static unsigned long long int ubignum = BIG64;
4484 struct incomplete_array
4486 int datasize;
4487 double data[];
4490 struct named_init {
4491 int number;
4492 const wchar_t *name;
4493 double average;
4496 typedef const char *ccp;
4498 static inline int
4499 test_restrict (ccp restrict text)
4501 // See if C++-style comments work.
4502 // Iterate through items via the restricted pointer.
4503 // Also check for declarations in for loops.
4504 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4505 continue;
4506 return 0;
4509 // Check varargs and va_copy.
4510 static void
4511 test_varargs (const char *format, ...)
4513 va_list args;
4514 va_start (args, format);
4515 va_list args_copy;
4516 va_copy (args_copy, args);
4518 const char *str;
4519 int number;
4520 float fnumber;
4522 while (*format)
4524 switch (*format++)
4526 case 's': // string
4527 str = va_arg (args_copy, const char *);
4528 break;
4529 case 'd': // int
4530 number = va_arg (args_copy, int);
4531 break;
4532 case 'f': // float
4533 fnumber = va_arg (args_copy, double);
4534 break;
4535 default:
4536 break;
4539 va_end (args_copy);
4540 va_end (args);
4544 main ()
4547 // Check bool.
4548 _Bool success = false;
4550 // Check restrict.
4551 if (test_restrict ("String literal") == 0)
4552 success = true;
4553 char *restrict newvar = "Another string";
4555 // Check varargs.
4556 test_varargs ("s, d' f .", "string", 65, 34.234);
4557 test_varargs_macros ();
4559 // Check flexible array members.
4560 struct incomplete_array *ia =
4561 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4562 ia->datasize = 10;
4563 for (int i = 0; i < ia->datasize; ++i)
4564 ia->data[i] = i * 1.234;
4566 // Check named initializers.
4567 struct named_init ni = {
4568 .number = 34,
4569 .name = L"Test wide string",
4570 .average = 543.34343,
4573 ni.number = 58;
4575 int dynamic_array[ni.number];
4576 dynamic_array[ni.number - 1] = 543;
4578 // work around unused variable warnings
4579 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4580 || dynamic_array[ni.number - 1] != 543);
4583 return 0;
4585 _ACEOF
4586 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4588 CC="$ac_save_CC $ac_arg"
4589 if ac_fn_c_try_compile "$LINENO"; then :
4590 ac_cv_prog_cc_c99=$ac_arg
4592 rm -f core conftest.err conftest.$ac_objext
4593 test "x$ac_cv_prog_cc_c99" != "xno" && break
4594 done
4595 rm -f conftest.$ac_ext
4596 CC=$ac_save_CC
4599 # AC_CACHE_VAL
4600 case "x$ac_cv_prog_cc_c99" in
4602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4603 $as_echo "none needed" >&6; } ;;
4604 xno)
4605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4606 $as_echo "unsupported" >&6; } ;;
4608 CC="$CC $ac_cv_prog_cc_c99"
4609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4610 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4611 esac
4612 if test "x$ac_cv_prog_cc_c99" != xno; then :
4618 # Error out if the compiler does not support C99, as the codebase
4619 # relies on that.
4620 if test "$ac_cv_prog_cc_c99" = no; then
4621 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4624 ac_ext=cpp
4625 ac_cpp='$CXXCPP $CPPFLAGS'
4626 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4627 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4628 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4629 if test -z "$CXX"; then
4630 if test -n "$CCC"; then
4631 CXX=$CCC
4632 else
4633 if test -n "$ac_tool_prefix"; then
4634 for ac_prog in $pgac_cxx_list
4636 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4637 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4639 $as_echo_n "checking for $ac_word... " >&6; }
4640 if ${ac_cv_prog_CXX+:} false; then :
4641 $as_echo_n "(cached) " >&6
4642 else
4643 if test -n "$CXX"; then
4644 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4645 else
4646 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4647 for as_dir in $PATH
4649 IFS=$as_save_IFS
4650 test -z "$as_dir" && as_dir=.
4651 for ac_exec_ext in '' $ac_executable_extensions; do
4652 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4653 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4654 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4655 break 2
4657 done
4658 done
4659 IFS=$as_save_IFS
4663 CXX=$ac_cv_prog_CXX
4664 if test -n "$CXX"; then
4665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4666 $as_echo "$CXX" >&6; }
4667 else
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4669 $as_echo "no" >&6; }
4673 test -n "$CXX" && break
4674 done
4676 if test -z "$CXX"; then
4677 ac_ct_CXX=$CXX
4678 for ac_prog in $pgac_cxx_list
4680 # Extract the first word of "$ac_prog", so it can be a program name with args.
4681 set dummy $ac_prog; ac_word=$2
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4683 $as_echo_n "checking for $ac_word... " >&6; }
4684 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4685 $as_echo_n "(cached) " >&6
4686 else
4687 if test -n "$ac_ct_CXX"; then
4688 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4689 else
4690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4691 for as_dir in $PATH
4693 IFS=$as_save_IFS
4694 test -z "$as_dir" && as_dir=.
4695 for ac_exec_ext in '' $ac_executable_extensions; do
4696 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4697 ac_cv_prog_ac_ct_CXX="$ac_prog"
4698 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4699 break 2
4701 done
4702 done
4703 IFS=$as_save_IFS
4707 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4708 if test -n "$ac_ct_CXX"; then
4709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4710 $as_echo "$ac_ct_CXX" >&6; }
4711 else
4712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4713 $as_echo "no" >&6; }
4717 test -n "$ac_ct_CXX" && break
4718 done
4720 if test "x$ac_ct_CXX" = x; then
4721 CXX="g++"
4722 else
4723 case $cross_compiling:$ac_tool_warned in
4724 yes:)
4725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4726 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4727 ac_tool_warned=yes ;;
4728 esac
4729 CXX=$ac_ct_CXX
4735 # Provide some information about the compiler.
4736 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4737 set X $ac_compile
4738 ac_compiler=$2
4739 for ac_option in --version -v -V -qversion; do
4740 { { ac_try="$ac_compiler $ac_option >&5"
4741 case "(($ac_try" in
4742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4743 *) ac_try_echo=$ac_try;;
4744 esac
4745 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4746 $as_echo "$ac_try_echo"; } >&5
4747 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4748 ac_status=$?
4749 if test -s conftest.err; then
4750 sed '10a\
4751 ... rest of stderr output deleted ...
4752 10q' conftest.err >conftest.er1
4753 cat conftest.er1 >&5
4755 rm -f conftest.er1 conftest.err
4756 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4757 test $ac_status = 0; }
4758 done
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4761 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4762 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4763 $as_echo_n "(cached) " >&6
4764 else
4765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4766 /* end confdefs.h. */
4769 main ()
4771 #ifndef __GNUC__
4772 choke me
4773 #endif
4776 return 0;
4778 _ACEOF
4779 if ac_fn_cxx_try_compile "$LINENO"; then :
4780 ac_compiler_gnu=yes
4781 else
4782 ac_compiler_gnu=no
4784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4785 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4789 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4790 if test $ac_compiler_gnu = yes; then
4791 GXX=yes
4792 else
4793 GXX=
4795 ac_test_CXXFLAGS=${CXXFLAGS+set}
4796 ac_save_CXXFLAGS=$CXXFLAGS
4797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4798 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4799 if ${ac_cv_prog_cxx_g+:} false; then :
4800 $as_echo_n "(cached) " >&6
4801 else
4802 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4803 ac_cxx_werror_flag=yes
4804 ac_cv_prog_cxx_g=no
4805 CXXFLAGS="-g"
4806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4807 /* end confdefs.h. */
4810 main ()
4814 return 0;
4816 _ACEOF
4817 if ac_fn_cxx_try_compile "$LINENO"; then :
4818 ac_cv_prog_cxx_g=yes
4819 else
4820 CXXFLAGS=""
4821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4822 /* end confdefs.h. */
4825 main ()
4829 return 0;
4831 _ACEOF
4832 if ac_fn_cxx_try_compile "$LINENO"; then :
4834 else
4835 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4836 CXXFLAGS="-g"
4837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4838 /* end confdefs.h. */
4841 main ()
4845 return 0;
4847 _ACEOF
4848 if ac_fn_cxx_try_compile "$LINENO"; then :
4849 ac_cv_prog_cxx_g=yes
4851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4856 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4859 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4860 if test "$ac_test_CXXFLAGS" = set; then
4861 CXXFLAGS=$ac_save_CXXFLAGS
4862 elif test $ac_cv_prog_cxx_g = yes; then
4863 if test "$GXX" = yes; then
4864 CXXFLAGS="-g -O2"
4865 else
4866 CXXFLAGS="-g"
4868 else
4869 if test "$GXX" = yes; then
4870 CXXFLAGS="-O2"
4871 else
4872 CXXFLAGS=
4875 ac_ext=c
4876 ac_cpp='$CPP $CPPFLAGS'
4877 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4878 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4879 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4882 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4883 # but has idiosyncrasies of its own. We assume icc will define
4884 # __INTEL_COMPILER regardless of CFLAGS.
4886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4887 /* end confdefs.h. */
4890 main ()
4892 #ifndef __INTEL_COMPILER
4893 choke me
4894 #endif
4896 return 0;
4898 _ACEOF
4899 if ac_fn_c_try_compile "$LINENO"; then :
4900 ICC=yes
4901 else
4902 ICC=no
4904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4906 # Check if it's Sun Studio compiler. We assume that
4907 # __SUNPRO_C will be defined for Sun Studio compilers
4908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4909 /* end confdefs.h. */
4912 main ()
4914 #ifndef __SUNPRO_C
4915 choke me
4916 #endif
4918 return 0;
4920 _ACEOF
4921 if ac_fn_c_try_compile "$LINENO"; then :
4922 SUN_STUDIO_CC=yes
4923 else
4924 SUN_STUDIO_CC=no
4926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4932 # LLVM
4934 # Checked early because subsequent tests depend on it.
4938 # Check whether --with-llvm was given.
4939 if test "${with_llvm+set}" = set; then :
4940 withval=$with_llvm;
4941 case $withval in
4942 yes)
4944 $as_echo "#define USE_LLVM 1" >>confdefs.h
4951 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4953 esac
4955 else
4956 with_llvm=no
4962 for ac_prog in gawk mawk nawk awk
4964 # Extract the first word of "$ac_prog", so it can be a program name with args.
4965 set dummy $ac_prog; ac_word=$2
4966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4967 $as_echo_n "checking for $ac_word... " >&6; }
4968 if ${ac_cv_prog_AWK+:} false; then :
4969 $as_echo_n "(cached) " >&6
4970 else
4971 if test -n "$AWK"; then
4972 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4973 else
4974 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4975 for as_dir in $PATH
4977 IFS=$as_save_IFS
4978 test -z "$as_dir" && as_dir=.
4979 for ac_exec_ext in '' $ac_executable_extensions; do
4980 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4981 ac_cv_prog_AWK="$ac_prog"
4982 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4983 break 2
4985 done
4986 done
4987 IFS=$as_save_IFS
4991 AWK=$ac_cv_prog_AWK
4992 if test -n "$AWK"; then
4993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4994 $as_echo "$AWK" >&6; }
4995 else
4996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4997 $as_echo "no" >&6; }
5001 test -n "$AWK" && break
5002 done
5004 if test "$with_llvm" = yes; then :
5010 if test -z "$LLVM_CONFIG"; then
5011 for ac_prog in llvm-config
5013 # Extract the first word of "$ac_prog", so it can be a program name with args.
5014 set dummy $ac_prog; ac_word=$2
5015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5016 $as_echo_n "checking for $ac_word... " >&6; }
5017 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5018 $as_echo_n "(cached) " >&6
5019 else
5020 case $LLVM_CONFIG in
5021 [\\/]* | ?:[\\/]*)
5022 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5026 for as_dir in $PATH
5028 IFS=$as_save_IFS
5029 test -z "$as_dir" && as_dir=.
5030 for ac_exec_ext in '' $ac_executable_extensions; do
5031 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5032 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5033 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5034 break 2
5036 done
5037 done
5038 IFS=$as_save_IFS
5041 esac
5043 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5044 if test -n "$LLVM_CONFIG"; then
5045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5046 $as_echo "$LLVM_CONFIG" >&6; }
5047 else
5048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5049 $as_echo "no" >&6; }
5053 test -n "$LLVM_CONFIG" && break
5054 done
5056 else
5057 # Report the value of LLVM_CONFIG in configure's output in all cases.
5058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5059 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5061 $as_echo "$LLVM_CONFIG" >&6; }
5065 # no point continuing if llvm wasn't found
5066 if test -z "$LLVM_CONFIG"; then
5067 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5069 # check if detected $LLVM_CONFIG is executable
5070 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5071 if test "x$pgac_llvm_version" = "xno"; then
5072 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5074 # and whether the version is supported
5075 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 10) exit 1; else exit 0;}';then
5076 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 10 is required" "$LINENO" 5
5078 { $as_echo "$as_me:${as_lineno-$LINENO}: using llvm $pgac_llvm_version" >&5
5079 $as_echo "$as_me: using llvm $pgac_llvm_version" >&6;}
5081 # need clang to create some bitcode files
5083 if test -z "$CLANG"; then
5084 for ac_prog in clang
5086 # Extract the first word of "$ac_prog", so it can be a program name with args.
5087 set dummy $ac_prog; ac_word=$2
5088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5089 $as_echo_n "checking for $ac_word... " >&6; }
5090 if ${ac_cv_path_CLANG+:} false; then :
5091 $as_echo_n "(cached) " >&6
5092 else
5093 case $CLANG in
5094 [\\/]* | ?:[\\/]*)
5095 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5099 for as_dir in $PATH
5101 IFS=$as_save_IFS
5102 test -z "$as_dir" && as_dir=.
5103 for ac_exec_ext in '' $ac_executable_extensions; do
5104 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5105 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5107 break 2
5109 done
5110 done
5111 IFS=$as_save_IFS
5114 esac
5116 CLANG=$ac_cv_path_CLANG
5117 if test -n "$CLANG"; then
5118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5119 $as_echo "$CLANG" >&6; }
5120 else
5121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5122 $as_echo "no" >&6; }
5126 test -n "$CLANG" && break
5127 done
5129 else
5130 # Report the value of CLANG in configure's output in all cases.
5131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5132 $as_echo_n "checking for CLANG... " >&6; }
5133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5134 $as_echo "$CLANG" >&6; }
5137 if test -z "$CLANG"; then
5138 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5140 # make sure clang is executable
5141 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5142 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5144 # Could check clang version, but it doesn't seem that
5145 # important. Systems with a new enough LLVM version are usually
5146 # going to have a decent clang version too. It's also not entirely
5147 # clear what the minimum version is.
5149 # Collect compiler flags necessary to build the LLVM dependent
5150 # shared library.
5151 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5152 case $pgac_option in
5153 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5154 esac
5155 done
5157 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5158 case $pgac_option in
5159 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5160 esac
5161 done
5163 # ABI influencing options, standard influencing options
5164 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5165 case $pgac_option in
5166 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5167 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5168 esac
5169 done
5171 # Look for components we're interested in, collect necessary
5172 # libs. As some components are optional, we can't just list all of
5173 # them as it'd raise an error.
5174 pgac_components='';
5175 for pgac_component in `$LLVM_CONFIG --components`; do
5176 case $pgac_component in
5177 engine) pgac_components="$pgac_components $pgac_component";;
5178 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5179 orcjit) pgac_components="$pgac_components $pgac_component";;
5180 passes) pgac_components="$pgac_components $pgac_component";;
5181 native) pgac_components="$pgac_components $pgac_component";;
5182 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5183 esac
5184 done;
5186 # And then get the libraries that need to be linked in for the
5187 # selected components. They're large libraries, we only want to
5188 # link them into the LLVM using shared library.
5189 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5190 case $pgac_option in
5191 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5192 esac
5193 done
5195 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5205 fi # fi
5208 unset CFLAGS
5209 unset CXXFLAGS
5212 # Read the template
5214 . "$srcdir/src/template/$template" || exit
5216 # C[XX]FLAGS are selected so:
5217 # If the user specifies something in the environment, that is used.
5218 # else: If the template file set something, that is used.
5219 # else: If coverage was enabled, don't set anything.
5220 # else: If the compiler is GCC, then we use -O2.
5221 # else: If the compiler is something else, then we use -O, unless debugging.
5223 if test "$ac_env_CFLAGS_set" = set; then
5224 CFLAGS=$ac_env_CFLAGS_value
5225 elif test "${CFLAGS+set}" = set; then
5226 : # (keep what template set)
5227 elif test "$enable_coverage" = yes; then
5228 : # no optimization by default
5229 elif test "$GCC" = yes; then
5230 CFLAGS="-O2"
5231 else
5232 # if the user selected debug mode, don't use -O
5233 if test "$enable_debug" != yes; then
5234 CFLAGS="-O"
5238 if test "$ac_env_CXXFLAGS_set" = set; then
5239 CXXFLAGS=$ac_env_CXXFLAGS_value
5240 elif test "${CXXFLAGS+set}" = set; then
5241 : # (keep what template set)
5242 elif test "$enable_coverage" = yes; then
5243 : # no optimization by default
5244 elif test "$GCC" = yes; then
5245 CXXFLAGS="-O2"
5246 else
5247 # if the user selected debug mode, don't use -O
5248 if test "$enable_debug" != yes; then
5249 CXXFLAGS="-O"
5253 # When generating bitcode (for inlining) we always want to use -O2
5254 # even when --enable-debug is specified. The bitcode is not going to
5255 # be used for line-by-line debugging, and JIT inlining doesn't work
5256 # without at least -O1 (otherwise clang will emit 'noinline'
5257 # attributes everywhere), which is bad for testing. Still allow the
5258 # environment to override if done explicitly.
5259 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5260 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5261 else
5262 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5264 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5265 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5266 else
5267 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5270 # C[XX]FLAGS we determined above will be added back at the end
5271 user_CFLAGS=$CFLAGS
5272 CFLAGS=""
5273 user_CXXFLAGS=$CXXFLAGS
5274 CXXFLAGS=""
5275 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5276 BITCODE_CFLAGS=""
5277 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5278 BITCODE_CXXFLAGS=""
5280 # set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5281 if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5282 CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5284 if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5285 CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5288 # Some versions of GCC support some additional useful warning flags.
5289 # Check whether they are supported, and add them to CFLAGS if so.
5290 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5291 # but has its own. Also check other compiler-specific flags here.
5293 if test "$GCC" = yes -a "$ICC" = no; then
5294 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5295 CXXFLAGS="-Wall -Wpointer-arith"
5296 # These work in some but not all gcc versions
5297 save_CFLAGS=$CFLAGS
5299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5300 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5301 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5302 $as_echo_n "(cached) " >&6
5303 else
5304 pgac_save_CFLAGS=$CFLAGS
5305 pgac_save_CC=$CC
5306 CC=${CC}
5307 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5308 ac_save_c_werror_flag=$ac_c_werror_flag
5309 ac_c_werror_flag=yes
5310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5311 /* end confdefs.h. */
5314 main ()
5318 return 0;
5320 _ACEOF
5321 if ac_fn_c_try_compile "$LINENO"; then :
5322 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5323 else
5324 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5327 ac_c_werror_flag=$ac_save_c_werror_flag
5328 CFLAGS="$pgac_save_CFLAGS"
5329 CC="$pgac_save_CC"
5331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5332 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5333 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5334 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5338 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5339 # disable it, so AC_SUBST the negative form.
5340 PERMIT_DECLARATION_AFTER_STATEMENT=
5341 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5342 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5345 # Really don't want VLAs to be used in our dialect of C
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5348 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5349 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5350 $as_echo_n "(cached) " >&6
5351 else
5352 pgac_save_CFLAGS=$CFLAGS
5353 pgac_save_CC=$CC
5354 CC=${CC}
5355 CFLAGS="${CFLAGS} -Werror=vla"
5356 ac_save_c_werror_flag=$ac_c_werror_flag
5357 ac_c_werror_flag=yes
5358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5359 /* end confdefs.h. */
5362 main ()
5366 return 0;
5368 _ACEOF
5369 if ac_fn_c_try_compile "$LINENO"; then :
5370 pgac_cv_prog_CC_cflags__Werror_vla=yes
5371 else
5372 pgac_cv_prog_CC_cflags__Werror_vla=no
5374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5375 ac_c_werror_flag=$ac_save_c_werror_flag
5376 CFLAGS="$pgac_save_CFLAGS"
5377 CC="$pgac_save_CC"
5379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5380 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5381 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5382 CFLAGS="${CFLAGS} -Werror=vla"
5386 # On macOS, complain about usage of symbols newer than the deployment target
5388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS" >&5
5389 $as_echo_n "checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS... " >&6; }
5390 if ${pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new+:} false; then :
5391 $as_echo_n "(cached) " >&6
5392 else
5393 pgac_save_CFLAGS=$CFLAGS
5394 pgac_save_CC=$CC
5395 CC=${CC}
5396 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5397 ac_save_c_werror_flag=$ac_c_werror_flag
5398 ac_c_werror_flag=yes
5399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5400 /* end confdefs.h. */
5403 main ()
5407 return 0;
5409 _ACEOF
5410 if ac_fn_c_try_compile "$LINENO"; then :
5411 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=yes
5412 else
5413 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=no
5415 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5416 ac_c_werror_flag=$ac_save_c_werror_flag
5417 CFLAGS="$pgac_save_CFLAGS"
5418 CC="$pgac_save_CC"
5420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&5
5421 $as_echo "$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&6; }
5422 if test x"$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" = x"yes"; then
5423 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS" >&5
5428 $as_echo_n "checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS... " >&6; }
5429 if ${pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new+:} false; then :
5430 $as_echo_n "(cached) " >&6
5431 else
5432 pgac_save_CXXFLAGS=$CXXFLAGS
5433 pgac_save_CXX=$CXX
5434 CXX=${CXX}
5435 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5436 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5437 ac_cxx_werror_flag=yes
5438 ac_ext=cpp
5439 ac_cpp='$CXXCPP $CPPFLAGS'
5440 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5441 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5442 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5445 /* end confdefs.h. */
5448 main ()
5452 return 0;
5454 _ACEOF
5455 if ac_fn_cxx_try_compile "$LINENO"; then :
5456 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=yes
5457 else
5458 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=no
5460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5461 ac_ext=c
5462 ac_cpp='$CPP $CPPFLAGS'
5463 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5464 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5465 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5467 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5468 CXXFLAGS="$pgac_save_CXXFLAGS"
5469 CXX="$pgac_save_CXX"
5471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&5
5472 $as_echo "$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&6; }
5473 if test x"$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" = x"yes"; then
5474 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5478 # -Wvla is not applicable for C++
5480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5481 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5482 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5483 $as_echo_n "(cached) " >&6
5484 else
5485 pgac_save_CFLAGS=$CFLAGS
5486 pgac_save_CC=$CC
5487 CC=${CC}
5488 CFLAGS="${CFLAGS} -Wendif-labels"
5489 ac_save_c_werror_flag=$ac_c_werror_flag
5490 ac_c_werror_flag=yes
5491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5492 /* end confdefs.h. */
5495 main ()
5499 return 0;
5501 _ACEOF
5502 if ac_fn_c_try_compile "$LINENO"; then :
5503 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5504 else
5505 pgac_cv_prog_CC_cflags__Wendif_labels=no
5507 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5508 ac_c_werror_flag=$ac_save_c_werror_flag
5509 CFLAGS="$pgac_save_CFLAGS"
5510 CC="$pgac_save_CC"
5512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5513 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5514 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5515 CFLAGS="${CFLAGS} -Wendif-labels"
5519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5520 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5521 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5522 $as_echo_n "(cached) " >&6
5523 else
5524 pgac_save_CXXFLAGS=$CXXFLAGS
5525 pgac_save_CXX=$CXX
5526 CXX=${CXX}
5527 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5528 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5529 ac_cxx_werror_flag=yes
5530 ac_ext=cpp
5531 ac_cpp='$CXXCPP $CPPFLAGS'
5532 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5533 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5534 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5537 /* end confdefs.h. */
5540 main ()
5544 return 0;
5546 _ACEOF
5547 if ac_fn_cxx_try_compile "$LINENO"; then :
5548 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5549 else
5550 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5553 ac_ext=c
5554 ac_cpp='$CPP $CPPFLAGS'
5555 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5556 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5557 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5559 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5560 CXXFLAGS="$pgac_save_CXXFLAGS"
5561 CXX="$pgac_save_CXX"
5563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5564 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5565 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5566 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5572 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5573 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5574 $as_echo_n "(cached) " >&6
5575 else
5576 pgac_save_CFLAGS=$CFLAGS
5577 pgac_save_CC=$CC
5578 CC=${CC}
5579 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5580 ac_save_c_werror_flag=$ac_c_werror_flag
5581 ac_c_werror_flag=yes
5582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5583 /* end confdefs.h. */
5586 main ()
5590 return 0;
5592 _ACEOF
5593 if ac_fn_c_try_compile "$LINENO"; then :
5594 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5595 else
5596 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5599 ac_c_werror_flag=$ac_save_c_werror_flag
5600 CFLAGS="$pgac_save_CFLAGS"
5601 CC="$pgac_save_CC"
5603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5604 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5605 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5606 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5611 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5612 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5613 $as_echo_n "(cached) " >&6
5614 else
5615 pgac_save_CXXFLAGS=$CXXFLAGS
5616 pgac_save_CXX=$CXX
5617 CXX=${CXX}
5618 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5619 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5620 ac_cxx_werror_flag=yes
5621 ac_ext=cpp
5622 ac_cpp='$CXXCPP $CPPFLAGS'
5623 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5624 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5625 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5628 /* end confdefs.h. */
5631 main ()
5635 return 0;
5637 _ACEOF
5638 if ac_fn_cxx_try_compile "$LINENO"; then :
5639 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5640 else
5641 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5643 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5644 ac_ext=c
5645 ac_cpp='$CPP $CPPFLAGS'
5646 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5647 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5648 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5650 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5651 CXXFLAGS="$pgac_save_CXXFLAGS"
5652 CXX="$pgac_save_CXX"
5654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5655 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5656 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5657 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5663 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5664 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5665 $as_echo_n "(cached) " >&6
5666 else
5667 pgac_save_CFLAGS=$CFLAGS
5668 pgac_save_CC=$CC
5669 CC=${CC}
5670 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5671 ac_save_c_werror_flag=$ac_c_werror_flag
5672 ac_c_werror_flag=yes
5673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5674 /* end confdefs.h. */
5677 main ()
5681 return 0;
5683 _ACEOF
5684 if ac_fn_c_try_compile "$LINENO"; then :
5685 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5686 else
5687 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5690 ac_c_werror_flag=$ac_save_c_werror_flag
5691 CFLAGS="$pgac_save_CFLAGS"
5692 CC="$pgac_save_CC"
5694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5695 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5696 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5697 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5702 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5703 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5704 $as_echo_n "(cached) " >&6
5705 else
5706 pgac_save_CXXFLAGS=$CXXFLAGS
5707 pgac_save_CXX=$CXX
5708 CXX=${CXX}
5709 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5710 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5711 ac_cxx_werror_flag=yes
5712 ac_ext=cpp
5713 ac_cpp='$CXXCPP $CPPFLAGS'
5714 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5715 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5716 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5719 /* end confdefs.h. */
5722 main ()
5726 return 0;
5728 _ACEOF
5729 if ac_fn_cxx_try_compile "$LINENO"; then :
5730 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5731 else
5732 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5734 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5735 ac_ext=c
5736 ac_cpp='$CPP $CPPFLAGS'
5737 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5738 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5739 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5741 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5742 CXXFLAGS="$pgac_save_CXXFLAGS"
5743 CXX="$pgac_save_CXX"
5745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5746 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5747 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5748 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5754 $as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5755 if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5756 $as_echo_n "(cached) " >&6
5757 else
5758 pgac_save_CFLAGS=$CFLAGS
5759 pgac_save_CC=$CC
5760 CC=${CC}
5761 CFLAGS="${CFLAGS} -Wcast-function-type"
5762 ac_save_c_werror_flag=$ac_c_werror_flag
5763 ac_c_werror_flag=yes
5764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5765 /* end confdefs.h. */
5768 main ()
5772 return 0;
5774 _ACEOF
5775 if ac_fn_c_try_compile "$LINENO"; then :
5776 pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5777 else
5778 pgac_cv_prog_CC_cflags__Wcast_function_type=no
5780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5781 ac_c_werror_flag=$ac_save_c_werror_flag
5782 CFLAGS="$pgac_save_CFLAGS"
5783 CC="$pgac_save_CC"
5785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5786 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5787 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5788 CFLAGS="${CFLAGS} -Wcast-function-type"
5792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5793 $as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5794 if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5795 $as_echo_n "(cached) " >&6
5796 else
5797 pgac_save_CXXFLAGS=$CXXFLAGS
5798 pgac_save_CXX=$CXX
5799 CXX=${CXX}
5800 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5801 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5802 ac_cxx_werror_flag=yes
5803 ac_ext=cpp
5804 ac_cpp='$CXXCPP $CPPFLAGS'
5805 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5806 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5807 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5810 /* end confdefs.h. */
5813 main ()
5817 return 0;
5819 _ACEOF
5820 if ac_fn_cxx_try_compile "$LINENO"; then :
5821 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5822 else
5823 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5826 ac_ext=c
5827 ac_cpp='$CPP $CPPFLAGS'
5828 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5829 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5830 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5832 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5833 CXXFLAGS="$pgac_save_CXXFLAGS"
5834 CXX="$pgac_save_CXX"
5836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5837 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5838 if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5839 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS" >&5
5845 $as_echo_n "checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS... " >&6; }
5846 if ${pgac_cv_prog_CC_cflags__Wshadow_compatible_local+:} false; then :
5847 $as_echo_n "(cached) " >&6
5848 else
5849 pgac_save_CFLAGS=$CFLAGS
5850 pgac_save_CC=$CC
5851 CC=${CC}
5852 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5853 ac_save_c_werror_flag=$ac_c_werror_flag
5854 ac_c_werror_flag=yes
5855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5856 /* end confdefs.h. */
5859 main ()
5863 return 0;
5865 _ACEOF
5866 if ac_fn_c_try_compile "$LINENO"; then :
5867 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=yes
5868 else
5869 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=no
5871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5872 ac_c_werror_flag=$ac_save_c_werror_flag
5873 CFLAGS="$pgac_save_CFLAGS"
5874 CC="$pgac_save_CC"
5876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&5
5877 $as_echo "$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&6; }
5878 if test x"$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" = x"yes"; then
5879 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS" >&5
5884 $as_echo_n "checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS... " >&6; }
5885 if ${pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local+:} false; then :
5886 $as_echo_n "(cached) " >&6
5887 else
5888 pgac_save_CXXFLAGS=$CXXFLAGS
5889 pgac_save_CXX=$CXX
5890 CXX=${CXX}
5891 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5892 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5893 ac_cxx_werror_flag=yes
5894 ac_ext=cpp
5895 ac_cpp='$CXXCPP $CPPFLAGS'
5896 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5897 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5898 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5901 /* end confdefs.h. */
5904 main ()
5908 return 0;
5910 _ACEOF
5911 if ac_fn_cxx_try_compile "$LINENO"; then :
5912 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=yes
5913 else
5914 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=no
5916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5917 ac_ext=c
5918 ac_cpp='$CPP $CPPFLAGS'
5919 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5920 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5921 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5923 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5924 CXXFLAGS="$pgac_save_CXXFLAGS"
5925 CXX="$pgac_save_CXX"
5927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&5
5928 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&6; }
5929 if test x"$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" = x"yes"; then
5930 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5934 # This was included in -Wall/-Wformat in older GCC versions
5936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5937 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5938 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5939 $as_echo_n "(cached) " >&6
5940 else
5941 pgac_save_CFLAGS=$CFLAGS
5942 pgac_save_CC=$CC
5943 CC=${CC}
5944 CFLAGS="${CFLAGS} -Wformat-security"
5945 ac_save_c_werror_flag=$ac_c_werror_flag
5946 ac_c_werror_flag=yes
5947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5948 /* end confdefs.h. */
5951 main ()
5955 return 0;
5957 _ACEOF
5958 if ac_fn_c_try_compile "$LINENO"; then :
5959 pgac_cv_prog_CC_cflags__Wformat_security=yes
5960 else
5961 pgac_cv_prog_CC_cflags__Wformat_security=no
5963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5964 ac_c_werror_flag=$ac_save_c_werror_flag
5965 CFLAGS="$pgac_save_CFLAGS"
5966 CC="$pgac_save_CC"
5968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5969 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5970 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5971 CFLAGS="${CFLAGS} -Wformat-security"
5975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5976 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5977 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5978 $as_echo_n "(cached) " >&6
5979 else
5980 pgac_save_CXXFLAGS=$CXXFLAGS
5981 pgac_save_CXX=$CXX
5982 CXX=${CXX}
5983 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5984 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5985 ac_cxx_werror_flag=yes
5986 ac_ext=cpp
5987 ac_cpp='$CXXCPP $CPPFLAGS'
5988 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5989 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5990 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5993 /* end confdefs.h. */
5996 main ()
6000 return 0;
6002 _ACEOF
6003 if ac_fn_cxx_try_compile "$LINENO"; then :
6004 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
6005 else
6006 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
6008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6009 ac_ext=c
6010 ac_cpp='$CPP $CPPFLAGS'
6011 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6012 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6013 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6015 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6016 CXXFLAGS="$pgac_save_CXXFLAGS"
6017 CXX="$pgac_save_CXX"
6019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
6020 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
6021 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
6022 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6026 # gcc 14+, clang for a while
6027 # (Supported in C++ by clang but not gcc. For consistency, omit in C++.)
6028 save_CFLAGS=$CFLAGS
6030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-variable-declarations, for CFLAGS" >&5
6031 $as_echo_n "checking whether ${CC} supports -Wmissing-variable-declarations, for CFLAGS... " >&6; }
6032 if ${pgac_cv_prog_CC_cflags__Wmissing_variable_declarations+:} false; then :
6033 $as_echo_n "(cached) " >&6
6034 else
6035 pgac_save_CFLAGS=$CFLAGS
6036 pgac_save_CC=$CC
6037 CC=${CC}
6038 CFLAGS="${CFLAGS} -Wmissing-variable-declarations"
6039 ac_save_c_werror_flag=$ac_c_werror_flag
6040 ac_c_werror_flag=yes
6041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6042 /* end confdefs.h. */
6045 main ()
6049 return 0;
6051 _ACEOF
6052 if ac_fn_c_try_compile "$LINENO"; then :
6053 pgac_cv_prog_CC_cflags__Wmissing_variable_declarations=yes
6054 else
6055 pgac_cv_prog_CC_cflags__Wmissing_variable_declarations=no
6057 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6058 ac_c_werror_flag=$ac_save_c_werror_flag
6059 CFLAGS="$pgac_save_CFLAGS"
6060 CC="$pgac_save_CC"
6062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_variable_declarations" >&5
6063 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_variable_declarations" >&6; }
6064 if test x"$pgac_cv_prog_CC_cflags__Wmissing_variable_declarations" = x"yes"; then
6065 CFLAGS="${CFLAGS} -Wmissing-variable-declarations"
6069 PERMIT_MISSING_VARIABLE_DECLARATIONS=
6070 if test x"$save_CFLAGS" != x"$CFLAGS"; then
6071 PERMIT_MISSING_VARIABLE_DECLARATIONS=-Wno-missing-variable-declarations
6074 # Disable strict-aliasing rules; needed for gcc 3.3+
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6077 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6078 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6079 $as_echo_n "(cached) " >&6
6080 else
6081 pgac_save_CFLAGS=$CFLAGS
6082 pgac_save_CC=$CC
6083 CC=${CC}
6084 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6085 ac_save_c_werror_flag=$ac_c_werror_flag
6086 ac_c_werror_flag=yes
6087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6088 /* end confdefs.h. */
6091 main ()
6095 return 0;
6097 _ACEOF
6098 if ac_fn_c_try_compile "$LINENO"; then :
6099 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6100 else
6101 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6104 ac_c_werror_flag=$ac_save_c_werror_flag
6105 CFLAGS="$pgac_save_CFLAGS"
6106 CC="$pgac_save_CC"
6108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6109 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6110 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6111 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6116 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6117 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6118 $as_echo_n "(cached) " >&6
6119 else
6120 pgac_save_CXXFLAGS=$CXXFLAGS
6121 pgac_save_CXX=$CXX
6122 CXX=${CXX}
6123 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6124 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6125 ac_cxx_werror_flag=yes
6126 ac_ext=cpp
6127 ac_cpp='$CXXCPP $CPPFLAGS'
6128 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6129 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6130 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6133 /* end confdefs.h. */
6136 main ()
6140 return 0;
6142 _ACEOF
6143 if ac_fn_cxx_try_compile "$LINENO"; then :
6144 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6145 else
6146 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6149 ac_ext=c
6150 ac_cpp='$CPP $CPPFLAGS'
6151 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6152 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6153 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6155 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6156 CXXFLAGS="$pgac_save_CXXFLAGS"
6157 CXX="$pgac_save_CXX"
6159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6160 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6161 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6162 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6166 # Disable optimizations that assume no overflow; needed for gcc 4.3+
6168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
6169 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
6170 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
6171 $as_echo_n "(cached) " >&6
6172 else
6173 pgac_save_CFLAGS=$CFLAGS
6174 pgac_save_CC=$CC
6175 CC=${CC}
6176 CFLAGS="${CFLAGS} -fwrapv"
6177 ac_save_c_werror_flag=$ac_c_werror_flag
6178 ac_c_werror_flag=yes
6179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6180 /* end confdefs.h. */
6183 main ()
6187 return 0;
6189 _ACEOF
6190 if ac_fn_c_try_compile "$LINENO"; then :
6191 pgac_cv_prog_CC_cflags__fwrapv=yes
6192 else
6193 pgac_cv_prog_CC_cflags__fwrapv=no
6195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6196 ac_c_werror_flag=$ac_save_c_werror_flag
6197 CFLAGS="$pgac_save_CFLAGS"
6198 CC="$pgac_save_CC"
6200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
6201 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
6202 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
6203 CFLAGS="${CFLAGS} -fwrapv"
6207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
6208 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
6209 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
6210 $as_echo_n "(cached) " >&6
6211 else
6212 pgac_save_CXXFLAGS=$CXXFLAGS
6213 pgac_save_CXX=$CXX
6214 CXX=${CXX}
6215 CXXFLAGS="${CXXFLAGS} -fwrapv"
6216 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6217 ac_cxx_werror_flag=yes
6218 ac_ext=cpp
6219 ac_cpp='$CXXCPP $CPPFLAGS'
6220 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6221 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6222 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6225 /* end confdefs.h. */
6228 main ()
6232 return 0;
6234 _ACEOF
6235 if ac_fn_cxx_try_compile "$LINENO"; then :
6236 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6237 else
6238 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6241 ac_ext=c
6242 ac_cpp='$CPP $CPPFLAGS'
6243 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6244 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6245 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6247 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6248 CXXFLAGS="$pgac_save_CXXFLAGS"
6249 CXX="$pgac_save_CXX"
6251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6252 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6253 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6254 CXXFLAGS="${CXXFLAGS} -fwrapv"
6258 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6261 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6262 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6263 $as_echo_n "(cached) " >&6
6264 else
6265 pgac_save_CFLAGS=$CFLAGS
6266 pgac_save_CC=$CC
6267 CC=${CC}
6268 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6269 ac_save_c_werror_flag=$ac_c_werror_flag
6270 ac_c_werror_flag=yes
6271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6272 /* end confdefs.h. */
6275 main ()
6279 return 0;
6281 _ACEOF
6282 if ac_fn_c_try_compile "$LINENO"; then :
6283 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6284 else
6285 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6288 ac_c_werror_flag=$ac_save_c_werror_flag
6289 CFLAGS="$pgac_save_CFLAGS"
6290 CC="$pgac_save_CC"
6292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6293 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6294 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6295 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6300 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6301 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6302 $as_echo_n "(cached) " >&6
6303 else
6304 pgac_save_CXXFLAGS=$CXXFLAGS
6305 pgac_save_CXX=$CXX
6306 CXX=${CXX}
6307 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6308 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6309 ac_cxx_werror_flag=yes
6310 ac_ext=cpp
6311 ac_cpp='$CXXCPP $CPPFLAGS'
6312 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6313 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6314 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6317 /* end confdefs.h. */
6320 main ()
6324 return 0;
6326 _ACEOF
6327 if ac_fn_cxx_try_compile "$LINENO"; then :
6328 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6329 else
6330 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6333 ac_ext=c
6334 ac_cpp='$CPP $CPPFLAGS'
6335 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6336 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6337 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6339 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6340 CXXFLAGS="$pgac_save_CXXFLAGS"
6341 CXX="$pgac_save_CXX"
6343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6344 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6345 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6346 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6350 # Optimization flags for specific files that benefit from loop unrolling
6351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6352 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6353 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6354 $as_echo_n "(cached) " >&6
6355 else
6356 pgac_save_CFLAGS=$CFLAGS
6357 pgac_save_CC=$CC
6358 CC=${CC}
6359 CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6360 ac_save_c_werror_flag=$ac_c_werror_flag
6361 ac_c_werror_flag=yes
6362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6363 /* end confdefs.h. */
6366 main ()
6370 return 0;
6372 _ACEOF
6373 if ac_fn_c_try_compile "$LINENO"; then :
6374 pgac_cv_prog_CC_cflags__funroll_loops=yes
6375 else
6376 pgac_cv_prog_CC_cflags__funroll_loops=no
6378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6379 ac_c_werror_flag=$ac_save_c_werror_flag
6380 CFLAGS="$pgac_save_CFLAGS"
6381 CC="$pgac_save_CC"
6383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6384 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6385 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6386 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6390 # Optimization flags for specific files that benefit from vectorization
6391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6392 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6393 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6394 $as_echo_n "(cached) " >&6
6395 else
6396 pgac_save_CFLAGS=$CFLAGS
6397 pgac_save_CC=$CC
6398 CC=${CC}
6399 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6400 ac_save_c_werror_flag=$ac_c_werror_flag
6401 ac_c_werror_flag=yes
6402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6403 /* end confdefs.h. */
6406 main ()
6410 return 0;
6412 _ACEOF
6413 if ac_fn_c_try_compile "$LINENO"; then :
6414 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6415 else
6416 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6419 ac_c_werror_flag=$ac_save_c_werror_flag
6420 CFLAGS="$pgac_save_CFLAGS"
6421 CC="$pgac_save_CC"
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6424 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6425 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6426 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6431 # The following tests want to suppress various unhelpful warnings by adding
6432 # -Wno-foo switches. But gcc won't complain about unrecognized -Wno-foo
6433 # switches, so we have to test for the positive form and if that works,
6434 # add the negative form. Note that tests of this form typically need to
6435 # be duplicated in the BITCODE_CFLAGS setup stanza below.
6437 # Suppress clang's unhelpful unused-command-line-argument warnings.
6438 NOT_THE_CFLAGS=""
6439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6440 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6441 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6442 $as_echo_n "(cached) " >&6
6443 else
6444 pgac_save_CFLAGS=$CFLAGS
6445 pgac_save_CC=$CC
6446 CC=${CC}
6447 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6448 ac_save_c_werror_flag=$ac_c_werror_flag
6449 ac_c_werror_flag=yes
6450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6451 /* end confdefs.h. */
6454 main ()
6458 return 0;
6460 _ACEOF
6461 if ac_fn_c_try_compile "$LINENO"; then :
6462 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6463 else
6464 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6466 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6467 ac_c_werror_flag=$ac_save_c_werror_flag
6468 CFLAGS="$pgac_save_CFLAGS"
6469 CC="$pgac_save_CC"
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6472 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6473 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6474 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6478 if test -n "$NOT_THE_CFLAGS"; then
6479 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6481 # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
6482 # of warnings when building plperl because of usages in the Perl headers.
6483 NOT_THE_CFLAGS=""
6484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
6485 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
6486 if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then :
6487 $as_echo_n "(cached) " >&6
6488 else
6489 pgac_save_CFLAGS=$CFLAGS
6490 pgac_save_CC=$CC
6491 CC=${CC}
6492 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6493 ac_save_c_werror_flag=$ac_c_werror_flag
6494 ac_c_werror_flag=yes
6495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6496 /* end confdefs.h. */
6499 main ()
6503 return 0;
6505 _ACEOF
6506 if ac_fn_c_try_compile "$LINENO"; then :
6507 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes
6508 else
6509 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no
6511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6512 ac_c_werror_flag=$ac_save_c_werror_flag
6513 CFLAGS="$pgac_save_CFLAGS"
6514 CC="$pgac_save_CC"
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5
6517 $as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; }
6518 if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then
6519 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6523 if test -n "$NOT_THE_CFLAGS"; then
6524 CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
6526 # Similarly disable useless truncation warnings from gcc 8+
6527 NOT_THE_CFLAGS=""
6528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6529 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6530 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6531 $as_echo_n "(cached) " >&6
6532 else
6533 pgac_save_CFLAGS=$CFLAGS
6534 pgac_save_CC=$CC
6535 CC=${CC}
6536 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6537 ac_save_c_werror_flag=$ac_c_werror_flag
6538 ac_c_werror_flag=yes
6539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6540 /* end confdefs.h. */
6543 main ()
6547 return 0;
6549 _ACEOF
6550 if ac_fn_c_try_compile "$LINENO"; then :
6551 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6552 else
6553 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6556 ac_c_werror_flag=$ac_save_c_werror_flag
6557 CFLAGS="$pgac_save_CFLAGS"
6558 CC="$pgac_save_CC"
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6561 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6562 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6563 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6567 if test -n "$NOT_THE_CFLAGS"; then
6568 CFLAGS="$CFLAGS -Wno-format-truncation"
6570 NOT_THE_CFLAGS=""
6571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6572 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6573 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6574 $as_echo_n "(cached) " >&6
6575 else
6576 pgac_save_CFLAGS=$CFLAGS
6577 pgac_save_CC=$CC
6578 CC=${CC}
6579 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6580 ac_save_c_werror_flag=$ac_c_werror_flag
6581 ac_c_werror_flag=yes
6582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6583 /* end confdefs.h. */
6586 main ()
6590 return 0;
6592 _ACEOF
6593 if ac_fn_c_try_compile "$LINENO"; then :
6594 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6595 else
6596 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6599 ac_c_werror_flag=$ac_save_c_werror_flag
6600 CFLAGS="$pgac_save_CFLAGS"
6601 CC="$pgac_save_CC"
6603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6604 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6605 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6606 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6610 if test -n "$NOT_THE_CFLAGS"; then
6611 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6613 # Suppress clang 16's strict warnings about function casts
6614 NOT_THE_CFLAGS=""
6615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS" >&5
6616 $as_echo_n "checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS... " >&6; }
6617 if ${pgac_cv_prog_CC_cflags__Wcast_function_type_strict+:} false; then :
6618 $as_echo_n "(cached) " >&6
6619 else
6620 pgac_save_CFLAGS=$CFLAGS
6621 pgac_save_CC=$CC
6622 CC=${CC}
6623 CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6624 ac_save_c_werror_flag=$ac_c_werror_flag
6625 ac_c_werror_flag=yes
6626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6627 /* end confdefs.h. */
6630 main ()
6634 return 0;
6636 _ACEOF
6637 if ac_fn_c_try_compile "$LINENO"; then :
6638 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=yes
6639 else
6640 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=no
6642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6643 ac_c_werror_flag=$ac_save_c_werror_flag
6644 CFLAGS="$pgac_save_CFLAGS"
6645 CC="$pgac_save_CC"
6647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&5
6648 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&6; }
6649 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" = x"yes"; then
6650 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6654 if test -n "$NOT_THE_CFLAGS"; then
6655 CFLAGS="$CFLAGS -Wno-cast-function-type-strict"
6657 elif test "$ICC" = yes; then
6658 # Intel's compiler has a bug/misoptimization in checking for
6659 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6662 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6663 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6664 $as_echo_n "(cached) " >&6
6665 else
6666 pgac_save_CFLAGS=$CFLAGS
6667 pgac_save_CC=$CC
6668 CC=${CC}
6669 CFLAGS="${CFLAGS} -mp1"
6670 ac_save_c_werror_flag=$ac_c_werror_flag
6671 ac_c_werror_flag=yes
6672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6673 /* end confdefs.h. */
6676 main ()
6680 return 0;
6682 _ACEOF
6683 if ac_fn_c_try_compile "$LINENO"; then :
6684 pgac_cv_prog_CC_cflags__mp1=yes
6685 else
6686 pgac_cv_prog_CC_cflags__mp1=no
6688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6689 ac_c_werror_flag=$ac_save_c_werror_flag
6690 CFLAGS="$pgac_save_CFLAGS"
6691 CC="$pgac_save_CC"
6693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6694 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6695 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6696 CFLAGS="${CFLAGS} -mp1"
6700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6701 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6702 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6703 $as_echo_n "(cached) " >&6
6704 else
6705 pgac_save_CXXFLAGS=$CXXFLAGS
6706 pgac_save_CXX=$CXX
6707 CXX=${CXX}
6708 CXXFLAGS="${CXXFLAGS} -mp1"
6709 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6710 ac_cxx_werror_flag=yes
6711 ac_ext=cpp
6712 ac_cpp='$CXXCPP $CPPFLAGS'
6713 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6714 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6715 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6718 /* end confdefs.h. */
6721 main ()
6725 return 0;
6727 _ACEOF
6728 if ac_fn_cxx_try_compile "$LINENO"; then :
6729 pgac_cv_prog_CXX_cxxflags__mp1=yes
6730 else
6731 pgac_cv_prog_CXX_cxxflags__mp1=no
6733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6734 ac_ext=c
6735 ac_cpp='$CPP $CPPFLAGS'
6736 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6737 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6738 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6740 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6741 CXXFLAGS="$pgac_save_CXXFLAGS"
6742 CXX="$pgac_save_CXX"
6744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6745 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6746 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6747 CXXFLAGS="${CXXFLAGS} -mp1"
6751 # Make sure strict aliasing is off (though this is said to be the default)
6753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6754 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6755 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6756 $as_echo_n "(cached) " >&6
6757 else
6758 pgac_save_CFLAGS=$CFLAGS
6759 pgac_save_CC=$CC
6760 CC=${CC}
6761 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6762 ac_save_c_werror_flag=$ac_c_werror_flag
6763 ac_c_werror_flag=yes
6764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6765 /* end confdefs.h. */
6768 main ()
6772 return 0;
6774 _ACEOF
6775 if ac_fn_c_try_compile "$LINENO"; then :
6776 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6777 else
6778 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6781 ac_c_werror_flag=$ac_save_c_werror_flag
6782 CFLAGS="$pgac_save_CFLAGS"
6783 CC="$pgac_save_CC"
6785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6786 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6787 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6788 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6793 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6794 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6795 $as_echo_n "(cached) " >&6
6796 else
6797 pgac_save_CXXFLAGS=$CXXFLAGS
6798 pgac_save_CXX=$CXX
6799 CXX=${CXX}
6800 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6801 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6802 ac_cxx_werror_flag=yes
6803 ac_ext=cpp
6804 ac_cpp='$CXXCPP $CPPFLAGS'
6805 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6806 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6807 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6810 /* end confdefs.h. */
6813 main ()
6817 return 0;
6819 _ACEOF
6820 if ac_fn_cxx_try_compile "$LINENO"; then :
6821 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6822 else
6823 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6826 ac_ext=c
6827 ac_cpp='$CPP $CPPFLAGS'
6828 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6829 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6830 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6832 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6833 CXXFLAGS="$pgac_save_CXXFLAGS"
6834 CXX="$pgac_save_CXX"
6836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6837 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6838 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6839 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6845 # If the compiler knows how to hide symbols, add the switch needed for that to
6846 # CFLAGS_SL_MODULE and define HAVE_VISIBILITY_ATTRIBUTE.
6848 # This is done separately from the above because -fvisibility is supported by
6849 # quite a few different compilers, making the required repetition bothersome.
6851 # We might need to add a separate test to check if
6852 # __attribute__((visibility("hidden"))) is supported, if we encounter a
6853 # compiler that supports one of the supported variants of -fvisibility=hidden
6854 # but uses a different syntax to mark a symbol as exported.
6855 if test "$GCC" = yes -o "$SUN_STUDIO_CC" = yes ; then
6856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE" >&5
6857 $as_echo_n "checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
6858 if ${pgac_cv_prog_CC_cflags__fvisibility_hidden+:} false; then :
6859 $as_echo_n "(cached) " >&6
6860 else
6861 pgac_save_CFLAGS=$CFLAGS
6862 pgac_save_CC=$CC
6863 CC=${CC}
6864 CFLAGS="${CFLAGS_SL_MODULE} -fvisibility=hidden"
6865 ac_save_c_werror_flag=$ac_c_werror_flag
6866 ac_c_werror_flag=yes
6867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6868 /* end confdefs.h. */
6871 main ()
6875 return 0;
6877 _ACEOF
6878 if ac_fn_c_try_compile "$LINENO"; then :
6879 pgac_cv_prog_CC_cflags__fvisibility_hidden=yes
6880 else
6881 pgac_cv_prog_CC_cflags__fvisibility_hidden=no
6883 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6884 ac_c_werror_flag=$ac_save_c_werror_flag
6885 CFLAGS="$pgac_save_CFLAGS"
6886 CC="$pgac_save_CC"
6888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fvisibility_hidden" >&5
6889 $as_echo "$pgac_cv_prog_CC_cflags__fvisibility_hidden" >&6; }
6890 if test x"$pgac_cv_prog_CC_cflags__fvisibility_hidden" = x"yes"; then
6891 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -fvisibility=hidden"
6895 # For C++ we additionally want -fvisibility-inlines-hidden
6896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
6897 $as_echo_n "checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
6898 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_hidden+:} false; then :
6899 $as_echo_n "(cached) " >&6
6900 else
6901 pgac_save_CXXFLAGS=$CXXFLAGS
6902 pgac_save_CXX=$CXX
6903 CXX=${CXX}
6904 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
6905 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6906 ac_cxx_werror_flag=yes
6907 ac_ext=cpp
6908 ac_cpp='$CXXCPP $CPPFLAGS'
6909 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6910 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6911 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6914 /* end confdefs.h. */
6917 main ()
6921 return 0;
6923 _ACEOF
6924 if ac_fn_cxx_try_compile "$LINENO"; then :
6925 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=yes
6926 else
6927 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=no
6929 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6930 ac_ext=c
6931 ac_cpp='$CPP $CPPFLAGS'
6932 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6933 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6934 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6936 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6937 CXXFLAGS="$pgac_save_CXXFLAGS"
6938 CXX="$pgac_save_CXX"
6940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&5
6941 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&6; }
6942 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" = x"yes"; then
6943 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
6946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE" >&5
6947 $as_echo_n "checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE... " >&6; }
6948 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden+:} false; then :
6949 $as_echo_n "(cached) " >&6
6950 else
6951 pgac_save_CXXFLAGS=$CXXFLAGS
6952 pgac_save_CXX=$CXX
6953 CXX=${CXX}
6954 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
6955 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6956 ac_cxx_werror_flag=yes
6957 ac_ext=cpp
6958 ac_cpp='$CXXCPP $CPPFLAGS'
6959 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6960 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6961 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6964 /* end confdefs.h. */
6967 main ()
6971 return 0;
6973 _ACEOF
6974 if ac_fn_cxx_try_compile "$LINENO"; then :
6975 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=yes
6976 else
6977 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=no
6979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6980 ac_ext=c
6981 ac_cpp='$CPP $CPPFLAGS'
6982 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6983 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6984 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6986 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6987 CXXFLAGS="$pgac_save_CXXFLAGS"
6988 CXX="$pgac_save_CXX"
6990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&5
6991 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&6; }
6992 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" = x"yes"; then
6993 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
6996 have_visibility_attribute=$pgac_cv_prog_CC_cflags__fvisibility_hidden
6999 if test "$have_visibility_attribute" = "yes"; then
7001 $as_echo "#define HAVE_VISIBILITY_ATTRIBUTE 1" >>confdefs.h
7010 # Determine flags used to emit bitcode for JIT inlining.
7011 # 1. We must duplicate any behaviour-changing compiler flags used above,
7012 # to keep compatibility with the compiler used for normal Postgres code.
7013 # 2. We don't bother to duplicate extra-warnings switches --- seeing a
7014 # warning in the main build is enough.
7015 # 3. But we must duplicate -Wno-warning flags, else we'll see those anyway.
7016 if test "$with_llvm" = yes ; then
7017 CLANGXX="$CLANG -xc++"
7019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
7020 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
7021 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
7022 $as_echo_n "(cached) " >&6
7023 else
7024 pgac_save_CFLAGS=$CFLAGS
7025 pgac_save_CC=$CC
7026 CC=${CLANG}
7027 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7028 ac_save_c_werror_flag=$ac_c_werror_flag
7029 ac_c_werror_flag=yes
7030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7031 /* end confdefs.h. */
7034 main ()
7038 return 0;
7040 _ACEOF
7041 if ac_fn_c_try_compile "$LINENO"; then :
7042 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
7043 else
7044 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
7046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7047 ac_c_werror_flag=$ac_save_c_werror_flag
7048 CFLAGS="$pgac_save_CFLAGS"
7049 CC="$pgac_save_CC"
7051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
7052 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
7053 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
7054 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
7058 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
7059 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
7060 $as_echo_n "(cached) " >&6
7061 else
7062 pgac_save_CXXFLAGS=$CXXFLAGS
7063 pgac_save_CXX=$CXX
7064 CXX=${CLANGXX}
7065 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7066 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7067 ac_cxx_werror_flag=yes
7068 ac_ext=cpp
7069 ac_cpp='$CXXCPP $CPPFLAGS'
7070 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7071 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7072 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7075 /* end confdefs.h. */
7078 main ()
7082 return 0;
7084 _ACEOF
7085 if ac_fn_cxx_try_compile "$LINENO"; then :
7086 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
7087 else
7088 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
7090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7091 ac_ext=c
7092 ac_cpp='$CPP $CPPFLAGS'
7093 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7094 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7095 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7097 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7098 CXXFLAGS="$pgac_save_CXXFLAGS"
7099 CXX="$pgac_save_CXX"
7101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
7102 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
7103 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
7104 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
7108 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
7109 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
7110 $as_echo_n "(cached) " >&6
7111 else
7112 pgac_save_CFLAGS=$CFLAGS
7113 pgac_save_CC=$CC
7114 CC=${CLANG}
7115 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7116 ac_save_c_werror_flag=$ac_c_werror_flag
7117 ac_c_werror_flag=yes
7118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7119 /* end confdefs.h. */
7122 main ()
7126 return 0;
7128 _ACEOF
7129 if ac_fn_c_try_compile "$LINENO"; then :
7130 pgac_cv_prog_CLANG_cflags__fwrapv=yes
7131 else
7132 pgac_cv_prog_CLANG_cflags__fwrapv=no
7134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7135 ac_c_werror_flag=$ac_save_c_werror_flag
7136 CFLAGS="$pgac_save_CFLAGS"
7137 CC="$pgac_save_CC"
7139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
7140 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
7141 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
7142 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
7146 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
7147 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
7148 $as_echo_n "(cached) " >&6
7149 else
7150 pgac_save_CXXFLAGS=$CXXFLAGS
7151 pgac_save_CXX=$CXX
7152 CXX=${CLANGXX}
7153 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7154 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7155 ac_cxx_werror_flag=yes
7156 ac_ext=cpp
7157 ac_cpp='$CXXCPP $CPPFLAGS'
7158 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7159 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7160 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7163 /* end confdefs.h. */
7166 main ()
7170 return 0;
7172 _ACEOF
7173 if ac_fn_cxx_try_compile "$LINENO"; then :
7174 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
7175 else
7176 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
7178 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7179 ac_ext=c
7180 ac_cpp='$CPP $CPPFLAGS'
7181 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7182 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7183 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7185 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7186 CXXFLAGS="$pgac_save_CXXFLAGS"
7187 CXX="$pgac_save_CXX"
7189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
7190 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
7191 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
7192 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
7196 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
7197 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
7198 $as_echo_n "(cached) " >&6
7199 else
7200 pgac_save_CFLAGS=$CFLAGS
7201 pgac_save_CC=$CC
7202 CC=${CLANG}
7203 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7204 ac_save_c_werror_flag=$ac_c_werror_flag
7205 ac_c_werror_flag=yes
7206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7207 /* end confdefs.h. */
7210 main ()
7214 return 0;
7216 _ACEOF
7217 if ac_fn_c_try_compile "$LINENO"; then :
7218 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7219 else
7220 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7223 ac_c_werror_flag=$ac_save_c_werror_flag
7224 CFLAGS="$pgac_save_CFLAGS"
7225 CC="$pgac_save_CC"
7227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7228 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7229 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7230 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7234 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7235 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7236 $as_echo_n "(cached) " >&6
7237 else
7238 pgac_save_CXXFLAGS=$CXXFLAGS
7239 pgac_save_CXX=$CXX
7240 CXX=${CLANGXX}
7241 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7242 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7243 ac_cxx_werror_flag=yes
7244 ac_ext=cpp
7245 ac_cpp='$CXXCPP $CPPFLAGS'
7246 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7247 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7248 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7251 /* end confdefs.h. */
7254 main ()
7258 return 0;
7260 _ACEOF
7261 if ac_fn_cxx_try_compile "$LINENO"; then :
7262 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7263 else
7264 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7267 ac_ext=c
7268 ac_cpp='$CPP $CPPFLAGS'
7269 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7270 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7271 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7273 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7274 CXXFLAGS="$pgac_save_CXXFLAGS"
7275 CXX="$pgac_save_CXX"
7277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7278 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7279 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7280 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS" >&5
7285 $as_echo_n "checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS... " >&6; }
7286 if ${pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers+:} false; then :
7287 $as_echo_n "(cached) " >&6
7288 else
7289 pgac_save_CFLAGS=$CFLAGS
7290 pgac_save_CC=$CC
7291 CC=${CLANG}
7292 CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7293 ac_save_c_werror_flag=$ac_c_werror_flag
7294 ac_c_werror_flag=yes
7295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7296 /* end confdefs.h. */
7299 main ()
7303 return 0;
7305 _ACEOF
7306 if ac_fn_c_try_compile "$LINENO"; then :
7307 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=yes
7308 else
7309 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=no
7311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7312 ac_c_werror_flag=$ac_save_c_werror_flag
7313 CFLAGS="$pgac_save_CFLAGS"
7314 CC="$pgac_save_CC"
7316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&5
7317 $as_echo "$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&6; }
7318 if test x"$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" = x"yes"; then
7319 BITCODE_CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS" >&5
7323 $as_echo_n "checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS... " >&6; }
7324 if ${pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers+:} false; then :
7325 $as_echo_n "(cached) " >&6
7326 else
7327 pgac_save_CXXFLAGS=$CXXFLAGS
7328 pgac_save_CXX=$CXX
7329 CXX=${CLANGXX}
7330 CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7331 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7332 ac_cxx_werror_flag=yes
7333 ac_ext=cpp
7334 ac_cpp='$CXXCPP $CPPFLAGS'
7335 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7336 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7337 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7340 /* end confdefs.h. */
7343 main ()
7347 return 0;
7349 _ACEOF
7350 if ac_fn_cxx_try_compile "$LINENO"; then :
7351 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=yes
7352 else
7353 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=no
7355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7356 ac_ext=c
7357 ac_cpp='$CPP $CPPFLAGS'
7358 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7359 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7360 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7362 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7363 CXXFLAGS="$pgac_save_CXXFLAGS"
7364 CXX="$pgac_save_CXX"
7366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&5
7367 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&6; }
7368 if test x"$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" = x"yes"; then
7369 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7373 NOT_THE_CFLAGS=""
7374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
7375 $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
7376 if ${pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument+:} false; then :
7377 $as_echo_n "(cached) " >&6
7378 else
7379 pgac_save_CFLAGS=$CFLAGS
7380 pgac_save_CC=$CC
7381 CC=${CLANG}
7382 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7383 ac_save_c_werror_flag=$ac_c_werror_flag
7384 ac_c_werror_flag=yes
7385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7386 /* end confdefs.h. */
7389 main ()
7393 return 0;
7395 _ACEOF
7396 if ac_fn_c_try_compile "$LINENO"; then :
7397 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=yes
7398 else
7399 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=no
7401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7402 ac_c_werror_flag=$ac_save_c_werror_flag
7403 CFLAGS="$pgac_save_CFLAGS"
7404 CC="$pgac_save_CC"
7406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&5
7407 $as_echo "$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&6; }
7408 if test x"$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" = x"yes"; then
7409 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7412 if test -n "$NOT_THE_CFLAGS"; then
7413 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-unused-command-line-argument"
7415 NOT_THE_CFLAGS=""
7416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
7417 $as_echo_n "checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
7418 if ${pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro+:} false; then :
7419 $as_echo_n "(cached) " >&6
7420 else
7421 pgac_save_CFLAGS=$CFLAGS
7422 pgac_save_CC=$CC
7423 CC=${CLANG}
7424 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7425 ac_save_c_werror_flag=$ac_c_werror_flag
7426 ac_c_werror_flag=yes
7427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7428 /* end confdefs.h. */
7431 main ()
7435 return 0;
7437 _ACEOF
7438 if ac_fn_c_try_compile "$LINENO"; then :
7439 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=yes
7440 else
7441 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=no
7443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7444 ac_c_werror_flag=$ac_save_c_werror_flag
7445 CFLAGS="$pgac_save_CFLAGS"
7446 CC="$pgac_save_CC"
7448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&5
7449 $as_echo "$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&6; }
7450 if test x"$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" = x"yes"; then
7451 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7454 if test -n "$NOT_THE_CFLAGS"; then
7455 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
7457 NOT_THE_CFLAGS=""
7458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
7459 $as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
7460 if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :
7461 $as_echo_n "(cached) " >&6
7462 else
7463 pgac_save_CFLAGS=$CFLAGS
7464 pgac_save_CC=$CC
7465 CC=${CLANG}
7466 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7467 ac_save_c_werror_flag=$ac_c_werror_flag
7468 ac_c_werror_flag=yes
7469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7470 /* end confdefs.h. */
7473 main ()
7477 return 0;
7479 _ACEOF
7480 if ac_fn_c_try_compile "$LINENO"; then :
7481 pgac_cv_prog_CLANG_cflags__Wformat_truncation=yes
7482 else
7483 pgac_cv_prog_CLANG_cflags__Wformat_truncation=no
7485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7486 ac_c_werror_flag=$ac_save_c_werror_flag
7487 CFLAGS="$pgac_save_CFLAGS"
7488 CC="$pgac_save_CC"
7490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&5
7491 $as_echo "$pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&6; }
7492 if test x"$pgac_cv_prog_CLANG_cflags__Wformat_truncation" = x"yes"; then
7493 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7496 if test -n "$NOT_THE_CFLAGS"; then
7497 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"
7499 NOT_THE_CFLAGS=""
7500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
7501 $as_echo_n "checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
7502 if ${pgac_cv_prog_CLANG_cflags__Wstringop_truncation+:} false; then :
7503 $as_echo_n "(cached) " >&6
7504 else
7505 pgac_save_CFLAGS=$CFLAGS
7506 pgac_save_CC=$CC
7507 CC=${CLANG}
7508 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7509 ac_save_c_werror_flag=$ac_c_werror_flag
7510 ac_c_werror_flag=yes
7511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7512 /* end confdefs.h. */
7515 main ()
7519 return 0;
7521 _ACEOF
7522 if ac_fn_c_try_compile "$LINENO"; then :
7523 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=yes
7524 else
7525 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=no
7527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7528 ac_c_werror_flag=$ac_save_c_werror_flag
7529 CFLAGS="$pgac_save_CFLAGS"
7530 CC="$pgac_save_CC"
7532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&5
7533 $as_echo "$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&6; }
7534 if test x"$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" = x"yes"; then
7535 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7538 if test -n "$NOT_THE_CFLAGS"; then
7539 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-stringop-truncation"
7543 # supply -g if --enable-debug
7544 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7545 CFLAGS="$CFLAGS -g"
7548 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7549 CXXFLAGS="$CXXFLAGS -g"
7552 # enable code coverage if --enable-coverage
7553 if test "$enable_coverage" = yes; then
7554 if test "$GCC" = yes; then
7555 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7556 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7557 else
7558 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7562 # enable profiling if --enable-profiling
7563 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7564 if test "$GCC" = yes; then
7566 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7568 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7569 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7570 else
7571 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7575 # On Solaris, we need this #define to get POSIX-conforming versions
7576 # of many interfaces (sigwait, getpwuid_r, ...).
7577 if test "$PORTNAME" = "solaris"; then
7578 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
7581 # We already have this in Makefile.win32, but configure needs it too
7582 if test "$PORTNAME" = "win32"; then
7583 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7586 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7587 # user-specified flags (if any) at the end. This lets users override
7588 # the automatic additions.
7589 CFLAGS="$CFLAGS $user_CFLAGS"
7590 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7591 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7592 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7597 # The template file must set up CFLAGS_SL; we don't support user override
7600 # Check if the compiler still works with the final flag settings
7601 # (note, we're not checking that for CXX, which is optional)
7602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7603 $as_echo_n "checking whether the C compiler still works... " >&6; }
7604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7605 /* end confdefs.h. */
7608 main ()
7610 return 0;
7612 return 0;
7614 _ACEOF
7615 if ac_fn_c_try_link "$LINENO"; then :
7616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7617 $as_echo "yes" >&6; }
7618 else
7619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7620 $as_echo "no" >&6; }
7621 as_fn_error $? "cannot proceed" "$LINENO" 5
7623 rm -f core conftest.err conftest.$ac_objext \
7624 conftest$ac_exeext conftest.$ac_ext
7626 # Defend against gcc -ffast-math
7627 if test "$GCC" = yes; then
7628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7629 /* end confdefs.h. */
7632 main ()
7634 #ifdef __FAST_MATH__
7635 choke me
7636 #endif
7638 return 0;
7640 _ACEOF
7641 if ac_fn_c_try_compile "$LINENO"; then :
7643 else
7644 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7646 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7649 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7650 # versions of clang do not understand -fexcess-precision=standard, the use of
7651 # x87 floating point operations leads to problems like isinf possibly returning
7652 # false for a value that is infinite when converted from the 80bit register to
7653 # the 8byte memory representation.
7655 # Only perform the test if the compiler doesn't understand
7656 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7657 # automatically.
7658 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7660 /* end confdefs.h. */
7663 main ()
7666 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7667 choke me
7668 #endif
7671 return 0;
7673 _ACEOF
7674 if ac_fn_c_try_compile "$LINENO"; then :
7676 else
7677 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7682 ac_ext=c
7683 ac_cpp='$CPP $CPPFLAGS'
7684 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7685 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7686 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7688 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7689 # On Suns, sometimes $CPP names a directory.
7690 if test -n "$CPP" && test -d "$CPP"; then
7691 CPP=
7693 if test -z "$CPP"; then
7694 if ${ac_cv_prog_CPP+:} false; then :
7695 $as_echo_n "(cached) " >&6
7696 else
7697 # Double quotes because CPP needs to be expanded
7698 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7700 ac_preproc_ok=false
7701 for ac_c_preproc_warn_flag in '' yes
7703 # Use a header file that comes with gcc, so configuring glibc
7704 # with a fresh cross-compiler works.
7705 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7706 # <limits.h> exists even on freestanding compilers.
7707 # On the NeXT, cc -E runs the code through the compiler's parser,
7708 # not just through cpp. "Syntax error" is here to catch this case.
7709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7710 /* end confdefs.h. */
7711 #ifdef __STDC__
7712 # include <limits.h>
7713 #else
7714 # include <assert.h>
7715 #endif
7716 Syntax error
7717 _ACEOF
7718 if ac_fn_c_try_cpp "$LINENO"; then :
7720 else
7721 # Broken: fails on valid input.
7722 continue
7724 rm -f conftest.err conftest.i conftest.$ac_ext
7726 # OK, works on sane cases. Now check whether nonexistent headers
7727 # can be detected and how.
7728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7729 /* end confdefs.h. */
7730 #include <ac_nonexistent.h>
7731 _ACEOF
7732 if ac_fn_c_try_cpp "$LINENO"; then :
7733 # Broken: success on invalid input.
7734 continue
7735 else
7736 # Passes both tests.
7737 ac_preproc_ok=:
7738 break
7740 rm -f conftest.err conftest.i conftest.$ac_ext
7742 done
7743 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7744 rm -f conftest.i conftest.err conftest.$ac_ext
7745 if $ac_preproc_ok; then :
7746 break
7749 done
7750 ac_cv_prog_CPP=$CPP
7753 CPP=$ac_cv_prog_CPP
7754 else
7755 ac_cv_prog_CPP=$CPP
7757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7758 $as_echo "$CPP" >&6; }
7759 ac_preproc_ok=false
7760 for ac_c_preproc_warn_flag in '' yes
7762 # Use a header file that comes with gcc, so configuring glibc
7763 # with a fresh cross-compiler works.
7764 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7765 # <limits.h> exists even on freestanding compilers.
7766 # On the NeXT, cc -E runs the code through the compiler's parser,
7767 # not just through cpp. "Syntax error" is here to catch this case.
7768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7769 /* end confdefs.h. */
7770 #ifdef __STDC__
7771 # include <limits.h>
7772 #else
7773 # include <assert.h>
7774 #endif
7775 Syntax error
7776 _ACEOF
7777 if ac_fn_c_try_cpp "$LINENO"; then :
7779 else
7780 # Broken: fails on valid input.
7781 continue
7783 rm -f conftest.err conftest.i conftest.$ac_ext
7785 # OK, works on sane cases. Now check whether nonexistent headers
7786 # can be detected and how.
7787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7788 /* end confdefs.h. */
7789 #include <ac_nonexistent.h>
7790 _ACEOF
7791 if ac_fn_c_try_cpp "$LINENO"; then :
7792 # Broken: success on invalid input.
7793 continue
7794 else
7795 # Passes both tests.
7796 ac_preproc_ok=:
7797 break
7799 rm -f conftest.err conftest.i conftest.$ac_ext
7801 done
7802 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7803 rm -f conftest.i conftest.err conftest.$ac_ext
7804 if $ac_preproc_ok; then :
7806 else
7807 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7808 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7809 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7810 See \`config.log' for more details" "$LINENO" 5; }
7813 ac_ext=c
7814 ac_cpp='$CPP $CPPFLAGS'
7815 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7816 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7817 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7823 # Set up TAS assembly code if needed; the template file has now had its
7824 # chance to request this.
7826 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7829 if test "$need_tas" = yes ; then
7830 TAS=tas.o
7831 else
7832 TAS=""
7837 cat >>confdefs.h <<_ACEOF
7838 #define DLSUFFIX "$DLSUFFIX"
7839 _ACEOF
7843 # Set up pkg_config in case we need it below
7852 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7853 if test -n "$ac_tool_prefix"; then
7854 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7855 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7857 $as_echo_n "checking for $ac_word... " >&6; }
7858 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7859 $as_echo_n "(cached) " >&6
7860 else
7861 case $PKG_CONFIG in
7862 [\\/]* | ?:[\\/]*)
7863 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7867 for as_dir in $PATH
7869 IFS=$as_save_IFS
7870 test -z "$as_dir" && as_dir=.
7871 for ac_exec_ext in '' $ac_executable_extensions; do
7872 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7873 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7874 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7875 break 2
7877 done
7878 done
7879 IFS=$as_save_IFS
7882 esac
7884 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7885 if test -n "$PKG_CONFIG"; then
7886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7887 $as_echo "$PKG_CONFIG" >&6; }
7888 else
7889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7890 $as_echo "no" >&6; }
7895 if test -z "$ac_cv_path_PKG_CONFIG"; then
7896 ac_pt_PKG_CONFIG=$PKG_CONFIG
7897 # Extract the first word of "pkg-config", so it can be a program name with args.
7898 set dummy pkg-config; ac_word=$2
7899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7900 $as_echo_n "checking for $ac_word... " >&6; }
7901 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7902 $as_echo_n "(cached) " >&6
7903 else
7904 case $ac_pt_PKG_CONFIG in
7905 [\\/]* | ?:[\\/]*)
7906 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7909 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7910 for as_dir in $PATH
7912 IFS=$as_save_IFS
7913 test -z "$as_dir" && as_dir=.
7914 for ac_exec_ext in '' $ac_executable_extensions; do
7915 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7916 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7917 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7918 break 2
7920 done
7921 done
7922 IFS=$as_save_IFS
7925 esac
7927 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7928 if test -n "$ac_pt_PKG_CONFIG"; then
7929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7930 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7931 else
7932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7933 $as_echo "no" >&6; }
7936 if test "x$ac_pt_PKG_CONFIG" = x; then
7937 PKG_CONFIG=""
7938 else
7939 case $cross_compiling:$ac_tool_warned in
7940 yes:)
7941 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7942 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7943 ac_tool_warned=yes ;;
7944 esac
7945 PKG_CONFIG=$ac_pt_PKG_CONFIG
7947 else
7948 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7952 if test -n "$PKG_CONFIG"; then
7953 _pkg_min_version=0.9.0
7954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7955 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7956 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7958 $as_echo "yes" >&6; }
7959 else
7960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7961 $as_echo "no" >&6; }
7962 PKG_CONFIG=""
7967 # Automatic dependency tracking
7971 # Check whether --enable-depend was given.
7972 if test "${enable_depend+set}" = set; then :
7973 enableval=$enable_depend;
7974 case $enableval in
7975 yes)
7976 autodepend=yes
7982 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7984 esac
7986 else
7987 enable_depend=no
7996 # Enable assert checks
8000 # Check whether --enable-cassert was given.
8001 if test "${enable_cassert+set}" = set; then :
8002 enableval=$enable_cassert;
8003 case $enableval in
8004 yes)
8006 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
8013 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
8015 esac
8017 else
8018 enable_cassert=no
8026 # Include directories
8028 ac_save_IFS=$IFS
8029 IFS="${IFS}${PATH_SEPARATOR}"
8030 # SRCH_INC comes from the template file
8031 for dir in $with_includes $SRCH_INC; do
8032 if test -d "$dir"; then
8033 INCLUDES="$INCLUDES -I$dir"
8034 else
8035 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
8036 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
8038 done
8039 IFS=$ac_save_IFS
8044 # Library directories
8046 ac_save_IFS=$IFS
8047 IFS="${IFS}${PATH_SEPARATOR}"
8048 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
8049 for dir in $LIBRARY_DIRS $SRCH_LIB; do
8050 if test -d "$dir"; then
8051 LIBDIRS="$LIBDIRS -L$dir"
8052 else
8053 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
8054 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
8056 done
8057 IFS=$ac_save_IFS
8060 # ICU
8062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
8063 $as_echo_n "checking whether to build with ICU support... " >&6; }
8067 # Check whether --with-icu was given.
8068 if test "${with_icu+set}" = set; then :
8069 withval=$with_icu;
8070 case $withval in
8071 yes)
8073 $as_echo "#define USE_ICU 1" >>confdefs.h
8080 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
8082 esac
8084 else
8085 with_icu=yes
8087 $as_echo "#define USE_ICU 1" >>confdefs.h
8092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
8093 $as_echo "$with_icu" >&6; }
8096 if test "$with_icu" = yes; then
8098 pkg_failed=no
8099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
8100 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
8102 if test -n "$ICU_CFLAGS"; then
8103 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
8104 elif test -n "$PKG_CONFIG"; then
8105 if test -n "$PKG_CONFIG" && \
8106 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8107 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8108 ac_status=$?
8109 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8110 test $ac_status = 0; }; then
8111 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
8112 test "x$?" != "x0" && pkg_failed=yes
8113 else
8114 pkg_failed=yes
8116 else
8117 pkg_failed=untried
8119 if test -n "$ICU_LIBS"; then
8120 pkg_cv_ICU_LIBS="$ICU_LIBS"
8121 elif test -n "$PKG_CONFIG"; then
8122 if test -n "$PKG_CONFIG" && \
8123 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8124 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8125 ac_status=$?
8126 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8127 test $ac_status = 0; }; then
8128 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
8129 test "x$?" != "x0" && pkg_failed=yes
8130 else
8131 pkg_failed=yes
8133 else
8134 pkg_failed=untried
8139 if test $pkg_failed = yes; then
8140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8141 $as_echo "no" >&6; }
8143 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8144 _pkg_short_errors_supported=yes
8145 else
8146 _pkg_short_errors_supported=no
8148 if test $_pkg_short_errors_supported = yes; then
8149 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8150 else
8151 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8153 # Put the nasty error message in config.log where it belongs
8154 echo "$ICU_PKG_ERRORS" >&5
8156 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
8158 $ICU_PKG_ERRORS
8160 Consider adjusting the PKG_CONFIG_PATH environment variable if you
8161 installed software in a non-standard prefix.
8163 Alternatively, you may set the environment variables ICU_CFLAGS
8164 and ICU_LIBS to avoid the need to call pkg-config.
8165 See the pkg-config man page for more details." "$LINENO" 5
8166 elif test $pkg_failed = untried; then
8167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8168 $as_echo "no" >&6; }
8169 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8170 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8171 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
8172 is in your PATH or set the PKG_CONFIG environment variable to the full
8173 path to pkg-config.
8175 Alternatively, you may set the environment variables ICU_CFLAGS
8176 and ICU_LIBS to avoid the need to call pkg-config.
8177 See the pkg-config man page for more details.
8179 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
8180 See \`config.log' for more details" "$LINENO" 5; }
8181 else
8182 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
8183 ICU_LIBS=$pkg_cv_ICU_LIBS
8184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8185 $as_echo "yes" >&6; }
8191 # Optionally build Tcl modules (PL/Tcl)
8193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
8194 $as_echo_n "checking whether to build with Tcl... " >&6; }
8198 # Check whether --with-tcl was given.
8199 if test "${with_tcl+set}" = set; then :
8200 withval=$with_tcl;
8201 case $withval in
8202 yes)
8209 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
8211 esac
8213 else
8214 with_tcl=no
8219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
8220 $as_echo "$with_tcl" >&6; }
8223 # We see if the path to the Tcl/Tk configuration scripts is specified.
8224 # This will override the use of tclsh to find the paths to search.
8229 # Check whether --with-tclconfig was given.
8230 if test "${with_tclconfig+set}" = set; then :
8231 withval=$with_tclconfig;
8232 case $withval in
8233 yes)
8234 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8237 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8242 esac
8249 # Optionally build Perl modules (PL/Perl)
8251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
8252 $as_echo_n "checking whether to build Perl modules... " >&6; }
8256 # Check whether --with-perl was given.
8257 if test "${with_perl+set}" = set; then :
8258 withval=$with_perl;
8259 case $withval in
8260 yes)
8267 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
8269 esac
8271 else
8272 with_perl=no
8277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
8278 $as_echo "$with_perl" >&6; }
8282 # Optionally build Python modules (PL/Python)
8284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
8285 $as_echo_n "checking whether to build Python modules... " >&6; }
8289 # Check whether --with-python was given.
8290 if test "${with_python+set}" = set; then :
8291 withval=$with_python;
8292 case $withval in
8293 yes)
8300 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
8302 esac
8304 else
8305 with_python=no
8310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8311 $as_echo "$with_python" >&6; }
8315 # GSSAPI
8317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
8318 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
8322 # Check whether --with-gssapi was given.
8323 if test "${with_gssapi+set}" = set; then :
8324 withval=$with_gssapi;
8325 case $withval in
8326 yes)
8329 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
8331 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
8338 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
8340 esac
8342 else
8343 with_gssapi=no
8348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8349 $as_echo "$with_gssapi" >&6; }
8357 # Kerberos configuration parameters
8362 # Check whether --with-krb-srvnam was given.
8363 if test "${with_krb_srvnam+set}" = set; then :
8364 withval=$with_krb_srvnam;
8365 case $withval in
8366 yes)
8367 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8370 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8375 esac
8377 else
8378 with_krb_srvnam="postgres"
8384 cat >>confdefs.h <<_ACEOF
8385 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8386 _ACEOF
8391 # PAM
8393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8394 $as_echo_n "checking whether to build with PAM support... " >&6; }
8398 # Check whether --with-pam was given.
8399 if test "${with_pam+set}" = set; then :
8400 withval=$with_pam;
8401 case $withval in
8402 yes)
8404 $as_echo "#define USE_PAM 1" >>confdefs.h
8411 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8413 esac
8415 else
8416 with_pam=no
8421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8422 $as_echo "$with_pam" >&6; }
8426 # BSD AUTH
8428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8429 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8433 # Check whether --with-bsd-auth was given.
8434 if test "${with_bsd_auth+set}" = set; then :
8435 withval=$with_bsd_auth;
8436 case $withval in
8437 yes)
8439 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8446 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8448 esac
8450 else
8451 with_bsd_auth=no
8456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8457 $as_echo "$with_bsd_auth" >&6; }
8461 # LDAP
8463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8464 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8468 # Check whether --with-ldap was given.
8469 if test "${with_ldap+set}" = set; then :
8470 withval=$with_ldap;
8471 case $withval in
8472 yes)
8474 $as_echo "#define USE_LDAP 1" >>confdefs.h
8481 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8483 esac
8485 else
8486 with_ldap=no
8491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8492 $as_echo "$with_ldap" >&6; }
8497 # Bonjour
8499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8500 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8504 # Check whether --with-bonjour was given.
8505 if test "${with_bonjour+set}" = set; then :
8506 withval=$with_bonjour;
8507 case $withval in
8508 yes)
8510 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8517 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8519 esac
8521 else
8522 with_bonjour=no
8527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8528 $as_echo "$with_bonjour" >&6; }
8532 # SELinux
8534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8535 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8539 # Check whether --with-selinux was given.
8540 if test "${with_selinux+set}" = set; then :
8541 withval=$with_selinux;
8542 case $withval in
8543 yes)
8550 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8552 esac
8554 else
8555 with_selinux=no
8561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8562 $as_echo "$with_selinux" >&6; }
8565 # Systemd
8567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8568 $as_echo_n "checking whether to build with systemd support... " >&6; }
8572 # Check whether --with-systemd was given.
8573 if test "${with_systemd+set}" = set; then :
8574 withval=$with_systemd;
8575 case $withval in
8576 yes)
8578 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8585 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8587 esac
8589 else
8590 with_systemd=no
8596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8597 $as_echo "$with_systemd" >&6; }
8600 # Readline
8605 # Check whether --with-readline was given.
8606 if test "${with_readline+set}" = set; then :
8607 withval=$with_readline;
8608 case $withval in
8609 yes)
8616 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8618 esac
8620 else
8621 with_readline=yes
8626 # readline on MinGW has problems with backslashes in psql and other bugs.
8627 # This is particularly a problem with non-US code pages.
8628 # Therefore disable its use until we understand the cause. 2004-07-20
8629 if test "$PORTNAME" = "win32"; then
8630 if test "$with_readline" = yes; then
8631 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8632 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8633 with_readline=no
8640 # Prefer libedit
8645 # Check whether --with-libedit-preferred was given.
8646 if test "${with_libedit_preferred+set}" = set; then :
8647 withval=$with_libedit_preferred;
8648 case $withval in
8649 yes)
8656 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8658 esac
8660 else
8661 with_libedit_preferred=no
8669 # UUID library
8671 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8672 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8673 # UUID library. More than one of these might be present on a given platform,
8674 # so we make the user say which one she wants.
8679 # Check whether --with-uuid was given.
8680 if test "${with_uuid+set}" = set; then :
8681 withval=$with_uuid;
8682 case $withval in
8683 yes)
8684 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8687 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8692 esac
8697 if test x"$with_uuid" = x"" ; then
8698 with_uuid=no
8703 # Check whether --with-ossp-uuid was given.
8704 if test "${with_ossp_uuid+set}" = set; then :
8705 withval=$with_ossp_uuid;
8706 case $withval in
8707 yes)
8714 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8716 esac
8718 else
8719 with_ossp_uuid=no
8724 if test "$with_ossp_uuid" = yes ; then
8725 with_uuid=ossp
8728 if test "$with_uuid" != no ; then
8729 if test "$with_uuid" = bsd ; then
8731 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8733 elif test "$with_uuid" = e2fs ; then
8735 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8737 elif test "$with_uuid" = ossp ; then
8739 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8741 else
8742 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8749 # XML
8751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
8752 $as_echo_n "checking whether to build with XML support... " >&6; }
8756 # Check whether --with-libxml was given.
8757 if test "${with_libxml+set}" = set; then :
8758 withval=$with_libxml;
8759 case $withval in
8760 yes)
8762 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8769 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8771 esac
8773 else
8774 with_libxml=no
8779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
8780 $as_echo "$with_libxml" >&6; }
8783 if test "$with_libxml" = yes ; then
8784 # Check pkg-config, then xml2-config. But for backwards compatibility,
8785 # setting XML2_CONFIG overrides pkg-config.
8786 have_libxml2_pkg_config=no
8787 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
8789 pkg_failed=no
8790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
8791 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
8793 if test -n "$XML2_CFLAGS"; then
8794 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
8795 elif test -n "$PKG_CONFIG"; then
8796 if test -n "$PKG_CONFIG" && \
8797 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8798 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8799 ac_status=$?
8800 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8801 test $ac_status = 0; }; then
8802 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
8803 test "x$?" != "x0" && pkg_failed=yes
8804 else
8805 pkg_failed=yes
8807 else
8808 pkg_failed=untried
8810 if test -n "$XML2_LIBS"; then
8811 pkg_cv_XML2_LIBS="$XML2_LIBS"
8812 elif test -n "$PKG_CONFIG"; then
8813 if test -n "$PKG_CONFIG" && \
8814 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8815 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8816 ac_status=$?
8817 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8818 test $ac_status = 0; }; then
8819 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
8820 test "x$?" != "x0" && pkg_failed=yes
8821 else
8822 pkg_failed=yes
8824 else
8825 pkg_failed=untried
8830 if test $pkg_failed = yes; then
8831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8832 $as_echo "no" >&6; }
8834 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8835 _pkg_short_errors_supported=yes
8836 else
8837 _pkg_short_errors_supported=no
8839 if test $_pkg_short_errors_supported = yes; then
8840 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8841 else
8842 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8844 # Put the nasty error message in config.log where it belongs
8845 echo "$XML2_PKG_ERRORS" >&5
8847 # do nothing
8848 elif test $pkg_failed = untried; then
8849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8850 $as_echo "no" >&6; }
8851 # do nothing
8852 else
8853 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
8854 XML2_LIBS=$pkg_cv_XML2_LIBS
8855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8856 $as_echo "yes" >&6; }
8857 have_libxml2_pkg_config=yes
8860 if test "$have_libxml2_pkg_config" = no ; then
8861 if test -z "$XML2_CONFIG"; then
8862 for ac_prog in xml2-config
8864 # Extract the first word of "$ac_prog", so it can be a program name with args.
8865 set dummy $ac_prog; ac_word=$2
8866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8867 $as_echo_n "checking for $ac_word... " >&6; }
8868 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8869 $as_echo_n "(cached) " >&6
8870 else
8871 case $XML2_CONFIG in
8872 [\\/]* | ?:[\\/]*)
8873 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8876 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8877 for as_dir in $PATH
8879 IFS=$as_save_IFS
8880 test -z "$as_dir" && as_dir=.
8881 for ac_exec_ext in '' $ac_executable_extensions; do
8882 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8883 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8884 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8885 break 2
8887 done
8888 done
8889 IFS=$as_save_IFS
8892 esac
8894 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8895 if test -n "$XML2_CONFIG"; then
8896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8897 $as_echo "$XML2_CONFIG" >&6; }
8898 else
8899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8900 $as_echo "no" >&6; }
8904 test -n "$XML2_CONFIG" && break
8905 done
8907 else
8908 # Report the value of XML2_CONFIG in configure's output in all cases.
8909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8910 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8912 $as_echo "$XML2_CONFIG" >&6; }
8915 if test -n "$XML2_CONFIG"; then
8916 XML2_CFLAGS=`$XML2_CONFIG --cflags`
8917 XML2_LIBS=`$XML2_CONFIG --libs`
8920 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
8921 for pgac_option in $XML2_CFLAGS; do
8922 case $pgac_option in
8923 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8924 esac
8925 done
8926 for pgac_option in $XML2_LIBS; do
8927 case $pgac_option in
8928 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8929 esac
8930 done
8935 # XSLT
8940 # Check whether --with-libxslt was given.
8941 if test "${with_libxslt+set}" = set; then :
8942 withval=$with_libxslt;
8943 case $withval in
8944 yes)
8946 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8953 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8955 esac
8957 else
8958 with_libxslt=no
8968 # tzdata
8973 # Check whether --with-system-tzdata was given.
8974 if test "${with_system_tzdata+set}" = set; then :
8975 withval=$with_system_tzdata;
8976 case $withval in
8977 yes)
8978 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8981 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8986 esac
8994 # Zlib
8999 # Check whether --with-zlib was given.
9000 if test "${with_zlib+set}" = set; then :
9001 withval=$with_zlib;
9002 case $withval in
9003 yes)
9010 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
9012 esac
9014 else
9015 with_zlib=yes
9023 # LZ4
9025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
9026 $as_echo_n "checking whether to build with LZ4 support... " >&6; }
9030 # Check whether --with-lz4 was given.
9031 if test "${with_lz4+set}" = set; then :
9032 withval=$with_lz4;
9033 case $withval in
9034 yes)
9036 $as_echo "#define USE_LZ4 1" >>confdefs.h
9043 as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
9045 esac
9047 else
9048 with_lz4=no
9053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
9054 $as_echo "$with_lz4" >&6; }
9057 if test "$with_lz4" = yes; then
9059 pkg_failed=no
9060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
9061 $as_echo_n "checking for liblz4... " >&6; }
9063 if test -n "$LZ4_CFLAGS"; then
9064 pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
9065 elif test -n "$PKG_CONFIG"; then
9066 if test -n "$PKG_CONFIG" && \
9067 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9068 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9069 ac_status=$?
9070 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9071 test $ac_status = 0; }; then
9072 pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
9073 test "x$?" != "x0" && pkg_failed=yes
9074 else
9075 pkg_failed=yes
9077 else
9078 pkg_failed=untried
9080 if test -n "$LZ4_LIBS"; then
9081 pkg_cv_LZ4_LIBS="$LZ4_LIBS"
9082 elif test -n "$PKG_CONFIG"; then
9083 if test -n "$PKG_CONFIG" && \
9084 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9085 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9086 ac_status=$?
9087 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9088 test $ac_status = 0; }; then
9089 pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
9090 test "x$?" != "x0" && pkg_failed=yes
9091 else
9092 pkg_failed=yes
9094 else
9095 pkg_failed=untried
9100 if test $pkg_failed = yes; then
9101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9102 $as_echo "no" >&6; }
9104 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9105 _pkg_short_errors_supported=yes
9106 else
9107 _pkg_short_errors_supported=no
9109 if test $_pkg_short_errors_supported = yes; then
9110 LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
9111 else
9112 LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
9114 # Put the nasty error message in config.log where it belongs
9115 echo "$LZ4_PKG_ERRORS" >&5
9117 as_fn_error $? "Package requirements (liblz4) were not met:
9119 $LZ4_PKG_ERRORS
9121 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9122 installed software in a non-standard prefix.
9124 Alternatively, you may set the environment variables LZ4_CFLAGS
9125 and LZ4_LIBS to avoid the need to call pkg-config.
9126 See the pkg-config man page for more details." "$LINENO" 5
9127 elif test $pkg_failed = untried; then
9128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9129 $as_echo "no" >&6; }
9130 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9131 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9132 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9133 is in your PATH or set the PKG_CONFIG environment variable to the full
9134 path to pkg-config.
9136 Alternatively, you may set the environment variables LZ4_CFLAGS
9137 and LZ4_LIBS to avoid the need to call pkg-config.
9138 See the pkg-config man page for more details.
9140 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9141 See \`config.log' for more details" "$LINENO" 5; }
9142 else
9143 LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
9144 LZ4_LIBS=$pkg_cv_LZ4_LIBS
9145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9146 $as_echo "yes" >&6; }
9149 # We only care about -I, -D, and -L switches;
9150 # note that -llz4 will be added by AC_CHECK_LIB below.
9151 for pgac_option in $LZ4_CFLAGS; do
9152 case $pgac_option in
9153 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9154 esac
9155 done
9156 for pgac_option in $LZ4_LIBS; do
9157 case $pgac_option in
9158 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9159 esac
9160 done
9164 # ZSTD
9166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ZSTD support" >&5
9167 $as_echo_n "checking whether to build with ZSTD support... " >&6; }
9171 # Check whether --with-zstd was given.
9172 if test "${with_zstd+set}" = set; then :
9173 withval=$with_zstd;
9174 case $withval in
9175 yes)
9177 $as_echo "#define USE_ZSTD 1" >>confdefs.h
9184 as_fn_error $? "no argument expected for --with-zstd option" "$LINENO" 5
9186 esac
9188 else
9189 with_zstd=no
9194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_zstd" >&5
9195 $as_echo "$with_zstd" >&6; }
9198 if test "$with_zstd" = yes; then
9200 pkg_failed=no
9201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd >= 1.4.0" >&5
9202 $as_echo_n "checking for libzstd >= 1.4.0... " >&6; }
9204 if test -n "$ZSTD_CFLAGS"; then
9205 pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
9206 elif test -n "$PKG_CONFIG"; then
9207 if test -n "$PKG_CONFIG" && \
9208 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9209 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9210 ac_status=$?
9211 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9212 test $ac_status = 0; }; then
9213 pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd >= 1.4.0" 2>/dev/null`
9214 test "x$?" != "x0" && pkg_failed=yes
9215 else
9216 pkg_failed=yes
9218 else
9219 pkg_failed=untried
9221 if test -n "$ZSTD_LIBS"; then
9222 pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
9223 elif test -n "$PKG_CONFIG"; then
9224 if test -n "$PKG_CONFIG" && \
9225 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9226 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9227 ac_status=$?
9228 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9229 test $ac_status = 0; }; then
9230 pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd >= 1.4.0" 2>/dev/null`
9231 test "x$?" != "x0" && pkg_failed=yes
9232 else
9233 pkg_failed=yes
9235 else
9236 pkg_failed=untried
9241 if test $pkg_failed = yes; then
9242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9243 $as_echo "no" >&6; }
9245 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9246 _pkg_short_errors_supported=yes
9247 else
9248 _pkg_short_errors_supported=no
9250 if test $_pkg_short_errors_supported = yes; then
9251 ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9252 else
9253 ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9255 # Put the nasty error message in config.log where it belongs
9256 echo "$ZSTD_PKG_ERRORS" >&5
9258 as_fn_error $? "Package requirements (libzstd >= 1.4.0) were not met:
9260 $ZSTD_PKG_ERRORS
9262 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9263 installed software in a non-standard prefix.
9265 Alternatively, you may set the environment variables ZSTD_CFLAGS
9266 and ZSTD_LIBS to avoid the need to call pkg-config.
9267 See the pkg-config man page for more details." "$LINENO" 5
9268 elif test $pkg_failed = untried; then
9269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9270 $as_echo "no" >&6; }
9271 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9272 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9273 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9274 is in your PATH or set the PKG_CONFIG environment variable to the full
9275 path to pkg-config.
9277 Alternatively, you may set the environment variables ZSTD_CFLAGS
9278 and ZSTD_LIBS to avoid the need to call pkg-config.
9279 See the pkg-config man page for more details.
9281 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9282 See \`config.log' for more details" "$LINENO" 5; }
9283 else
9284 ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
9285 ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
9286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9287 $as_echo "yes" >&6; }
9290 # We only care about -I, -D, and -L switches;
9291 # note that -lzstd will be added by AC_CHECK_LIB below.
9292 for pgac_option in $ZSTD_CFLAGS; do
9293 case $pgac_option in
9294 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9295 esac
9296 done
9297 for pgac_option in $ZSTD_LIBS; do
9298 case $pgac_option in
9299 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9300 esac
9301 done
9304 # Assignments
9307 CPPFLAGS="$CPPFLAGS $INCLUDES"
9308 LDFLAGS="$LDFLAGS $LIBDIRS"
9314 if test -n "$ac_tool_prefix"; then
9315 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9316 set dummy ${ac_tool_prefix}strip; ac_word=$2
9317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9318 $as_echo_n "checking for $ac_word... " >&6; }
9319 if ${ac_cv_prog_STRIP+:} false; then :
9320 $as_echo_n "(cached) " >&6
9321 else
9322 if test -n "$STRIP"; then
9323 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9324 else
9325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9326 for as_dir in $PATH
9328 IFS=$as_save_IFS
9329 test -z "$as_dir" && as_dir=.
9330 for ac_exec_ext in '' $ac_executable_extensions; do
9331 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9332 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9333 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9334 break 2
9336 done
9337 done
9338 IFS=$as_save_IFS
9342 STRIP=$ac_cv_prog_STRIP
9343 if test -n "$STRIP"; then
9344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9345 $as_echo "$STRIP" >&6; }
9346 else
9347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9348 $as_echo "no" >&6; }
9353 if test -z "$ac_cv_prog_STRIP"; then
9354 ac_ct_STRIP=$STRIP
9355 # Extract the first word of "strip", so it can be a program name with args.
9356 set dummy strip; ac_word=$2
9357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9358 $as_echo_n "checking for $ac_word... " >&6; }
9359 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9360 $as_echo_n "(cached) " >&6
9361 else
9362 if test -n "$ac_ct_STRIP"; then
9363 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9364 else
9365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9366 for as_dir in $PATH
9368 IFS=$as_save_IFS
9369 test -z "$as_dir" && as_dir=.
9370 for ac_exec_ext in '' $ac_executable_extensions; do
9371 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9372 ac_cv_prog_ac_ct_STRIP="strip"
9373 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9374 break 2
9376 done
9377 done
9378 IFS=$as_save_IFS
9382 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9383 if test -n "$ac_ct_STRIP"; then
9384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9385 $as_echo "$ac_ct_STRIP" >&6; }
9386 else
9387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9388 $as_echo "no" >&6; }
9391 if test "x$ac_ct_STRIP" = x; then
9392 STRIP=":"
9393 else
9394 case $cross_compiling:$ac_tool_warned in
9395 yes:)
9396 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9397 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9398 ac_tool_warned=yes ;;
9399 esac
9400 STRIP=$ac_ct_STRIP
9402 else
9403 STRIP="$ac_cv_prog_STRIP"
9407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9408 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9409 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9410 STRIP_STATIC_LIB="$STRIP --strip-unneeded"
9411 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9413 $as_echo "yes" >&6; }
9414 else
9415 case $host_os in
9416 darwin*)
9417 STRIP="$STRIP -x"
9418 STRIP_STATIC_LIB=$STRIP
9419 STRIP_SHARED_LIB=$STRIP
9420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9421 $as_echo "yes" >&6; }
9424 STRIP_STATIC_LIB=:
9425 STRIP_SHARED_LIB=:
9426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9427 $as_echo "no" >&6; }
9429 esac
9434 if test -n "$ac_tool_prefix"; then
9435 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9436 set dummy ${ac_tool_prefix}ar; ac_word=$2
9437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9438 $as_echo_n "checking for $ac_word... " >&6; }
9439 if ${ac_cv_prog_AR+:} false; then :
9440 $as_echo_n "(cached) " >&6
9441 else
9442 if test -n "$AR"; then
9443 ac_cv_prog_AR="$AR" # Let the user override the test.
9444 else
9445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9446 for as_dir in $PATH
9448 IFS=$as_save_IFS
9449 test -z "$as_dir" && as_dir=.
9450 for ac_exec_ext in '' $ac_executable_extensions; do
9451 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9452 ac_cv_prog_AR="${ac_tool_prefix}ar"
9453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9454 break 2
9456 done
9457 done
9458 IFS=$as_save_IFS
9462 AR=$ac_cv_prog_AR
9463 if test -n "$AR"; then
9464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9465 $as_echo "$AR" >&6; }
9466 else
9467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9468 $as_echo "no" >&6; }
9473 if test -z "$ac_cv_prog_AR"; then
9474 ac_ct_AR=$AR
9475 # Extract the first word of "ar", so it can be a program name with args.
9476 set dummy ar; ac_word=$2
9477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9478 $as_echo_n "checking for $ac_word... " >&6; }
9479 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9480 $as_echo_n "(cached) " >&6
9481 else
9482 if test -n "$ac_ct_AR"; then
9483 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9484 else
9485 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9486 for as_dir in $PATH
9488 IFS=$as_save_IFS
9489 test -z "$as_dir" && as_dir=.
9490 for ac_exec_ext in '' $ac_executable_extensions; do
9491 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9492 ac_cv_prog_ac_ct_AR="ar"
9493 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9494 break 2
9496 done
9497 done
9498 IFS=$as_save_IFS
9502 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9503 if test -n "$ac_ct_AR"; then
9504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9505 $as_echo "$ac_ct_AR" >&6; }
9506 else
9507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9508 $as_echo "no" >&6; }
9511 if test "x$ac_ct_AR" = x; then
9512 AR="ar"
9513 else
9514 case $cross_compiling:$ac_tool_warned in
9515 yes:)
9516 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9517 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9518 ac_tool_warned=yes ;;
9519 esac
9520 AR=$ac_ct_AR
9522 else
9523 AR="$ac_cv_prog_AR"
9526 if test "$PORTNAME" = "win32"; then
9527 if test -n "$ac_tool_prefix"; then
9528 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9529 set dummy ${ac_tool_prefix}windres; ac_word=$2
9530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9531 $as_echo_n "checking for $ac_word... " >&6; }
9532 if ${ac_cv_prog_WINDRES+:} false; then :
9533 $as_echo_n "(cached) " >&6
9534 else
9535 if test -n "$WINDRES"; then
9536 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9537 else
9538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9539 for as_dir in $PATH
9541 IFS=$as_save_IFS
9542 test -z "$as_dir" && as_dir=.
9543 for ac_exec_ext in '' $ac_executable_extensions; do
9544 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9545 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9546 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9547 break 2
9549 done
9550 done
9551 IFS=$as_save_IFS
9555 WINDRES=$ac_cv_prog_WINDRES
9556 if test -n "$WINDRES"; then
9557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9558 $as_echo "$WINDRES" >&6; }
9559 else
9560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9561 $as_echo "no" >&6; }
9566 if test -z "$ac_cv_prog_WINDRES"; then
9567 ac_ct_WINDRES=$WINDRES
9568 # Extract the first word of "windres", so it can be a program name with args.
9569 set dummy windres; ac_word=$2
9570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9571 $as_echo_n "checking for $ac_word... " >&6; }
9572 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9573 $as_echo_n "(cached) " >&6
9574 else
9575 if test -n "$ac_ct_WINDRES"; then
9576 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9577 else
9578 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9579 for as_dir in $PATH
9581 IFS=$as_save_IFS
9582 test -z "$as_dir" && as_dir=.
9583 for ac_exec_ext in '' $ac_executable_extensions; do
9584 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9585 ac_cv_prog_ac_ct_WINDRES="windres"
9586 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9587 break 2
9589 done
9590 done
9591 IFS=$as_save_IFS
9595 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9596 if test -n "$ac_ct_WINDRES"; then
9597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9598 $as_echo "$ac_ct_WINDRES" >&6; }
9599 else
9600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9601 $as_echo "no" >&6; }
9604 if test "x$ac_ct_WINDRES" = x; then
9605 WINDRES="windres"
9606 else
9607 case $cross_compiling:$ac_tool_warned in
9608 yes:)
9609 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9610 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9611 ac_tool_warned=yes ;;
9612 esac
9613 WINDRES=$ac_ct_WINDRES
9615 else
9616 WINDRES="$ac_cv_prog_WINDRES"
9621 # Find a good install program. We prefer a C program (faster),
9622 # so one script is as good as another. But avoid the broken or
9623 # incompatible versions:
9624 # SysV /etc/install, /usr/sbin/install
9625 # SunOS /usr/etc/install
9626 # IRIX /sbin/install
9627 # AIX /bin/install
9628 # AmigaOS /C/install, which installs bootblocks on floppy discs
9629 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9630 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9631 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9632 # OS/2's system install, which has a completely different semantic
9633 # ./install, which can be erroneously created by make from ./install.sh.
9634 # Reject install programs that cannot install multiple files.
9635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9636 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9637 if test -z "$INSTALL"; then
9638 if ${ac_cv_path_install+:} false; then :
9639 $as_echo_n "(cached) " >&6
9640 else
9641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9642 for as_dir in $PATH
9644 IFS=$as_save_IFS
9645 test -z "$as_dir" && as_dir=.
9646 # Account for people who put trailing slashes in PATH elements.
9647 case $as_dir/ in #((
9648 ./ | .// | /[cC]/* | \
9649 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9650 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9651 /usr/ucb/* ) ;;
9653 # OSF1 and SCO ODT 3.0 have their own names for install.
9654 # Don't use installbsd from OSF since it installs stuff as root
9655 # by default.
9656 for ac_prog in ginstall scoinst install; do
9657 for ac_exec_ext in '' $ac_executable_extensions; do
9658 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9659 if test $ac_prog = install &&
9660 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9661 # AIX install. It has an incompatible calling convention.
9663 elif test $ac_prog = install &&
9664 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9665 # program-specific install script used by HP pwplus--don't use.
9667 else
9668 rm -rf conftest.one conftest.two conftest.dir
9669 echo one > conftest.one
9670 echo two > conftest.two
9671 mkdir conftest.dir
9672 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9673 test -s conftest.one && test -s conftest.two &&
9674 test -s conftest.dir/conftest.one &&
9675 test -s conftest.dir/conftest.two
9676 then
9677 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9678 break 3
9682 done
9683 done
9685 esac
9687 done
9688 IFS=$as_save_IFS
9690 rm -rf conftest.one conftest.two conftest.dir
9693 if test "${ac_cv_path_install+set}" = set; then
9694 INSTALL=$ac_cv_path_install
9695 else
9696 # As a last resort, use the slow shell script. Don't cache a
9697 # value for INSTALL within a source directory, because that will
9698 # break other packages using the cache if that directory is
9699 # removed, or if the value is a relative name.
9700 INSTALL=$ac_install_sh
9703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9704 $as_echo "$INSTALL" >&6; }
9706 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9707 # It thinks the first close brace ends the variable substitution.
9708 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9710 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9712 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9714 # When Autoconf chooses install-sh as install program it tries to generate
9715 # a relative path to it in each makefile where it substitutes it. This clashes
9716 # with our Makefile.global concept. This workaround helps.
9717 case $INSTALL in
9718 *install-sh*) install_bin='';;
9719 *) install_bin=$INSTALL;;
9720 esac
9723 if test -z "$TAR"; then
9724 for ac_prog in tar
9726 # Extract the first word of "$ac_prog", so it can be a program name with args.
9727 set dummy $ac_prog; ac_word=$2
9728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9729 $as_echo_n "checking for $ac_word... " >&6; }
9730 if ${ac_cv_path_TAR+:} false; then :
9731 $as_echo_n "(cached) " >&6
9732 else
9733 case $TAR in
9734 [\\/]* | ?:[\\/]*)
9735 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9739 for as_dir in $PATH
9741 IFS=$as_save_IFS
9742 test -z "$as_dir" && as_dir=.
9743 for ac_exec_ext in '' $ac_executable_extensions; do
9744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9745 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9747 break 2
9749 done
9750 done
9751 IFS=$as_save_IFS
9754 esac
9756 TAR=$ac_cv_path_TAR
9757 if test -n "$TAR"; then
9758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9759 $as_echo "$TAR" >&6; }
9760 else
9761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9762 $as_echo "no" >&6; }
9766 test -n "$TAR" && break
9767 done
9769 else
9770 # Report the value of TAR in configure's output in all cases.
9771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9772 $as_echo_n "checking for TAR... " >&6; }
9773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9774 $as_echo "$TAR" >&6; }
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9778 $as_echo_n "checking whether ln -s works... " >&6; }
9779 LN_S=$as_ln_s
9780 if test "$LN_S" = "ln -s"; then
9781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9782 $as_echo "yes" >&6; }
9783 else
9784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9785 $as_echo "no, using $LN_S" >&6; }
9788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9789 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9790 if test -z "$MKDIR_P"; then
9791 if ${ac_cv_path_mkdir+:} false; then :
9792 $as_echo_n "(cached) " >&6
9793 else
9794 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9795 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9797 IFS=$as_save_IFS
9798 test -z "$as_dir" && as_dir=.
9799 for ac_prog in mkdir gmkdir; do
9800 for ac_exec_ext in '' $ac_executable_extensions; do
9801 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9802 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9803 'mkdir (GNU coreutils) '* | \
9804 'mkdir (coreutils) '* | \
9805 'mkdir (fileutils) '4.1*)
9806 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9807 break 3;;
9808 esac
9809 done
9810 done
9811 done
9812 IFS=$as_save_IFS
9816 test -d ./--version && rmdir ./--version
9817 if test "${ac_cv_path_mkdir+set}" = set; then
9818 MKDIR_P="$ac_cv_path_mkdir -p"
9819 else
9820 # As a last resort, use the slow shell script. Don't cache a
9821 # value for MKDIR_P within a source directory, because that will
9822 # break other packages using the cache if that directory is
9823 # removed, or if the value is a relative name.
9824 MKDIR_P="$ac_install_sh -d"
9827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9828 $as_echo "$MKDIR_P" >&6; }
9830 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9831 # a relative path to it in each makefile where it substitutes it. This clashes
9832 # with our Makefile.global concept. This workaround helps.
9833 case $MKDIR_P in
9834 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9835 esac
9837 if test -z "$BISON"; then
9838 for ac_prog in bison
9840 # Extract the first word of "$ac_prog", so it can be a program name with args.
9841 set dummy $ac_prog; ac_word=$2
9842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9843 $as_echo_n "checking for $ac_word... " >&6; }
9844 if ${ac_cv_path_BISON+:} false; then :
9845 $as_echo_n "(cached) " >&6
9846 else
9847 case $BISON in
9848 [\\/]* | ?:[\\/]*)
9849 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9852 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9853 for as_dir in $PATH
9855 IFS=$as_save_IFS
9856 test -z "$as_dir" && as_dir=.
9857 for ac_exec_ext in '' $ac_executable_extensions; do
9858 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9859 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9860 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9861 break 2
9863 done
9864 done
9865 IFS=$as_save_IFS
9868 esac
9870 BISON=$ac_cv_path_BISON
9871 if test -n "$BISON"; then
9872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9873 $as_echo "$BISON" >&6; }
9874 else
9875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9876 $as_echo "no" >&6; }
9880 test -n "$BISON" && break
9881 done
9883 else
9884 # Report the value of BISON in configure's output in all cases.
9885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9886 $as_echo_n "checking for BISON... " >&6; }
9887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9888 $as_echo "$BISON" >&6; }
9892 if test "$BISON"; then
9893 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9894 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9895 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9896 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 2.3) exit 0; else exit 1;}'
9897 then
9898 as_fn_error $? "
9899 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9900 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." "$LINENO" 5
9902 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9903 # of the now preferred %name-prefix "base_yy", but the latter
9904 # doesn't work with Bison 2.3 or less. So for now we silence the
9905 # deprecation warnings.
9906 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9907 then
9908 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9912 if test -z "$BISON"; then
9913 as_fn_error $? "bison not found" "$LINENO" 5
9917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9918 $as_echo_n "checking for flex... " >&6; }
9919 if ${pgac_cv_path_flex+:} false; then :
9920 $as_echo_n "(cached) " >&6
9921 else
9922 # Let the user override the test
9923 if test -n "$FLEX"; then
9924 pgac_cv_path_flex=$FLEX
9925 else
9926 pgac_save_IFS=$IFS
9927 IFS=$PATH_SEPARATOR
9928 for pgac_dir in $PATH; do
9929 IFS=$pgac_save_IFS
9930 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9931 pgac_dir=`pwd`
9933 for pgac_prog in flex lex; do
9934 pgac_candidate="$pgac_dir/$pgac_prog"
9935 if test -f "$pgac_candidate" \
9936 && $pgac_candidate --version </dev/null >/dev/null 2>&1
9937 then
9938 echo '%%' > conftest.l
9939 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9940 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9941 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;}'
9942 then
9943 pgac_cv_path_flex=$pgac_candidate
9944 break 2
9945 else
9946 as_fn_error $? "
9947 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9948 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." "$LINENO" 5
9952 done
9953 done
9954 rm -f conftest.l lex.yy.c
9955 : ${pgac_cv_path_flex=no}
9959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9960 $as_echo "$pgac_cv_path_flex" >&6; }
9961 if test x"$pgac_cv_path_flex" = x"no"; then
9962 as_fn_error $? "flex not found" "$LINENO" 5
9963 else
9964 FLEX=$pgac_cv_path_flex
9965 pgac_flex_version=`$FLEX --version 2>/dev/null`
9966 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9967 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9974 if test -z "$PERL"; then
9975 for ac_prog in perl
9977 # Extract the first word of "$ac_prog", so it can be a program name with args.
9978 set dummy $ac_prog; ac_word=$2
9979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9980 $as_echo_n "checking for $ac_word... " >&6; }
9981 if ${ac_cv_path_PERL+:} false; then :
9982 $as_echo_n "(cached) " >&6
9983 else
9984 case $PERL in
9985 [\\/]* | ?:[\\/]*)
9986 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9990 for as_dir in $PATH
9992 IFS=$as_save_IFS
9993 test -z "$as_dir" && as_dir=.
9994 for ac_exec_ext in '' $ac_executable_extensions; do
9995 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9996 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9997 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9998 break 2
10000 done
10001 done
10002 IFS=$as_save_IFS
10005 esac
10007 PERL=$ac_cv_path_PERL
10008 if test -n "$PERL"; then
10009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10010 $as_echo "$PERL" >&6; }
10011 else
10012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10013 $as_echo "no" >&6; }
10017 test -n "$PERL" && break
10018 done
10020 else
10021 # Report the value of PERL in configure's output in all cases.
10022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
10023 $as_echo_n "checking for PERL... " >&6; }
10024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10025 $as_echo "$PERL" >&6; }
10029 if test "$PERL"; then
10030 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'`
10031 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
10032 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
10033 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
10034 $AWK '{ if ($1 == 5 && ($2 >= 14)) exit 1; else exit 0;}'
10035 then
10036 as_fn_error $? "
10037 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10038 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." "$LINENO" 5
10042 if test -z "$PERL"; then
10043 as_fn_error $? "Perl not found" "$LINENO" 5
10046 if test "$with_perl" = yes; then
10047 if test -z "$PERL"; then
10048 as_fn_error $? "Perl not found" "$LINENO" 5
10051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
10052 $as_echo_n "checking for Perl archlibexp... " >&6; }
10053 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
10054 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
10055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
10056 $as_echo "$perl_archlibexp" >&6; }
10057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
10058 $as_echo_n "checking for Perl privlibexp... " >&6; }
10059 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
10060 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
10061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
10062 $as_echo "$perl_privlibexp" >&6; }
10063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
10064 $as_echo_n "checking for Perl useshrplib... " >&6; }
10065 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
10066 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
10067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
10068 $as_echo "$perl_useshrplib" >&6; }
10069 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
10070 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
10071 You might have to rebuild your Perl installation. Refer to the
10072 documentation for details. Use --without-perl to disable building
10073 PL/Perl." "$LINENO" 5
10075 # On most platforms, archlibexp is also where the Perl include files live ...
10076 perl_includespec="-I$perl_archlibexp/CORE"
10077 # ... but on newer macOS versions, we must use -iwithsysroot to look
10078 # under $PG_SYSROOT
10079 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
10080 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
10081 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
10085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
10086 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
10087 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10089 $as_echo "$perl_ccflags" >&6; }
10090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10091 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10092 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10094 $as_echo "$perl_embed_ccflags" >&6; }
10097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10098 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10099 if test "$PORTNAME" = "win32" ; then
10100 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10101 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10102 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10103 else
10104 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10105 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10106 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10109 else
10110 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10111 pgac_tmp2=`$PERL -MConfig -e 'print "$Config{ccdlflags} $Config{ldflags}"'`
10112 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%"`
10114 if test -z "$perl_embed_ldflags" ; then
10115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10116 $as_echo "no" >&6; }
10117 as_fn_error $? "could not determine flags for linking embedded Perl.
10118 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10119 installed." "$LINENO" 5
10120 else
10121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10122 $as_echo "$perl_embed_ldflags" >&6; }
10127 if test "$with_python" = yes; then
10128 if test -z "$PYTHON"; then
10129 for ac_prog in python3 python
10131 # Extract the first word of "$ac_prog", so it can be a program name with args.
10132 set dummy $ac_prog; ac_word=$2
10133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10134 $as_echo_n "checking for $ac_word... " >&6; }
10135 if ${ac_cv_path_PYTHON+:} false; then :
10136 $as_echo_n "(cached) " >&6
10137 else
10138 case $PYTHON in
10139 [\\/]* | ?:[\\/]*)
10140 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10143 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10144 for as_dir in $PATH
10146 IFS=$as_save_IFS
10147 test -z "$as_dir" && as_dir=.
10148 for ac_exec_ext in '' $ac_executable_extensions; do
10149 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10150 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10152 break 2
10154 done
10155 done
10156 IFS=$as_save_IFS
10159 esac
10161 PYTHON=$ac_cv_path_PYTHON
10162 if test -n "$PYTHON"; then
10163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10164 $as_echo "$PYTHON" >&6; }
10165 else
10166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10167 $as_echo "no" >&6; }
10171 test -n "$PYTHON" && break
10172 done
10174 else
10175 # Report the value of PYTHON in configure's output in all cases.
10176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10177 $as_echo_n "checking for PYTHON... " >&6; }
10178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10179 $as_echo "$PYTHON" >&6; }
10182 if test x"$PYTHON" = x""; then
10183 as_fn_error $? "Python not found" "$LINENO" 5
10187 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10188 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10189 $as_echo "$as_me: using python $python_fullversion" >&6;}
10190 # python_fullversion is typically n.n.n plus some trailing junk
10191 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10192 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10193 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10194 # Reject unsupported Python versions as soon as practical.
10195 if test "$python_majorversion" -lt 3; then
10196 as_fn_error $? "Python version $python_version is too old (version 3 or later is required)" "$LINENO" 5
10199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
10200 $as_echo_n "checking for Python sysconfig module... " >&6; }
10201 if "${PYTHON}" -c 'import sysconfig' 2>&5
10202 then
10203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10204 $as_echo "yes" >&6; }
10205 else
10206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10207 $as_echo "no" >&6; }
10208 as_fn_error $? "sysconfig module not found" "$LINENO" 5
10211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10212 $as_echo_n "checking Python configuration directory... " >&6; }
10213 python_configdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBPL'))))"`
10214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10215 $as_echo "$python_configdir" >&6; }
10217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directory" >&5
10218 $as_echo_n "checking Python include directory... " >&6; }
10219 python_includespec=`${PYTHON} -c "import sysconfig; print('-I' + sysconfig.get_config_var('INCLUDEPY'))"`
10220 if test "$PORTNAME" = win32 ; then
10221 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10224 $as_echo "$python_includespec" >&6; }
10228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10229 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10231 python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10232 python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
10234 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10235 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10236 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10237 then
10238 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10239 found_shlib=1
10240 else
10241 # Otherwise, guess the base name of the shlib.
10242 # LDVERSION was added in Python 3.2, before that use VERSION,
10243 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10244 python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
10245 if test x"${python_ldversion}" != x""; then
10246 ldlibrary="python${python_ldversion}"
10247 else
10248 python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
10249 if test x"${python_version_var}" != x""; then
10250 ldlibrary="python${python_version_var}"
10251 else
10252 ldlibrary="python${python_version}"
10255 # Search for a likely-looking file.
10256 found_shlib=0
10257 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10259 if test -e "$d/lib${ldlibrary}${DLSUFFIX}"; then
10260 python_libdir="$d"
10261 found_shlib=1
10262 break 2
10264 done
10265 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10266 # (".so.n.n") as well. However, check this only after failing to find
10267 # ".so" anywhere, because yet other platforms (Debian) put the .so
10268 # symlink in a different directory from the underlying versioned shlib.
10269 if test "$found_shlib" != 1; then
10270 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10272 for f in "$d/lib${ldlibrary}.so."* ; do
10273 if test -e "$f"; then
10274 python_libdir="$d"
10275 found_shlib=1
10276 break 2
10278 done
10279 done
10281 # As usual, Windows has its own ideas. Possible default library
10282 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10283 # and the "lib" prefix might not be there.
10284 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10285 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10287 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10288 if test -e "$f"; then
10289 python_libdir="$d"
10290 found_shlib=1
10291 break 2
10293 done
10294 done
10297 if test "$found_shlib" != 1; then
10298 as_fn_error $? "could not find shared library for Python
10299 You might have to rebuild your Python installation. Refer to the
10300 documentation for details. Use --without-python to disable building
10301 PL/Python." "$LINENO" 5
10303 python_libspec="-L${python_libdir} -l${ldlibrary}"
10305 python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10308 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10314 if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then
10315 if test -z "$ZIC"; then
10316 for ac_prog in zic
10318 # Extract the first word of "$ac_prog", so it can be a program name with args.
10319 set dummy $ac_prog; ac_word=$2
10320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10321 $as_echo_n "checking for $ac_word... " >&6; }
10322 if ${ac_cv_path_ZIC+:} false; then :
10323 $as_echo_n "(cached) " >&6
10324 else
10325 case $ZIC in
10326 [\\/]* | ?:[\\/]*)
10327 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10330 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10331 for as_dir in $PATH
10333 IFS=$as_save_IFS
10334 test -z "$as_dir" && as_dir=.
10335 for ac_exec_ext in '' $ac_executable_extensions; do
10336 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10337 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10338 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10339 break 2
10341 done
10342 done
10343 IFS=$as_save_IFS
10346 esac
10348 ZIC=$ac_cv_path_ZIC
10349 if test -n "$ZIC"; then
10350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10351 $as_echo "$ZIC" >&6; }
10352 else
10353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10354 $as_echo "no" >&6; }
10358 test -n "$ZIC" && break
10359 done
10361 else
10362 # Report the value of ZIC in configure's output in all cases.
10363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10364 $as_echo_n "checking for ZIC... " >&6; }
10365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10366 $as_echo "$ZIC" >&6; }
10369 if test -z "$ZIC"; then
10370 as_fn_error $? "
10371 When cross-compiling, either use the option --with-system-tzdata to use
10372 existing time-zone data, or set the environment variable ZIC to a zic
10373 program to use during the build." "$LINENO" 5
10378 # Pthreads
10380 # For each platform, we need to know about any special compile and link
10381 # libraries, and whether the normal C function names are thread-safe.
10382 # WIN32 doesn't need the pthread tests; it always uses threads
10384 # These tests are run before the library-tests, because linking with the
10385 # other libraries can pull in the pthread functions as a side-effect. We
10386 # want to use the -pthread or similar flags directly, and not rely on
10387 # the side-effects of linking with some other library.
10389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10390 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10391 if ${ac_cv_path_SED+:} false; then :
10392 $as_echo_n "(cached) " >&6
10393 else
10394 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10395 for ac_i in 1 2 3 4 5 6 7; do
10396 ac_script="$ac_script$as_nl$ac_script"
10397 done
10398 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10399 { ac_script=; unset ac_script;}
10400 if test -z "$SED"; then
10401 ac_path_SED_found=false
10402 # Loop through the user's path and test for each of PROGNAME-LIST
10403 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10404 for as_dir in $PATH
10406 IFS=$as_save_IFS
10407 test -z "$as_dir" && as_dir=.
10408 for ac_prog in sed gsed; do
10409 for ac_exec_ext in '' $ac_executable_extensions; do
10410 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10411 as_fn_executable_p "$ac_path_SED" || continue
10412 # Check for GNU ac_path_SED and select it if it is found.
10413 # Check for GNU $ac_path_SED
10414 case `"$ac_path_SED" --version 2>&1` in
10415 *GNU*)
10416 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10418 ac_count=0
10419 $as_echo_n 0123456789 >"conftest.in"
10420 while :
10422 cat "conftest.in" "conftest.in" >"conftest.tmp"
10423 mv "conftest.tmp" "conftest.in"
10424 cp "conftest.in" "conftest.nl"
10425 $as_echo '' >> "conftest.nl"
10426 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10427 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10428 as_fn_arith $ac_count + 1 && ac_count=$as_val
10429 if test $ac_count -gt ${ac_path_SED_max-0}; then
10430 # Best one so far, save it but keep looking for a better one
10431 ac_cv_path_SED="$ac_path_SED"
10432 ac_path_SED_max=$ac_count
10434 # 10*(2^10) chars as input seems more than enough
10435 test $ac_count -gt 10 && break
10436 done
10437 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10438 esac
10440 $ac_path_SED_found && break 3
10441 done
10442 done
10443 done
10444 IFS=$as_save_IFS
10445 if test -z "$ac_cv_path_SED"; then
10446 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10448 else
10449 ac_cv_path_SED=$SED
10453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10454 $as_echo "$ac_cv_path_SED" >&6; }
10455 SED="$ac_cv_path_SED"
10456 rm -f conftest.sed
10459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10460 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10461 if ${ac_cv_path_GREP+:} false; then :
10462 $as_echo_n "(cached) " >&6
10463 else
10464 if test -z "$GREP"; then
10465 ac_path_GREP_found=false
10466 # Loop through the user's path and test for each of PROGNAME-LIST
10467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10468 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10470 IFS=$as_save_IFS
10471 test -z "$as_dir" && as_dir=.
10472 for ac_prog in grep ggrep; do
10473 for ac_exec_ext in '' $ac_executable_extensions; do
10474 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10475 as_fn_executable_p "$ac_path_GREP" || continue
10476 # Check for GNU ac_path_GREP and select it if it is found.
10477 # Check for GNU $ac_path_GREP
10478 case `"$ac_path_GREP" --version 2>&1` in
10479 *GNU*)
10480 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10482 ac_count=0
10483 $as_echo_n 0123456789 >"conftest.in"
10484 while :
10486 cat "conftest.in" "conftest.in" >"conftest.tmp"
10487 mv "conftest.tmp" "conftest.in"
10488 cp "conftest.in" "conftest.nl"
10489 $as_echo 'GREP' >> "conftest.nl"
10490 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10491 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10492 as_fn_arith $ac_count + 1 && ac_count=$as_val
10493 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10494 # Best one so far, save it but keep looking for a better one
10495 ac_cv_path_GREP="$ac_path_GREP"
10496 ac_path_GREP_max=$ac_count
10498 # 10*(2^10) chars as input seems more than enough
10499 test $ac_count -gt 10 && break
10500 done
10501 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10502 esac
10504 $ac_path_GREP_found && break 3
10505 done
10506 done
10507 done
10508 IFS=$as_save_IFS
10509 if test -z "$ac_cv_path_GREP"; then
10510 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10512 else
10513 ac_cv_path_GREP=$GREP
10517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10518 $as_echo "$ac_cv_path_GREP" >&6; }
10519 GREP="$ac_cv_path_GREP"
10522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10523 $as_echo_n "checking for egrep... " >&6; }
10524 if ${ac_cv_path_EGREP+:} false; then :
10525 $as_echo_n "(cached) " >&6
10526 else
10527 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10528 then ac_cv_path_EGREP="$GREP -E"
10529 else
10530 if test -z "$EGREP"; then
10531 ac_path_EGREP_found=false
10532 # Loop through the user's path and test for each of PROGNAME-LIST
10533 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10534 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10536 IFS=$as_save_IFS
10537 test -z "$as_dir" && as_dir=.
10538 for ac_prog in egrep; do
10539 for ac_exec_ext in '' $ac_executable_extensions; do
10540 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10541 as_fn_executable_p "$ac_path_EGREP" || continue
10542 # Check for GNU ac_path_EGREP and select it if it is found.
10543 # Check for GNU $ac_path_EGREP
10544 case `"$ac_path_EGREP" --version 2>&1` in
10545 *GNU*)
10546 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10548 ac_count=0
10549 $as_echo_n 0123456789 >"conftest.in"
10550 while :
10552 cat "conftest.in" "conftest.in" >"conftest.tmp"
10553 mv "conftest.tmp" "conftest.in"
10554 cp "conftest.in" "conftest.nl"
10555 $as_echo 'EGREP' >> "conftest.nl"
10556 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10557 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10558 as_fn_arith $ac_count + 1 && ac_count=$as_val
10559 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10560 # Best one so far, save it but keep looking for a better one
10561 ac_cv_path_EGREP="$ac_path_EGREP"
10562 ac_path_EGREP_max=$ac_count
10564 # 10*(2^10) chars as input seems more than enough
10565 test $ac_count -gt 10 && break
10566 done
10567 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10568 esac
10570 $ac_path_EGREP_found && break 3
10571 done
10572 done
10573 done
10574 IFS=$as_save_IFS
10575 if test -z "$ac_cv_path_EGREP"; then
10576 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10578 else
10579 ac_cv_path_EGREP=$EGREP
10584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10585 $as_echo "$ac_cv_path_EGREP" >&6; }
10586 EGREP="$ac_cv_path_EGREP"
10589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10590 $as_echo_n "checking for ANSI C header files... " >&6; }
10591 if ${ac_cv_header_stdc+:} false; then :
10592 $as_echo_n "(cached) " >&6
10593 else
10594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10595 /* end confdefs.h. */
10596 #include <stdlib.h>
10597 #include <stdarg.h>
10598 #include <string.h>
10599 #include <float.h>
10602 main ()
10606 return 0;
10608 _ACEOF
10609 if ac_fn_c_try_compile "$LINENO"; then :
10610 ac_cv_header_stdc=yes
10611 else
10612 ac_cv_header_stdc=no
10614 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10616 if test $ac_cv_header_stdc = yes; then
10617 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10619 /* end confdefs.h. */
10620 #include <string.h>
10622 _ACEOF
10623 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10624 $EGREP "memchr" >/dev/null 2>&1; then :
10626 else
10627 ac_cv_header_stdc=no
10629 rm -f conftest*
10633 if test $ac_cv_header_stdc = yes; then
10634 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10636 /* end confdefs.h. */
10637 #include <stdlib.h>
10639 _ACEOF
10640 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10641 $EGREP "free" >/dev/null 2>&1; then :
10643 else
10644 ac_cv_header_stdc=no
10646 rm -f conftest*
10650 if test $ac_cv_header_stdc = yes; then
10651 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10652 if test "$cross_compiling" = yes; then :
10654 else
10655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10656 /* end confdefs.h. */
10657 #include <ctype.h>
10658 #include <stdlib.h>
10659 #if ((' ' & 0x0FF) == 0x020)
10660 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10661 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10662 #else
10663 # define ISLOWER(c) \
10664 (('a' <= (c) && (c) <= 'i') \
10665 || ('j' <= (c) && (c) <= 'r') \
10666 || ('s' <= (c) && (c) <= 'z'))
10667 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10668 #endif
10670 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10672 main ()
10674 int i;
10675 for (i = 0; i < 256; i++)
10676 if (XOR (islower (i), ISLOWER (i))
10677 || toupper (i) != TOUPPER (i))
10678 return 2;
10679 return 0;
10681 _ACEOF
10682 if ac_fn_c_try_run "$LINENO"; then :
10684 else
10685 ac_cv_header_stdc=no
10687 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10688 conftest.$ac_objext conftest.beam conftest.$ac_ext
10693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10694 $as_echo "$ac_cv_header_stdc" >&6; }
10695 if test $ac_cv_header_stdc = yes; then
10697 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10701 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10702 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10703 inttypes.h stdint.h unistd.h
10704 do :
10705 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10706 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10708 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10709 cat >>confdefs.h <<_ACEOF
10710 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10711 _ACEOF
10715 done
10718 if test "$PORTNAME" != "win32"; then :
10719 # then
10724 ac_ext=c
10725 ac_cpp='$CPP $CPPFLAGS'
10726 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10727 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10728 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10730 ax_pthread_ok=no
10732 # We used to check for pthread.h first, but this fails if pthread.h
10733 # requires special compiler flags (e.g. on Tru64 or Sequent).
10734 # It gets checked for in the link test anyway.
10736 # First of all, check if the user has set any of the PTHREAD_LIBS,
10737 # etcetera environment variables, and if threads linking works using
10738 # them:
10739 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10740 ax_pthread_save_CC="$CC"
10741 ax_pthread_save_CFLAGS="$CFLAGS"
10742 ax_pthread_save_LIBS="$LIBS"
10743 if test "x$PTHREAD_CC" != "x"; then :
10744 CC="$PTHREAD_CC"
10746 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10747 LIBS="$PTHREAD_LIBS $LIBS"
10748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10749 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10751 /* end confdefs.h. */
10753 /* Override any GCC internal prototype to avoid an error.
10754 Use char because int might match the return type of a GCC
10755 builtin and then its argument prototype would still apply. */
10756 #ifdef __cplusplus
10757 extern "C"
10758 #endif
10759 char pthread_join ();
10761 main ()
10763 return pthread_join ();
10765 return 0;
10767 _ACEOF
10768 if ac_fn_c_try_link "$LINENO"; then :
10769 ax_pthread_ok=yes
10771 rm -f core conftest.err conftest.$ac_objext \
10772 conftest$ac_exeext conftest.$ac_ext
10773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10774 $as_echo "$ax_pthread_ok" >&6; }
10775 if test "x$ax_pthread_ok" = "xno"; then
10776 PTHREAD_LIBS=""
10777 PTHREAD_CFLAGS=""
10779 CC="$ax_pthread_save_CC"
10780 CFLAGS="$ax_pthread_save_CFLAGS"
10781 LIBS="$ax_pthread_save_LIBS"
10784 # We must check for the threads library under a number of different
10785 # names; the ordering is very important because some systems
10786 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10787 # libraries is broken (non-POSIX).
10789 # Create a list of thread flags to try. Items starting with a "-" are
10790 # C compiler flags, and other items are library names, except for "none"
10791 # which indicates that we try without any flags at all, and "pthread-config"
10792 # which is a program returning the flags for the Pth emulation library.
10794 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10796 # The ordering *is* (sometimes) important. Some notes on the
10797 # individual items follow:
10799 # pthreads: AIX (must check this before -lpthread)
10800 # none: in case threads are in libc; should be tried before -Kthread and
10801 # other compiler flags to prevent continual compiler warnings
10802 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10803 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10804 # (Note: HP C rejects this with "bad form for `-t' option")
10805 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10806 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10807 # doesn't hurt to check since this sometimes defines pthreads and
10808 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
10809 # is present but should not be used directly; and before -mthreads,
10810 # because the compiler interprets this as "-mt" + "-hreads")
10811 # -mthreads: Mingw32/gcc, Lynx/gcc
10812 # pthread: Linux, etcetera
10813 # --thread-safe: KAI C++
10814 # pthread-config: use pthread-config program (for GNU Pth library)
10816 case $host_os in
10818 freebsd*)
10820 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10821 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10823 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10826 hpux*)
10828 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10829 # multi-threading and also sets -lpthread."
10831 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10834 openedition*)
10836 # IBM z/OS requires a feature-test macro to be defined in order to
10837 # enable POSIX threads at all, so give the user a hint if this is
10838 # not set. (We don't define these ourselves, as they can affect
10839 # other portions of the system API in unpredictable ways.)
10841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10842 /* end confdefs.h. */
10844 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10845 AX_PTHREAD_ZOS_MISSING
10846 # endif
10848 _ACEOF
10849 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10850 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10852 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10854 rm -f conftest*
10858 solaris*)
10860 # On Solaris (at least, for some versions), libc contains stubbed
10861 # (non-functional) versions of the pthreads routines, so link-based
10862 # tests will erroneously succeed. (N.B.: The stubs are missing
10863 # pthread_cleanup_push, or rather a function called by this macro,
10864 # so we could check for that, but who knows whether they'll stub
10865 # that too in a future libc.) So we'll check first for the
10866 # standard Solaris way of linking pthreads (-mt -lpthread).
10868 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10870 esac
10872 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10874 if test "x$GCC" = "xyes"; then :
10875 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10878 # The presence of a feature test macro requesting re-entrant function
10879 # definitions is, on some systems, a strong hint that pthreads support is
10880 # correctly enabled
10882 case $host_os in
10883 darwin* | hpux* | linux* | osf* | solaris*)
10884 ax_pthread_check_macro="_REENTRANT"
10887 aix*)
10888 ax_pthread_check_macro="_THREAD_SAFE"
10892 ax_pthread_check_macro="--"
10894 esac
10895 if test "x$ax_pthread_check_macro" = "x--"; then :
10896 ax_pthread_check_cond=0
10897 else
10898 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10901 # Are we compiling with Clang?
10903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10904 $as_echo_n "checking whether $CC is Clang... " >&6; }
10905 if ${ax_cv_PTHREAD_CLANG+:} false; then :
10906 $as_echo_n "(cached) " >&6
10907 else
10908 ax_cv_PTHREAD_CLANG=no
10909 # Note that Autoconf sets GCC=yes for Clang as well as GCC
10910 if test "x$GCC" = "xyes"; then
10911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10912 /* end confdefs.h. */
10913 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10914 # if defined(__clang__) && defined(__llvm__)
10915 AX_PTHREAD_CC_IS_CLANG
10916 # endif
10918 _ACEOF
10919 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10920 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10921 ax_cv_PTHREAD_CLANG=yes
10923 rm -f conftest*
10928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10929 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10930 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10932 ax_pthread_clang_warning=no
10934 # Clang needs special handling, because older versions handle the -pthread
10935 # option in a rather... idiosyncratic way
10937 if test "x$ax_pthread_clang" = "xyes"; then
10939 # Clang takes -pthread; it has never supported any other flag
10941 # (Note 1: This will need to be revisited if a system that Clang
10942 # supports has POSIX threads in a separate library. This tends not
10943 # to be the way of modern systems, but it's conceivable.)
10945 # (Note 2: On some systems, notably Darwin, -pthread is not needed
10946 # to get POSIX threads support; the API is always present and
10947 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
10948 # -pthread does define _REENTRANT, and while the Darwin headers
10949 # ignore this macro, third-party headers might not.)
10951 PTHREAD_CFLAGS="-pthread"
10952 PTHREAD_LIBS=
10954 ax_pthread_ok=yes
10956 # However, older versions of Clang make a point of warning the user
10957 # that, in an invocation where only linking and no compilation is
10958 # taking place, the -pthread option has no effect ("argument unused
10959 # during compilation"). They expect -pthread to be passed in only
10960 # when source code is being compiled.
10962 # Problem is, this is at odds with the way Automake and most other
10963 # C build frameworks function, which is that the same flags used in
10964 # compilation (CFLAGS) are also used in linking. Many systems
10965 # supported by AX_PTHREAD require exactly this for POSIX threads
10966 # support, and in fact it is often not straightforward to specify a
10967 # flag that is used only in the compilation phase and not in
10968 # linking. Such a scenario is extremely rare in practice.
10970 # Even though use of the -pthread flag in linking would only print
10971 # a warning, this can be a nuisance for well-run software projects
10972 # that build with -Werror. So if the active version of Clang has
10973 # this misfeature, we search for an option to squash it.
10975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10976 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10977 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10978 $as_echo_n "(cached) " >&6
10979 else
10980 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10981 # Create an alternate version of $ac_link that compiles and
10982 # links in two steps (.c -> .o, .o -> exe) instead of one
10983 # (.c -> exe), because the warning occurs only in the second
10984 # step
10985 ax_pthread_save_ac_link="$ac_link"
10986 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10987 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
10988 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10989 ax_pthread_save_CFLAGS="$CFLAGS"
10990 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10991 if test "x$ax_pthread_try" = "xunknown"; then :
10992 break
10994 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10995 ac_link="$ax_pthread_save_ac_link"
10996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10997 /* end confdefs.h. */
10998 int main(void){return 0;}
10999 _ACEOF
11000 if ac_fn_c_try_link "$LINENO"; then :
11001 ac_link="$ax_pthread_2step_ac_link"
11002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11003 /* end confdefs.h. */
11004 int main(void){return 0;}
11005 _ACEOF
11006 if ac_fn_c_try_link "$LINENO"; then :
11007 break
11009 rm -f core conftest.err conftest.$ac_objext \
11010 conftest$ac_exeext conftest.$ac_ext
11013 rm -f core conftest.err conftest.$ac_objext \
11014 conftest$ac_exeext conftest.$ac_ext
11015 done
11016 ac_link="$ax_pthread_save_ac_link"
11017 CFLAGS="$ax_pthread_save_CFLAGS"
11018 if test "x$ax_pthread_try" = "x"; then :
11019 ax_pthread_try=no
11021 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
11024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
11025 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
11027 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
11028 no | unknown) ;;
11029 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
11030 esac
11032 fi # $ax_pthread_clang = yes
11034 if test "x$ax_pthread_ok" = "xno"; then
11035 for ax_pthread_try_flag in $ax_pthread_flags; do
11037 case $ax_pthread_try_flag in
11038 none)
11039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
11040 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
11043 -mt,pthread)
11044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
11045 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
11046 PTHREAD_CFLAGS="-mt"
11047 PTHREAD_LIBS="-lpthread"
11051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
11052 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
11053 PTHREAD_CFLAGS="$ax_pthread_try_flag"
11056 pthread-config)
11057 # Extract the first word of "pthread-config", so it can be a program name with args.
11058 set dummy pthread-config; ac_word=$2
11059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11060 $as_echo_n "checking for $ac_word... " >&6; }
11061 if ${ac_cv_prog_ax_pthread_config+:} false; then :
11062 $as_echo_n "(cached) " >&6
11063 else
11064 if test -n "$ax_pthread_config"; then
11065 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
11066 else
11067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11068 for as_dir in $PATH
11070 IFS=$as_save_IFS
11071 test -z "$as_dir" && as_dir=.
11072 for ac_exec_ext in '' $ac_executable_extensions; do
11073 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11074 ac_cv_prog_ax_pthread_config="yes"
11075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11076 break 2
11078 done
11079 done
11080 IFS=$as_save_IFS
11082 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
11085 ax_pthread_config=$ac_cv_prog_ax_pthread_config
11086 if test -n "$ax_pthread_config"; then
11087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11088 $as_echo "$ax_pthread_config" >&6; }
11089 else
11090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11091 $as_echo "no" >&6; }
11095 if test "x$ax_pthread_config" = "xno"; then :
11096 continue
11098 PTHREAD_CFLAGS="`pthread-config --cflags`"
11099 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11104 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11105 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11107 esac
11109 ax_pthread_save_CFLAGS="$CFLAGS"
11110 ax_pthread_save_LIBS="$LIBS"
11111 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11112 LIBS="$PTHREAD_LIBS $LIBS"
11114 # Check for various functions. We must include pthread.h,
11115 # since some functions may be macros. (On the Sequent, we
11116 # need a special flag -Kthread to make this header compile.)
11117 # We check for pthread_join because it is in -lpthread on IRIX
11118 # while pthread_create is in libc. We check for pthread_attr_init
11119 # due to DEC craziness with -lpthreads. We check for
11120 # pthread_cleanup_push because it is one of the few pthread
11121 # functions on Solaris that doesn't have a non-functional libc stub.
11122 # We try pthread_create on general principles.
11124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11125 /* end confdefs.h. */
11126 #include <pthread.h>
11127 # if $ax_pthread_check_cond
11128 # error "$ax_pthread_check_macro must be defined"
11129 # endif
11130 static void routine(void *a) { a = 0; }
11131 static void *start_routine(void *a) { return a; }
11133 main ()
11135 pthread_t th; pthread_attr_t attr;
11136 pthread_create(&th, 0, start_routine, 0);
11137 pthread_join(th, 0);
11138 pthread_attr_init(&attr);
11139 pthread_cleanup_push(routine, 0);
11140 pthread_cleanup_pop(0) /* ; */
11142 return 0;
11144 _ACEOF
11145 if ac_fn_c_try_link "$LINENO"; then :
11146 ax_pthread_ok=yes
11148 rm -f core conftest.err conftest.$ac_objext \
11149 conftest$ac_exeext conftest.$ac_ext
11151 CFLAGS="$ax_pthread_save_CFLAGS"
11152 LIBS="$ax_pthread_save_LIBS"
11154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11155 $as_echo "$ax_pthread_ok" >&6; }
11156 if test "x$ax_pthread_ok" = "xyes"; then :
11157 break
11160 PTHREAD_LIBS=""
11161 PTHREAD_CFLAGS=""
11162 done
11165 # Various other checks:
11166 if test "x$ax_pthread_ok" = "xyes"; then
11167 ax_pthread_save_CFLAGS="$CFLAGS"
11168 ax_pthread_save_LIBS="$LIBS"
11169 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11170 LIBS="$PTHREAD_LIBS $LIBS"
11172 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11174 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11175 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11176 $as_echo_n "(cached) " >&6
11177 else
11178 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11179 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11181 /* end confdefs.h. */
11182 #include <pthread.h>
11184 main ()
11186 int attr = $ax_pthread_attr; return attr /* ; */
11188 return 0;
11190 _ACEOF
11191 if ac_fn_c_try_link "$LINENO"; then :
11192 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11194 rm -f core conftest.err conftest.$ac_objext \
11195 conftest$ac_exeext conftest.$ac_ext
11196 done
11199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11200 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11201 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11202 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11203 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11205 cat >>confdefs.h <<_ACEOF
11206 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11207 _ACEOF
11209 ax_pthread_joinable_attr_defined=yes
11213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11214 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11215 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11216 $as_echo_n "(cached) " >&6
11217 else
11218 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11219 case $host_os in
11220 solaris*)
11221 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11223 esac
11226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11227 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11228 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11229 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11230 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11231 ax_pthread_special_flags_added=yes
11234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11235 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11236 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11237 $as_echo_n "(cached) " >&6
11238 else
11239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11240 /* end confdefs.h. */
11241 #include <pthread.h>
11243 main ()
11245 int i = PTHREAD_PRIO_INHERIT;
11247 return 0;
11249 _ACEOF
11250 if ac_fn_c_try_link "$LINENO"; then :
11251 ax_cv_PTHREAD_PRIO_INHERIT=yes
11252 else
11253 ax_cv_PTHREAD_PRIO_INHERIT=no
11255 rm -f core conftest.err conftest.$ac_objext \
11256 conftest$ac_exeext conftest.$ac_ext
11259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11260 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11261 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11262 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11264 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11266 ax_pthread_prio_inherit_defined=yes
11270 CFLAGS="$ax_pthread_save_CFLAGS"
11271 LIBS="$ax_pthread_save_LIBS"
11273 # More AIX lossage: compile with *_r variant
11274 if test "x$GCC" != "xyes"; then
11275 case $host_os in
11276 aix*)
11277 case "x/$CC" in #(
11278 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11279 #handle absolute path differently from PATH based program lookup
11280 case "x$CC" in #(
11281 x/*) :
11282 if as_fn_executable_p ${CC}_r; then :
11283 PTHREAD_CC="${CC}_r"
11284 fi ;; #(
11285 *) :
11286 for ac_prog in ${CC}_r
11288 # Extract the first word of "$ac_prog", so it can be a program name with args.
11289 set dummy $ac_prog; ac_word=$2
11290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11291 $as_echo_n "checking for $ac_word... " >&6; }
11292 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11293 $as_echo_n "(cached) " >&6
11294 else
11295 if test -n "$PTHREAD_CC"; then
11296 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11297 else
11298 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11299 for as_dir in $PATH
11301 IFS=$as_save_IFS
11302 test -z "$as_dir" && as_dir=.
11303 for ac_exec_ext in '' $ac_executable_extensions; do
11304 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11305 ac_cv_prog_PTHREAD_CC="$ac_prog"
11306 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11307 break 2
11309 done
11310 done
11311 IFS=$as_save_IFS
11315 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11316 if test -n "$PTHREAD_CC"; then
11317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11318 $as_echo "$PTHREAD_CC" >&6; }
11319 else
11320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11321 $as_echo "no" >&6; }
11325 test -n "$PTHREAD_CC" && break
11326 done
11327 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11329 esac ;; #(
11330 *) :
11332 esac
11334 esac
11338 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11344 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11345 if test "x$ax_pthread_ok" = "xyes"; then
11347 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11350 else
11351 ax_pthread_ok=no
11354 ac_ext=c
11355 ac_cpp='$CPP $CPPFLAGS'
11356 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11357 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11358 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11360 # set thread flags
11362 # Some platforms use these, so just define them. They can't hurt if they
11363 # are not supported.
11364 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE"
11366 # Check for *_r functions
11367 _CFLAGS="$CFLAGS"
11368 _LIBS="$LIBS"
11369 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11370 LIBS="$LIBS $PTHREAD_LIBS"
11372 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11373 if test "x$ac_cv_header_pthread_h" = xyes; then :
11375 else
11376 as_fn_error $? "
11377 pthread.h not found" "$LINENO" 5
11382 for ac_func in strerror_r
11383 do :
11384 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
11385 if test "x$ac_cv_func_strerror_r" = xyes; then :
11386 cat >>confdefs.h <<_ACEOF
11387 #define HAVE_STRERROR_R 1
11388 _ACEOF
11391 done
11394 # Do test here with the proper thread flags
11395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11396 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11397 if ${pgac_cv_func_strerror_r_int+:} false; then :
11398 $as_echo_n "(cached) " >&6
11399 else
11400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11401 /* end confdefs.h. */
11402 #include <string.h>
11404 main ()
11406 char buf[100];
11407 switch (strerror_r(1, buf, sizeof(buf)))
11408 { case 0: break; default: break; }
11411 return 0;
11413 _ACEOF
11414 if ac_fn_c_try_compile "$LINENO"; then :
11415 pgac_cv_func_strerror_r_int=yes
11416 else
11417 pgac_cv_func_strerror_r_int=no
11419 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11422 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11423 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11425 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11430 CFLAGS="$_CFLAGS"
11431 LIBS="$_LIBS"
11434 else
11435 # else
11436 # do not use values from template file
11437 PTHREAD_CFLAGS=
11438 PTHREAD_LIBS=
11440 fi # fi
11447 ## Libraries
11449 ## Most libraries are included only if they demonstrably provide a function
11450 ## we need, but libm is an exception: always include it, because there are
11451 ## too many compilers that play cute optimization games that will break
11452 ## probes for standard functions such as pow().
11455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11456 $as_echo_n "checking for main in -lm... " >&6; }
11457 if ${ac_cv_lib_m_main+:} false; then :
11458 $as_echo_n "(cached) " >&6
11459 else
11460 ac_check_lib_save_LIBS=$LIBS
11461 LIBS="-lm $LIBS"
11462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11463 /* end confdefs.h. */
11467 main ()
11469 return main ();
11471 return 0;
11473 _ACEOF
11474 if ac_fn_c_try_link "$LINENO"; then :
11475 ac_cv_lib_m_main=yes
11476 else
11477 ac_cv_lib_m_main=no
11479 rm -f core conftest.err conftest.$ac_objext \
11480 conftest$ac_exeext conftest.$ac_ext
11481 LIBS=$ac_check_lib_save_LIBS
11483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11484 $as_echo "$ac_cv_lib_m_main" >&6; }
11485 if test "x$ac_cv_lib_m_main" = xyes; then :
11486 cat >>confdefs.h <<_ACEOF
11487 #define HAVE_LIBM 1
11488 _ACEOF
11490 LIBS="-lm $LIBS"
11494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11495 $as_echo_n "checking for library containing setproctitle... " >&6; }
11496 if ${ac_cv_search_setproctitle+:} false; then :
11497 $as_echo_n "(cached) " >&6
11498 else
11499 ac_func_search_save_LIBS=$LIBS
11500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11501 /* end confdefs.h. */
11503 /* Override any GCC internal prototype to avoid an error.
11504 Use char because int might match the return type of a GCC
11505 builtin and then its argument prototype would still apply. */
11506 #ifdef __cplusplus
11507 extern "C"
11508 #endif
11509 char setproctitle ();
11511 main ()
11513 return setproctitle ();
11515 return 0;
11517 _ACEOF
11518 for ac_lib in '' util; do
11519 if test -z "$ac_lib"; then
11520 ac_res="none required"
11521 else
11522 ac_res=-l$ac_lib
11523 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11525 if ac_fn_c_try_link "$LINENO"; then :
11526 ac_cv_search_setproctitle=$ac_res
11528 rm -f core conftest.err conftest.$ac_objext \
11529 conftest$ac_exeext
11530 if ${ac_cv_search_setproctitle+:} false; then :
11531 break
11533 done
11534 if ${ac_cv_search_setproctitle+:} false; then :
11536 else
11537 ac_cv_search_setproctitle=no
11539 rm conftest.$ac_ext
11540 LIBS=$ac_func_search_save_LIBS
11542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11543 $as_echo "$ac_cv_search_setproctitle" >&6; }
11544 ac_res=$ac_cv_search_setproctitle
11545 if test "$ac_res" != no; then :
11546 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11550 # gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
11551 # when enabling asan the dlopen check doesn't notice that -ldl is actually
11552 # required. Just checking for dlsym() ought to suffice.
11553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
11554 $as_echo_n "checking for library containing dlsym... " >&6; }
11555 if ${ac_cv_search_dlsym+:} false; then :
11556 $as_echo_n "(cached) " >&6
11557 else
11558 ac_func_search_save_LIBS=$LIBS
11559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11560 /* end confdefs.h. */
11562 /* Override any GCC internal prototype to avoid an error.
11563 Use char because int might match the return type of a GCC
11564 builtin and then its argument prototype would still apply. */
11565 #ifdef __cplusplus
11566 extern "C"
11567 #endif
11568 char dlsym ();
11570 main ()
11572 return dlsym ();
11574 return 0;
11576 _ACEOF
11577 for ac_lib in '' dl; do
11578 if test -z "$ac_lib"; then
11579 ac_res="none required"
11580 else
11581 ac_res=-l$ac_lib
11582 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11584 if ac_fn_c_try_link "$LINENO"; then :
11585 ac_cv_search_dlsym=$ac_res
11587 rm -f core conftest.err conftest.$ac_objext \
11588 conftest$ac_exeext
11589 if ${ac_cv_search_dlsym+:} false; then :
11590 break
11592 done
11593 if ${ac_cv_search_dlsym+:} false; then :
11595 else
11596 ac_cv_search_dlsym=no
11598 rm conftest.$ac_ext
11599 LIBS=$ac_func_search_save_LIBS
11601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
11602 $as_echo "$ac_cv_search_dlsym" >&6; }
11603 ac_res=$ac_cv_search_dlsym
11604 if test "$ac_res" != no; then :
11605 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11610 $as_echo_n "checking for library containing socket... " >&6; }
11611 if ${ac_cv_search_socket+:} false; then :
11612 $as_echo_n "(cached) " >&6
11613 else
11614 ac_func_search_save_LIBS=$LIBS
11615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11616 /* end confdefs.h. */
11618 /* Override any GCC internal prototype to avoid an error.
11619 Use char because int might match the return type of a GCC
11620 builtin and then its argument prototype would still apply. */
11621 #ifdef __cplusplus
11622 extern "C"
11623 #endif
11624 char socket ();
11626 main ()
11628 return socket ();
11630 return 0;
11632 _ACEOF
11633 for ac_lib in '' socket ws2_32; do
11634 if test -z "$ac_lib"; then
11635 ac_res="none required"
11636 else
11637 ac_res=-l$ac_lib
11638 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11640 if ac_fn_c_try_link "$LINENO"; then :
11641 ac_cv_search_socket=$ac_res
11643 rm -f core conftest.err conftest.$ac_objext \
11644 conftest$ac_exeext
11645 if ${ac_cv_search_socket+:} false; then :
11646 break
11648 done
11649 if ${ac_cv_search_socket+:} false; then :
11651 else
11652 ac_cv_search_socket=no
11654 rm conftest.$ac_ext
11655 LIBS=$ac_func_search_save_LIBS
11657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11658 $as_echo "$ac_cv_search_socket" >&6; }
11659 ac_res=$ac_cv_search_socket
11660 if test "$ac_res" != no; then :
11661 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11666 $as_echo_n "checking for library containing getopt_long... " >&6; }
11667 if ${ac_cv_search_getopt_long+:} false; then :
11668 $as_echo_n "(cached) " >&6
11669 else
11670 ac_func_search_save_LIBS=$LIBS
11671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11672 /* end confdefs.h. */
11674 /* Override any GCC internal prototype to avoid an error.
11675 Use char because int might match the return type of a GCC
11676 builtin and then its argument prototype would still apply. */
11677 #ifdef __cplusplus
11678 extern "C"
11679 #endif
11680 char getopt_long ();
11682 main ()
11684 return getopt_long ();
11686 return 0;
11688 _ACEOF
11689 for ac_lib in '' getopt gnugetopt; do
11690 if test -z "$ac_lib"; then
11691 ac_res="none required"
11692 else
11693 ac_res=-l$ac_lib
11694 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11696 if ac_fn_c_try_link "$LINENO"; then :
11697 ac_cv_search_getopt_long=$ac_res
11699 rm -f core conftest.err conftest.$ac_objext \
11700 conftest$ac_exeext
11701 if ${ac_cv_search_getopt_long+:} false; then :
11702 break
11704 done
11705 if ${ac_cv_search_getopt_long+:} false; then :
11707 else
11708 ac_cv_search_getopt_long=no
11710 rm conftest.$ac_ext
11711 LIBS=$ac_func_search_save_LIBS
11713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11714 $as_echo "$ac_cv_search_getopt_long" >&6; }
11715 ac_res=$ac_cv_search_getopt_long
11716 if test "$ac_res" != no; then :
11717 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11722 $as_echo_n "checking for library containing shm_open... " >&6; }
11723 if ${ac_cv_search_shm_open+:} false; then :
11724 $as_echo_n "(cached) " >&6
11725 else
11726 ac_func_search_save_LIBS=$LIBS
11727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11728 /* end confdefs.h. */
11730 /* Override any GCC internal prototype to avoid an error.
11731 Use char because int might match the return type of a GCC
11732 builtin and then its argument prototype would still apply. */
11733 #ifdef __cplusplus
11734 extern "C"
11735 #endif
11736 char shm_open ();
11738 main ()
11740 return shm_open ();
11742 return 0;
11744 _ACEOF
11745 for ac_lib in '' rt; do
11746 if test -z "$ac_lib"; then
11747 ac_res="none required"
11748 else
11749 ac_res=-l$ac_lib
11750 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11752 if ac_fn_c_try_link "$LINENO"; then :
11753 ac_cv_search_shm_open=$ac_res
11755 rm -f core conftest.err conftest.$ac_objext \
11756 conftest$ac_exeext
11757 if ${ac_cv_search_shm_open+:} false; then :
11758 break
11760 done
11761 if ${ac_cv_search_shm_open+:} false; then :
11763 else
11764 ac_cv_search_shm_open=no
11766 rm conftest.$ac_ext
11767 LIBS=$ac_func_search_save_LIBS
11769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11770 $as_echo "$ac_cv_search_shm_open" >&6; }
11771 ac_res=$ac_cv_search_shm_open
11772 if test "$ac_res" != no; then :
11773 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11778 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11779 if ${ac_cv_search_shm_unlink+:} false; then :
11780 $as_echo_n "(cached) " >&6
11781 else
11782 ac_func_search_save_LIBS=$LIBS
11783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11784 /* end confdefs.h. */
11786 /* Override any GCC internal prototype to avoid an error.
11787 Use char because int might match the return type of a GCC
11788 builtin and then its argument prototype would still apply. */
11789 #ifdef __cplusplus
11790 extern "C"
11791 #endif
11792 char shm_unlink ();
11794 main ()
11796 return shm_unlink ();
11798 return 0;
11800 _ACEOF
11801 for ac_lib in '' rt; do
11802 if test -z "$ac_lib"; then
11803 ac_res="none required"
11804 else
11805 ac_res=-l$ac_lib
11806 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11808 if ac_fn_c_try_link "$LINENO"; then :
11809 ac_cv_search_shm_unlink=$ac_res
11811 rm -f core conftest.err conftest.$ac_objext \
11812 conftest$ac_exeext
11813 if ${ac_cv_search_shm_unlink+:} false; then :
11814 break
11816 done
11817 if ${ac_cv_search_shm_unlink+:} false; then :
11819 else
11820 ac_cv_search_shm_unlink=no
11822 rm conftest.$ac_ext
11823 LIBS=$ac_func_search_save_LIBS
11825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11826 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11827 ac_res=$ac_cv_search_shm_unlink
11828 if test "$ac_res" != no; then :
11829 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11834 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11835 if ${ac_cv_search_clock_gettime+:} false; then :
11836 $as_echo_n "(cached) " >&6
11837 else
11838 ac_func_search_save_LIBS=$LIBS
11839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11840 /* end confdefs.h. */
11842 /* Override any GCC internal prototype to avoid an error.
11843 Use char because int might match the return type of a GCC
11844 builtin and then its argument prototype would still apply. */
11845 #ifdef __cplusplus
11846 extern "C"
11847 #endif
11848 char clock_gettime ();
11850 main ()
11852 return clock_gettime ();
11854 return 0;
11856 _ACEOF
11857 for ac_lib in '' rt; do
11858 if test -z "$ac_lib"; then
11859 ac_res="none required"
11860 else
11861 ac_res=-l$ac_lib
11862 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11864 if ac_fn_c_try_link "$LINENO"; then :
11865 ac_cv_search_clock_gettime=$ac_res
11867 rm -f core conftest.err conftest.$ac_objext \
11868 conftest$ac_exeext
11869 if ${ac_cv_search_clock_gettime+:} false; then :
11870 break
11872 done
11873 if ${ac_cv_search_clock_gettime+:} false; then :
11875 else
11876 ac_cv_search_clock_gettime=no
11878 rm conftest.$ac_ext
11879 LIBS=$ac_func_search_save_LIBS
11881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11882 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11883 ac_res=$ac_cv_search_clock_gettime
11884 if test "$ac_res" != no; then :
11885 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11889 # Cygwin:
11890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11891 $as_echo_n "checking for library containing shmget... " >&6; }
11892 if ${ac_cv_search_shmget+:} false; then :
11893 $as_echo_n "(cached) " >&6
11894 else
11895 ac_func_search_save_LIBS=$LIBS
11896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11897 /* end confdefs.h. */
11899 /* Override any GCC internal prototype to avoid an error.
11900 Use char because int might match the return type of a GCC
11901 builtin and then its argument prototype would still apply. */
11902 #ifdef __cplusplus
11903 extern "C"
11904 #endif
11905 char shmget ();
11907 main ()
11909 return shmget ();
11911 return 0;
11913 _ACEOF
11914 for ac_lib in '' cygipc; do
11915 if test -z "$ac_lib"; then
11916 ac_res="none required"
11917 else
11918 ac_res=-l$ac_lib
11919 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11921 if ac_fn_c_try_link "$LINENO"; then :
11922 ac_cv_search_shmget=$ac_res
11924 rm -f core conftest.err conftest.$ac_objext \
11925 conftest$ac_exeext
11926 if ${ac_cv_search_shmget+:} false; then :
11927 break
11929 done
11930 if ${ac_cv_search_shmget+:} false; then :
11932 else
11933 ac_cv_search_shmget=no
11935 rm conftest.$ac_ext
11936 LIBS=$ac_func_search_save_LIBS
11938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11939 $as_echo "$ac_cv_search_shmget" >&6; }
11940 ac_res=$ac_cv_search_shmget
11941 if test "$ac_res" != no; then :
11942 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11946 # *BSD:
11947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
11948 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
11949 if ${ac_cv_search_backtrace_symbols+:} false; then :
11950 $as_echo_n "(cached) " >&6
11951 else
11952 ac_func_search_save_LIBS=$LIBS
11953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11954 /* end confdefs.h. */
11956 /* Override any GCC internal prototype to avoid an error.
11957 Use char because int might match the return type of a GCC
11958 builtin and then its argument prototype would still apply. */
11959 #ifdef __cplusplus
11960 extern "C"
11961 #endif
11962 char backtrace_symbols ();
11964 main ()
11966 return backtrace_symbols ();
11968 return 0;
11970 _ACEOF
11971 for ac_lib in '' execinfo; do
11972 if test -z "$ac_lib"; then
11973 ac_res="none required"
11974 else
11975 ac_res=-l$ac_lib
11976 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11978 if ac_fn_c_try_link "$LINENO"; then :
11979 ac_cv_search_backtrace_symbols=$ac_res
11981 rm -f core conftest.err conftest.$ac_objext \
11982 conftest$ac_exeext
11983 if ${ac_cv_search_backtrace_symbols+:} false; then :
11984 break
11986 done
11987 if ${ac_cv_search_backtrace_symbols+:} false; then :
11989 else
11990 ac_cv_search_backtrace_symbols=no
11992 rm conftest.$ac_ext
11993 LIBS=$ac_func_search_save_LIBS
11995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
11996 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
11997 ac_res=$ac_cv_search_backtrace_symbols
11998 if test "$ac_res" != no; then :
11999 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
12005 $as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
12006 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12007 $as_echo_n "(cached) " >&6
12008 else
12009 ac_func_search_save_LIBS=$LIBS
12010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12011 /* end confdefs.h. */
12013 /* Override any GCC internal prototype to avoid an error.
12014 Use char because int might match the return type of a GCC
12015 builtin and then its argument prototype would still apply. */
12016 #ifdef __cplusplus
12017 extern "C"
12018 #endif
12019 char pthread_barrier_wait ();
12021 main ()
12023 return pthread_barrier_wait ();
12025 return 0;
12027 _ACEOF
12028 for ac_lib in '' pthread; do
12029 if test -z "$ac_lib"; then
12030 ac_res="none required"
12031 else
12032 ac_res=-l$ac_lib
12033 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12035 if ac_fn_c_try_link "$LINENO"; then :
12036 ac_cv_search_pthread_barrier_wait=$ac_res
12038 rm -f core conftest.err conftest.$ac_objext \
12039 conftest$ac_exeext
12040 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12041 break
12043 done
12044 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12046 else
12047 ac_cv_search_pthread_barrier_wait=no
12049 rm conftest.$ac_ext
12050 LIBS=$ac_func_search_save_LIBS
12052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_barrier_wait" >&5
12053 $as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
12054 ac_res=$ac_cv_search_pthread_barrier_wait
12055 if test "$ac_res" != no; then :
12056 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12061 if test "$with_readline" = yes; then
12064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
12065 $as_echo_n "checking for library containing readline... " >&6; }
12066 if ${pgac_cv_check_readline+:} false; then :
12067 $as_echo_n "(cached) " >&6
12068 else
12069 pgac_cv_check_readline=no
12070 pgac_save_LIBS=$LIBS
12071 if test x"$with_libedit_preferred" != x"yes"
12072 then READLINE_ORDER="-lreadline -ledit"
12073 else READLINE_ORDER="-ledit -lreadline"
12075 for pgac_rllib in $READLINE_ORDER ; do
12076 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
12077 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
12078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12079 /* end confdefs.h. */
12081 /* Override any GCC internal prototype to avoid an error.
12082 Use char because int might match the return type of a GCC
12083 builtin and then its argument prototype would still apply. */
12084 #ifdef __cplusplus
12085 extern "C"
12086 #endif
12087 char readline ();
12089 main ()
12091 return readline ();
12093 return 0;
12095 _ACEOF
12096 if ac_fn_c_try_link "$LINENO"; then :
12098 # Older NetBSD and OpenBSD have a broken linker that does not
12099 # recognize dependent libraries; assume curses is needed if we didn't
12100 # find any dependency.
12101 case $host_os in
12102 netbsd* | openbsd*)
12103 if test x"$pgac_lib" = x"" ; then
12104 pgac_lib=" -lcurses"
12105 fi ;;
12106 esac
12108 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12109 break
12112 rm -f core conftest.err conftest.$ac_objext \
12113 conftest$ac_exeext conftest.$ac_ext
12114 done
12115 if test "$pgac_cv_check_readline" != no ; then
12116 break
12118 done
12119 LIBS=$pgac_save_LIBS
12122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12123 $as_echo "$pgac_cv_check_readline" >&6; }
12124 if test "$pgac_cv_check_readline" != no ; then
12125 LIBS="$pgac_cv_check_readline $LIBS"
12127 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12132 if test x"$pgac_cv_check_readline" = x"no"; then
12133 as_fn_error $? "readline library not found
12134 If you have readline already installed, see config.log for details on the
12135 failure. It is possible the compiler isn't looking in the proper directory.
12136 Use --without-readline to disable readline support." "$LINENO" 5
12140 if test "$with_zlib" = yes; then
12141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12142 $as_echo_n "checking for inflate in -lz... " >&6; }
12143 if ${ac_cv_lib_z_inflate+:} false; then :
12144 $as_echo_n "(cached) " >&6
12145 else
12146 ac_check_lib_save_LIBS=$LIBS
12147 LIBS="-lz $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 inflate ();
12159 main ()
12161 return inflate ();
12163 return 0;
12165 _ACEOF
12166 if ac_fn_c_try_link "$LINENO"; then :
12167 ac_cv_lib_z_inflate=yes
12168 else
12169 ac_cv_lib_z_inflate=no
12171 rm -f core conftest.err conftest.$ac_objext \
12172 conftest$ac_exeext conftest.$ac_ext
12173 LIBS=$ac_check_lib_save_LIBS
12175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12176 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12177 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12178 cat >>confdefs.h <<_ACEOF
12179 #define HAVE_LIBZ 1
12180 _ACEOF
12182 LIBS="-lz $LIBS"
12184 else
12185 as_fn_error $? "zlib library not found
12186 If you have zlib already installed, see config.log for details on the
12187 failure. It is possible the compiler isn't looking in the proper directory.
12188 Use --without-zlib to disable zlib support." "$LINENO" 5
12193 if test "$with_gssapi" = yes ; then
12194 if test "$PORTNAME" != "win32"; then
12195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_store_cred_into" >&5
12196 $as_echo_n "checking for library containing gss_store_cred_into... " >&6; }
12197 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12198 $as_echo_n "(cached) " >&6
12199 else
12200 ac_func_search_save_LIBS=$LIBS
12201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12202 /* end confdefs.h. */
12204 /* Override any GCC internal prototype to avoid an error.
12205 Use char because int might match the return type of a GCC
12206 builtin and then its argument prototype would still apply. */
12207 #ifdef __cplusplus
12208 extern "C"
12209 #endif
12210 char gss_store_cred_into ();
12212 main ()
12214 return gss_store_cred_into ();
12216 return 0;
12218 _ACEOF
12219 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12220 if test -z "$ac_lib"; then
12221 ac_res="none required"
12222 else
12223 ac_res=-l$ac_lib
12224 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12226 if ac_fn_c_try_link "$LINENO"; then :
12227 ac_cv_search_gss_store_cred_into=$ac_res
12229 rm -f core conftest.err conftest.$ac_objext \
12230 conftest$ac_exeext
12231 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12232 break
12234 done
12235 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12237 else
12238 ac_cv_search_gss_store_cred_into=no
12240 rm conftest.$ac_ext
12241 LIBS=$ac_func_search_save_LIBS
12243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_store_cred_into" >&5
12244 $as_echo "$ac_cv_search_gss_store_cred_into" >&6; }
12245 ac_res=$ac_cv_search_gss_store_cred_into
12246 if test "$ac_res" != no; then :
12247 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12249 else
12250 as_fn_error $? "could not find function 'gss_store_cred_into' required for GSSAPI" "$LINENO" 5
12253 else
12254 LIBS="$LIBS -lgssapi32"
12259 # SSL Library
12261 # There is currently only one supported SSL/TLS library: OpenSSL.
12266 # Check whether --with-ssl was given.
12267 if test "${with_ssl+set}" = set; then :
12268 withval=$with_ssl;
12269 case $withval in
12270 yes)
12271 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12274 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12279 esac
12284 if test x"$with_ssl" = x"" ; then
12285 with_ssl=no
12290 # Check whether --with-openssl was given.
12291 if test "${with_openssl+set}" = set; then :
12292 withval=$with_openssl;
12293 case $withval in
12294 yes)
12301 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12303 esac
12305 else
12306 with_openssl=no
12311 if test "$with_openssl" = yes ; then
12312 with_ssl=openssl
12315 if test "$with_ssl" = openssl ; then
12316 # Minimum required OpenSSL version is 1.1.0
12318 $as_echo "#define OPENSSL_API_COMPAT 0x10100000L" >>confdefs.h
12320 if test "$PORTNAME" != "win32"; then
12321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12322 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12323 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12324 $as_echo_n "(cached) " >&6
12325 else
12326 ac_check_lib_save_LIBS=$LIBS
12327 LIBS="-lcrypto $LIBS"
12328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12329 /* end confdefs.h. */
12331 /* Override any GCC internal prototype to avoid an error.
12332 Use char because int might match the return type of a GCC
12333 builtin and then its argument prototype would still apply. */
12334 #ifdef __cplusplus
12335 extern "C"
12336 #endif
12337 char CRYPTO_new_ex_data ();
12339 main ()
12341 return CRYPTO_new_ex_data ();
12343 return 0;
12345 _ACEOF
12346 if ac_fn_c_try_link "$LINENO"; then :
12347 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12348 else
12349 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12351 rm -f core conftest.err conftest.$ac_objext \
12352 conftest$ac_exeext conftest.$ac_ext
12353 LIBS=$ac_check_lib_save_LIBS
12355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12356 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12357 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12358 cat >>confdefs.h <<_ACEOF
12359 #define HAVE_LIBCRYPTO 1
12360 _ACEOF
12362 LIBS="-lcrypto $LIBS"
12364 else
12365 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12369 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12370 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12371 $as_echo_n "(cached) " >&6
12372 else
12373 ac_check_lib_save_LIBS=$LIBS
12374 LIBS="-lssl $LIBS"
12375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12376 /* end confdefs.h. */
12378 /* Override any GCC internal prototype to avoid an error.
12379 Use char because int might match the return type of a GCC
12380 builtin and then its argument prototype would still apply. */
12381 #ifdef __cplusplus
12382 extern "C"
12383 #endif
12384 char SSL_new ();
12386 main ()
12388 return SSL_new ();
12390 return 0;
12392 _ACEOF
12393 if ac_fn_c_try_link "$LINENO"; then :
12394 ac_cv_lib_ssl_SSL_new=yes
12395 else
12396 ac_cv_lib_ssl_SSL_new=no
12398 rm -f core conftest.err conftest.$ac_objext \
12399 conftest$ac_exeext conftest.$ac_ext
12400 LIBS=$ac_check_lib_save_LIBS
12402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12403 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12404 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12405 cat >>confdefs.h <<_ACEOF
12406 #define HAVE_LIBSSL 1
12407 _ACEOF
12409 LIBS="-lssl $LIBS"
12411 else
12412 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12415 else
12416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12417 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12418 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12419 $as_echo_n "(cached) " >&6
12420 else
12421 ac_func_search_save_LIBS=$LIBS
12422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12423 /* end confdefs.h. */
12425 /* Override any GCC internal prototype to avoid an error.
12426 Use char because int might match the return type of a GCC
12427 builtin and then its argument prototype would still apply. */
12428 #ifdef __cplusplus
12429 extern "C"
12430 #endif
12431 char CRYPTO_new_ex_data ();
12433 main ()
12435 return CRYPTO_new_ex_data ();
12437 return 0;
12439 _ACEOF
12440 for ac_lib in '' eay32 crypto; do
12441 if test -z "$ac_lib"; then
12442 ac_res="none required"
12443 else
12444 ac_res=-l$ac_lib
12445 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12447 if ac_fn_c_try_link "$LINENO"; then :
12448 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12450 rm -f core conftest.err conftest.$ac_objext \
12451 conftest$ac_exeext
12452 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12453 break
12455 done
12456 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12458 else
12459 ac_cv_search_CRYPTO_new_ex_data=no
12461 rm conftest.$ac_ext
12462 LIBS=$ac_func_search_save_LIBS
12464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12465 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12466 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12467 if test "$ac_res" != no; then :
12468 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12470 else
12471 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12475 $as_echo_n "checking for library containing SSL_new... " >&6; }
12476 if ${ac_cv_search_SSL_new+:} false; then :
12477 $as_echo_n "(cached) " >&6
12478 else
12479 ac_func_search_save_LIBS=$LIBS
12480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12481 /* end confdefs.h. */
12483 /* Override any GCC internal prototype to avoid an error.
12484 Use char because int might match the return type of a GCC
12485 builtin and then its argument prototype would still apply. */
12486 #ifdef __cplusplus
12487 extern "C"
12488 #endif
12489 char SSL_new ();
12491 main ()
12493 return SSL_new ();
12495 return 0;
12497 _ACEOF
12498 for ac_lib in '' ssleay32 ssl; do
12499 if test -z "$ac_lib"; then
12500 ac_res="none required"
12501 else
12502 ac_res=-l$ac_lib
12503 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12505 if ac_fn_c_try_link "$LINENO"; then :
12506 ac_cv_search_SSL_new=$ac_res
12508 rm -f core conftest.err conftest.$ac_objext \
12509 conftest$ac_exeext
12510 if ${ac_cv_search_SSL_new+:} false; then :
12511 break
12513 done
12514 if ${ac_cv_search_SSL_new+:} false; then :
12516 else
12517 ac_cv_search_SSL_new=no
12519 rm conftest.$ac_ext
12520 LIBS=$ac_func_search_save_LIBS
12522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12523 $as_echo "$ac_cv_search_SSL_new" >&6; }
12524 ac_res=$ac_cv_search_SSL_new
12525 if test "$ac_res" != no; then :
12526 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12528 else
12529 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12533 # Function introduced in OpenSSL 1.0.2, not in LibreSSL.
12534 for ac_func in SSL_CTX_set_cert_cb
12535 do :
12536 ac_fn_c_check_func "$LINENO" "SSL_CTX_set_cert_cb" "ac_cv_func_SSL_CTX_set_cert_cb"
12537 if test "x$ac_cv_func_SSL_CTX_set_cert_cb" = xyes; then :
12538 cat >>confdefs.h <<_ACEOF
12539 #define HAVE_SSL_CTX_SET_CERT_CB 1
12540 _ACEOF
12543 done
12545 # Functions introduced in OpenSSL 1.1.0. We used to check for
12546 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12547 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12548 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12549 # functions.
12550 for ac_func in OPENSSL_init_ssl
12551 do :
12552 ac_fn_c_check_func "$LINENO" "OPENSSL_init_ssl" "ac_cv_func_OPENSSL_init_ssl"
12553 if test "x$ac_cv_func_OPENSSL_init_ssl" = xyes; then :
12554 cat >>confdefs.h <<_ACEOF
12555 #define HAVE_OPENSSL_INIT_SSL 1
12556 _ACEOF
12558 else
12559 as_fn_error $? "OpenSSL version >= 1.1.0 is required for SSL support" "$LINENO" 5
12561 done
12563 # Function introduced in OpenSSL 1.1.1, not in LibreSSL.
12564 for ac_func in X509_get_signature_info SSL_CTX_set_num_tickets
12565 do :
12566 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12567 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12568 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12569 cat >>confdefs.h <<_ACEOF
12570 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12571 _ACEOF
12574 done
12577 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
12579 elif test "$with_ssl" != no ; then
12580 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
12584 if test "$with_pam" = yes ; then
12585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12586 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12587 if ${ac_cv_lib_pam_pam_start+:} false; then :
12588 $as_echo_n "(cached) " >&6
12589 else
12590 ac_check_lib_save_LIBS=$LIBS
12591 LIBS="-lpam $LIBS"
12592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12593 /* end confdefs.h. */
12595 /* Override any GCC internal prototype to avoid an error.
12596 Use char because int might match the return type of a GCC
12597 builtin and then its argument prototype would still apply. */
12598 #ifdef __cplusplus
12599 extern "C"
12600 #endif
12601 char pam_start ();
12603 main ()
12605 return pam_start ();
12607 return 0;
12609 _ACEOF
12610 if ac_fn_c_try_link "$LINENO"; then :
12611 ac_cv_lib_pam_pam_start=yes
12612 else
12613 ac_cv_lib_pam_pam_start=no
12615 rm -f core conftest.err conftest.$ac_objext \
12616 conftest$ac_exeext conftest.$ac_ext
12617 LIBS=$ac_check_lib_save_LIBS
12619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12620 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12621 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12622 cat >>confdefs.h <<_ACEOF
12623 #define HAVE_LIBPAM 1
12624 _ACEOF
12626 LIBS="-lpam $LIBS"
12628 else
12629 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12634 if test "$with_libxml" = yes ; then
12635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12636 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12637 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12638 $as_echo_n "(cached) " >&6
12639 else
12640 ac_check_lib_save_LIBS=$LIBS
12641 LIBS="-lxml2 $LIBS"
12642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12643 /* end confdefs.h. */
12645 /* Override any GCC internal prototype to avoid an error.
12646 Use char because int might match the return type of a GCC
12647 builtin and then its argument prototype would still apply. */
12648 #ifdef __cplusplus
12649 extern "C"
12650 #endif
12651 char xmlSaveToBuffer ();
12653 main ()
12655 return xmlSaveToBuffer ();
12657 return 0;
12659 _ACEOF
12660 if ac_fn_c_try_link "$LINENO"; then :
12661 ac_cv_lib_xml2_xmlSaveToBuffer=yes
12662 else
12663 ac_cv_lib_xml2_xmlSaveToBuffer=no
12665 rm -f core conftest.err conftest.$ac_objext \
12666 conftest$ac_exeext conftest.$ac_ext
12667 LIBS=$ac_check_lib_save_LIBS
12669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12670 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12671 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12672 cat >>confdefs.h <<_ACEOF
12673 #define HAVE_LIBXML2 1
12674 _ACEOF
12676 LIBS="-lxml2 $LIBS"
12678 else
12679 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12684 if test "$with_libxslt" = yes ; then
12685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12686 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12687 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12688 $as_echo_n "(cached) " >&6
12689 else
12690 ac_check_lib_save_LIBS=$LIBS
12691 LIBS="-lxslt $LIBS"
12692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12693 /* end confdefs.h. */
12695 /* Override any GCC internal prototype to avoid an error.
12696 Use char because int might match the return type of a GCC
12697 builtin and then its argument prototype would still apply. */
12698 #ifdef __cplusplus
12699 extern "C"
12700 #endif
12701 char xsltCleanupGlobals ();
12703 main ()
12705 return xsltCleanupGlobals ();
12707 return 0;
12709 _ACEOF
12710 if ac_fn_c_try_link "$LINENO"; then :
12711 ac_cv_lib_xslt_xsltCleanupGlobals=yes
12712 else
12713 ac_cv_lib_xslt_xsltCleanupGlobals=no
12715 rm -f core conftest.err conftest.$ac_objext \
12716 conftest$ac_exeext conftest.$ac_ext
12717 LIBS=$ac_check_lib_save_LIBS
12719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12720 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12721 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12722 cat >>confdefs.h <<_ACEOF
12723 #define HAVE_LIBXSLT 1
12724 _ACEOF
12726 LIBS="-lxslt $LIBS"
12728 else
12729 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12734 if test "$with_lz4" = yes ; then
12735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
12736 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
12737 if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
12738 $as_echo_n "(cached) " >&6
12739 else
12740 ac_check_lib_save_LIBS=$LIBS
12741 LIBS="-llz4 $LIBS"
12742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12743 /* end confdefs.h. */
12745 /* Override any GCC internal prototype to avoid an error.
12746 Use char because int might match the return type of a GCC
12747 builtin and then its argument prototype would still apply. */
12748 #ifdef __cplusplus
12749 extern "C"
12750 #endif
12751 char LZ4_compress_default ();
12753 main ()
12755 return LZ4_compress_default ();
12757 return 0;
12759 _ACEOF
12760 if ac_fn_c_try_link "$LINENO"; then :
12761 ac_cv_lib_lz4_LZ4_compress_default=yes
12762 else
12763 ac_cv_lib_lz4_LZ4_compress_default=no
12765 rm -f core conftest.err conftest.$ac_objext \
12766 conftest$ac_exeext conftest.$ac_ext
12767 LIBS=$ac_check_lib_save_LIBS
12769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5
12770 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
12771 if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
12772 cat >>confdefs.h <<_ACEOF
12773 #define HAVE_LIBLZ4 1
12774 _ACEOF
12776 LIBS="-llz4 $LIBS"
12778 else
12779 as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
12784 if test "$with_zstd" = yes ; then
12785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5
12786 $as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; }
12787 if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then :
12788 $as_echo_n "(cached) " >&6
12789 else
12790 ac_check_lib_save_LIBS=$LIBS
12791 LIBS="-lzstd $LIBS"
12792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12793 /* end confdefs.h. */
12795 /* Override any GCC internal prototype to avoid an error.
12796 Use char because int might match the return type of a GCC
12797 builtin and then its argument prototype would still apply. */
12798 #ifdef __cplusplus
12799 extern "C"
12800 #endif
12801 char ZSTD_compress ();
12803 main ()
12805 return ZSTD_compress ();
12807 return 0;
12809 _ACEOF
12810 if ac_fn_c_try_link "$LINENO"; then :
12811 ac_cv_lib_zstd_ZSTD_compress=yes
12812 else
12813 ac_cv_lib_zstd_ZSTD_compress=no
12815 rm -f core conftest.err conftest.$ac_objext \
12816 conftest$ac_exeext conftest.$ac_ext
12817 LIBS=$ac_check_lib_save_LIBS
12819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5
12820 $as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; }
12821 if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then :
12822 cat >>confdefs.h <<_ACEOF
12823 #define HAVE_LIBZSTD 1
12824 _ACEOF
12826 LIBS="-lzstd $LIBS"
12828 else
12829 as_fn_error $? "library 'zstd' is required for ZSTD support" "$LINENO" 5
12834 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12835 if test "$with_ldap" = yes ; then
12836 _LIBS="$LIBS"
12837 if test "$PORTNAME" != "win32"; then
12838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12839 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12840 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12841 $as_echo_n "(cached) " >&6
12842 else
12843 ac_check_lib_save_LIBS=$LIBS
12844 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12846 /* end confdefs.h. */
12848 /* Override any GCC internal prototype to avoid an error.
12849 Use char because int might match the return type of a GCC
12850 builtin and then its argument prototype would still apply. */
12851 #ifdef __cplusplus
12852 extern "C"
12853 #endif
12854 char ldap_bind ();
12856 main ()
12858 return ldap_bind ();
12860 return 0;
12862 _ACEOF
12863 if ac_fn_c_try_link "$LINENO"; then :
12864 ac_cv_lib_ldap_ldap_bind=yes
12865 else
12866 ac_cv_lib_ldap_ldap_bind=no
12868 rm -f core conftest.err conftest.$ac_objext \
12869 conftest$ac_exeext conftest.$ac_ext
12870 LIBS=$ac_check_lib_save_LIBS
12872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12873 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12874 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12875 cat >>confdefs.h <<_ACEOF
12876 #define HAVE_LIBLDAP 1
12877 _ACEOF
12879 LIBS="-lldap $LIBS"
12881 else
12882 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12885 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12886 # This test is carried out against libldap.
12887 for ac_func in ldap_initialize
12888 do :
12889 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12890 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12891 cat >>confdefs.h <<_ACEOF
12892 #define HAVE_LDAP_INITIALIZE 1
12893 _ACEOF
12896 done
12898 # The separate ldap_r library only exists in OpenLDAP < 2.5, and if we
12899 # have 2.5 or later, we shouldn't even probe for ldap_r (we might find a
12900 # library from a separate OpenLDAP installation). The most reliable
12901 # way to check that is to check for a function introduced in 2.5.
12902 ac_fn_c_check_func "$LINENO" "ldap_verify_credentials" "ac_cv_func_ldap_verify_credentials"
12903 if test "x$ac_cv_func_ldap_verify_credentials" = xyes; then :
12904 thread_safe_libldap=yes
12905 else
12906 thread_safe_libldap=no
12909 if test "$thread_safe_libldap" = no; then
12910 # Use ldap_r for FE if available, else assume ldap is thread-safe.
12911 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
12912 LIBS="$_LIBS"
12913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
12914 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
12915 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
12916 $as_echo_n "(cached) " >&6
12917 else
12918 ac_check_lib_save_LIBS=$LIBS
12919 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12921 /* end confdefs.h. */
12923 /* Override any GCC internal prototype to avoid an error.
12924 Use char because int might match the return type of a GCC
12925 builtin and then its argument prototype would still apply. */
12926 #ifdef __cplusplus
12927 extern "C"
12928 #endif
12929 char ldap_bind ();
12931 main ()
12933 return ldap_bind ();
12935 return 0;
12937 _ACEOF
12938 if ac_fn_c_try_link "$LINENO"; then :
12939 ac_cv_lib_ldap_r_ldap_bind=yes
12940 else
12941 ac_cv_lib_ldap_r_ldap_bind=no
12943 rm -f core conftest.err conftest.$ac_objext \
12944 conftest$ac_exeext conftest.$ac_ext
12945 LIBS=$ac_check_lib_save_LIBS
12947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
12948 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
12949 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
12950 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12951 else
12952 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12955 else
12956 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12958 else
12959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12960 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12961 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12962 $as_echo_n "(cached) " >&6
12963 else
12964 ac_check_lib_save_LIBS=$LIBS
12965 LIBS="-lwldap32 $LIBS"
12966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12967 /* end confdefs.h. */
12969 /* Override any GCC internal prototype to avoid an error.
12970 Use char because int might match the return type of a GCC
12971 builtin and then its argument prototype would still apply. */
12972 #ifdef __cplusplus
12973 extern "C"
12974 #endif
12975 char ldap_bind ();
12977 main ()
12979 return ldap_bind ();
12981 return 0;
12983 _ACEOF
12984 if ac_fn_c_try_link "$LINENO"; then :
12985 ac_cv_lib_wldap32_ldap_bind=yes
12986 else
12987 ac_cv_lib_wldap32_ldap_bind=no
12989 rm -f core conftest.err conftest.$ac_objext \
12990 conftest$ac_exeext conftest.$ac_ext
12991 LIBS=$ac_check_lib_save_LIBS
12993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12994 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12995 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12996 cat >>confdefs.h <<_ACEOF
12997 #define HAVE_LIBWLDAP32 1
12998 _ACEOF
13000 LIBS="-lwldap32 $LIBS"
13002 else
13003 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13006 LDAP_LIBS_FE="-lwldap32"
13007 LDAP_LIBS_BE="-lwldap32"
13009 LIBS="$_LIBS"
13014 # for contrib/sepgsql
13015 if test "$with_selinux" = yes; then
13016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
13017 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
13018 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
13019 $as_echo_n "(cached) " >&6
13020 else
13021 ac_check_lib_save_LIBS=$LIBS
13022 LIBS="-lselinux $LIBS"
13023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13024 /* end confdefs.h. */
13026 /* Override any GCC internal prototype to avoid an error.
13027 Use char because int might match the return type of a GCC
13028 builtin and then its argument prototype would still apply. */
13029 #ifdef __cplusplus
13030 extern "C"
13031 #endif
13032 char security_compute_create_name ();
13034 main ()
13036 return security_compute_create_name ();
13038 return 0;
13040 _ACEOF
13041 if ac_fn_c_try_link "$LINENO"; then :
13042 ac_cv_lib_selinux_security_compute_create_name=yes
13043 else
13044 ac_cv_lib_selinux_security_compute_create_name=no
13046 rm -f core conftest.err conftest.$ac_objext \
13047 conftest$ac_exeext conftest.$ac_ext
13048 LIBS=$ac_check_lib_save_LIBS
13050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
13051 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
13052 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
13053 cat >>confdefs.h <<_ACEOF
13054 #define HAVE_LIBSELINUX 1
13055 _ACEOF
13057 LIBS="-lselinux $LIBS"
13059 else
13060 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
13065 # for contrib/uuid-ossp
13066 if test "$with_uuid" = bsd ; then
13067 # On BSD, the UUID functions are in libc
13068 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
13069 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
13070 UUID_LIBS=""
13071 else
13072 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
13075 elif test "$with_uuid" = e2fs ; then
13076 # On macOS, the UUID functions are in libc
13077 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
13078 if test "x$ac_cv_func_uuid_generate" = xyes; then :
13079 UUID_LIBS=""
13080 else
13081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
13082 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
13083 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
13084 $as_echo_n "(cached) " >&6
13085 else
13086 ac_check_lib_save_LIBS=$LIBS
13087 LIBS="-luuid $LIBS"
13088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13089 /* end confdefs.h. */
13091 /* Override any GCC internal prototype to avoid an error.
13092 Use char because int might match the return type of a GCC
13093 builtin and then its argument prototype would still apply. */
13094 #ifdef __cplusplus
13095 extern "C"
13096 #endif
13097 char uuid_generate ();
13099 main ()
13101 return uuid_generate ();
13103 return 0;
13105 _ACEOF
13106 if ac_fn_c_try_link "$LINENO"; then :
13107 ac_cv_lib_uuid_uuid_generate=yes
13108 else
13109 ac_cv_lib_uuid_uuid_generate=no
13111 rm -f core conftest.err conftest.$ac_objext \
13112 conftest$ac_exeext conftest.$ac_ext
13113 LIBS=$ac_check_lib_save_LIBS
13115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13116 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13117 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13118 UUID_LIBS="-luuid"
13119 else
13120 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13125 elif test "$with_uuid" = ossp ; then
13126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13127 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13128 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13129 $as_echo_n "(cached) " >&6
13130 else
13131 ac_check_lib_save_LIBS=$LIBS
13132 LIBS="-lossp-uuid $LIBS"
13133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13134 /* end confdefs.h. */
13136 /* Override any GCC internal prototype to avoid an error.
13137 Use char because int might match the return type of a GCC
13138 builtin and then its argument prototype would still apply. */
13139 #ifdef __cplusplus
13140 extern "C"
13141 #endif
13142 char uuid_export ();
13144 main ()
13146 return uuid_export ();
13148 return 0;
13150 _ACEOF
13151 if ac_fn_c_try_link "$LINENO"; then :
13152 ac_cv_lib_ossp_uuid_uuid_export=yes
13153 else
13154 ac_cv_lib_ossp_uuid_uuid_export=no
13156 rm -f core conftest.err conftest.$ac_objext \
13157 conftest$ac_exeext conftest.$ac_ext
13158 LIBS=$ac_check_lib_save_LIBS
13160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13161 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13162 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13163 UUID_LIBS="-lossp-uuid"
13164 else
13165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13166 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13167 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13168 $as_echo_n "(cached) " >&6
13169 else
13170 ac_check_lib_save_LIBS=$LIBS
13171 LIBS="-luuid $LIBS"
13172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13173 /* end confdefs.h. */
13175 /* Override any GCC internal prototype to avoid an error.
13176 Use char because int might match the return type of a GCC
13177 builtin and then its argument prototype would still apply. */
13178 #ifdef __cplusplus
13179 extern "C"
13180 #endif
13181 char uuid_export ();
13183 main ()
13185 return uuid_export ();
13187 return 0;
13189 _ACEOF
13190 if ac_fn_c_try_link "$LINENO"; then :
13191 ac_cv_lib_uuid_uuid_export=yes
13192 else
13193 ac_cv_lib_uuid_uuid_export=no
13195 rm -f core conftest.err conftest.$ac_objext \
13196 conftest$ac_exeext conftest.$ac_ext
13197 LIBS=$ac_check_lib_save_LIBS
13199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13200 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13201 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13202 UUID_LIBS="-luuid"
13203 else
13204 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13214 ## Header files
13217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13218 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13219 if ${ac_cv_header_stdbool_h+:} false; then :
13220 $as_echo_n "(cached) " >&6
13221 else
13222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13223 /* end confdefs.h. */
13225 #include <stdbool.h>
13226 #ifndef bool
13227 "error: bool is not defined"
13228 #endif
13229 #ifndef false
13230 "error: false is not defined"
13231 #endif
13232 #if false
13233 "error: false is not 0"
13234 #endif
13235 #ifndef true
13236 "error: true is not defined"
13237 #endif
13238 #if true != 1
13239 "error: true is not 1"
13240 #endif
13241 #ifndef __bool_true_false_are_defined
13242 "error: __bool_true_false_are_defined is not defined"
13243 #endif
13245 struct s { _Bool s: 1; _Bool t; } s;
13247 char a[true == 1 ? 1 : -1];
13248 char b[false == 0 ? 1 : -1];
13249 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13250 char d[(bool) 0.5 == true ? 1 : -1];
13251 /* See body of main program for 'e'. */
13252 char f[(_Bool) 0.0 == false ? 1 : -1];
13253 char g[true];
13254 char h[sizeof (_Bool)];
13255 char i[sizeof s.t];
13256 enum { j = false, k = true, l = false * true, m = true * 256 };
13257 /* The following fails for
13258 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13259 _Bool n[m];
13260 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13261 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13262 /* Catch a bug in an HP-UX C compiler. See
13263 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13264 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13266 _Bool q = true;
13267 _Bool *pq = &q;
13270 main ()
13273 bool e = &s;
13274 *pq |= q;
13275 *pq |= ! q;
13276 /* Refer to every declared value, to avoid compiler optimizations. */
13277 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13278 + !m + !n + !o + !p + !q + !pq);
13281 return 0;
13283 _ACEOF
13284 if ac_fn_c_try_compile "$LINENO"; then :
13285 ac_cv_header_stdbool_h=yes
13286 else
13287 ac_cv_header_stdbool_h=no
13289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13292 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13293 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13294 if test "x$ac_cv_type__Bool" = xyes; then :
13296 cat >>confdefs.h <<_ACEOF
13297 #define HAVE__BOOL 1
13298 _ACEOF
13304 if test $ac_cv_header_stdbool_h = yes; then
13306 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13311 for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h mbarrier.h sys/epoll.h sys/event.h sys/personality.h sys/prctl.h sys/procctl.h sys/signalfd.h sys/ucred.h termios.h ucred.h
13312 do :
13313 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13314 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13315 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13316 cat >>confdefs.h <<_ACEOF
13317 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13318 _ACEOF
13322 done
13325 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13326 for ac_header in readline/readline.h
13327 do :
13328 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13329 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13330 cat >>confdefs.h <<_ACEOF
13331 #define HAVE_READLINE_READLINE_H 1
13332 _ACEOF
13334 else
13335 for ac_header in readline.h
13336 do :
13337 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13338 if test "x$ac_cv_header_readline_h" = xyes; then :
13339 cat >>confdefs.h <<_ACEOF
13340 #define HAVE_READLINE_H 1
13341 _ACEOF
13343 else
13344 as_fn_error $? "readline header not found
13345 If you have readline already installed, see config.log for details on the
13346 failure. It is possible the compiler isn't looking in the proper directory.
13347 Use --without-readline to disable readline support." "$LINENO" 5
13350 done
13354 done
13356 for ac_header in readline/history.h
13357 do :
13358 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13359 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13360 cat >>confdefs.h <<_ACEOF
13361 #define HAVE_READLINE_HISTORY_H 1
13362 _ACEOF
13364 else
13365 for ac_header in history.h
13366 do :
13367 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13368 if test "x$ac_cv_header_history_h" = xyes; then :
13369 cat >>confdefs.h <<_ACEOF
13370 #define HAVE_HISTORY_H 1
13371 _ACEOF
13373 else
13374 as_fn_error $? "history header not found
13375 If you have readline already installed, see config.log for details on the
13376 failure. It is possible the compiler isn't looking in the proper directory.
13377 Use --without-readline to disable readline support." "$LINENO" 5
13380 done
13384 done
13388 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13389 # Some installations of libedit usurp /usr/include/readline/, which seems
13390 # bad practice, since in combined installations readline will have its headers
13391 # there. We might have to resort to AC_EGREP checks to make sure we found
13392 # the proper header...
13393 for ac_header in editline/readline.h
13394 do :
13395 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13396 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13397 cat >>confdefs.h <<_ACEOF
13398 #define HAVE_EDITLINE_READLINE_H 1
13399 _ACEOF
13401 else
13402 for ac_header in readline.h
13403 do :
13404 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13405 if test "x$ac_cv_header_readline_h" = xyes; then :
13406 cat >>confdefs.h <<_ACEOF
13407 #define HAVE_READLINE_H 1
13408 _ACEOF
13410 else
13411 for ac_header in readline/readline.h
13412 do :
13413 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13414 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13415 cat >>confdefs.h <<_ACEOF
13416 #define HAVE_READLINE_READLINE_H 1
13417 _ACEOF
13419 else
13420 as_fn_error $? "readline header not found
13421 If you have libedit already installed, see config.log for details on the
13422 failure. It is possible the compiler isn't looking in the proper directory.
13423 Use --without-readline to disable libedit support." "$LINENO" 5
13426 done
13430 done
13434 done
13436 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13437 # not be there at all. Hence, don't complain if not found. We must check
13438 # though, since in yet other versions it is an independent header.
13439 for ac_header in editline/history.h
13440 do :
13441 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13442 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13443 cat >>confdefs.h <<_ACEOF
13444 #define HAVE_EDITLINE_HISTORY_H 1
13445 _ACEOF
13447 else
13448 for ac_header in history.h
13449 do :
13450 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13451 if test "x$ac_cv_header_history_h" = xyes; then :
13452 cat >>confdefs.h <<_ACEOF
13453 #define HAVE_HISTORY_H 1
13454 _ACEOF
13456 else
13457 for ac_header in readline/history.h
13458 do :
13459 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13460 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13461 cat >>confdefs.h <<_ACEOF
13462 #define HAVE_READLINE_HISTORY_H 1
13463 _ACEOF
13467 done
13471 done
13475 done
13479 if test "$with_zlib" = yes; then
13480 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13481 if test "x$ac_cv_header_zlib_h" = xyes; then :
13483 else
13484 as_fn_error $? "zlib header not found
13485 If you have zlib already installed, see config.log for details on the
13486 failure. It is possible the compiler isn't looking in the proper directory.
13487 Use --without-zlib to disable zlib support." "$LINENO" 5
13493 if test -z "$LZ4"; then
13494 for ac_prog in lz4
13496 # Extract the first word of "$ac_prog", so it can be a program name with args.
13497 set dummy $ac_prog; ac_word=$2
13498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13499 $as_echo_n "checking for $ac_word... " >&6; }
13500 if ${ac_cv_path_LZ4+:} false; then :
13501 $as_echo_n "(cached) " >&6
13502 else
13503 case $LZ4 in
13504 [\\/]* | ?:[\\/]*)
13505 ac_cv_path_LZ4="$LZ4" # Let the user override the test with a path.
13508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13509 for as_dir in $PATH
13511 IFS=$as_save_IFS
13512 test -z "$as_dir" && as_dir=.
13513 for ac_exec_ext in '' $ac_executable_extensions; do
13514 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13515 ac_cv_path_LZ4="$as_dir/$ac_word$ac_exec_ext"
13516 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13517 break 2
13519 done
13520 done
13521 IFS=$as_save_IFS
13524 esac
13526 LZ4=$ac_cv_path_LZ4
13527 if test -n "$LZ4"; then
13528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13529 $as_echo "$LZ4" >&6; }
13530 else
13531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13532 $as_echo "no" >&6; }
13536 test -n "$LZ4" && break
13537 done
13539 else
13540 # Report the value of LZ4 in configure's output in all cases.
13541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4" >&5
13542 $as_echo_n "checking for LZ4... " >&6; }
13543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13544 $as_echo "$LZ4" >&6; }
13547 if test "$with_lz4" = yes; then
13548 ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
13549 if test "x$ac_cv_header_lz4_h" = xyes; then :
13551 else
13552 as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
13558 if test -z "$ZSTD"; then
13559 for ac_prog in zstd
13561 # Extract the first word of "$ac_prog", so it can be a program name with args.
13562 set dummy $ac_prog; ac_word=$2
13563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13564 $as_echo_n "checking for $ac_word... " >&6; }
13565 if ${ac_cv_path_ZSTD+:} false; then :
13566 $as_echo_n "(cached) " >&6
13567 else
13568 case $ZSTD in
13569 [\\/]* | ?:[\\/]*)
13570 ac_cv_path_ZSTD="$ZSTD" # Let the user override the test with a path.
13573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13574 for as_dir in $PATH
13576 IFS=$as_save_IFS
13577 test -z "$as_dir" && as_dir=.
13578 for ac_exec_ext in '' $ac_executable_extensions; do
13579 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13580 ac_cv_path_ZSTD="$as_dir/$ac_word$ac_exec_ext"
13581 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13582 break 2
13584 done
13585 done
13586 IFS=$as_save_IFS
13589 esac
13591 ZSTD=$ac_cv_path_ZSTD
13592 if test -n "$ZSTD"; then
13593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13594 $as_echo "$ZSTD" >&6; }
13595 else
13596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13597 $as_echo "no" >&6; }
13601 test -n "$ZSTD" && break
13602 done
13604 else
13605 # Report the value of ZSTD in configure's output in all cases.
13606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD" >&5
13607 $as_echo_n "checking for ZSTD... " >&6; }
13608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
13609 $as_echo "$ZSTD" >&6; }
13612 if test "$with_zstd" = yes; then
13613 ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default"
13614 if test "x$ac_cv_header_zstd_h" = xyes; then :
13616 else
13617 as_fn_error $? "zstd.h header file is required for ZSTD" "$LINENO" 5
13623 if test "$with_gssapi" = yes ; then
13624 for ac_header in gssapi/gssapi.h
13625 do :
13626 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13627 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13628 cat >>confdefs.h <<_ACEOF
13629 #define HAVE_GSSAPI_GSSAPI_H 1
13630 _ACEOF
13632 else
13633 for ac_header in gssapi.h
13634 do :
13635 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13636 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13637 cat >>confdefs.h <<_ACEOF
13638 #define HAVE_GSSAPI_H 1
13639 _ACEOF
13641 else
13642 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13645 done
13649 done
13651 for ac_header in gssapi/gssapi_ext.h
13652 do :
13653 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi_ext.h" "ac_cv_header_gssapi_gssapi_ext_h" "$ac_includes_default"
13654 if test "x$ac_cv_header_gssapi_gssapi_ext_h" = xyes; then :
13655 cat >>confdefs.h <<_ACEOF
13656 #define HAVE_GSSAPI_GSSAPI_EXT_H 1
13657 _ACEOF
13659 else
13660 for ac_header in gssapi_ext.h
13661 do :
13662 ac_fn_c_check_header_mongrel "$LINENO" "gssapi_ext.h" "ac_cv_header_gssapi_ext_h" "$ac_includes_default"
13663 if test "x$ac_cv_header_gssapi_ext_h" = xyes; then :
13664 cat >>confdefs.h <<_ACEOF
13665 #define HAVE_GSSAPI_EXT_H 1
13666 _ACEOF
13668 else
13669 as_fn_error $? "gssapi_ext.h header file is required for GSSAPI" "$LINENO" 5
13672 done
13676 done
13680 if test -z "$OPENSSL"; then
13681 for ac_prog in openssl
13683 # Extract the first word of "$ac_prog", so it can be a program name with args.
13684 set dummy $ac_prog; ac_word=$2
13685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13686 $as_echo_n "checking for $ac_word... " >&6; }
13687 if ${ac_cv_path_OPENSSL+:} false; then :
13688 $as_echo_n "(cached) " >&6
13689 else
13690 case $OPENSSL in
13691 [\\/]* | ?:[\\/]*)
13692 ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a path.
13695 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13696 for as_dir in $PATH
13698 IFS=$as_save_IFS
13699 test -z "$as_dir" && as_dir=.
13700 for ac_exec_ext in '' $ac_executable_extensions; do
13701 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13702 ac_cv_path_OPENSSL="$as_dir/$ac_word$ac_exec_ext"
13703 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13704 break 2
13706 done
13707 done
13708 IFS=$as_save_IFS
13711 esac
13713 OPENSSL=$ac_cv_path_OPENSSL
13714 if test -n "$OPENSSL"; then
13715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
13716 $as_echo "$OPENSSL" >&6; }
13717 else
13718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13719 $as_echo "no" >&6; }
13723 test -n "$OPENSSL" && break
13724 done
13726 else
13727 # Report the value of OPENSSL in configure's output in all cases.
13728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
13729 $as_echo_n "checking for OPENSSL... " >&6; }
13730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
13731 $as_echo "$OPENSSL" >&6; }
13734 pgac_openssl_version="$($OPENSSL version 2> /dev/null || echo openssl not found)"
13735 { $as_echo "$as_me:${as_lineno-$LINENO}: using openssl: $pgac_openssl_version" >&5
13736 $as_echo "$as_me: using openssl: $pgac_openssl_version" >&6;}
13737 if test "$with_ssl" = openssl ; then
13738 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13739 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13741 else
13742 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13746 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13747 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13749 else
13750 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13756 if test "$with_pam" = yes ; then
13757 for ac_header in security/pam_appl.h
13758 do :
13759 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13760 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13761 cat >>confdefs.h <<_ACEOF
13762 #define HAVE_SECURITY_PAM_APPL_H 1
13763 _ACEOF
13765 else
13766 for ac_header in pam/pam_appl.h
13767 do :
13768 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13769 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13770 cat >>confdefs.h <<_ACEOF
13771 #define HAVE_PAM_PAM_APPL_H 1
13772 _ACEOF
13774 else
13775 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13778 done
13782 done
13786 if test "$with_bsd_auth" = yes ; then
13787 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13788 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13790 else
13791 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13797 if test "$with_systemd" = yes ; then
13798 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13799 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13801 else
13802 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13808 if test "$with_libxml" = yes ; then
13809 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13810 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13812 else
13813 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13819 if test "$with_libxslt" = yes ; then
13820 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13821 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13823 else
13824 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13830 if test "$with_ldap" = yes ; then
13831 if test "$PORTNAME" != "win32"; then
13832 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13833 if test "x$ac_cv_header_ldap_h" = xyes; then :
13835 else
13836 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13841 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13842 if ${pgac_cv_ldap_safe+:} false; then :
13843 $as_echo_n "(cached) " >&6
13844 else
13845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13846 /* end confdefs.h. */
13847 #include <ldap.h>
13848 #if !defined(LDAP_VENDOR_VERSION) || \
13849 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13850 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13851 choke me
13852 #endif
13854 main ()
13858 return 0;
13860 _ACEOF
13861 if ac_fn_c_try_compile "$LINENO"; then :
13862 pgac_cv_ldap_safe=yes
13863 else
13864 pgac_cv_ldap_safe=no
13866 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13869 $as_echo "$pgac_cv_ldap_safe" >&6; }
13871 if test "$pgac_cv_ldap_safe" != yes; then
13872 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13873 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13874 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13875 *** also uses LDAP will crash on exit." >&5
13876 $as_echo "$as_me: WARNING:
13877 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13878 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13879 *** also uses LDAP will crash on exit." >&2;}
13881 else
13882 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13883 #include <windows.h>
13886 if test "x$ac_cv_header_winldap_h" = xyes; then :
13888 else
13889 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13896 if test "$with_bonjour" = yes ; then
13897 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13898 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13900 else
13901 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13907 # for contrib/uuid-ossp
13908 if test "$with_uuid" = bsd ; then
13909 for ac_header in uuid.h
13910 do :
13911 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13912 if test "x$ac_cv_header_uuid_h" = xyes; then :
13913 cat >>confdefs.h <<_ACEOF
13914 #define HAVE_UUID_H 1
13915 _ACEOF
13916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13917 /* end confdefs.h. */
13918 #include <uuid.h>
13920 _ACEOF
13921 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13922 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13924 else
13925 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13927 rm -f conftest*
13929 else
13930 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13933 done
13935 elif test "$with_uuid" = e2fs ; then
13936 for ac_header in uuid/uuid.h
13937 do :
13938 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13939 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13940 cat >>confdefs.h <<_ACEOF
13941 #define HAVE_UUID_UUID_H 1
13942 _ACEOF
13943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13944 /* end confdefs.h. */
13945 #include <uuid/uuid.h>
13947 _ACEOF
13948 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13949 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13951 else
13952 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13954 rm -f conftest*
13956 else
13957 for ac_header in uuid.h
13958 do :
13959 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13960 if test "x$ac_cv_header_uuid_h" = xyes; then :
13961 cat >>confdefs.h <<_ACEOF
13962 #define HAVE_UUID_H 1
13963 _ACEOF
13964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13965 /* end confdefs.h. */
13966 #include <uuid.h>
13968 _ACEOF
13969 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13970 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13972 else
13973 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13975 rm -f conftest*
13977 else
13978 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13981 done
13985 done
13987 elif test "$with_uuid" = ossp ; then
13988 for ac_header in ossp/uuid.h
13989 do :
13990 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13991 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13992 cat >>confdefs.h <<_ACEOF
13993 #define HAVE_OSSP_UUID_H 1
13994 _ACEOF
13995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13996 /* end confdefs.h. */
13997 #include <ossp/uuid.h>
13999 _ACEOF
14000 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14001 $EGREP "uuid_export" >/dev/null 2>&1; then :
14003 else
14004 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
14006 rm -f conftest*
14008 else
14009 for ac_header in uuid.h
14010 do :
14011 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14012 if test "x$ac_cv_header_uuid_h" = xyes; then :
14013 cat >>confdefs.h <<_ACEOF
14014 #define HAVE_UUID_H 1
14015 _ACEOF
14016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14017 /* end confdefs.h. */
14018 #include <uuid.h>
14020 _ACEOF
14021 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14022 $EGREP "uuid_export" >/dev/null 2>&1; then :
14024 else
14025 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
14027 rm -f conftest*
14029 else
14030 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
14033 done
14037 done
14041 if test "$PORTNAME" = "win32" ; then
14042 for ac_header in crtdefs.h
14043 do :
14044 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
14045 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
14046 cat >>confdefs.h <<_ACEOF
14047 #define HAVE_CRTDEFS_H 1
14048 _ACEOF
14052 done
14057 ## Types, structures, compiler characteristics
14060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14061 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14062 if ${ac_cv_c_bigendian+:} false; then :
14063 $as_echo_n "(cached) " >&6
14064 else
14065 ac_cv_c_bigendian=unknown
14066 # See if we're dealing with a universal compiler.
14067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14068 /* end confdefs.h. */
14069 #ifndef __APPLE_CC__
14070 not a universal capable compiler
14071 #endif
14072 typedef int dummy;
14074 _ACEOF
14075 if ac_fn_c_try_compile "$LINENO"; then :
14077 # Check for potential -arch flags. It is not universal unless
14078 # there are at least two -arch flags with different values.
14079 ac_arch=
14080 ac_prev=
14081 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14082 if test -n "$ac_prev"; then
14083 case $ac_word in
14084 i?86 | x86_64 | ppc | ppc64)
14085 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14086 ac_arch=$ac_word
14087 else
14088 ac_cv_c_bigendian=universal
14089 break
14092 esac
14093 ac_prev=
14094 elif test "x$ac_word" = "x-arch"; then
14095 ac_prev=arch
14097 done
14099 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14100 if test $ac_cv_c_bigendian = unknown; then
14101 # See if sys/param.h defines the BYTE_ORDER macro.
14102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14103 /* end confdefs.h. */
14104 #include <sys/types.h>
14105 #include <sys/param.h>
14108 main ()
14110 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14111 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14112 && LITTLE_ENDIAN)
14113 bogus endian macros
14114 #endif
14117 return 0;
14119 _ACEOF
14120 if ac_fn_c_try_compile "$LINENO"; then :
14121 # It does; now see whether it defined to BIG_ENDIAN or not.
14122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14123 /* end confdefs.h. */
14124 #include <sys/types.h>
14125 #include <sys/param.h>
14128 main ()
14130 #if BYTE_ORDER != BIG_ENDIAN
14131 not big endian
14132 #endif
14135 return 0;
14137 _ACEOF
14138 if ac_fn_c_try_compile "$LINENO"; then :
14139 ac_cv_c_bigendian=yes
14140 else
14141 ac_cv_c_bigendian=no
14143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14147 if test $ac_cv_c_bigendian = unknown; then
14148 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14150 /* end confdefs.h. */
14151 #include <limits.h>
14154 main ()
14156 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14157 bogus endian macros
14158 #endif
14161 return 0;
14163 _ACEOF
14164 if ac_fn_c_try_compile "$LINENO"; then :
14165 # It does; now see whether it defined to _BIG_ENDIAN or not.
14166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14167 /* end confdefs.h. */
14168 #include <limits.h>
14171 main ()
14173 #ifndef _BIG_ENDIAN
14174 not big endian
14175 #endif
14178 return 0;
14180 _ACEOF
14181 if ac_fn_c_try_compile "$LINENO"; then :
14182 ac_cv_c_bigendian=yes
14183 else
14184 ac_cv_c_bigendian=no
14186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14190 if test $ac_cv_c_bigendian = unknown; then
14191 # Compile a test program.
14192 if test "$cross_compiling" = yes; then :
14193 # Try to guess by grepping values from an object file.
14194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14195 /* end confdefs.h. */
14196 short int ascii_mm[] =
14197 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14198 short int ascii_ii[] =
14199 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14200 int use_ascii (int i) {
14201 return ascii_mm[i] + ascii_ii[i];
14203 short int ebcdic_ii[] =
14204 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14205 short int ebcdic_mm[] =
14206 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14207 int use_ebcdic (int i) {
14208 return ebcdic_mm[i] + ebcdic_ii[i];
14210 extern int foo;
14213 main ()
14215 return use_ascii (foo) == use_ebcdic (foo);
14217 return 0;
14219 _ACEOF
14220 if ac_fn_c_try_compile "$LINENO"; then :
14221 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14222 ac_cv_c_bigendian=yes
14224 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14225 if test "$ac_cv_c_bigendian" = unknown; then
14226 ac_cv_c_bigendian=no
14227 else
14228 # finding both strings is unlikely to happen, but who knows?
14229 ac_cv_c_bigendian=unknown
14233 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14234 else
14235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14236 /* end confdefs.h. */
14237 $ac_includes_default
14239 main ()
14242 /* Are we little or big endian? From Harbison&Steele. */
14243 union
14245 long int l;
14246 char c[sizeof (long int)];
14247 } u;
14248 u.l = 1;
14249 return u.c[sizeof (long int) - 1] == 1;
14252 return 0;
14254 _ACEOF
14255 if ac_fn_c_try_run "$LINENO"; then :
14256 ac_cv_c_bigendian=no
14257 else
14258 ac_cv_c_bigendian=yes
14260 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14261 conftest.$ac_objext conftest.beam conftest.$ac_ext
14266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14267 $as_echo "$ac_cv_c_bigendian" >&6; }
14268 case $ac_cv_c_bigendian in #(
14269 yes)
14270 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14271 ;; #(
14273 ;; #(
14274 universal)
14276 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14278 ;; #(
14280 as_fn_error $? "unknown endianness
14281 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14282 esac
14284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14285 $as_echo_n "checking for inline... " >&6; }
14286 if ${ac_cv_c_inline+:} false; then :
14287 $as_echo_n "(cached) " >&6
14288 else
14289 ac_cv_c_inline=no
14290 for ac_kw in inline __inline__ __inline; do
14291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14292 /* end confdefs.h. */
14293 #ifndef __cplusplus
14294 typedef int foo_t;
14295 static $ac_kw foo_t static_foo () {return 0; }
14296 $ac_kw foo_t foo () {return 0; }
14297 #endif
14299 _ACEOF
14300 if ac_fn_c_try_compile "$LINENO"; then :
14301 ac_cv_c_inline=$ac_kw
14303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14304 test "$ac_cv_c_inline" != no && break
14305 done
14308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14309 $as_echo "$ac_cv_c_inline" >&6; }
14311 case $ac_cv_c_inline in
14312 inline | yes) ;;
14314 case $ac_cv_c_inline in
14315 no) ac_val=;;
14316 *) ac_val=$ac_cv_c_inline;;
14317 esac
14318 cat >>confdefs.h <<_ACEOF
14319 #ifndef __cplusplus
14320 #define inline $ac_val
14321 #endif
14322 _ACEOF
14324 esac
14326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14327 $as_echo_n "checking for printf format archetype... " >&6; }
14328 if ${pgac_cv_printf_archetype+:} false; then :
14329 $as_echo_n "(cached) " >&6
14330 else
14331 pgac_cv_printf_archetype=gnu_printf
14332 ac_save_c_werror_flag=$ac_c_werror_flag
14333 ac_c_werror_flag=yes
14334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14335 /* end confdefs.h. */
14336 extern void pgac_write(int ignore, const char *fmt,...)
14337 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14339 main ()
14341 pgac_write(0, "error %s: %m", "foo");
14343 return 0;
14345 _ACEOF
14346 if ac_fn_c_try_compile "$LINENO"; then :
14347 ac_archetype_ok=yes
14348 else
14349 ac_archetype_ok=no
14351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14352 ac_c_werror_flag=$ac_save_c_werror_flag
14354 if [ "$ac_archetype_ok" = no ]; then
14355 pgac_cv_printf_archetype=__syslog__
14356 ac_save_c_werror_flag=$ac_c_werror_flag
14357 ac_c_werror_flag=yes
14358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14359 /* end confdefs.h. */
14360 extern void pgac_write(int ignore, const char *fmt,...)
14361 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14363 main ()
14365 pgac_write(0, "error %s: %m", "foo");
14367 return 0;
14369 _ACEOF
14370 if ac_fn_c_try_compile "$LINENO"; then :
14371 ac_archetype_ok=yes
14372 else
14373 ac_archetype_ok=no
14375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14376 ac_c_werror_flag=$ac_save_c_werror_flag
14378 if [ "$ac_archetype_ok" = no ]; then
14379 pgac_cv_printf_archetype=printf
14383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14384 $as_echo "$pgac_cv_printf_archetype" >&6; }
14386 cat >>confdefs.h <<_ACEOF
14387 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14388 _ACEOF
14391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14392 $as_echo_n "checking for _Static_assert... " >&6; }
14393 if ${pgac_cv__static_assert+:} false; then :
14394 $as_echo_n "(cached) " >&6
14395 else
14396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14397 /* end confdefs.h. */
14400 main ()
14402 ({ _Static_assert(1, "foo"); })
14404 return 0;
14406 _ACEOF
14407 if ac_fn_c_try_link "$LINENO"; then :
14408 pgac_cv__static_assert=yes
14409 else
14410 pgac_cv__static_assert=no
14412 rm -f core conftest.err conftest.$ac_objext \
14413 conftest$ac_exeext conftest.$ac_ext
14415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14416 $as_echo "$pgac_cv__static_assert" >&6; }
14417 if test x"$pgac_cv__static_assert" = xyes ; then
14419 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14423 $as_echo_n "checking for typeof... " >&6; }
14424 if ${pgac_cv_c_typeof+:} false; then :
14425 $as_echo_n "(cached) " >&6
14426 else
14427 pgac_cv_c_typeof=no
14428 for pgac_kw in typeof __typeof__ decltype; do
14429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14430 /* end confdefs.h. */
14433 main ()
14435 int x = 0;
14436 $pgac_kw(x) y;
14437 y = x;
14438 return y;
14440 return 0;
14442 _ACEOF
14443 if ac_fn_c_try_compile "$LINENO"; then :
14444 pgac_cv_c_typeof=$pgac_kw
14446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14447 test "$pgac_cv_c_typeof" != no && break
14448 done
14450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14451 $as_echo "$pgac_cv_c_typeof" >&6; }
14452 if test "$pgac_cv_c_typeof" != no; then
14454 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14456 if test "$pgac_cv_c_typeof" != typeof; then
14458 cat >>confdefs.h <<_ACEOF
14459 #define typeof $pgac_cv_c_typeof
14460 _ACEOF
14464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14465 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14466 if ${pgac_cv__types_compatible+:} false; then :
14467 $as_echo_n "(cached) " >&6
14468 else
14469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14470 /* end confdefs.h. */
14473 main ()
14475 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14477 return 0;
14479 _ACEOF
14480 if ac_fn_c_try_compile "$LINENO"; then :
14481 pgac_cv__types_compatible=yes
14482 else
14483 pgac_cv__types_compatible=no
14485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14488 $as_echo "$pgac_cv__types_compatible" >&6; }
14489 if test x"$pgac_cv__types_compatible" = xyes ; then
14491 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14495 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14496 if ${pgac_cv__builtin_constant_p+:} false; then :
14497 $as_echo_n "(cached) " >&6
14498 else
14499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14500 /* end confdefs.h. */
14501 static int x;
14502 static int y[__builtin_constant_p(x) ? x : 1];
14503 static int z[__builtin_constant_p("string literal") ? 1 : x];
14506 _ACEOF
14507 if ac_fn_c_try_compile "$LINENO"; then :
14508 pgac_cv__builtin_constant_p=yes
14509 else
14510 pgac_cv__builtin_constant_p=no
14512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14515 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14516 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14518 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14522 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14523 if ${pgac_cv__builtin_unreachable+:} false; then :
14524 $as_echo_n "(cached) " >&6
14525 else
14526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14527 /* end confdefs.h. */
14530 main ()
14532 __builtin_unreachable();
14534 return 0;
14536 _ACEOF
14537 if ac_fn_c_try_link "$LINENO"; then :
14538 pgac_cv__builtin_unreachable=yes
14539 else
14540 pgac_cv__builtin_unreachable=no
14542 rm -f core conftest.err conftest.$ac_objext \
14543 conftest$ac_exeext conftest.$ac_ext
14545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14546 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14547 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14549 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14553 $as_echo_n "checking for computed goto support... " >&6; }
14554 if ${pgac_cv_computed_goto+:} false; then :
14555 $as_echo_n "(cached) " >&6
14556 else
14557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14558 /* end confdefs.h. */
14561 main ()
14563 void *labeladdrs[] = {&&my_label};
14564 goto *labeladdrs[0];
14565 my_label:
14566 return 1;
14569 return 0;
14571 _ACEOF
14572 if ac_fn_c_try_compile "$LINENO"; then :
14573 pgac_cv_computed_goto=yes
14574 else
14575 pgac_cv_computed_goto=no
14577 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14580 $as_echo "$pgac_cv_computed_goto" >&6; }
14581 if test x"$pgac_cv_computed_goto" = xyes ; then
14583 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14586 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14587 #include <time.h>
14590 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14592 cat >>confdefs.h <<_ACEOF
14593 #define HAVE_STRUCT_TM_TM_ZONE 1
14594 _ACEOF
14600 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14601 #include <sys/ipc.h>
14602 #include <sys/sem.h>
14605 if test "x$ac_cv_type_union_semun" = xyes; then :
14607 cat >>confdefs.h <<_ACEOF
14608 #define HAVE_UNION_SEMUN 1
14609 _ACEOF
14614 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/socket.h>
14616 if test "x$ac_cv_type_socklen_t" = xyes; then :
14618 cat >>confdefs.h <<_ACEOF
14619 #define HAVE_SOCKLEN_T 1
14620 _ACEOF
14625 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14626 #include <sys/socket.h>
14629 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14631 cat >>confdefs.h <<_ACEOF
14632 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14633 _ACEOF
14639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14640 $as_echo_n "checking for locale_t... " >&6; }
14641 if ${pgac_cv_type_locale_t+:} false; then :
14642 $as_echo_n "(cached) " >&6
14643 else
14644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14645 /* end confdefs.h. */
14646 #include <locale.h>
14647 locale_t x;
14649 main ()
14653 return 0;
14655 _ACEOF
14656 if ac_fn_c_try_compile "$LINENO"; then :
14657 pgac_cv_type_locale_t=yes
14658 else
14659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14660 /* end confdefs.h. */
14661 #include <xlocale.h>
14662 locale_t x;
14664 main ()
14668 return 0;
14670 _ACEOF
14671 if ac_fn_c_try_compile "$LINENO"; then :
14672 pgac_cv_type_locale_t='yes (in xlocale.h)'
14673 else
14674 pgac_cv_type_locale_t=no
14676 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14681 $as_echo "$pgac_cv_type_locale_t" >&6; }
14682 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14684 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14688 # MSVC doesn't cope well with defining restrict to __restrict, the
14689 # spelling it understands, because it conflicts with
14690 # __declspec(restrict). Therefore we define pg_restrict to the
14691 # appropriate definition, which presumably won't conflict.
14692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14693 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14694 if ${ac_cv_c_restrict+:} false; then :
14695 $as_echo_n "(cached) " >&6
14696 else
14697 ac_cv_c_restrict=no
14698 # The order here caters to the fact that C++ does not require restrict.
14699 for ac_kw in __restrict __restrict__ _Restrict restrict; do
14700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14701 /* end confdefs.h. */
14702 typedef int * int_ptr;
14703 int foo (int_ptr $ac_kw ip) {
14704 return ip[0];
14707 main ()
14709 int s[1];
14710 int * $ac_kw t = s;
14711 t[0] = 0;
14712 return foo(t)
14714 return 0;
14716 _ACEOF
14717 if ac_fn_c_try_compile "$LINENO"; then :
14718 ac_cv_c_restrict=$ac_kw
14720 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14721 test "$ac_cv_c_restrict" != no && break
14722 done
14725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14726 $as_echo "$ac_cv_c_restrict" >&6; }
14728 case $ac_cv_c_restrict in
14729 restrict) ;;
14730 no) $as_echo "#define restrict /**/" >>confdefs.h
14732 *) cat >>confdefs.h <<_ACEOF
14733 #define restrict $ac_cv_c_restrict
14734 _ACEOF
14736 esac
14738 if test "$ac_cv_c_restrict" = "no"; then
14739 pg_restrict=""
14740 else
14741 pg_restrict="$ac_cv_c_restrict"
14744 cat >>confdefs.h <<_ACEOF
14745 #define pg_restrict $pg_restrict
14746 _ACEOF
14749 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14750 #include <getopt.h>
14751 #endif
14753 if test "x$ac_cv_type_struct_option" = xyes; then :
14755 cat >>confdefs.h <<_ACEOF
14756 #define HAVE_STRUCT_OPTION 1
14757 _ACEOF
14763 case $host_cpu in
14764 x86_64)
14765 # On x86_64, check if we can compile a popcntq instruction
14766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
14767 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
14768 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
14769 $as_echo_n "(cached) " >&6
14770 else
14771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14772 /* end confdefs.h. */
14775 main ()
14777 long long x = 1; long long r;
14778 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
14780 return 0;
14782 _ACEOF
14783 if ac_fn_c_try_compile "$LINENO"; then :
14784 pgac_cv_have_x86_64_popcntq=yes
14785 else
14786 pgac_cv_have_x86_64_popcntq=no
14788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
14791 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
14792 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
14794 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
14798 ppc*|powerpc*)
14799 # On PPC, check if compiler accepts "i"(x) when __builtin_constant_p(x).
14800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
14801 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
14802 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
14803 $as_echo_n "(cached) " >&6
14804 else
14805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14806 /* end confdefs.h. */
14807 static inline int
14808 addi(int ra, int si)
14810 int res = 0;
14811 if (__builtin_constant_p(si))
14812 __asm__ __volatile__(
14813 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
14814 return res;
14816 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
14818 main ()
14822 return 0;
14824 _ACEOF
14825 if ac_fn_c_try_compile "$LINENO"; then :
14826 pgac_cv_have_i_constraint__builtin_constant_p=yes
14827 else
14828 pgac_cv_have_i_constraint__builtin_constant_p=no
14830 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
14833 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
14834 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
14836 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
14840 esac
14842 # Check largefile support. You might think this is a system service not a
14843 # compiler characteristic, but you'd be wrong. We must check this before
14844 # probing existence of related functions such as fseeko, since the largefile
14845 # defines can affect what is generated for that.
14846 if test "$PORTNAME" != "win32"; then
14847 # Check whether --enable-largefile was given.
14848 if test "${enable_largefile+set}" = set; then :
14849 enableval=$enable_largefile;
14852 if test "$enable_largefile" != no; then
14854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14855 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14856 if ${ac_cv_sys_largefile_CC+:} false; then :
14857 $as_echo_n "(cached) " >&6
14858 else
14859 ac_cv_sys_largefile_CC=no
14860 if test "$GCC" != yes; then
14861 ac_save_CC=$CC
14862 while :; do
14863 # IRIX 6.2 and later do not support large files by default,
14864 # so use the C compiler's -n32 option if that helps.
14865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14866 /* end confdefs.h. */
14867 #include <sys/types.h>
14868 /* Check that off_t can represent 2**63 - 1 correctly.
14869 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14870 since some C++ compilers masquerading as C compilers
14871 incorrectly reject 9223372036854775807. */
14872 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14873 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14874 && LARGE_OFF_T % 2147483647 == 1)
14875 ? 1 : -1];
14877 main ()
14881 return 0;
14883 _ACEOF
14884 if ac_fn_c_try_compile "$LINENO"; then :
14885 break
14887 rm -f core conftest.err conftest.$ac_objext
14888 CC="$CC -n32"
14889 if ac_fn_c_try_compile "$LINENO"; then :
14890 ac_cv_sys_largefile_CC=' -n32'; break
14892 rm -f core conftest.err conftest.$ac_objext
14893 break
14894 done
14895 CC=$ac_save_CC
14896 rm -f conftest.$ac_ext
14899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14900 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14901 if test "$ac_cv_sys_largefile_CC" != no; then
14902 CC=$CC$ac_cv_sys_largefile_CC
14905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14906 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14907 if ${ac_cv_sys_file_offset_bits+:} false; then :
14908 $as_echo_n "(cached) " >&6
14909 else
14910 while :; do
14911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14912 /* end confdefs.h. */
14913 #include <sys/types.h>
14914 /* Check that off_t can represent 2**63 - 1 correctly.
14915 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14916 since some C++ compilers masquerading as C compilers
14917 incorrectly reject 9223372036854775807. */
14918 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14919 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14920 && LARGE_OFF_T % 2147483647 == 1)
14921 ? 1 : -1];
14923 main ()
14927 return 0;
14929 _ACEOF
14930 if ac_fn_c_try_compile "$LINENO"; then :
14931 ac_cv_sys_file_offset_bits=no; break
14933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14935 /* end confdefs.h. */
14936 #define _FILE_OFFSET_BITS 64
14937 #include <sys/types.h>
14938 /* Check that off_t can represent 2**63 - 1 correctly.
14939 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14940 since some C++ compilers masquerading as C compilers
14941 incorrectly reject 9223372036854775807. */
14942 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14943 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14944 && LARGE_OFF_T % 2147483647 == 1)
14945 ? 1 : -1];
14947 main ()
14951 return 0;
14953 _ACEOF
14954 if ac_fn_c_try_compile "$LINENO"; then :
14955 ac_cv_sys_file_offset_bits=64; break
14957 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14958 ac_cv_sys_file_offset_bits=unknown
14959 break
14960 done
14962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14963 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14964 case $ac_cv_sys_file_offset_bits in #(
14965 no | unknown) ;;
14967 cat >>confdefs.h <<_ACEOF
14968 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14969 _ACEOF
14971 esac
14972 rm -rf conftest*
14973 if test $ac_cv_sys_file_offset_bits = unknown; then
14974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14975 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14976 if ${ac_cv_sys_large_files+:} false; then :
14977 $as_echo_n "(cached) " >&6
14978 else
14979 while :; do
14980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14981 /* end confdefs.h. */
14982 #include <sys/types.h>
14983 /* Check that off_t can represent 2**63 - 1 correctly.
14984 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14985 since some C++ compilers masquerading as C compilers
14986 incorrectly reject 9223372036854775807. */
14987 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14988 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14989 && LARGE_OFF_T % 2147483647 == 1)
14990 ? 1 : -1];
14992 main ()
14996 return 0;
14998 _ACEOF
14999 if ac_fn_c_try_compile "$LINENO"; then :
15000 ac_cv_sys_large_files=no; break
15002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15004 /* end confdefs.h. */
15005 #define _LARGE_FILES 1
15006 #include <sys/types.h>
15007 /* Check that off_t can represent 2**63 - 1 correctly.
15008 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15009 since some C++ compilers masquerading as C compilers
15010 incorrectly reject 9223372036854775807. */
15011 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15012 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15013 && LARGE_OFF_T % 2147483647 == 1)
15014 ? 1 : -1];
15016 main ()
15020 return 0;
15022 _ACEOF
15023 if ac_fn_c_try_compile "$LINENO"; then :
15024 ac_cv_sys_large_files=1; break
15026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15027 ac_cv_sys_large_files=unknown
15028 break
15029 done
15031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15032 $as_echo "$ac_cv_sys_large_files" >&6; }
15033 case $ac_cv_sys_large_files in #(
15034 no | unknown) ;;
15036 cat >>confdefs.h <<_ACEOF
15037 #define _LARGE_FILES $ac_cv_sys_large_files
15038 _ACEOF
15040 esac
15041 rm -rf conftest*
15050 # The cast to long int works around a bug in the HP C Compiler
15051 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15052 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15053 # This bug is HP SR number 8606223364.
15054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15055 $as_echo_n "checking size of off_t... " >&6; }
15056 if ${ac_cv_sizeof_off_t+:} false; then :
15057 $as_echo_n "(cached) " >&6
15058 else
15059 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
15061 else
15062 if test "$ac_cv_type_off_t" = yes; then
15063 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15064 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15065 as_fn_error 77 "cannot compute sizeof (off_t)
15066 See \`config.log' for more details" "$LINENO" 5; }
15067 else
15068 ac_cv_sizeof_off_t=0
15073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15074 $as_echo "$ac_cv_sizeof_off_t" >&6; }
15078 cat >>confdefs.h <<_ACEOF
15079 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15080 _ACEOF
15084 # If we don't have largefile support, can't handle segment size >= 2GB.
15085 if test "$ac_cv_sizeof_off_t" -lt 8; then
15086 if expr $RELSEG_SIZE '*' $blocksize '>=' 2 '*' 1024 '*' 1024; then
15087 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15091 # The cast to long int works around a bug in the HP C Compiler
15092 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15093 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15094 # This bug is HP SR number 8606223364.
15095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
15096 $as_echo_n "checking size of bool... " >&6; }
15097 if ${ac_cv_sizeof_bool+:} false; then :
15098 $as_echo_n "(cached) " >&6
15099 else
15100 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
15101 #include <stdbool.h>
15102 #endif
15103 "; then :
15105 else
15106 if test "$ac_cv_type_bool" = yes; then
15107 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15108 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15109 as_fn_error 77 "cannot compute sizeof (bool)
15110 See \`config.log' for more details" "$LINENO" 5; }
15111 else
15112 ac_cv_sizeof_bool=0
15117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15118 $as_echo "$ac_cv_sizeof_bool" >&6; }
15122 cat >>confdefs.h <<_ACEOF
15123 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15124 _ACEOF
15128 if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
15130 $as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
15136 ## Functions, global variables
15139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15140 $as_echo_n "checking for int timezone... " >&6; }
15141 if ${pgac_cv_var_int_timezone+:} false; then :
15142 $as_echo_n "(cached) " >&6
15143 else
15144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15145 /* end confdefs.h. */
15146 #include <time.h>
15147 int res;
15149 main ()
15151 #ifndef __CYGWIN__
15152 res = timezone / 60;
15153 #else
15154 res = _timezone / 60;
15155 #endif
15157 return 0;
15159 _ACEOF
15160 if ac_fn_c_try_link "$LINENO"; then :
15161 pgac_cv_var_int_timezone=yes
15162 else
15163 pgac_cv_var_int_timezone=no
15165 rm -f core conftest.err conftest.$ac_objext \
15166 conftest$ac_exeext conftest.$ac_ext
15168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15169 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15170 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15172 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15176 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15177 if ${pgac_cv_func_wcstombs_l+:} false; then :
15178 $as_echo_n "(cached) " >&6
15179 else
15180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15181 /* end confdefs.h. */
15182 #include <stdlib.h>
15183 #include <locale.h>
15185 main ()
15187 #ifndef wcstombs_l
15188 (void) wcstombs_l;
15189 #endif
15191 return 0;
15193 _ACEOF
15194 if ac_fn_c_try_compile "$LINENO"; then :
15195 pgac_cv_func_wcstombs_l='yes'
15196 else
15197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15198 /* end confdefs.h. */
15199 #include <stdlib.h>
15200 #include <locale.h>
15201 #include <xlocale.h>
15203 main ()
15205 #ifndef wcstombs_l
15206 (void) wcstombs_l;
15207 #endif
15209 return 0;
15211 _ACEOF
15212 if ac_fn_c_try_compile "$LINENO"; then :
15213 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15214 else
15215 pgac_cv_func_wcstombs_l='no'
15217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15222 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15223 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15225 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15229 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15230 # symbols that that library has no business exposing to the world. Pending
15231 # acquisition of a clue by those developers, ignore libedit (including its
15232 # possible alias of libreadline) while checking for everything else.
15233 LIBS_including_readline="$LIBS"
15234 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15236 for ac_func in backtrace_symbols copyfile copy_file_range getifaddrs getpeerucred inet_pton kqueue mbstowcs_l memset_s posix_fallocate ppoll pthread_is_threaded_np setproctitle setproctitle_fast strchrnul strsignal syncfs sync_file_range uselocale wcstombs_l
15237 do :
15238 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15239 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15240 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15241 cat >>confdefs.h <<_ACEOF
15242 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15243 _ACEOF
15246 done
15249 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15251 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15252 if ${pgac_cv__builtin_bswap16+:} false; then :
15253 $as_echo_n "(cached) " >&6
15254 else
15255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15256 /* end confdefs.h. */
15259 call__builtin_bswap16(int x)
15261 return __builtin_bswap16(x);
15264 main ()
15268 return 0;
15270 _ACEOF
15271 if ac_fn_c_try_link "$LINENO"; then :
15272 pgac_cv__builtin_bswap16=yes
15273 else
15274 pgac_cv__builtin_bswap16=no
15276 rm -f core conftest.err conftest.$ac_objext \
15277 conftest$ac_exeext conftest.$ac_ext
15279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15280 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15281 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15283 cat >>confdefs.h <<_ACEOF
15284 #define HAVE__BUILTIN_BSWAP16 1
15285 _ACEOF
15288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15289 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15290 if ${pgac_cv__builtin_bswap32+:} false; then :
15291 $as_echo_n "(cached) " >&6
15292 else
15293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15294 /* end confdefs.h. */
15297 call__builtin_bswap32(int x)
15299 return __builtin_bswap32(x);
15302 main ()
15306 return 0;
15308 _ACEOF
15309 if ac_fn_c_try_link "$LINENO"; then :
15310 pgac_cv__builtin_bswap32=yes
15311 else
15312 pgac_cv__builtin_bswap32=no
15314 rm -f core conftest.err conftest.$ac_objext \
15315 conftest$ac_exeext conftest.$ac_ext
15317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15318 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15319 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15321 cat >>confdefs.h <<_ACEOF
15322 #define HAVE__BUILTIN_BSWAP32 1
15323 _ACEOF
15326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15327 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15328 if ${pgac_cv__builtin_bswap64+:} false; then :
15329 $as_echo_n "(cached) " >&6
15330 else
15331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15332 /* end confdefs.h. */
15335 call__builtin_bswap64(long int x)
15337 return __builtin_bswap64(x);
15340 main ()
15344 return 0;
15346 _ACEOF
15347 if ac_fn_c_try_link "$LINENO"; then :
15348 pgac_cv__builtin_bswap64=yes
15349 else
15350 pgac_cv__builtin_bswap64=no
15352 rm -f core conftest.err conftest.$ac_objext \
15353 conftest$ac_exeext conftest.$ac_ext
15355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15356 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15357 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15359 cat >>confdefs.h <<_ACEOF
15360 #define HAVE__BUILTIN_BSWAP64 1
15361 _ACEOF
15364 # We assume that we needn't test all widths of these explicitly:
15365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15366 $as_echo_n "checking for __builtin_clz... " >&6; }
15367 if ${pgac_cv__builtin_clz+:} false; then :
15368 $as_echo_n "(cached) " >&6
15369 else
15370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15371 /* end confdefs.h. */
15374 call__builtin_clz(unsigned int x)
15376 return __builtin_clz(x);
15379 main ()
15383 return 0;
15385 _ACEOF
15386 if ac_fn_c_try_link "$LINENO"; then :
15387 pgac_cv__builtin_clz=yes
15388 else
15389 pgac_cv__builtin_clz=no
15391 rm -f core conftest.err conftest.$ac_objext \
15392 conftest$ac_exeext conftest.$ac_ext
15394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15395 $as_echo "$pgac_cv__builtin_clz" >&6; }
15396 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15398 cat >>confdefs.h <<_ACEOF
15399 #define HAVE__BUILTIN_CLZ 1
15400 _ACEOF
15403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15404 $as_echo_n "checking for __builtin_ctz... " >&6; }
15405 if ${pgac_cv__builtin_ctz+:} false; then :
15406 $as_echo_n "(cached) " >&6
15407 else
15408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15409 /* end confdefs.h. */
15412 call__builtin_ctz(unsigned int x)
15414 return __builtin_ctz(x);
15417 main ()
15421 return 0;
15423 _ACEOF
15424 if ac_fn_c_try_link "$LINENO"; then :
15425 pgac_cv__builtin_ctz=yes
15426 else
15427 pgac_cv__builtin_ctz=no
15429 rm -f core conftest.err conftest.$ac_objext \
15430 conftest$ac_exeext conftest.$ac_ext
15432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15433 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15434 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15436 cat >>confdefs.h <<_ACEOF
15437 #define HAVE__BUILTIN_CTZ 1
15438 _ACEOF
15441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15442 $as_echo_n "checking for __builtin_popcount... " >&6; }
15443 if ${pgac_cv__builtin_popcount+:} false; then :
15444 $as_echo_n "(cached) " >&6
15445 else
15446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15447 /* end confdefs.h. */
15450 call__builtin_popcount(unsigned int x)
15452 return __builtin_popcount(x);
15455 main ()
15459 return 0;
15461 _ACEOF
15462 if ac_fn_c_try_link "$LINENO"; then :
15463 pgac_cv__builtin_popcount=yes
15464 else
15465 pgac_cv__builtin_popcount=no
15467 rm -f core conftest.err conftest.$ac_objext \
15468 conftest$ac_exeext conftest.$ac_ext
15470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15471 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15472 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15474 cat >>confdefs.h <<_ACEOF
15475 #define HAVE__BUILTIN_POPCOUNT 1
15476 _ACEOF
15479 # __builtin_frame_address may draw a diagnostic for non-constant argument,
15480 # so it needs a different test function.
15481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
15482 $as_echo_n "checking for __builtin_frame_address... " >&6; }
15483 if ${pgac_cv__builtin_frame_address+:} false; then :
15484 $as_echo_n "(cached) " >&6
15485 else
15486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15487 /* end confdefs.h. */
15489 void *
15490 call__builtin_frame_address(void)
15492 return __builtin_frame_address(0);
15495 main ()
15499 return 0;
15501 _ACEOF
15502 if ac_fn_c_try_link "$LINENO"; then :
15503 pgac_cv__builtin_frame_address=yes
15504 else
15505 pgac_cv__builtin_frame_address=no
15507 rm -f core conftest.err conftest.$ac_objext \
15508 conftest$ac_exeext conftest.$ac_ext
15510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5
15511 $as_echo "$pgac_cv__builtin_frame_address" >&6; }
15512 if test x"${pgac_cv__builtin_frame_address}" = xyes ; then
15514 cat >>confdefs.h <<_ACEOF
15515 #define HAVE__BUILTIN_FRAME_ADDRESS 1
15516 _ACEOF
15520 # We require 64-bit fseeko() to be available, but run this check anyway
15521 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
15522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15523 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15524 if ${ac_cv_sys_largefile_source+:} false; then :
15525 $as_echo_n "(cached) " >&6
15526 else
15527 while :; do
15528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15529 /* end confdefs.h. */
15530 #include <sys/types.h> /* for off_t */
15531 #include <stdio.h>
15533 main ()
15535 int (*fp) (FILE *, off_t, int) = fseeko;
15536 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15538 return 0;
15540 _ACEOF
15541 if ac_fn_c_try_link "$LINENO"; then :
15542 ac_cv_sys_largefile_source=no; break
15544 rm -f core conftest.err conftest.$ac_objext \
15545 conftest$ac_exeext conftest.$ac_ext
15546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15547 /* end confdefs.h. */
15548 #define _LARGEFILE_SOURCE 1
15549 #include <sys/types.h> /* for off_t */
15550 #include <stdio.h>
15552 main ()
15554 int (*fp) (FILE *, off_t, int) = fseeko;
15555 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15557 return 0;
15559 _ACEOF
15560 if ac_fn_c_try_link "$LINENO"; then :
15561 ac_cv_sys_largefile_source=1; break
15563 rm -f core conftest.err conftest.$ac_objext \
15564 conftest$ac_exeext conftest.$ac_ext
15565 ac_cv_sys_largefile_source=unknown
15566 break
15567 done
15569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15570 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15571 case $ac_cv_sys_largefile_source in #(
15572 no | unknown) ;;
15574 cat >>confdefs.h <<_ACEOF
15575 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15576 _ACEOF
15578 esac
15579 rm -rf conftest*
15581 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15582 # in glibc 2.1.3, but that breaks too many other things.
15583 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15584 if test $ac_cv_sys_largefile_source != unknown; then
15586 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15591 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15592 # by calling it, 2009-04-02
15593 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15594 # The Clang compiler raises a warning for an undeclared identifier that matches
15595 # a compiler builtin function. All extant Clang versions are affected, as of
15596 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
15597 # C and Objective C languages, but Clang does report an error under C++ and
15598 # Objective C++.
15600 # Passing -fno-builtin to the compiler would suppress this problem. That
15601 # strategy would have the advantage of being insensitive to stray warnings, but
15602 # it would make tests less realistic.
15603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15604 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15605 if ${ac_cv_c_decl_report+:} false; then :
15606 $as_echo_n "(cached) " >&6
15607 else
15608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15609 /* end confdefs.h. */
15612 main ()
15614 (void) strchr;
15616 return 0;
15618 _ACEOF
15619 if ac_fn_c_try_compile "$LINENO"; then :
15620 if test -s conftest.err; then :
15621 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15622 # valid AC_CHECK_DECL input. No library function is consistently available
15623 # on freestanding implementations, so test against a dummy declaration.
15624 # Include always-available headers on the off chance that they somehow
15625 # elicit warnings.
15626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15627 /* end confdefs.h. */
15628 #include <float.h>
15629 #include <limits.h>
15630 #include <stdarg.h>
15631 #include <stddef.h>
15632 extern void ac_decl (int, char *);
15634 main ()
15636 #ifdef __cplusplus
15637 (void) ac_decl ((int) 0, (char *) 0);
15638 (void) ac_decl;
15639 #else
15640 (void) ac_decl;
15641 #endif
15644 return 0;
15646 _ACEOF
15647 if ac_fn_c_try_compile "$LINENO"; then :
15648 if test -s conftest.err; then :
15649 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15650 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15651 as_fn_error $? "cannot detect from compiler exit status or warnings
15652 See \`config.log' for more details" "$LINENO" 5; }
15653 else
15654 ac_cv_c_decl_report=warning
15656 else
15657 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15658 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15659 as_fn_error $? "cannot compile a simple declaration test
15660 See \`config.log' for more details" "$LINENO" 5; }
15662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15663 else
15664 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15665 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15666 as_fn_error $? "compiler does not report undeclared identifiers
15667 See \`config.log' for more details" "$LINENO" 5; }
15669 else
15670 ac_cv_c_decl_report=error
15672 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15675 $as_echo "$ac_cv_c_decl_report" >&6; }
15677 case $ac_cv_c_decl_report in
15678 warning) ac_c_decl_warn_flag=yes ;;
15679 *) ac_c_decl_warn_flag= ;;
15680 esac
15682 if test "$PORTNAME" != "solaris"; then :
15684 for ac_func in posix_fadvise
15685 do :
15686 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15687 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15688 cat >>confdefs.h <<_ACEOF
15689 #define HAVE_POSIX_FADVISE 1
15690 _ACEOF
15693 done
15695 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15697 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15698 ac_have_decl=1
15699 else
15700 ac_have_decl=0
15703 cat >>confdefs.h <<_ACEOF
15704 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15705 _ACEOF
15708 fi # fi
15710 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15712 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15713 ac_have_decl=1
15714 else
15715 ac_have_decl=0
15718 cat >>confdefs.h <<_ACEOF
15719 #define HAVE_DECL_FDATASYNC $ac_have_decl
15720 _ACEOF
15722 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15723 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15724 ac_have_decl=1
15725 else
15726 ac_have_decl=0
15729 cat >>confdefs.h <<_ACEOF
15730 #define HAVE_DECL_STRLCAT $ac_have_decl
15731 _ACEOF
15732 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15733 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15734 ac_have_decl=1
15735 else
15736 ac_have_decl=0
15739 cat >>confdefs.h <<_ACEOF
15740 #define HAVE_DECL_STRLCPY $ac_have_decl
15741 _ACEOF
15742 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15743 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15744 ac_have_decl=1
15745 else
15746 ac_have_decl=0
15749 cat >>confdefs.h <<_ACEOF
15750 #define HAVE_DECL_STRNLEN $ac_have_decl
15751 _ACEOF
15752 ac_fn_c_check_decl "$LINENO" "strsep" "ac_cv_have_decl_strsep" "$ac_includes_default"
15753 if test "x$ac_cv_have_decl_strsep" = xyes; then :
15754 ac_have_decl=1
15755 else
15756 ac_have_decl=0
15759 cat >>confdefs.h <<_ACEOF
15760 #define HAVE_DECL_STRSEP $ac_have_decl
15761 _ACEOF
15764 # We can't use AC_CHECK_FUNCS to detect these functions, because it
15765 # won't handle deployment target restrictions on macOS
15766 ac_fn_c_check_decl "$LINENO" "preadv" "ac_cv_have_decl_preadv" "#include <sys/uio.h>
15768 if test "x$ac_cv_have_decl_preadv" = xyes; then :
15769 ac_have_decl=1
15770 else
15771 ac_have_decl=0
15774 cat >>confdefs.h <<_ACEOF
15775 #define HAVE_DECL_PREADV $ac_have_decl
15776 _ACEOF
15778 ac_fn_c_check_decl "$LINENO" "pwritev" "ac_cv_have_decl_pwritev" "#include <sys/uio.h>
15780 if test "x$ac_cv_have_decl_pwritev" = xyes; then :
15781 ac_have_decl=1
15782 else
15783 ac_have_decl=0
15786 cat >>confdefs.h <<_ACEOF
15787 #define HAVE_DECL_PWRITEV $ac_have_decl
15788 _ACEOF
15791 # This is probably only present on macOS, but may as well check always
15792 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15794 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15795 ac_have_decl=1
15796 else
15797 ac_have_decl=0
15800 cat >>confdefs.h <<_ACEOF
15801 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15802 _ACEOF
15805 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
15806 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
15807 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
15809 else
15810 case " $LIBOBJS " in
15811 *" explicit_bzero.$ac_objext "* ) ;;
15812 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
15814 esac
15818 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15819 if test "x$ac_cv_func_getopt" = xyes; then :
15820 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15822 else
15823 case " $LIBOBJS " in
15824 *" getopt.$ac_objext "* ) ;;
15825 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15827 esac
15831 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15832 if test "x$ac_cv_func_getpeereid" = xyes; then :
15833 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15835 else
15836 case " $LIBOBJS " in
15837 *" getpeereid.$ac_objext "* ) ;;
15838 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15840 esac
15844 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15845 if test "x$ac_cv_func_inet_aton" = xyes; then :
15846 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15848 else
15849 case " $LIBOBJS " in
15850 *" inet_aton.$ac_objext "* ) ;;
15851 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15853 esac
15857 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15858 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15859 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15861 else
15862 case " $LIBOBJS " in
15863 *" mkdtemp.$ac_objext "* ) ;;
15864 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15866 esac
15870 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15871 if test "x$ac_cv_func_strlcat" = xyes; then :
15872 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15874 else
15875 case " $LIBOBJS " in
15876 *" strlcat.$ac_objext "* ) ;;
15877 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15879 esac
15883 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15884 if test "x$ac_cv_func_strlcpy" = xyes; then :
15885 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15887 else
15888 case " $LIBOBJS " in
15889 *" strlcpy.$ac_objext "* ) ;;
15890 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15892 esac
15896 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15897 if test "x$ac_cv_func_strnlen" = xyes; then :
15898 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15900 else
15901 case " $LIBOBJS " in
15902 *" strnlen.$ac_objext "* ) ;;
15903 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15905 esac
15909 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
15910 if test "x$ac_cv_func_strsep" = xyes; then :
15911 $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
15913 else
15914 case " $LIBOBJS " in
15915 *" strsep.$ac_objext "* ) ;;
15916 *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
15918 esac
15924 ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
15925 if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
15926 $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
15928 else
15929 case " $LIBOBJS " in
15930 *" pthread_barrier_wait.$ac_objext "* ) ;;
15931 *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
15933 esac
15939 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
15940 # Cygwin and (apparently, based on test results) Mingw both
15941 # have a broken strtof(), so substitute its implementation.
15942 # That's not a perfect fix, since it doesn't avoid double-rounding,
15943 # but we have no better options.
15944 case " $LIBOBJS " in
15945 *" strtof.$ac_objext "* ) ;;
15946 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
15948 esac
15950 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
15951 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
15954 # Similarly, use system's getopt_long() only if system provides struct option.
15955 if test x"$ac_cv_type_struct_option" = xyes ; then
15956 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15957 if test "x$ac_cv_func_getopt_long" = xyes; then :
15958 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15960 else
15961 case " $LIBOBJS " in
15962 *" getopt_long.$ac_objext "* ) ;;
15963 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15965 esac
15970 else
15971 case " $LIBOBJS " in
15972 *" getopt_long.$ac_objext "* ) ;;
15973 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15975 esac
15979 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
15980 # (i.e., allow '-' as a flag character), so use our version on those platforms.
15981 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
15982 case " $LIBOBJS " in
15983 *" getopt.$ac_objext "* ) ;;
15984 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15986 esac
15990 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15991 # so always use our version on Windows.
15992 if test "$PORTNAME" = "win32"; then
15993 case " $LIBOBJS " in
15994 *" getopt.$ac_objext "* ) ;;
15995 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15997 esac
15999 case " $LIBOBJS " in
16000 *" getopt_long.$ac_objext "* ) ;;
16001 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16003 esac
16007 # Win32 (really MinGW) support
16008 if test "$PORTNAME" = "win32"; then
16009 for ac_func in _configthreadlocale
16010 do :
16011 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16012 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16013 cat >>confdefs.h <<_ACEOF
16014 #define HAVE__CONFIGTHREADLOCALE 1
16015 _ACEOF
16018 done
16020 case " $LIBOBJS " in
16021 *" dirmod.$ac_objext "* ) ;;
16022 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16024 esac
16026 case " $LIBOBJS " in
16027 *" kill.$ac_objext "* ) ;;
16028 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16030 esac
16032 case " $LIBOBJS " in
16033 *" open.$ac_objext "* ) ;;
16034 *) LIBOBJS="$LIBOBJS open.$ac_objext"
16036 esac
16038 case " $LIBOBJS " in
16039 *" system.$ac_objext "* ) ;;
16040 *) LIBOBJS="$LIBOBJS system.$ac_objext"
16042 esac
16044 case " $LIBOBJS " in
16045 *" win32common.$ac_objext "* ) ;;
16046 *) LIBOBJS="$LIBOBJS win32common.$ac_objext"
16048 esac
16050 case " $LIBOBJS " in
16051 *" win32dlopen.$ac_objext "* ) ;;
16052 *) LIBOBJS="$LIBOBJS win32dlopen.$ac_objext"
16054 esac
16056 case " $LIBOBJS " in
16057 *" win32env.$ac_objext "* ) ;;
16058 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16060 esac
16062 case " $LIBOBJS " in
16063 *" win32error.$ac_objext "* ) ;;
16064 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16066 esac
16068 case " $LIBOBJS " in
16069 *" win32fdatasync.$ac_objext "* ) ;;
16070 *) LIBOBJS="$LIBOBJS win32fdatasync.$ac_objext"
16072 esac
16074 case " $LIBOBJS " in
16075 *" win32gai_strerror.$ac_objext "* ) ;;
16076 *) LIBOBJS="$LIBOBJS win32gai_strerror.$ac_objext"
16078 esac
16080 case " $LIBOBJS " in
16081 *" win32getrusage.$ac_objext "* ) ;;
16082 *) LIBOBJS="$LIBOBJS win32getrusage.$ac_objext"
16084 esac
16086 case " $LIBOBJS " in
16087 *" win32link.$ac_objext "* ) ;;
16088 *) LIBOBJS="$LIBOBJS win32link.$ac_objext"
16090 esac
16092 case " $LIBOBJS " in
16093 *" win32ntdll.$ac_objext "* ) ;;
16094 *) LIBOBJS="$LIBOBJS win32ntdll.$ac_objext"
16096 esac
16098 case " $LIBOBJS " in
16099 *" win32pread.$ac_objext "* ) ;;
16100 *) LIBOBJS="$LIBOBJS win32pread.$ac_objext"
16102 esac
16104 case " $LIBOBJS " in
16105 *" win32pwrite.$ac_objext "* ) ;;
16106 *) LIBOBJS="$LIBOBJS win32pwrite.$ac_objext"
16108 esac
16110 case " $LIBOBJS " in
16111 *" win32security.$ac_objext "* ) ;;
16112 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16114 esac
16116 case " $LIBOBJS " in
16117 *" win32setlocale.$ac_objext "* ) ;;
16118 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16120 esac
16122 case " $LIBOBJS " in
16123 *" win32stat.$ac_objext "* ) ;;
16124 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
16126 esac
16129 # Cygwin needs only a bit of that
16130 if test "$PORTNAME" = "cygwin"; then
16131 case " $LIBOBJS " in
16132 *" dirmod.$ac_objext "* ) ;;
16133 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16135 esac
16139 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16140 if test "x$ac_cv_func_syslog" = xyes; then :
16141 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16142 if test "x$ac_cv_header_syslog_h" = xyes; then :
16144 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16153 $as_echo_n "checking for opterr... " >&6; }
16154 if ${pgac_cv_var_int_opterr+:} false; then :
16155 $as_echo_n "(cached) " >&6
16156 else
16157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16158 /* end confdefs.h. */
16159 #include <unistd.h>
16161 main ()
16163 extern int opterr; opterr = 1;
16165 return 0;
16167 _ACEOF
16168 if ac_fn_c_try_link "$LINENO"; then :
16169 pgac_cv_var_int_opterr=yes
16170 else
16171 pgac_cv_var_int_opterr=no
16173 rm -f core conftest.err conftest.$ac_objext \
16174 conftest$ac_exeext conftest.$ac_ext
16176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16177 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16178 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16180 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16185 $as_echo_n "checking for optreset... " >&6; }
16186 if ${pgac_cv_var_int_optreset+:} false; then :
16187 $as_echo_n "(cached) " >&6
16188 else
16189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16190 /* end confdefs.h. */
16191 #include <unistd.h>
16193 main ()
16195 extern int optreset; optreset = 1;
16197 return 0;
16199 _ACEOF
16200 if ac_fn_c_try_link "$LINENO"; then :
16201 pgac_cv_var_int_optreset=yes
16202 else
16203 pgac_cv_var_int_optreset=no
16205 rm -f core conftest.err conftest.$ac_objext \
16206 conftest$ac_exeext conftest.$ac_ext
16208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16209 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16210 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16212 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16216 if test "$with_icu" = yes; then
16217 ac_save_CPPFLAGS=$CPPFLAGS
16218 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16220 # Verify we have ICU's header files
16221 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16222 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16224 else
16225 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16230 CPPFLAGS=$ac_save_CPPFLAGS
16233 if test "$with_llvm" = yes; then
16235 # Check which functionality is present
16236 SAVE_CPPFLAGS="$CPPFLAGS"
16237 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16238 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16240 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16241 ac_have_decl=1
16242 else
16243 ac_have_decl=0
16246 cat >>confdefs.h <<_ACEOF
16247 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16248 _ACEOF
16249 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16251 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16252 ac_have_decl=1
16253 else
16254 ac_have_decl=0
16257 cat >>confdefs.h <<_ACEOF
16258 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16259 _ACEOF
16261 CPPFLAGS="$SAVE_CPPFLAGS"
16265 # Lastly, restore full LIBS list and check for readline/libedit symbols
16266 LIBS="$LIBS_including_readline"
16268 if test "$with_readline" = yes; then
16269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
16270 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
16271 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
16272 $as_echo_n "(cached) " >&6
16273 else
16274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16275 /* end confdefs.h. */
16276 #include <stdio.h>
16277 #if defined(HAVE_READLINE_READLINE_H)
16278 #include <readline/readline.h>
16279 #elif defined(HAVE_EDITLINE_READLINE_H)
16280 #include <editline/readline.h>
16281 #elif defined(HAVE_READLINE_H)
16282 #include <readline.h>
16283 #endif
16286 main ()
16288 rl_completion_suppress_quote = 1;
16290 return 0;
16292 _ACEOF
16293 if ac_fn_c_try_link "$LINENO"; then :
16294 pgac_cv_var_rl_completion_suppress_quote=yes
16295 else
16296 pgac_cv_var_rl_completion_suppress_quote=no
16298 rm -f core conftest.err conftest.$ac_objext \
16299 conftest$ac_exeext conftest.$ac_ext
16301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
16302 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
16303 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
16305 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
16308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
16309 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
16310 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
16311 $as_echo_n "(cached) " >&6
16312 else
16313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16314 /* end confdefs.h. */
16315 #include <stdio.h>
16316 #if defined(HAVE_READLINE_READLINE_H)
16317 #include <readline/readline.h>
16318 #elif defined(HAVE_EDITLINE_READLINE_H)
16319 #include <editline/readline.h>
16320 #elif defined(HAVE_READLINE_H)
16321 #include <readline.h>
16322 #endif
16325 main ()
16327 rl_filename_quote_characters = "x";
16329 return 0;
16331 _ACEOF
16332 if ac_fn_c_try_link "$LINENO"; then :
16333 pgac_cv_var_rl_filename_quote_characters=yes
16334 else
16335 pgac_cv_var_rl_filename_quote_characters=no
16337 rm -f core conftest.err conftest.$ac_objext \
16338 conftest$ac_exeext conftest.$ac_ext
16340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
16341 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
16342 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
16344 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
16347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
16348 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
16349 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
16350 $as_echo_n "(cached) " >&6
16351 else
16352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16353 /* end confdefs.h. */
16354 #include <stdio.h>
16355 #if defined(HAVE_READLINE_READLINE_H)
16356 #include <readline/readline.h>
16357 #elif defined(HAVE_EDITLINE_READLINE_H)
16358 #include <editline/readline.h>
16359 #elif defined(HAVE_READLINE_H)
16360 #include <readline.h>
16361 #endif
16364 main ()
16366 rl_filename_quoting_function = 0;
16368 return 0;
16370 _ACEOF
16371 if ac_fn_c_try_link "$LINENO"; then :
16372 pgac_cv_var_rl_filename_quoting_function=yes
16373 else
16374 pgac_cv_var_rl_filename_quoting_function=no
16376 rm -f core conftest.err conftest.$ac_objext \
16377 conftest$ac_exeext conftest.$ac_ext
16379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
16380 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
16381 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
16383 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
16387 for ac_func in append_history history_truncate_file rl_completion_matches rl_filename_completion_function rl_reset_screen_size rl_variable_bind
16388 do :
16389 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16390 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16391 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16392 cat >>confdefs.h <<_ACEOF
16393 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16394 _ACEOF
16397 done
16402 # This test makes sure that run tests work at all. Sometimes a shared
16403 # library is found by the linker, but the runtime linker can't find it.
16404 # This check should come after all modifications of compiler or linker
16405 # variables, and before any other run tests.
16406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16407 $as_echo_n "checking test program... " >&6; }
16408 if test "$cross_compiling" = yes; then :
16409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16410 $as_echo "cross-compiling" >&6; }
16411 else
16412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16413 /* end confdefs.h. */
16414 int main() { return 0; }
16415 _ACEOF
16416 if ac_fn_c_try_run "$LINENO"; then :
16417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16418 $as_echo "ok" >&6; }
16419 else
16420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16421 $as_echo "failed" >&6; }
16422 as_fn_error $? "
16423 Could not execute a simple test program. This may be a problem
16424 related to locating shared libraries. Check the file 'config.log'
16425 for the exact reason." "$LINENO" 5
16427 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16428 conftest.$ac_objext conftest.beam conftest.$ac_ext
16432 # --------------------
16433 # Run tests below here
16434 # --------------------
16437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16438 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16439 if ${pgac_cv_type_long_int_64+:} false; then :
16440 $as_echo_n "(cached) " >&6
16441 else
16442 if test "$cross_compiling" = yes; then :
16443 # If cross-compiling, check the size reported by the compiler and
16444 # trust that the arithmetic works.
16445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16446 /* end confdefs.h. */
16449 main ()
16451 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16452 test_array [0] = 0;
16453 return test_array [0];
16456 return 0;
16458 _ACEOF
16459 if ac_fn_c_try_compile "$LINENO"; then :
16460 pgac_cv_type_long_int_64=yes
16461 else
16462 pgac_cv_type_long_int_64=no
16464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16465 else
16466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16467 /* end confdefs.h. */
16468 typedef long int ac_int64;
16471 * These are globals to discourage the compiler from folding all the
16472 * arithmetic tests down to compile-time constants.
16474 ac_int64 a = 20000001;
16475 ac_int64 b = 40000005;
16477 int does_int64_work()
16479 ac_int64 c,d;
16481 if (sizeof(ac_int64) != 8)
16482 return 0; /* definitely not the right size */
16484 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16485 c = a * b;
16486 d = (c + b) / b;
16487 if (d != a+1)
16488 return 0;
16489 return 1;
16493 main() {
16494 return (! does_int64_work());
16496 _ACEOF
16497 if ac_fn_c_try_run "$LINENO"; then :
16498 pgac_cv_type_long_int_64=yes
16499 else
16500 pgac_cv_type_long_int_64=no
16502 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16503 conftest.$ac_objext conftest.beam conftest.$ac_ext
16507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16508 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16510 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16511 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16513 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16518 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16519 pg_int64_type="long int"
16520 else
16521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16522 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16523 if ${pgac_cv_type_long_long_int_64+:} false; then :
16524 $as_echo_n "(cached) " >&6
16525 else
16526 if test "$cross_compiling" = yes; then :
16527 # If cross-compiling, check the size reported by the compiler and
16528 # trust that the arithmetic works.
16529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16530 /* end confdefs.h. */
16533 main ()
16535 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16536 test_array [0] = 0;
16537 return test_array [0];
16540 return 0;
16542 _ACEOF
16543 if ac_fn_c_try_compile "$LINENO"; then :
16544 pgac_cv_type_long_long_int_64=yes
16545 else
16546 pgac_cv_type_long_long_int_64=no
16548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16549 else
16550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16551 /* end confdefs.h. */
16552 typedef long long int ac_int64;
16555 * These are globals to discourage the compiler from folding all the
16556 * arithmetic tests down to compile-time constants.
16558 ac_int64 a = 20000001;
16559 ac_int64 b = 40000005;
16561 int does_int64_work()
16563 ac_int64 c,d;
16565 if (sizeof(ac_int64) != 8)
16566 return 0; /* definitely not the right size */
16568 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16569 c = a * b;
16570 d = (c + b) / b;
16571 if (d != a+1)
16572 return 0;
16573 return 1;
16577 main() {
16578 return (! does_int64_work());
16580 _ACEOF
16581 if ac_fn_c_try_run "$LINENO"; then :
16582 pgac_cv_type_long_long_int_64=yes
16583 else
16584 pgac_cv_type_long_long_int_64=no
16586 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16587 conftest.$ac_objext conftest.beam conftest.$ac_ext
16591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16592 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16594 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16595 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16597 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16601 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16602 pg_int64_type="long long int"
16603 else
16604 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16609 cat >>confdefs.h <<_ACEOF
16610 #define PG_INT64_TYPE $pg_int64_type
16611 _ACEOF
16614 # Select the printf length modifier that goes with that, too.
16615 if test x"$pg_int64_type" = x"long long int" ; then
16616 INT64_MODIFIER='"ll"'
16617 else
16618 INT64_MODIFIER='"l"'
16622 cat >>confdefs.h <<_ACEOF
16623 #define INT64_MODIFIER $INT64_MODIFIER
16624 _ACEOF
16627 # has to be down here, rather than with the other builtins, because
16628 # the test uses PG_INT64_TYPE.
16629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16630 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16631 if ${pgac_cv__builtin_op_overflow+:} false; then :
16632 $as_echo_n "(cached) " >&6
16633 else
16634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16635 /* end confdefs.h. */
16637 PG_INT64_TYPE a = 1;
16638 PG_INT64_TYPE b = 1;
16639 PG_INT64_TYPE result;
16640 int oflo;
16643 main ()
16645 oflo = __builtin_mul_overflow(a, b, &result);
16647 return 0;
16649 _ACEOF
16650 if ac_fn_c_try_link "$LINENO"; then :
16651 pgac_cv__builtin_op_overflow=yes
16652 else
16653 pgac_cv__builtin_op_overflow=no
16655 rm -f core conftest.err conftest.$ac_objext \
16656 conftest$ac_exeext conftest.$ac_ext
16658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16659 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16660 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16662 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16666 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16667 # The cast to long int works around a bug in the HP C Compiler
16668 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16669 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16670 # This bug is HP SR number 8606223364.
16671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16672 $as_echo_n "checking size of void *... " >&6; }
16673 if ${ac_cv_sizeof_void_p+:} false; then :
16674 $as_echo_n "(cached) " >&6
16675 else
16676 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
16678 else
16679 if test "$ac_cv_type_void_p" = yes; then
16680 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16681 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16682 as_fn_error 77 "cannot compute sizeof (void *)
16683 See \`config.log' for more details" "$LINENO" 5; }
16684 else
16685 ac_cv_sizeof_void_p=0
16690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16691 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16695 cat >>confdefs.h <<_ACEOF
16696 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16697 _ACEOF
16700 # The cast to long int works around a bug in the HP C Compiler
16701 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16702 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16703 # This bug is HP SR number 8606223364.
16704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16705 $as_echo_n "checking size of size_t... " >&6; }
16706 if ${ac_cv_sizeof_size_t+:} false; then :
16707 $as_echo_n "(cached) " >&6
16708 else
16709 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
16711 else
16712 if test "$ac_cv_type_size_t" = yes; then
16713 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16714 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16715 as_fn_error 77 "cannot compute sizeof (size_t)
16716 See \`config.log' for more details" "$LINENO" 5; }
16717 else
16718 ac_cv_sizeof_size_t=0
16723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16724 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16728 cat >>confdefs.h <<_ACEOF
16729 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16730 _ACEOF
16733 # The cast to long int works around a bug in the HP C Compiler
16734 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16735 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16736 # This bug is HP SR number 8606223364.
16737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16738 $as_echo_n "checking size of long... " >&6; }
16739 if ${ac_cv_sizeof_long+:} false; then :
16740 $as_echo_n "(cached) " >&6
16741 else
16742 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
16744 else
16745 if test "$ac_cv_type_long" = yes; then
16746 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16747 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16748 as_fn_error 77 "cannot compute sizeof (long)
16749 See \`config.log' for more details" "$LINENO" 5; }
16750 else
16751 ac_cv_sizeof_long=0
16756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16757 $as_echo "$ac_cv_sizeof_long" >&6; }
16761 cat >>confdefs.h <<_ACEOF
16762 #define SIZEOF_LONG $ac_cv_sizeof_long
16763 _ACEOF
16767 # Determine memory alignment requirements for the basic C data types.
16769 # The cast to long int works around a bug in the HP C Compiler,
16770 # see AC_CHECK_SIZEOF for more information.
16771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16772 $as_echo_n "checking alignment of short... " >&6; }
16773 if ${ac_cv_alignof_short+:} false; then :
16774 $as_echo_n "(cached) " >&6
16775 else
16776 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
16777 #ifndef offsetof
16778 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16779 #endif
16780 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16782 else
16783 if test "$ac_cv_type_short" = yes; then
16784 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16785 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16786 as_fn_error 77 "cannot compute alignment of short
16787 See \`config.log' for more details" "$LINENO" 5; }
16788 else
16789 ac_cv_alignof_short=0
16794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16795 $as_echo "$ac_cv_alignof_short" >&6; }
16799 cat >>confdefs.h <<_ACEOF
16800 #define ALIGNOF_SHORT $ac_cv_alignof_short
16801 _ACEOF
16804 # The cast to long int works around a bug in the HP C Compiler,
16805 # see AC_CHECK_SIZEOF for more information.
16806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16807 $as_echo_n "checking alignment of int... " >&6; }
16808 if ${ac_cv_alignof_int+:} false; then :
16809 $as_echo_n "(cached) " >&6
16810 else
16811 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
16812 #ifndef offsetof
16813 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16814 #endif
16815 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16817 else
16818 if test "$ac_cv_type_int" = yes; then
16819 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16820 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16821 as_fn_error 77 "cannot compute alignment of int
16822 See \`config.log' for more details" "$LINENO" 5; }
16823 else
16824 ac_cv_alignof_int=0
16829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16830 $as_echo "$ac_cv_alignof_int" >&6; }
16834 cat >>confdefs.h <<_ACEOF
16835 #define ALIGNOF_INT $ac_cv_alignof_int
16836 _ACEOF
16839 # The cast to long int works around a bug in the HP C Compiler,
16840 # see AC_CHECK_SIZEOF for more information.
16841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16842 $as_echo_n "checking alignment of long... " >&6; }
16843 if ${ac_cv_alignof_long+:} false; then :
16844 $as_echo_n "(cached) " >&6
16845 else
16846 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
16847 #ifndef offsetof
16848 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16849 #endif
16850 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16852 else
16853 if test "$ac_cv_type_long" = yes; then
16854 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16855 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16856 as_fn_error 77 "cannot compute alignment of long
16857 See \`config.log' for more details" "$LINENO" 5; }
16858 else
16859 ac_cv_alignof_long=0
16864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16865 $as_echo "$ac_cv_alignof_long" >&6; }
16869 cat >>confdefs.h <<_ACEOF
16870 #define ALIGNOF_LONG $ac_cv_alignof_long
16871 _ACEOF
16874 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16875 # The cast to long int works around a bug in the HP C Compiler,
16876 # see AC_CHECK_SIZEOF for more information.
16877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16878 $as_echo_n "checking alignment of long long int... " >&6; }
16879 if ${ac_cv_alignof_long_long_int+:} false; then :
16880 $as_echo_n "(cached) " >&6
16881 else
16882 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
16883 #ifndef offsetof
16884 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16885 #endif
16886 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16888 else
16889 if test "$ac_cv_type_long_long_int" = yes; then
16890 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16891 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16892 as_fn_error 77 "cannot compute alignment of long long int
16893 See \`config.log' for more details" "$LINENO" 5; }
16894 else
16895 ac_cv_alignof_long_long_int=0
16900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16901 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
16905 cat >>confdefs.h <<_ACEOF
16906 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16907 _ACEOF
16911 # The cast to long int works around a bug in the HP C Compiler,
16912 # see AC_CHECK_SIZEOF for more information.
16913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16914 $as_echo_n "checking alignment of double... " >&6; }
16915 if ${ac_cv_alignof_double+:} false; then :
16916 $as_echo_n "(cached) " >&6
16917 else
16918 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
16919 #ifndef offsetof
16920 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16921 #endif
16922 typedef struct { char x; double y; } ac__type_alignof_;"; then :
16924 else
16925 if test "$ac_cv_type_double" = yes; then
16926 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16927 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16928 as_fn_error 77 "cannot compute alignment of double
16929 See \`config.log' for more details" "$LINENO" 5; }
16930 else
16931 ac_cv_alignof_double=0
16936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
16937 $as_echo "$ac_cv_alignof_double" >&6; }
16941 cat >>confdefs.h <<_ACEOF
16942 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
16943 _ACEOF
16947 # Compute maximum alignment of any basic type.
16949 # We require 'double' to have the strictest alignment among the basic types,
16950 # because otherwise the C ABI might impose 8-byte alignment on some of the
16951 # other C types that correspond to TYPALIGN_DOUBLE SQL types. That could
16952 # cause a mismatch between the tuple layout and the C struct layout of a
16953 # catalog tuple. We used to carefully order catalog columns such that any
16954 # fixed-width, attalign=4 columns were at offsets divisible by 8 regardless
16955 # of MAXIMUM_ALIGNOF to avoid that, but we no longer support any platforms
16956 # where TYPALIGN_DOUBLE != MAXIMUM_ALIGNOF.
16958 # We assume without checking that long's alignment is at least as strong as
16959 # char, short, or int. Note that we intentionally do not consider any types
16960 # wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8 would be too
16961 # much of a penalty for disk and memory space.
16963 MAX_ALIGNOF=$ac_cv_alignof_double
16965 if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
16966 as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5
16968 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $ac_cv_alignof_long_long_int -gt $MAX_ALIGNOF ; then
16969 as_fn_error $? "alignment of 'long long int' is greater than the alignment of 'double'" "$LINENO" 5
16972 cat >>confdefs.h <<_ACEOF
16973 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
16974 _ACEOF
16978 # Some platforms predefine the types int8, int16, etc. Only check
16979 # a (hopefully) representative subset.
16980 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
16982 if test "x$ac_cv_type_int8" = xyes; then :
16984 cat >>confdefs.h <<_ACEOF
16985 #define HAVE_INT8 1
16986 _ACEOF
16990 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
16992 if test "x$ac_cv_type_uint8" = xyes; then :
16994 cat >>confdefs.h <<_ACEOF
16995 #define HAVE_UINT8 1
16996 _ACEOF
17000 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17002 if test "x$ac_cv_type_int64" = xyes; then :
17004 cat >>confdefs.h <<_ACEOF
17005 #define HAVE_INT64 1
17006 _ACEOF
17010 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17012 if test "x$ac_cv_type_uint64" = xyes; then :
17014 cat >>confdefs.h <<_ACEOF
17015 #define HAVE_UINT64 1
17016 _ACEOF
17022 # Some compilers offer a 128-bit integer scalar type.
17023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17024 $as_echo_n "checking for __int128... " >&6; }
17025 if ${pgac_cv__128bit_int+:} false; then :
17026 $as_echo_n "(cached) " >&6
17027 else
17028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17029 /* end confdefs.h. */
17032 * We don't actually run this test, just link it to verify that any support
17033 * functions needed for __int128 are present.
17035 * These are globals to discourage the compiler from folding all the
17036 * arithmetic tests down to compile-time constants. We do not have
17037 * convenient support for 128bit literals at this point...
17039 __int128 a = 48828125;
17040 __int128 b = 97656250;
17043 main ()
17046 __int128 c,d;
17047 a = (a << 12) + 1; /* 200000000001 */
17048 b = (b << 12) + 5; /* 400000000005 */
17049 /* try the most relevant arithmetic ops */
17050 c = a * b;
17051 d = (c + b) / b;
17052 /* must use the results, else compiler may optimize arithmetic away */
17053 if (d != a+1)
17054 return 1;
17057 return 0;
17059 _ACEOF
17060 if ac_fn_c_try_link "$LINENO"; then :
17061 pgac_cv__128bit_int=yes
17062 else
17063 pgac_cv__128bit_int=no
17065 rm -f core conftest.err conftest.$ac_objext \
17066 conftest$ac_exeext conftest.$ac_ext
17068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17069 $as_echo "$pgac_cv__128bit_int" >&6; }
17070 if test x"$pgac_cv__128bit_int" = xyes ; then
17071 # Use of non-default alignment with __int128 tickles bugs in some compilers.
17072 # If not cross-compiling, we can test for bugs and disable use of __int128
17073 # with buggy compilers. If cross-compiling, hope for the best.
17074 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17076 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17077 if ${pgac_cv__128bit_int_bug+:} false; then :
17078 $as_echo_n "(cached) " >&6
17079 else
17080 if test "$cross_compiling" = yes; then :
17081 pgac_cv__128bit_int_bug="assuming ok"
17082 else
17083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17084 /* end confdefs.h. */
17086 /* This must match the corresponding code in c.h: */
17087 #if defined(__GNUC__) || defined(__SUNPRO_C)
17088 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17089 #elif defined(_MSC_VER)
17090 #define pg_attribute_aligned(a) __declspec(align(a))
17091 #endif
17092 typedef __int128 int128a
17093 #if defined(pg_attribute_aligned)
17094 pg_attribute_aligned(8)
17095 #endif
17097 int128a holder;
17098 void pass_by_val(void *buffer, int128a par) { holder = par; }
17101 main ()
17104 long int i64 = 97656225L << 12;
17105 int128a q;
17106 pass_by_val(main, (int128a) i64);
17107 q = (int128a) i64;
17108 if (q != holder)
17109 return 1;
17112 return 0;
17114 _ACEOF
17115 if ac_fn_c_try_run "$LINENO"; then :
17116 pgac_cv__128bit_int_bug=ok
17117 else
17118 pgac_cv__128bit_int_bug=broken
17120 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17121 conftest.$ac_objext conftest.beam conftest.$ac_ext
17125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17126 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17127 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17129 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17131 # The cast to long int works around a bug in the HP C Compiler,
17132 # see AC_CHECK_SIZEOF for more information.
17133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17134 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17135 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17136 $as_echo_n "(cached) " >&6
17137 else
17138 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
17139 #ifndef offsetof
17140 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17141 #endif
17142 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17144 else
17145 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17146 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17147 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17148 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17149 See \`config.log' for more details" "$LINENO" 5; }
17150 else
17151 ac_cv_alignof_PG_INT128_TYPE=0
17156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17157 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17161 cat >>confdefs.h <<_ACEOF
17162 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17163 _ACEOF
17169 # Check for various atomic operations now that we have checked how to declare
17170 # 64bit integers.
17171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17172 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17173 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17174 $as_echo_n "(cached) " >&6
17175 else
17176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17177 /* end confdefs.h. */
17180 main ()
17182 char lock = 0;
17183 __sync_lock_test_and_set(&lock, 1);
17184 __sync_lock_release(&lock);
17186 return 0;
17188 _ACEOF
17189 if ac_fn_c_try_link "$LINENO"; then :
17190 pgac_cv_gcc_sync_char_tas="yes"
17191 else
17192 pgac_cv_gcc_sync_char_tas="no"
17194 rm -f core conftest.err conftest.$ac_objext \
17195 conftest$ac_exeext conftest.$ac_ext
17197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17198 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17199 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17201 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17205 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17206 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17207 $as_echo_n "(cached) " >&6
17208 else
17209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17210 /* end confdefs.h. */
17213 main ()
17215 int lock = 0;
17216 __sync_lock_test_and_set(&lock, 1);
17217 __sync_lock_release(&lock);
17219 return 0;
17221 _ACEOF
17222 if ac_fn_c_try_link "$LINENO"; then :
17223 pgac_cv_gcc_sync_int32_tas="yes"
17224 else
17225 pgac_cv_gcc_sync_int32_tas="no"
17227 rm -f core conftest.err conftest.$ac_objext \
17228 conftest$ac_exeext conftest.$ac_ext
17230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17231 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17232 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17234 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17238 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17239 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17240 $as_echo_n "(cached) " >&6
17241 else
17242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17243 /* end confdefs.h. */
17246 main ()
17248 int val = 0;
17249 __sync_val_compare_and_swap(&val, 0, 37);
17251 return 0;
17253 _ACEOF
17254 if ac_fn_c_try_link "$LINENO"; then :
17255 pgac_cv_gcc_sync_int32_cas="yes"
17256 else
17257 pgac_cv_gcc_sync_int32_cas="no"
17259 rm -f core conftest.err conftest.$ac_objext \
17260 conftest$ac_exeext conftest.$ac_ext
17262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17263 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17264 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17266 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17270 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17271 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17272 $as_echo_n "(cached) " >&6
17273 else
17274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17275 /* end confdefs.h. */
17278 main ()
17280 PG_INT64_TYPE lock = 0;
17281 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17283 return 0;
17285 _ACEOF
17286 if ac_fn_c_try_link "$LINENO"; then :
17287 pgac_cv_gcc_sync_int64_cas="yes"
17288 else
17289 pgac_cv_gcc_sync_int64_cas="no"
17291 rm -f core conftest.err conftest.$ac_objext \
17292 conftest$ac_exeext conftest.$ac_ext
17294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17295 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17296 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17298 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17302 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17303 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17304 $as_echo_n "(cached) " >&6
17305 else
17306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17307 /* end confdefs.h. */
17310 main ()
17312 int val = 0;
17313 int expect = 0;
17314 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17316 return 0;
17318 _ACEOF
17319 if ac_fn_c_try_link "$LINENO"; then :
17320 pgac_cv_gcc_atomic_int32_cas="yes"
17321 else
17322 pgac_cv_gcc_atomic_int32_cas="no"
17324 rm -f core conftest.err conftest.$ac_objext \
17325 conftest$ac_exeext conftest.$ac_ext
17327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17328 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17329 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17331 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17335 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17336 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17337 $as_echo_n "(cached) " >&6
17338 else
17339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17340 /* end confdefs.h. */
17343 main ()
17345 PG_INT64_TYPE val = 0;
17346 PG_INT64_TYPE expect = 0;
17347 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17349 return 0;
17351 _ACEOF
17352 if ac_fn_c_try_link "$LINENO"; then :
17353 pgac_cv_gcc_atomic_int64_cas="yes"
17354 else
17355 pgac_cv_gcc_atomic_int64_cas="no"
17357 rm -f core conftest.err conftest.$ac_objext \
17358 conftest$ac_exeext conftest.$ac_ext
17360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17361 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17362 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17364 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17369 # Check for x86 cpuid instruction
17370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17371 $as_echo_n "checking for __get_cpuid... " >&6; }
17372 if ${pgac_cv__get_cpuid+:} false; then :
17373 $as_echo_n "(cached) " >&6
17374 else
17375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17376 /* end confdefs.h. */
17377 #include <cpuid.h>
17379 main ()
17381 unsigned int exx[4] = {0, 0, 0, 0};
17382 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17385 return 0;
17387 _ACEOF
17388 if ac_fn_c_try_link "$LINENO"; then :
17389 pgac_cv__get_cpuid="yes"
17390 else
17391 pgac_cv__get_cpuid="no"
17393 rm -f core conftest.err conftest.$ac_objext \
17394 conftest$ac_exeext conftest.$ac_ext
17396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17397 $as_echo "$pgac_cv__get_cpuid" >&6; }
17398 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17400 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid_count" >&5
17405 $as_echo_n "checking for __get_cpuid_count... " >&6; }
17406 if ${pgac_cv__get_cpuid_count+:} false; then :
17407 $as_echo_n "(cached) " >&6
17408 else
17409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17410 /* end confdefs.h. */
17411 #include <cpuid.h>
17413 main ()
17415 unsigned int exx[4] = {0, 0, 0, 0};
17416 __get_cpuid_count(7, 0, &exx[0], &exx[1], &exx[2], &exx[3]);
17419 return 0;
17421 _ACEOF
17422 if ac_fn_c_try_link "$LINENO"; then :
17423 pgac_cv__get_cpuid_count="yes"
17424 else
17425 pgac_cv__get_cpuid_count="no"
17427 rm -f core conftest.err conftest.$ac_objext \
17428 conftest$ac_exeext conftest.$ac_ext
17430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid_count" >&5
17431 $as_echo "$pgac_cv__get_cpuid_count" >&6; }
17432 if test x"$pgac_cv__get_cpuid_count" = x"yes"; then
17434 $as_echo "#define HAVE__GET_CPUID_COUNT 1" >>confdefs.h
17438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17439 $as_echo_n "checking for __cpuid... " >&6; }
17440 if ${pgac_cv__cpuid+:} false; then :
17441 $as_echo_n "(cached) " >&6
17442 else
17443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17444 /* end confdefs.h. */
17445 #include <intrin.h>
17447 main ()
17449 unsigned int exx[4] = {0, 0, 0, 0};
17450 __get_cpuid(exx[0], 1);
17453 return 0;
17455 _ACEOF
17456 if ac_fn_c_try_link "$LINENO"; then :
17457 pgac_cv__cpuid="yes"
17458 else
17459 pgac_cv__cpuid="no"
17461 rm -f core conftest.err conftest.$ac_objext \
17462 conftest$ac_exeext conftest.$ac_ext
17464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17465 $as_echo "$pgac_cv__cpuid" >&6; }
17466 if test x"$pgac_cv__cpuid" = x"yes"; then
17468 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuidex" >&5
17473 $as_echo_n "checking for __cpuidex... " >&6; }
17474 if ${pgac_cv__cpuidex+:} false; then :
17475 $as_echo_n "(cached) " >&6
17476 else
17477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17478 /* end confdefs.h. */
17479 #include <intrin.h>
17481 main ()
17483 unsigned int exx[4] = {0, 0, 0, 0};
17484 __get_cpuidex(exx[0], 7, 0);
17487 return 0;
17489 _ACEOF
17490 if ac_fn_c_try_link "$LINENO"; then :
17491 pgac_cv__cpuidex="yes"
17492 else
17493 pgac_cv__cpuidex="no"
17495 rm -f core conftest.err conftest.$ac_objext \
17496 conftest$ac_exeext conftest.$ac_ext
17498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuidex" >&5
17499 $as_echo "$pgac_cv__cpuidex" >&6; }
17500 if test x"$pgac_cv__cpuidex" = x"yes"; then
17502 $as_echo "#define HAVE__CPUIDEX 1" >>confdefs.h
17506 # Check for XSAVE intrinsics
17508 CFLAGS_XSAVE=""
17509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xgetbv with CFLAGS=" >&5
17510 $as_echo_n "checking for _xgetbv with CFLAGS=... " >&6; }
17511 if ${pgac_cv_xsave_intrinsics_+:} false; then :
17512 $as_echo_n "(cached) " >&6
17513 else
17514 pgac_save_CFLAGS=$CFLAGS
17515 CFLAGS="$pgac_save_CFLAGS "
17516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17517 /* end confdefs.h. */
17518 #include <immintrin.h>
17520 main ()
17522 return _xgetbv(0) & 0xe0;
17524 return 0;
17526 _ACEOF
17527 if ac_fn_c_try_link "$LINENO"; then :
17528 pgac_cv_xsave_intrinsics_=yes
17529 else
17530 pgac_cv_xsave_intrinsics_=no
17532 rm -f core conftest.err conftest.$ac_objext \
17533 conftest$ac_exeext conftest.$ac_ext
17534 CFLAGS="$pgac_save_CFLAGS"
17536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_xsave_intrinsics_" >&5
17537 $as_echo "$pgac_cv_xsave_intrinsics_" >&6; }
17538 if test x"$pgac_cv_xsave_intrinsics_" = x"yes"; then
17539 CFLAGS_XSAVE=""
17540 pgac_xsave_intrinsics=yes
17543 if test x"$pgac_xsave_intrinsics" != x"yes"; then
17544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xgetbv with CFLAGS=-mxsave" >&5
17545 $as_echo_n "checking for _xgetbv with CFLAGS=-mxsave... " >&6; }
17546 if ${pgac_cv_xsave_intrinsics__mxsave+:} false; then :
17547 $as_echo_n "(cached) " >&6
17548 else
17549 pgac_save_CFLAGS=$CFLAGS
17550 CFLAGS="$pgac_save_CFLAGS -mxsave"
17551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17552 /* end confdefs.h. */
17553 #include <immintrin.h>
17555 main ()
17557 return _xgetbv(0) & 0xe0;
17559 return 0;
17561 _ACEOF
17562 if ac_fn_c_try_link "$LINENO"; then :
17563 pgac_cv_xsave_intrinsics__mxsave=yes
17564 else
17565 pgac_cv_xsave_intrinsics__mxsave=no
17567 rm -f core conftest.err conftest.$ac_objext \
17568 conftest$ac_exeext conftest.$ac_ext
17569 CFLAGS="$pgac_save_CFLAGS"
17571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_xsave_intrinsics__mxsave" >&5
17572 $as_echo "$pgac_cv_xsave_intrinsics__mxsave" >&6; }
17573 if test x"$pgac_cv_xsave_intrinsics__mxsave" = x"yes"; then
17574 CFLAGS_XSAVE="-mxsave"
17575 pgac_xsave_intrinsics=yes
17579 if test x"$pgac_xsave_intrinsics" = x"yes"; then
17581 $as_echo "#define HAVE_XSAVE_INTRINSICS 1" >>confdefs.h
17586 # Check for AVX-512 popcount intrinsics
17588 CFLAGS_POPCNT=""
17589 PG_POPCNT_OBJS=""
17590 if test x"$host_cpu" = x"x86_64"; then
17591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm512_popcnt_epi64 with CFLAGS=" >&5
17592 $as_echo_n "checking for _mm512_popcnt_epi64 with CFLAGS=... " >&6; }
17593 if ${pgac_cv_avx512_popcnt_intrinsics_+:} false; then :
17594 $as_echo_n "(cached) " >&6
17595 else
17596 pgac_save_CFLAGS=$CFLAGS
17597 CFLAGS="$pgac_save_CFLAGS "
17598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17599 /* end confdefs.h. */
17600 #include <immintrin.h>
17602 main ()
17604 const char buf[sizeof(__m512i)];
17605 PG_INT64_TYPE popcnt = 0;
17606 __m512i accum = _mm512_setzero_si512();
17607 const __m512i val = _mm512_maskz_loadu_epi8((__mmask64) 0xf0f0f0f0f0f0f0f0, (const __m512i *) buf);
17608 const __m512i cnt = _mm512_popcnt_epi64(val);
17609 accum = _mm512_add_epi64(accum, cnt);
17610 popcnt = _mm512_reduce_add_epi64(accum);
17611 /* return computed value, to prevent the above being optimized away */
17612 return popcnt == 0;
17614 return 0;
17616 _ACEOF
17617 if ac_fn_c_try_link "$LINENO"; then :
17618 pgac_cv_avx512_popcnt_intrinsics_=yes
17619 else
17620 pgac_cv_avx512_popcnt_intrinsics_=no
17622 rm -f core conftest.err conftest.$ac_objext \
17623 conftest$ac_exeext conftest.$ac_ext
17624 CFLAGS="$pgac_save_CFLAGS"
17626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_avx512_popcnt_intrinsics_" >&5
17627 $as_echo "$pgac_cv_avx512_popcnt_intrinsics_" >&6; }
17628 if test x"$pgac_cv_avx512_popcnt_intrinsics_" = x"yes"; then
17629 CFLAGS_POPCNT=""
17630 pgac_avx512_popcnt_intrinsics=yes
17633 if test x"$pgac_avx512_popcnt_intrinsics" != x"yes"; then
17634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm512_popcnt_epi64 with CFLAGS=-mavx512vpopcntdq -mavx512bw" >&5
17635 $as_echo_n "checking for _mm512_popcnt_epi64 with CFLAGS=-mavx512vpopcntdq -mavx512bw... " >&6; }
17636 if ${pgac_cv_avx512_popcnt_intrinsics__mavx512vpopcntdq__mavx512bw+:} false; then :
17637 $as_echo_n "(cached) " >&6
17638 else
17639 pgac_save_CFLAGS=$CFLAGS
17640 CFLAGS="$pgac_save_CFLAGS -mavx512vpopcntdq -mavx512bw"
17641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17642 /* end confdefs.h. */
17643 #include <immintrin.h>
17645 main ()
17647 const char buf[sizeof(__m512i)];
17648 PG_INT64_TYPE popcnt = 0;
17649 __m512i accum = _mm512_setzero_si512();
17650 const __m512i val = _mm512_maskz_loadu_epi8((__mmask64) 0xf0f0f0f0f0f0f0f0, (const __m512i *) buf);
17651 const __m512i cnt = _mm512_popcnt_epi64(val);
17652 accum = _mm512_add_epi64(accum, cnt);
17653 popcnt = _mm512_reduce_add_epi64(accum);
17654 /* return computed value, to prevent the above being optimized away */
17655 return popcnt == 0;
17657 return 0;
17659 _ACEOF
17660 if ac_fn_c_try_link "$LINENO"; then :
17661 pgac_cv_avx512_popcnt_intrinsics__mavx512vpopcntdq__mavx512bw=yes
17662 else
17663 pgac_cv_avx512_popcnt_intrinsics__mavx512vpopcntdq__mavx512bw=no
17665 rm -f core conftest.err conftest.$ac_objext \
17666 conftest$ac_exeext conftest.$ac_ext
17667 CFLAGS="$pgac_save_CFLAGS"
17669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_avx512_popcnt_intrinsics__mavx512vpopcntdq__mavx512bw" >&5
17670 $as_echo "$pgac_cv_avx512_popcnt_intrinsics__mavx512vpopcntdq__mavx512bw" >&6; }
17671 if test x"$pgac_cv_avx512_popcnt_intrinsics__mavx512vpopcntdq__mavx512bw" = x"yes"; then
17672 CFLAGS_POPCNT="-mavx512vpopcntdq -mavx512bw"
17673 pgac_avx512_popcnt_intrinsics=yes
17677 if test x"$pgac_avx512_popcnt_intrinsics" = x"yes"; then
17678 PG_POPCNT_OBJS="pg_popcount_avx512.o pg_popcount_avx512_choose.o"
17680 $as_echo "#define USE_AVX512_POPCNT_WITH_RUNTIME_CHECK 1" >>confdefs.h
17687 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17689 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17690 # with the default compiler flags. If not, check if adding the -msse4.2
17691 # flag helps. CFLAGS_CRC is set to -msse4.2 if that's required.
17692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17693 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17694 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17695 $as_echo_n "(cached) " >&6
17696 else
17697 pgac_save_CFLAGS=$CFLAGS
17698 CFLAGS="$pgac_save_CFLAGS "
17699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17700 /* end confdefs.h. */
17701 #include <nmmintrin.h>
17703 main ()
17705 unsigned int crc = 0;
17706 crc = _mm_crc32_u8(crc, 0);
17707 crc = _mm_crc32_u32(crc, 0);
17708 /* return computed value, to prevent the above being optimized away */
17709 return crc == 0;
17711 return 0;
17713 _ACEOF
17714 if ac_fn_c_try_link "$LINENO"; then :
17715 pgac_cv_sse42_crc32_intrinsics_=yes
17716 else
17717 pgac_cv_sse42_crc32_intrinsics_=no
17719 rm -f core conftest.err conftest.$ac_objext \
17720 conftest$ac_exeext conftest.$ac_ext
17721 CFLAGS="$pgac_save_CFLAGS"
17723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17724 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17725 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17726 CFLAGS_CRC=""
17727 pgac_sse42_crc32_intrinsics=yes
17730 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17732 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17733 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17734 $as_echo_n "(cached) " >&6
17735 else
17736 pgac_save_CFLAGS=$CFLAGS
17737 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17739 /* end confdefs.h. */
17740 #include <nmmintrin.h>
17742 main ()
17744 unsigned int crc = 0;
17745 crc = _mm_crc32_u8(crc, 0);
17746 crc = _mm_crc32_u32(crc, 0);
17747 /* return computed value, to prevent the above being optimized away */
17748 return crc == 0;
17750 return 0;
17752 _ACEOF
17753 if ac_fn_c_try_link "$LINENO"; then :
17754 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17755 else
17756 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17758 rm -f core conftest.err conftest.$ac_objext \
17759 conftest$ac_exeext conftest.$ac_ext
17760 CFLAGS="$pgac_save_CFLAGS"
17762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17763 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17764 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17765 CFLAGS_CRC="-msse4.2"
17766 pgac_sse42_crc32_intrinsics=yes
17771 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17772 # define __SSE4_2__ in that case.
17773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17774 /* end confdefs.h. */
17777 main ()
17780 #ifndef __SSE4_2__
17781 #error __SSE4_2__ not defined
17782 #endif
17785 return 0;
17787 _ACEOF
17788 if ac_fn_c_try_compile "$LINENO"; then :
17789 SSE4_2_TARGETED=1
17791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17793 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17795 # First check if __crc32c* intrinsics can be used with the default compiler
17796 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17797 # CFLAGS_CRC is set if the extra flag is required.
17798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17799 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17800 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17801 $as_echo_n "(cached) " >&6
17802 else
17803 pgac_save_CFLAGS=$CFLAGS
17804 CFLAGS="$pgac_save_CFLAGS "
17805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17806 /* end confdefs.h. */
17807 #include <arm_acle.h>
17809 main ()
17811 unsigned int crc = 0;
17812 crc = __crc32cb(crc, 0);
17813 crc = __crc32ch(crc, 0);
17814 crc = __crc32cw(crc, 0);
17815 crc = __crc32cd(crc, 0);
17816 /* return computed value, to prevent the above being optimized away */
17817 return crc == 0;
17819 return 0;
17821 _ACEOF
17822 if ac_fn_c_try_link "$LINENO"; then :
17823 pgac_cv_armv8_crc32c_intrinsics_=yes
17824 else
17825 pgac_cv_armv8_crc32c_intrinsics_=no
17827 rm -f core conftest.err conftest.$ac_objext \
17828 conftest$ac_exeext conftest.$ac_ext
17829 CFLAGS="$pgac_save_CFLAGS"
17831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17832 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17833 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17834 CFLAGS_CRC=""
17835 pgac_armv8_crc32c_intrinsics=yes
17838 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17840 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17841 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17842 $as_echo_n "(cached) " >&6
17843 else
17844 pgac_save_CFLAGS=$CFLAGS
17845 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17847 /* end confdefs.h. */
17848 #include <arm_acle.h>
17850 main ()
17852 unsigned int crc = 0;
17853 crc = __crc32cb(crc, 0);
17854 crc = __crc32ch(crc, 0);
17855 crc = __crc32cw(crc, 0);
17856 crc = __crc32cd(crc, 0);
17857 /* return computed value, to prevent the above being optimized away */
17858 return crc == 0;
17860 return 0;
17862 _ACEOF
17863 if ac_fn_c_try_link "$LINENO"; then :
17864 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17865 else
17866 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17868 rm -f core conftest.err conftest.$ac_objext \
17869 conftest$ac_exeext conftest.$ac_ext
17870 CFLAGS="$pgac_save_CFLAGS"
17872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17873 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17874 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17875 CFLAGS_CRC="-march=armv8-a+crc"
17876 pgac_armv8_crc32c_intrinsics=yes
17881 # Check for LoongArch CRC intrinsics to do CRC calculations.
17883 # Check if __builtin_loongarch_crcc_* intrinsics can be used
17884 # with the default compiler flags.
17885 { $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
17886 $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; }
17887 if ${pgac_cv_loongarch_crc32c_intrinsics+:} false; then :
17888 $as_echo_n "(cached) " >&6
17889 else
17890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17891 /* end confdefs.h. */
17894 main ()
17896 unsigned int crc = 0;
17897 crc = __builtin_loongarch_crcc_w_b_w(0, crc);
17898 crc = __builtin_loongarch_crcc_w_h_w(0, crc);
17899 crc = __builtin_loongarch_crcc_w_w_w(0, crc);
17900 crc = __builtin_loongarch_crcc_w_d_w(0, crc);
17901 /* return computed value, to prevent the above being optimized away */
17902 return crc == 0;
17904 return 0;
17906 _ACEOF
17907 if ac_fn_c_try_link "$LINENO"; then :
17908 pgac_cv_loongarch_crc32c_intrinsics=yes
17909 else
17910 pgac_cv_loongarch_crc32c_intrinsics=no
17912 rm -f core conftest.err conftest.$ac_objext \
17913 conftest$ac_exeext conftest.$ac_ext
17915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_loongarch_crc32c_intrinsics" >&5
17916 $as_echo "$pgac_cv_loongarch_crc32c_intrinsics" >&6; }
17917 if test x"$pgac_cv_loongarch_crc32c_intrinsics" = x"yes"; then
17918 pgac_loongarch_crc32c_intrinsics=yes
17924 # Select CRC-32C implementation.
17926 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17927 # use the special CRC instructions for calculating CRC-32C. If we're not
17928 # targeting such a processor, but we can nevertheless produce code that uses
17929 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17930 # implementations and select which one to use at runtime, depending on whether
17931 # SSE 4.2 is supported by the processor we're running on.
17933 # Similarly, if we are targeting an ARM processor that has the CRC
17934 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17935 # we're not targeting such a processor, but can nevertheless produce code that
17936 # uses the CRC instructions, compile both, and select at runtime.
17938 # You can skip the runtime check by setting the appropriate USE_*_CRC32 flag to 1
17939 # in the template or configure command line.
17941 # If we are targeting a LoongArch processor, CRC instructions are
17942 # always available (at least on 64 bit), so no runtime check is needed.
17943 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
17944 # Use Intel SSE 4.2 if available.
17945 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17946 USE_SSE42_CRC32C=1
17947 else
17948 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17949 # the runtime check.
17950 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
17951 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17952 else
17953 # Use ARM CRC Extension if available.
17954 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_CRC" = x""; then
17955 USE_ARMV8_CRC32C=1
17956 else
17957 # ARM CRC Extension, with runtime check?
17958 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17959 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17960 else
17961 # LoongArch CRCC instructions.
17962 if test x"$pgac_loongarch_crc32c_intrinsics" = x"yes"; then
17963 USE_LOONGARCH_CRC32C=1
17964 else
17965 # fall back to slicing-by-8 algorithm, which doesn't require any
17966 # special CPU support.
17967 USE_SLICING_BY_8_CRC32C=1
17975 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17977 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17978 if test x"$USE_SSE42_CRC32C" = x"1"; then
17980 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17982 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17984 $as_echo "SSE 4.2" >&6; }
17985 else
17986 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17988 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17990 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17992 $as_echo "SSE 4.2 with runtime check" >&6; }
17993 else
17994 if test x"$USE_ARMV8_CRC32C" = x"1"; then
17996 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17998 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
18000 $as_echo "ARMv8 CRC instructions" >&6; }
18001 else
18002 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18004 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18006 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
18007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
18008 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
18009 else
18010 if test x"$USE_LOONGARCH_CRC32C" = x"1"; then
18012 $as_echo "#define USE_LOONGARCH_CRC32C 1" >>confdefs.h
18014 PG_CRC32C_OBJS="pg_crc32c_loongarch.o"
18015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: LoongArch CRCC instructions" >&5
18016 $as_echo "LoongArch CRCC instructions" >&6; }
18017 else
18019 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
18021 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
18022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
18023 $as_echo "slicing-by-8" >&6; }
18032 # Select semaphore implementation type.
18033 if test "$PORTNAME" != "win32"; then
18034 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
18035 # Need sem_open for this
18036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
18037 $as_echo_n "checking for library containing sem_open... " >&6; }
18038 if ${ac_cv_search_sem_open+:} false; then :
18039 $as_echo_n "(cached) " >&6
18040 else
18041 ac_func_search_save_LIBS=$LIBS
18042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18043 /* end confdefs.h. */
18045 /* Override any GCC internal prototype to avoid an error.
18046 Use char because int might match the return type of a GCC
18047 builtin and then its argument prototype would still apply. */
18048 #ifdef __cplusplus
18049 extern "C"
18050 #endif
18051 char sem_open ();
18053 main ()
18055 return sem_open ();
18057 return 0;
18059 _ACEOF
18060 for ac_lib in '' rt pthread; do
18061 if test -z "$ac_lib"; then
18062 ac_res="none required"
18063 else
18064 ac_res=-l$ac_lib
18065 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18067 if ac_fn_c_try_link "$LINENO"; then :
18068 ac_cv_search_sem_open=$ac_res
18070 rm -f core conftest.err conftest.$ac_objext \
18071 conftest$ac_exeext
18072 if ${ac_cv_search_sem_open+:} false; then :
18073 break
18075 done
18076 if ${ac_cv_search_sem_open+:} false; then :
18078 else
18079 ac_cv_search_sem_open=no
18081 rm conftest.$ac_ext
18082 LIBS=$ac_func_search_save_LIBS
18084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18085 $as_echo "$ac_cv_search_sem_open" >&6; }
18086 ac_res=$ac_cv_search_sem_open
18087 if test "$ac_res" != no; then :
18088 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18089 USE_NAMED_POSIX_SEMAPHORES=1
18093 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18094 # Need sem_init for this
18095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18096 $as_echo_n "checking for library containing sem_init... " >&6; }
18097 if ${ac_cv_search_sem_init+:} false; then :
18098 $as_echo_n "(cached) " >&6
18099 else
18100 ac_func_search_save_LIBS=$LIBS
18101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18102 /* end confdefs.h. */
18104 /* Override any GCC internal prototype to avoid an error.
18105 Use char because int might match the return type of a GCC
18106 builtin and then its argument prototype would still apply. */
18107 #ifdef __cplusplus
18108 extern "C"
18109 #endif
18110 char sem_init ();
18112 main ()
18114 return sem_init ();
18116 return 0;
18118 _ACEOF
18119 for ac_lib in '' rt pthread; do
18120 if test -z "$ac_lib"; then
18121 ac_res="none required"
18122 else
18123 ac_res=-l$ac_lib
18124 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18126 if ac_fn_c_try_link "$LINENO"; then :
18127 ac_cv_search_sem_init=$ac_res
18129 rm -f core conftest.err conftest.$ac_objext \
18130 conftest$ac_exeext
18131 if ${ac_cv_search_sem_init+:} false; then :
18132 break
18134 done
18135 if ${ac_cv_search_sem_init+:} false; then :
18137 else
18138 ac_cv_search_sem_init=no
18140 rm conftest.$ac_ext
18141 LIBS=$ac_func_search_save_LIBS
18143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18144 $as_echo "$ac_cv_search_sem_init" >&6; }
18145 ac_res=$ac_cv_search_sem_init
18146 if test "$ac_res" != no; then :
18147 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18148 USE_UNNAMED_POSIX_SEMAPHORES=1
18152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18153 $as_echo_n "checking which semaphore API to use... " >&6; }
18154 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18156 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18158 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18159 sematype="named POSIX"
18160 else
18161 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18163 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18165 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18166 sematype="unnamed POSIX"
18167 else
18169 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18171 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18172 sematype="System V"
18175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18176 $as_echo "$sematype" >&6; }
18177 else
18179 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18181 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18185 # Select shared-memory implementation type.
18186 if test "$PORTNAME" != "win32"; then
18188 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18190 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18191 else
18193 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18195 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18198 # Select random number source. If a TLS library is used then it will be the
18199 # first choice, else the native platform sources (Windows API or /dev/urandom)
18200 # will be used.
18201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18202 $as_echo_n "checking which random number source to use... " >&6; }
18203 if test x"$with_ssl" = x"openssl" ; then
18204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18205 $as_echo "OpenSSL" >&6; }
18206 elif test x"$PORTNAME" = x"win32" ; then
18207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18208 $as_echo "Windows native" >&6; }
18209 elif test x"$cross_compiling" = x"yes"; then
18210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming /dev/urandom" >&5
18211 $as_echo "assuming /dev/urandom" >&6; }
18212 else
18213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18214 $as_echo "/dev/urandom" >&6; }
18215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18216 $as_echo_n "checking for /dev/urandom... " >&6; }
18217 if ${ac_cv_file__dev_urandom+:} false; then :
18218 $as_echo_n "(cached) " >&6
18219 else
18220 test "$cross_compiling" = yes &&
18221 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18222 if test -r "/dev/urandom"; then
18223 ac_cv_file__dev_urandom=yes
18224 else
18225 ac_cv_file__dev_urandom=no
18228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18229 $as_echo "$ac_cv_file__dev_urandom" >&6; }
18230 if test "x$ac_cv_file__dev_urandom" = xyes; then :
18235 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
18236 as_fn_error $? "
18237 no source of strong random numbers was found
18238 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
18242 # If not set in template file, set bytes to use libc memset()
18243 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18244 MEMSET_LOOP_LIMIT=1024
18247 cat >>confdefs.h <<_ACEOF
18248 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18249 _ACEOF
18253 if test "$enable_nls" = yes ; then
18255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18256 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18257 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18258 $as_echo_n "(cached) " >&6
18259 else
18260 ac_func_search_save_LIBS=$LIBS
18261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18262 /* end confdefs.h. */
18264 /* Override any GCC internal prototype to avoid an error.
18265 Use char because int might match the return type of a GCC
18266 builtin and then its argument prototype would still apply. */
18267 #ifdef __cplusplus
18268 extern "C"
18269 #endif
18270 char bind_textdomain_codeset ();
18272 main ()
18274 return bind_textdomain_codeset ();
18276 return 0;
18278 _ACEOF
18279 for ac_lib in '' intl; do
18280 if test -z "$ac_lib"; then
18281 ac_res="none required"
18282 else
18283 ac_res=-l$ac_lib
18284 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18286 if ac_fn_c_try_link "$LINENO"; then :
18287 ac_cv_search_bind_textdomain_codeset=$ac_res
18289 rm -f core conftest.err conftest.$ac_objext \
18290 conftest$ac_exeext
18291 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18292 break
18294 done
18295 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18297 else
18298 ac_cv_search_bind_textdomain_codeset=no
18300 rm conftest.$ac_ext
18301 LIBS=$ac_func_search_save_LIBS
18303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18304 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18305 ac_res=$ac_cv_search_bind_textdomain_codeset
18306 if test "$ac_res" != no; then :
18307 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18309 else
18310 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18313 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18314 if test "x$ac_cv_header_libintl_h" = xyes; then :
18316 else
18317 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18321 if test -z "$MSGFMT"; then
18322 for ac_prog in msgfmt
18324 # Extract the first word of "$ac_prog", so it can be a program name with args.
18325 set dummy $ac_prog; ac_word=$2
18326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18327 $as_echo_n "checking for $ac_word... " >&6; }
18328 if ${ac_cv_path_MSGFMT+:} false; then :
18329 $as_echo_n "(cached) " >&6
18330 else
18331 case $MSGFMT in
18332 [\\/]* | ?:[\\/]*)
18333 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18336 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18337 for as_dir in $PATH
18339 IFS=$as_save_IFS
18340 test -z "$as_dir" && as_dir=.
18341 for ac_exec_ext in '' $ac_executable_extensions; do
18342 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18343 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18344 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18345 break 2
18347 done
18348 done
18349 IFS=$as_save_IFS
18352 esac
18354 MSGFMT=$ac_cv_path_MSGFMT
18355 if test -n "$MSGFMT"; then
18356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18357 $as_echo "$MSGFMT" >&6; }
18358 else
18359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18360 $as_echo "no" >&6; }
18364 test -n "$MSGFMT" && break
18365 done
18367 else
18368 # Report the value of MSGFMT in configure's output in all cases.
18369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18370 $as_echo_n "checking for MSGFMT... " >&6; }
18371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18372 $as_echo "$MSGFMT" >&6; }
18375 if test -z "$MSGFMT"; then
18376 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18379 $as_echo_n "checking for msgfmt flags... " >&6; }
18380 if ${pgac_cv_msgfmt_flags+:} false; then :
18381 $as_echo_n "(cached) " >&6
18382 else
18383 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18384 pgac_cv_msgfmt_flags=-c
18387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18388 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18389 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18391 if test -z "$MSGMERGE"; then
18392 for ac_prog in msgmerge
18394 # Extract the first word of "$ac_prog", so it can be a program name with args.
18395 set dummy $ac_prog; ac_word=$2
18396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18397 $as_echo_n "checking for $ac_word... " >&6; }
18398 if ${ac_cv_path_MSGMERGE+:} false; then :
18399 $as_echo_n "(cached) " >&6
18400 else
18401 case $MSGMERGE in
18402 [\\/]* | ?:[\\/]*)
18403 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18407 for as_dir in $PATH
18409 IFS=$as_save_IFS
18410 test -z "$as_dir" && as_dir=.
18411 for ac_exec_ext in '' $ac_executable_extensions; do
18412 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18413 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18414 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18415 break 2
18417 done
18418 done
18419 IFS=$as_save_IFS
18422 esac
18424 MSGMERGE=$ac_cv_path_MSGMERGE
18425 if test -n "$MSGMERGE"; then
18426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18427 $as_echo "$MSGMERGE" >&6; }
18428 else
18429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18430 $as_echo "no" >&6; }
18434 test -n "$MSGMERGE" && break
18435 done
18437 else
18438 # Report the value of MSGMERGE in configure's output in all cases.
18439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18440 $as_echo_n "checking for MSGMERGE... " >&6; }
18441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18442 $as_echo "$MSGMERGE" >&6; }
18445 if test -z "$XGETTEXT"; then
18446 for ac_prog in xgettext
18448 # Extract the first word of "$ac_prog", so it can be a program name with args.
18449 set dummy $ac_prog; ac_word=$2
18450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18451 $as_echo_n "checking for $ac_word... " >&6; }
18452 if ${ac_cv_path_XGETTEXT+:} false; then :
18453 $as_echo_n "(cached) " >&6
18454 else
18455 case $XGETTEXT in
18456 [\\/]* | ?:[\\/]*)
18457 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18461 for as_dir in $PATH
18463 IFS=$as_save_IFS
18464 test -z "$as_dir" && as_dir=.
18465 for ac_exec_ext in '' $ac_executable_extensions; do
18466 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18467 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18468 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18469 break 2
18471 done
18472 done
18473 IFS=$as_save_IFS
18476 esac
18478 XGETTEXT=$ac_cv_path_XGETTEXT
18479 if test -n "$XGETTEXT"; then
18480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18481 $as_echo "$XGETTEXT" >&6; }
18482 else
18483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18484 $as_echo "no" >&6; }
18488 test -n "$XGETTEXT" && break
18489 done
18491 else
18492 # Report the value of XGETTEXT in configure's output in all cases.
18493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18494 $as_echo_n "checking for XGETTEXT... " >&6; }
18495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18496 $as_echo "$XGETTEXT" >&6; }
18502 # Check for Tcl configuration script tclConfig.sh
18503 if test "$with_tcl" = yes; then
18504 if test -z "$TCLSH"; then
18505 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18507 # Extract the first word of "$ac_prog", so it can be a program name with args.
18508 set dummy $ac_prog; ac_word=$2
18509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18510 $as_echo_n "checking for $ac_word... " >&6; }
18511 if ${ac_cv_path_TCLSH+:} false; then :
18512 $as_echo_n "(cached) " >&6
18513 else
18514 case $TCLSH in
18515 [\\/]* | ?:[\\/]*)
18516 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18520 for as_dir in $PATH
18522 IFS=$as_save_IFS
18523 test -z "$as_dir" && as_dir=.
18524 for ac_exec_ext in '' $ac_executable_extensions; do
18525 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18526 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18527 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18528 break 2
18530 done
18531 done
18532 IFS=$as_save_IFS
18535 esac
18537 TCLSH=$ac_cv_path_TCLSH
18538 if test -n "$TCLSH"; then
18539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18540 $as_echo "$TCLSH" >&6; }
18541 else
18542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18543 $as_echo "no" >&6; }
18547 test -n "$TCLSH" && break
18548 done
18550 else
18551 # Report the value of TCLSH in configure's output in all cases.
18552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18553 $as_echo_n "checking for TCLSH... " >&6; }
18554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18555 $as_echo "$TCLSH" >&6; }
18558 if test x"$TCLSH" = x""; then
18559 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18563 $as_echo_n "checking for tclConfig.sh... " >&6; }
18564 # Let user override test
18565 if test -z "$TCL_CONFIG_SH"; then
18566 pgac_test_dirs="$with_tclconfig"
18568 set X $pgac_test_dirs; shift
18569 if test $# -eq 0; then
18570 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18571 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18572 # On newer macOS, $auto_path frequently doesn't include the place
18573 # where tclConfig.sh actually lives. Append that to the end, so as not
18574 # to break cases where a non-default Tcl installation is being used.
18575 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18576 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18578 set X $pgac_test_dirs; shift
18581 for pgac_dir do
18582 if test -r "$pgac_dir/tclConfig.sh"; then
18583 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18584 break
18586 done
18589 if test -z "$TCL_CONFIG_SH"; then
18590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18591 $as_echo "no" >&6; }
18592 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18593 else
18594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18595 $as_echo "$TCL_CONFIG_SH" >&6; }
18600 . "$TCL_CONFIG_SH"
18601 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18602 eval TCL_LIBS=\"$TCL_LIBS\"
18603 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18604 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18606 if test "$TCL_SHARED_BUILD" != 1; then
18607 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18608 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18610 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18611 ac_save_CPPFLAGS=$CPPFLAGS
18612 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18613 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18614 if test "x$ac_cv_header_tcl_h" = xyes; then :
18616 else
18617 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18621 CPPFLAGS=$ac_save_CPPFLAGS
18624 # check for <perl.h>
18625 if test "$with_perl" = yes; then
18626 ac_save_CPPFLAGS=$CPPFLAGS
18627 CPPFLAGS="$CPPFLAGS $perl_includespec"
18628 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18630 if test "x$ac_cv_header_perl_h" = xyes; then :
18632 else
18633 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18637 # While we're at it, check that we can link to libperl.
18638 # On most platforms, if perl.h is there then libperl.so will be too, but at
18639 # this writing Debian packages them separately. There is no known reason to
18640 # waste cycles on separate probes for the Tcl or Python libraries, though.
18641 # On some Red Hat platforms, the link attempt can fail if we don't use
18642 # CFLAGS_SL while building the test program.
18643 ac_save_CFLAGS=$CFLAGS
18644 CFLAGS="$CFLAGS $CFLAGS_SL"
18645 pgac_save_LIBS=$LIBS
18646 LIBS="$perl_embed_ldflags"
18647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18648 $as_echo_n "checking for libperl... " >&6; }
18649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18650 /* end confdefs.h. */
18652 #include <EXTERN.h>
18653 #include <perl.h>
18656 main ()
18658 perl_alloc();
18660 return 0;
18662 _ACEOF
18663 if ac_fn_c_try_link "$LINENO"; then :
18664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18665 $as_echo "yes" >&6; }
18666 else
18667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18668 $as_echo "no" >&6; }
18669 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18671 rm -f core conftest.err conftest.$ac_objext \
18672 conftest$ac_exeext conftest.$ac_ext
18673 LIBS=$pgac_save_LIBS
18674 CFLAGS=$ac_save_CFLAGS
18675 CPPFLAGS=$ac_save_CPPFLAGS
18678 # check for <Python.h>
18679 if test "$with_python" = yes; then
18680 ac_save_CPPFLAGS=$CPPFLAGS
18681 CPPFLAGS="$python_includespec $CPPFLAGS"
18682 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18683 if test "x$ac_cv_header_Python_h" = xyes; then :
18685 else
18686 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18690 CPPFLAGS=$ac_save_CPPFLAGS
18694 # Check for documentation-building tools
18696 if test -z "$XMLLINT"; then
18697 for ac_prog in xmllint
18699 # Extract the first word of "$ac_prog", so it can be a program name with args.
18700 set dummy $ac_prog; ac_word=$2
18701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18702 $as_echo_n "checking for $ac_word... " >&6; }
18703 if ${ac_cv_path_XMLLINT+:} false; then :
18704 $as_echo_n "(cached) " >&6
18705 else
18706 case $XMLLINT in
18707 [\\/]* | ?:[\\/]*)
18708 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18711 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18712 for as_dir in $PATH
18714 IFS=$as_save_IFS
18715 test -z "$as_dir" && as_dir=.
18716 for ac_exec_ext in '' $ac_executable_extensions; do
18717 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18718 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18719 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18720 break 2
18722 done
18723 done
18724 IFS=$as_save_IFS
18727 esac
18729 XMLLINT=$ac_cv_path_XMLLINT
18730 if test -n "$XMLLINT"; then
18731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18732 $as_echo "$XMLLINT" >&6; }
18733 else
18734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18735 $as_echo "no" >&6; }
18739 test -n "$XMLLINT" && break
18740 done
18742 else
18743 # Report the value of XMLLINT in configure's output in all cases.
18744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18745 $as_echo_n "checking for XMLLINT... " >&6; }
18746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18747 $as_echo "$XMLLINT" >&6; }
18750 if test -z "$XSLTPROC"; then
18751 for ac_prog in xsltproc
18753 # Extract the first word of "$ac_prog", so it can be a program name with args.
18754 set dummy $ac_prog; ac_word=$2
18755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18756 $as_echo_n "checking for $ac_word... " >&6; }
18757 if ${ac_cv_path_XSLTPROC+:} false; then :
18758 $as_echo_n "(cached) " >&6
18759 else
18760 case $XSLTPROC in
18761 [\\/]* | ?:[\\/]*)
18762 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18766 for as_dir in $PATH
18768 IFS=$as_save_IFS
18769 test -z "$as_dir" && as_dir=.
18770 for ac_exec_ext in '' $ac_executable_extensions; do
18771 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18772 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18773 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18774 break 2
18776 done
18777 done
18778 IFS=$as_save_IFS
18781 esac
18783 XSLTPROC=$ac_cv_path_XSLTPROC
18784 if test -n "$XSLTPROC"; then
18785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18786 $as_echo "$XSLTPROC" >&6; }
18787 else
18788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18789 $as_echo "no" >&6; }
18793 test -n "$XSLTPROC" && break
18794 done
18796 else
18797 # Report the value of XSLTPROC in configure's output in all cases.
18798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18799 $as_echo_n "checking for XSLTPROC... " >&6; }
18800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18801 $as_echo "$XSLTPROC" >&6; }
18804 if test -z "$FOP"; then
18805 for ac_prog in fop
18807 # Extract the first word of "$ac_prog", so it can be a program name with args.
18808 set dummy $ac_prog; ac_word=$2
18809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18810 $as_echo_n "checking for $ac_word... " >&6; }
18811 if ${ac_cv_path_FOP+:} false; then :
18812 $as_echo_n "(cached) " >&6
18813 else
18814 case $FOP in
18815 [\\/]* | ?:[\\/]*)
18816 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18820 for as_dir in $PATH
18822 IFS=$as_save_IFS
18823 test -z "$as_dir" && as_dir=.
18824 for ac_exec_ext in '' $ac_executable_extensions; do
18825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18826 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18827 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18828 break 2
18830 done
18831 done
18832 IFS=$as_save_IFS
18835 esac
18837 FOP=$ac_cv_path_FOP
18838 if test -n "$FOP"; then
18839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18840 $as_echo "$FOP" >&6; }
18841 else
18842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18843 $as_echo "no" >&6; }
18847 test -n "$FOP" && break
18848 done
18850 else
18851 # Report the value of FOP in configure's output in all cases.
18852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18853 $as_echo_n "checking for FOP... " >&6; }
18854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18855 $as_echo "$FOP" >&6; }
18858 if test -z "$DBTOEPUB"; then
18859 for ac_prog in dbtoepub
18861 # Extract the first word of "$ac_prog", so it can be a program name with args.
18862 set dummy $ac_prog; ac_word=$2
18863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18864 $as_echo_n "checking for $ac_word... " >&6; }
18865 if ${ac_cv_path_DBTOEPUB+:} false; then :
18866 $as_echo_n "(cached) " >&6
18867 else
18868 case $DBTOEPUB in
18869 [\\/]* | ?:[\\/]*)
18870 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18873 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18874 for as_dir in $PATH
18876 IFS=$as_save_IFS
18877 test -z "$as_dir" && as_dir=.
18878 for ac_exec_ext in '' $ac_executable_extensions; do
18879 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18880 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18881 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18882 break 2
18884 done
18885 done
18886 IFS=$as_save_IFS
18889 esac
18891 DBTOEPUB=$ac_cv_path_DBTOEPUB
18892 if test -n "$DBTOEPUB"; then
18893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18894 $as_echo "$DBTOEPUB" >&6; }
18895 else
18896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18897 $as_echo "no" >&6; }
18901 test -n "$DBTOEPUB" && break
18902 done
18904 else
18905 # Report the value of DBTOEPUB in configure's output in all cases.
18906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18907 $as_echo_n "checking for DBTOEPUB... " >&6; }
18908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18909 $as_echo "$DBTOEPUB" >&6; }
18914 # Check for test tools
18916 if test "$enable_tap_tests" = yes; then
18917 # Make sure we know where prove is.
18918 if test -z "$PROVE"; then
18919 for ac_prog in prove
18921 # Extract the first word of "$ac_prog", so it can be a program name with args.
18922 set dummy $ac_prog; ac_word=$2
18923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18924 $as_echo_n "checking for $ac_word... " >&6; }
18925 if ${ac_cv_path_PROVE+:} false; then :
18926 $as_echo_n "(cached) " >&6
18927 else
18928 case $PROVE in
18929 [\\/]* | ?:[\\/]*)
18930 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18933 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18934 for as_dir in $PATH
18936 IFS=$as_save_IFS
18937 test -z "$as_dir" && as_dir=.
18938 for ac_exec_ext in '' $ac_executable_extensions; do
18939 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18940 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18941 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18942 break 2
18944 done
18945 done
18946 IFS=$as_save_IFS
18949 esac
18951 PROVE=$ac_cv_path_PROVE
18952 if test -n "$PROVE"; then
18953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18954 $as_echo "$PROVE" >&6; }
18955 else
18956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18957 $as_echo "no" >&6; }
18961 test -n "$PROVE" && break
18962 done
18964 else
18965 # Report the value of PROVE in configure's output in all cases.
18966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18967 $as_echo_n "checking for PROVE... " >&6; }
18968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18969 $as_echo "$PROVE" >&6; }
18972 if test -z "$PROVE"; then
18973 as_fn_error $? "prove not found" "$LINENO" 5
18975 # Check for necessary Perl modules. You might think we should use
18976 # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
18977 # installation than perl, eg on MSys, so we have to check using prove.
18978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
18979 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
18980 __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__
18981 modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
18982 if test $? -eq 0; then
18983 # log the module version details, but don't show them interactively
18984 echo "$modulestderr" >&5
18985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18986 $as_echo "yes" >&6; }
18987 else
18988 # on failure, though, show the results to the user
18989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modulestderr" >&5
18990 $as_echo "$modulestderr" >&6; }
18991 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18995 # If compiler will take -Wl,--as-needed (or various platform-specific
18996 # spellings thereof) then add that to LDFLAGS. This is much easier than
18997 # trying to filter LIBS to the minimum for each executable.
18998 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18999 # libreadline; therefore we postpone testing it until we know what library
19000 # dependencies readline has. The test code will try to link with $LIBS.
19001 if test "$with_readline" = yes; then
19002 link_test_func=readline
19003 else
19004 link_test_func=exit
19007 if test "$PORTNAME" = "darwin"; then
19008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS" >&5
19009 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS... " >&6; }
19010 if ${pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs+:} false; then :
19011 $as_echo_n "(cached) " >&6
19012 else
19013 pgac_save_LDFLAGS=$LDFLAGS
19014 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19015 if test "$cross_compiling" = yes; then :
19016 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs="assuming no"
19017 else
19018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19019 /* end confdefs.h. */
19020 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19022 main ()
19026 return 0;
19028 _ACEOF
19029 if ac_fn_c_try_run "$LINENO"; then :
19030 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=yes
19031 else
19032 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=no
19034 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19035 conftest.$ac_objext conftest.beam conftest.$ac_ext
19038 LDFLAGS="$pgac_save_LDFLAGS"
19040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&5
19041 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&6; }
19042 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" = x"yes"; then
19043 LDFLAGS="${LDFLAGS} -Wl,-dead_strip_dylibs"
19047 elif test "$PORTNAME" = "openbsd"; then
19048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS" >&5
19049 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS... " >&6; }
19050 if ${pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic+:} false; then :
19051 $as_echo_n "(cached) " >&6
19052 else
19053 pgac_save_LDFLAGS=$LDFLAGS
19054 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19055 if test "$cross_compiling" = yes; then :
19056 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic="assuming no"
19057 else
19058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19059 /* end confdefs.h. */
19060 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19062 main ()
19066 return 0;
19068 _ACEOF
19069 if ac_fn_c_try_run "$LINENO"; then :
19070 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=yes
19071 else
19072 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=no
19074 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19075 conftest.$ac_objext conftest.beam conftest.$ac_ext
19078 LDFLAGS="$pgac_save_LDFLAGS"
19080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&5
19081 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&6; }
19082 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" = x"yes"; then
19083 LDFLAGS="${LDFLAGS} -Wl,-Bdynamic"
19087 else
19088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed, for LDFLAGS" >&5
19089 $as_echo_n "checking whether $CC supports -Wl,--as-needed, for LDFLAGS... " >&6; }
19090 if ${pgac_cv_prog_cc_LDFLAGS__Wl___as_needed+:} false; then :
19091 $as_echo_n "(cached) " >&6
19092 else
19093 pgac_save_LDFLAGS=$LDFLAGS
19094 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19095 if test "$cross_compiling" = yes; then :
19096 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed="assuming no"
19097 else
19098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19099 /* end confdefs.h. */
19100 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19102 main ()
19106 return 0;
19108 _ACEOF
19109 if ac_fn_c_try_run "$LINENO"; then :
19110 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=yes
19111 else
19112 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=no
19114 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19115 conftest.$ac_objext conftest.beam conftest.$ac_ext
19118 LDFLAGS="$pgac_save_LDFLAGS"
19120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&5
19121 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&6; }
19122 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" = x"yes"; then
19123 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
19129 # For linkers that understand --export-dynamic, add that to the LDFLAGS_EX_BE
19130 # (backend specific ldflags). One some platforms this will always fail (e.g.,
19131 # windows), but on others it depends on the choice of linker (e.g., solaris).
19132 # macOS uses -export_dynamic instead. (On macOS, the option is only
19133 # needed when also using -flto, but we add it anyway since it's
19134 # harmless.)
19135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE" >&5
19136 $as_echo_n "checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE... " >&6; }
19137 if ${pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic+:} false; then :
19138 $as_echo_n "(cached) " >&6
19139 else
19140 pgac_save_LDFLAGS=$LDFLAGS
19141 LDFLAGS="$pgac_save_LDFLAGS -Wl,--export-dynamic"
19142 if test "$cross_compiling" = yes; then :
19143 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic="assuming no"
19144 else
19145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19146 /* end confdefs.h. */
19147 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19149 main ()
19153 return 0;
19155 _ACEOF
19156 if ac_fn_c_try_run "$LINENO"; then :
19157 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=yes
19158 else
19159 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=no
19161 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19162 conftest.$ac_objext conftest.beam conftest.$ac_ext
19165 LDFLAGS="$pgac_save_LDFLAGS"
19167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&5
19168 $as_echo "$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&6; }
19169 if test x"$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" = x"yes"; then
19170 LDFLAGS_EX_BE="${LDFLAGS_EX_BE} -Wl,--export-dynamic"
19173 if test x"$LDFLAGS_EX_BE" = x""; then
19174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-export_dynamic, for LDFLAGS_EX_BE" >&5
19175 $as_echo_n "checking whether $CC supports -Wl,-export_dynamic, for LDFLAGS_EX_BE... " >&6; }
19176 if ${pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic+:} false; then :
19177 $as_echo_n "(cached) " >&6
19178 else
19179 pgac_save_LDFLAGS=$LDFLAGS
19180 LDFLAGS="$pgac_save_LDFLAGS -Wl,-export_dynamic"
19181 if test "$cross_compiling" = yes; then :
19182 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic="assuming no"
19183 else
19184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19185 /* end confdefs.h. */
19186 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19188 main ()
19192 return 0;
19194 _ACEOF
19195 if ac_fn_c_try_run "$LINENO"; then :
19196 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic=yes
19197 else
19198 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic=no
19200 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19201 conftest.$ac_objext conftest.beam conftest.$ac_ext
19204 LDFLAGS="$pgac_save_LDFLAGS"
19206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic" >&5
19207 $as_echo "$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic" >&6; }
19208 if test x"$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic" = x"yes"; then
19209 LDFLAGS_EX_BE="${LDFLAGS_EX_BE} -Wl,-export_dynamic"
19215 # Create compiler version string
19216 if test x"$GCC" = x"yes" ; then
19217 cc_string=`${CC} --version | sed q`
19218 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19219 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19220 cc_string=`${CC} -V 2>&1 | sed q`
19221 else
19222 cc_string=$CC
19226 cat >>confdefs.h <<_ACEOF
19227 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19228 _ACEOF
19231 # Supply a numeric version string for use by 3rd party add-ons
19232 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19233 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
19234 $AWK '{printf "%d%04d", $1, $2}'`"
19236 cat >>confdefs.h <<_ACEOF
19237 #define PG_VERSION_NUM $PG_VERSION_NUM
19238 _ACEOF
19242 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19243 # literally, so that it's possible to override it at build time using
19244 # a command like "make ... PG_SYSROOT=path". This has to be done after
19245 # we've finished all configure checks that depend on CPPFLAGS.
19246 # The same for LDFLAGS, too.
19247 if test x"$PG_SYSROOT" != x; then
19248 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19249 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19254 # Begin output steps
19256 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19257 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19258 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19259 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19260 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19261 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19262 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19263 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19264 # Currently only used when LLVM is used
19265 if test "$with_llvm" = yes ; then
19266 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19267 $as_echo "$as_me: using CXX=$CXX" >&6;}
19268 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19269 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19270 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19271 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19272 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19273 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19274 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19275 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19278 # prepare build tree if outside source tree
19279 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19280 # Note 2: /bin/pwd might be better than shell's built-in at getting
19281 # a symlink-free name.
19282 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19283 vpath_build=no
19284 else
19285 vpath_build=yes
19286 if test "$no_create" != yes; then
19287 $as_echo_n "preparing build tree... " >&6
19288 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19289 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19290 || as_fn_error $? "failed" "$LINENO" 5
19291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19292 $as_echo "done" >&6; }
19298 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19301 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}"
19304 if test "$PORTNAME" = "win32"; then
19305 ac_config_commands="$ac_config_commands check_win32_symlinks"
19309 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19312 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19315 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19318 cat >confcache <<\_ACEOF
19319 # This file is a shell script that caches the results of configure
19320 # tests run on this system so they can be shared between configure
19321 # scripts and configure runs, see configure's option --config-cache.
19322 # It is not useful on other systems. If it contains results you don't
19323 # want to keep, you may remove or edit it.
19325 # config.status only pays attention to the cache file if you give it
19326 # the --recheck option to rerun configure.
19328 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19329 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19330 # following values.
19332 _ACEOF
19334 # The following way of writing the cache mishandles newlines in values,
19335 # but we know of no workaround that is simple, portable, and efficient.
19336 # So, we kill variables containing newlines.
19337 # Ultrix sh set writes to stderr and can't be redirected directly,
19338 # and sets the high bit in the cache file unless we assign to the vars.
19340 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19341 eval ac_val=\$$ac_var
19342 case $ac_val in #(
19343 *${as_nl}*)
19344 case $ac_var in #(
19345 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19346 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19347 esac
19348 case $ac_var in #(
19349 _ | IFS | as_nl) ;; #(
19350 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19351 *) { eval $ac_var=; unset $ac_var;} ;;
19352 esac ;;
19353 esac
19354 done
19356 (set) 2>&1 |
19357 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19358 *${as_nl}ac_space=\ *)
19359 # `set' does not quote correctly, so add quotes: double-quote
19360 # substitution turns \\\\ into \\, and sed turns \\ into \.
19361 sed -n \
19362 "s/'/'\\\\''/g;
19363 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19364 ;; #(
19366 # `set' quotes correctly as required by POSIX, so do not add quotes.
19367 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19369 esac |
19370 sort
19372 sed '
19373 /^ac_cv_env_/b end
19374 t clear
19375 :clear
19376 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19377 t end
19378 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19379 :end' >>confcache
19380 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19381 if test -w "$cache_file"; then
19382 if test "x$cache_file" != "x/dev/null"; then
19383 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19384 $as_echo "$as_me: updating cache $cache_file" >&6;}
19385 if test ! -f "$cache_file" || test -h "$cache_file"; then
19386 cat confcache >"$cache_file"
19387 else
19388 case $cache_file in #(
19389 */* | ?:*)
19390 mv -f confcache "$cache_file"$$ &&
19391 mv -f "$cache_file"$$ "$cache_file" ;; #(
19393 mv -f confcache "$cache_file" ;;
19394 esac
19397 else
19398 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19399 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19402 rm -f confcache
19404 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19405 # Let make expand exec_prefix.
19406 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19408 DEFS=-DHAVE_CONFIG_H
19410 ac_libobjs=
19411 ac_ltlibobjs=
19413 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19414 # 1. Remove the extension, and $U if already installed.
19415 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19416 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19417 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19418 # will be set to the directory where LIBOBJS objects are built.
19419 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19420 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19421 done
19422 LIBOBJS=$ac_libobjs
19424 LTLIBOBJS=$ac_ltlibobjs
19429 : "${CONFIG_STATUS=./config.status}"
19430 ac_write_fail=0
19431 ac_clean_files_save=$ac_clean_files
19432 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19433 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19434 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19435 as_write_fail=0
19436 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19437 #! $SHELL
19438 # Generated by $as_me.
19439 # Run this file to recreate the current configuration.
19440 # Compiler output produced by configure, useful for debugging
19441 # configure, is in config.log if it exists.
19443 debug=false
19444 ac_cs_recheck=false
19445 ac_cs_silent=false
19447 SHELL=\${CONFIG_SHELL-$SHELL}
19448 export SHELL
19449 _ASEOF
19450 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19451 ## -------------------- ##
19452 ## M4sh Initialization. ##
19453 ## -------------------- ##
19455 # Be more Bourne compatible
19456 DUALCASE=1; export DUALCASE # for MKS sh
19457 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19458 emulate sh
19459 NULLCMD=:
19460 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19461 # is contrary to our usage. Disable this feature.
19462 alias -g '${1+"$@"}'='"$@"'
19463 setopt NO_GLOB_SUBST
19464 else
19465 case `(set -o) 2>/dev/null` in #(
19466 *posix*) :
19467 set -o posix ;; #(
19468 *) :
19470 esac
19474 as_nl='
19476 export as_nl
19477 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19478 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19479 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19480 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19481 # Prefer a ksh shell builtin over an external printf program on Solaris,
19482 # but without wasting forks for bash or zsh.
19483 if test -z "$BASH_VERSION$ZSH_VERSION" \
19484 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19485 as_echo='print -r --'
19486 as_echo_n='print -rn --'
19487 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19488 as_echo='printf %s\n'
19489 as_echo_n='printf %s'
19490 else
19491 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19492 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19493 as_echo_n='/usr/ucb/echo -n'
19494 else
19495 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19496 as_echo_n_body='eval
19497 arg=$1;
19498 case $arg in #(
19499 *"$as_nl"*)
19500 expr "X$arg" : "X\\(.*\\)$as_nl";
19501 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19502 esac;
19503 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19505 export as_echo_n_body
19506 as_echo_n='sh -c $as_echo_n_body as_echo'
19508 export as_echo_body
19509 as_echo='sh -c $as_echo_body as_echo'
19512 # The user is always right.
19513 if test "${PATH_SEPARATOR+set}" != set; then
19514 PATH_SEPARATOR=:
19515 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19516 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19517 PATH_SEPARATOR=';'
19522 # IFS
19523 # We need space, tab and new line, in precisely that order. Quoting is
19524 # there to prevent editors from complaining about space-tab.
19525 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19526 # splitting by setting IFS to empty value.)
19527 IFS=" "" $as_nl"
19529 # Find who we are. Look in the path if we contain no directory separator.
19530 as_myself=
19531 case $0 in #((
19532 *[\\/]* ) as_myself=$0 ;;
19533 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19534 for as_dir in $PATH
19536 IFS=$as_save_IFS
19537 test -z "$as_dir" && as_dir=.
19538 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19539 done
19540 IFS=$as_save_IFS
19543 esac
19544 # We did not find ourselves, most probably we were run as `sh COMMAND'
19545 # in which case we are not to be found in the path.
19546 if test "x$as_myself" = x; then
19547 as_myself=$0
19549 if test ! -f "$as_myself"; then
19550 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19551 exit 1
19554 # Unset variables that we do not need and which cause bugs (e.g. in
19555 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19556 # suppresses any "Segmentation fault" message there. '((' could
19557 # trigger a bug in pdksh 5.2.14.
19558 for as_var in BASH_ENV ENV MAIL MAILPATH
19559 do eval test x\${$as_var+set} = xset \
19560 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19561 done
19562 PS1='$ '
19563 PS2='> '
19564 PS4='+ '
19566 # NLS nuisances.
19567 LC_ALL=C
19568 export LC_ALL
19569 LANGUAGE=C
19570 export LANGUAGE
19572 # CDPATH.
19573 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19576 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19577 # ----------------------------------------
19578 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19579 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19580 # script with STATUS, using 1 if that was 0.
19581 as_fn_error ()
19583 as_status=$1; test $as_status -eq 0 && as_status=1
19584 if test "$4"; then
19585 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19586 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19588 $as_echo "$as_me: error: $2" >&2
19589 as_fn_exit $as_status
19590 } # as_fn_error
19593 # as_fn_set_status STATUS
19594 # -----------------------
19595 # Set $? to STATUS, without forking.
19596 as_fn_set_status ()
19598 return $1
19599 } # as_fn_set_status
19601 # as_fn_exit STATUS
19602 # -----------------
19603 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19604 as_fn_exit ()
19606 set +e
19607 as_fn_set_status $1
19608 exit $1
19609 } # as_fn_exit
19611 # as_fn_unset VAR
19612 # ---------------
19613 # Portably unset VAR.
19614 as_fn_unset ()
19616 { eval $1=; unset $1;}
19618 as_unset=as_fn_unset
19619 # as_fn_append VAR VALUE
19620 # ----------------------
19621 # Append the text in VALUE to the end of the definition contained in VAR. Take
19622 # advantage of any shell optimizations that allow amortized linear growth over
19623 # repeated appends, instead of the typical quadratic growth present in naive
19624 # implementations.
19625 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19626 eval 'as_fn_append ()
19628 eval $1+=\$2
19630 else
19631 as_fn_append ()
19633 eval $1=\$$1\$2
19635 fi # as_fn_append
19637 # as_fn_arith ARG...
19638 # ------------------
19639 # Perform arithmetic evaluation on the ARGs, and store the result in the
19640 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19641 # must be portable across $(()) and expr.
19642 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19643 eval 'as_fn_arith ()
19645 as_val=$(( $* ))
19647 else
19648 as_fn_arith ()
19650 as_val=`expr "$@" || test $? -eq 1`
19652 fi # as_fn_arith
19655 if expr a : '\(a\)' >/dev/null 2>&1 &&
19656 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19657 as_expr=expr
19658 else
19659 as_expr=false
19662 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19663 as_basename=basename
19664 else
19665 as_basename=false
19668 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19669 as_dirname=dirname
19670 else
19671 as_dirname=false
19674 as_me=`$as_basename -- "$0" ||
19675 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19676 X"$0" : 'X\(//\)$' \| \
19677 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19678 $as_echo X/"$0" |
19679 sed '/^.*\/\([^/][^/]*\)\/*$/{
19680 s//\1/
19683 /^X\/\(\/\/\)$/{
19684 s//\1/
19687 /^X\/\(\/\).*/{
19688 s//\1/
19691 s/.*/./; q'`
19693 # Avoid depending upon Character Ranges.
19694 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19695 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19696 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19697 as_cr_digits='0123456789'
19698 as_cr_alnum=$as_cr_Letters$as_cr_digits
19700 ECHO_C= ECHO_N= ECHO_T=
19701 case `echo -n x` in #(((((
19702 -n*)
19703 case `echo 'xy\c'` in
19704 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19705 xy) ECHO_C='\c';;
19706 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19707 ECHO_T=' ';;
19708 esac;;
19710 ECHO_N='-n';;
19711 esac
19713 rm -f conf$$ conf$$.exe conf$$.file
19714 if test -d conf$$.dir; then
19715 rm -f conf$$.dir/conf$$.file
19716 else
19717 rm -f conf$$.dir
19718 mkdir conf$$.dir 2>/dev/null
19720 if (echo >conf$$.file) 2>/dev/null; then
19721 if ln -s conf$$.file conf$$ 2>/dev/null; then
19722 as_ln_s='ln -s'
19723 # ... but there are two gotchas:
19724 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19725 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19726 # In both cases, we have to default to `cp -pR'.
19727 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19728 as_ln_s='cp -pR'
19729 elif ln conf$$.file conf$$ 2>/dev/null; then
19730 as_ln_s=ln
19731 else
19732 as_ln_s='cp -pR'
19734 else
19735 as_ln_s='cp -pR'
19737 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19738 rmdir conf$$.dir 2>/dev/null
19741 # as_fn_mkdir_p
19742 # -------------
19743 # Create "$as_dir" as a directory, including parents if necessary.
19744 as_fn_mkdir_p ()
19747 case $as_dir in #(
19748 -*) as_dir=./$as_dir;;
19749 esac
19750 test -d "$as_dir" || eval $as_mkdir_p || {
19751 as_dirs=
19752 while :; do
19753 case $as_dir in #(
19754 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19755 *) as_qdir=$as_dir;;
19756 esac
19757 as_dirs="'$as_qdir' $as_dirs"
19758 as_dir=`$as_dirname -- "$as_dir" ||
19759 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19760 X"$as_dir" : 'X\(//\)[^/]' \| \
19761 X"$as_dir" : 'X\(//\)$' \| \
19762 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19763 $as_echo X"$as_dir" |
19764 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19765 s//\1/
19768 /^X\(\/\/\)[^/].*/{
19769 s//\1/
19772 /^X\(\/\/\)$/{
19773 s//\1/
19776 /^X\(\/\).*/{
19777 s//\1/
19780 s/.*/./; q'`
19781 test -d "$as_dir" && break
19782 done
19783 test -z "$as_dirs" || eval "mkdir $as_dirs"
19784 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19787 } # as_fn_mkdir_p
19788 if mkdir -p . 2>/dev/null; then
19789 as_mkdir_p='mkdir -p "$as_dir"'
19790 else
19791 test -d ./-p && rmdir ./-p
19792 as_mkdir_p=false
19796 # as_fn_executable_p FILE
19797 # -----------------------
19798 # Test if FILE is an executable regular file.
19799 as_fn_executable_p ()
19801 test -f "$1" && test -x "$1"
19802 } # as_fn_executable_p
19803 as_test_x='test -x'
19804 as_executable_p=as_fn_executable_p
19806 # Sed expression to map a string onto a valid CPP name.
19807 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19809 # Sed expression to map a string onto a valid variable name.
19810 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19813 exec 6>&1
19814 ## ----------------------------------- ##
19815 ## Main body of $CONFIG_STATUS script. ##
19816 ## ----------------------------------- ##
19817 _ASEOF
19818 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19820 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19821 # Save the log message, to keep $0 and so on meaningful, and to
19822 # report actual input values of CONFIG_FILES etc. instead of their
19823 # values after options handling.
19824 ac_log="
19825 This file was extended by PostgreSQL $as_me 18devel, which was
19826 generated by GNU Autoconf 2.69. Invocation command line was
19828 CONFIG_FILES = $CONFIG_FILES
19829 CONFIG_HEADERS = $CONFIG_HEADERS
19830 CONFIG_LINKS = $CONFIG_LINKS
19831 CONFIG_COMMANDS = $CONFIG_COMMANDS
19832 $ $0 $@
19834 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19837 _ACEOF
19839 case $ac_config_files in *"
19840 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19841 esac
19843 case $ac_config_headers in *"
19844 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19845 esac
19848 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19849 # Files that config.status was made for.
19850 config_files="$ac_config_files"
19851 config_headers="$ac_config_headers"
19852 config_links="$ac_config_links"
19853 config_commands="$ac_config_commands"
19855 _ACEOF
19857 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19858 ac_cs_usage="\
19859 \`$as_me' instantiates files and other configuration actions
19860 from templates according to the current configuration. Unless the files
19861 and actions are specified as TAGs, all are instantiated by default.
19863 Usage: $0 [OPTION]... [TAG]...
19865 -h, --help print this help, then exit
19866 -V, --version print version number and configuration settings, then exit
19867 --config print configuration, then exit
19868 -q, --quiet, --silent
19869 do not print progress messages
19870 -d, --debug don't remove temporary files
19871 --recheck update $as_me by reconfiguring in the same conditions
19872 --file=FILE[:TEMPLATE]
19873 instantiate the configuration file FILE
19874 --header=FILE[:TEMPLATE]
19875 instantiate the configuration header FILE
19877 Configuration files:
19878 $config_files
19880 Configuration headers:
19881 $config_headers
19883 Configuration links:
19884 $config_links
19886 Configuration commands:
19887 $config_commands
19889 Report bugs to <pgsql-bugs@lists.postgresql.org>.
19890 PostgreSQL home page: <https://www.postgresql.org/>."
19892 _ACEOF
19893 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19894 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19895 ac_cs_version="\\
19896 PostgreSQL config.status 18devel
19897 configured by $0, generated by GNU Autoconf 2.69,
19898 with options \\"\$ac_cs_config\\"
19900 Copyright (C) 2012 Free Software Foundation, Inc.
19901 This config.status script is free software; the Free Software Foundation
19902 gives unlimited permission to copy, distribute and modify it."
19904 ac_pwd='$ac_pwd'
19905 srcdir='$srcdir'
19906 INSTALL='$INSTALL'
19907 MKDIR_P='$MKDIR_P'
19908 AWK='$AWK'
19909 test -n "\$AWK" || AWK=awk
19910 _ACEOF
19912 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19913 # The default lists apply if the user does not specify any file.
19914 ac_need_defaults=:
19915 while test $# != 0
19917 case $1 in
19918 --*=?*)
19919 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19920 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19921 ac_shift=:
19923 --*=)
19924 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19925 ac_optarg=
19926 ac_shift=:
19929 ac_option=$1
19930 ac_optarg=$2
19931 ac_shift=shift
19933 esac
19935 case $ac_option in
19936 # Handling of the options.
19937 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19938 ac_cs_recheck=: ;;
19939 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19940 $as_echo "$ac_cs_version"; exit ;;
19941 --config | --confi | --conf | --con | --co | --c )
19942 $as_echo "$ac_cs_config"; exit ;;
19943 --debug | --debu | --deb | --de | --d | -d )
19944 debug=: ;;
19945 --file | --fil | --fi | --f )
19946 $ac_shift
19947 case $ac_optarg in
19948 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19949 '') as_fn_error $? "missing file argument" ;;
19950 esac
19951 as_fn_append CONFIG_FILES " '$ac_optarg'"
19952 ac_need_defaults=false;;
19953 --header | --heade | --head | --hea )
19954 $ac_shift
19955 case $ac_optarg in
19956 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19957 esac
19958 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19959 ac_need_defaults=false;;
19960 --he | --h)
19961 # Conflict between --help and --header
19962 as_fn_error $? "ambiguous option: \`$1'
19963 Try \`$0 --help' for more information.";;
19964 --help | --hel | -h )
19965 $as_echo "$ac_cs_usage"; exit ;;
19966 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19967 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19968 ac_cs_silent=: ;;
19970 # This is an error.
19971 -*) as_fn_error $? "unrecognized option: \`$1'
19972 Try \`$0 --help' for more information." ;;
19974 *) as_fn_append ac_config_targets " $1"
19975 ac_need_defaults=false ;;
19977 esac
19978 shift
19979 done
19981 ac_configure_extra_args=
19983 if $ac_cs_silent; then
19984 exec 6>/dev/null
19985 ac_configure_extra_args="$ac_configure_extra_args --silent"
19988 _ACEOF
19989 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19990 if \$ac_cs_recheck; then
19991 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19992 shift
19993 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19994 CONFIG_SHELL='$SHELL'
19995 export CONFIG_SHELL
19996 exec "\$@"
19999 _ACEOF
20000 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20001 exec 5>>config.log
20003 echo
20004 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20005 ## Running $as_me. ##
20006 _ASBOX
20007 $as_echo "$ac_log"
20008 } >&5
20010 _ACEOF
20011 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20012 _ACEOF
20014 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20016 # Handling of arguments.
20017 for ac_config_target in $ac_config_targets
20019 case $ac_config_target in
20020 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
20021 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
20022 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
20023 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
20024 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
20025 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
20026 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
20027 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
20028 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
20029 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
20030 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
20032 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20033 esac
20034 done
20037 # If the user did not use the arguments to specify the items to instantiate,
20038 # then the envvar interface is used. Set only those that are not.
20039 # We use the long form for the default assignment because of an extremely
20040 # bizarre bug on SunOS 4.1.3.
20041 if $ac_need_defaults; then
20042 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20043 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20044 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20045 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20048 # Have a temporary directory for convenience. Make it in the build tree
20049 # simply because there is no reason against having it here, and in addition,
20050 # creating and moving files from /tmp can sometimes cause problems.
20051 # Hook for its removal unless debugging.
20052 # Note that there is a small window in which the directory will not be cleaned:
20053 # after its creation but before its name has been assigned to `$tmp'.
20054 $debug ||
20056 tmp= ac_tmp=
20057 trap 'exit_status=$?
20058 : "${ac_tmp:=$tmp}"
20059 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20061 trap 'as_fn_exit 1' 1 2 13 15
20063 # Create a (secure) tmp directory for tmp files.
20066 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20067 test -d "$tmp"
20068 } ||
20070 tmp=./conf$$-$RANDOM
20071 (umask 077 && mkdir "$tmp")
20072 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20073 ac_tmp=$tmp
20075 # Set up the scripts for CONFIG_FILES section.
20076 # No need to generate them if there are no CONFIG_FILES.
20077 # This happens for instance with `./config.status config.h'.
20078 if test -n "$CONFIG_FILES"; then
20081 ac_cr=`echo X | tr X '\015'`
20082 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20083 # But we know of no other shell where ac_cr would be empty at this
20084 # point, so we can use a bashism as a fallback.
20085 if test "x$ac_cr" = x; then
20086 eval ac_cr=\$\'\\r\'
20088 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20089 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20090 ac_cs_awk_cr='\\r'
20091 else
20092 ac_cs_awk_cr=$ac_cr
20095 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20096 _ACEOF
20100 echo "cat >conf$$subs.awk <<_ACEOF" &&
20101 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20102 echo "_ACEOF"
20103 } >conf$$subs.sh ||
20104 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20105 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20106 ac_delim='%!_!# '
20107 for ac_last_try in false false false false false :; do
20108 . ./conf$$subs.sh ||
20109 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20111 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20112 if test $ac_delim_n = $ac_delim_num; then
20113 break
20114 elif $ac_last_try; then
20115 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20116 else
20117 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20119 done
20120 rm -f conf$$subs.sh
20122 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20123 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20124 _ACEOF
20125 sed -n '
20127 s/^/S["/; s/!.*/"]=/
20130 s/^[^!]*!//
20131 :repl
20132 t repl
20133 s/'"$ac_delim"'$//
20134 t delim
20137 s/\(.\{148\}\)..*/\1/
20138 t more1
20139 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20142 b repl
20143 :more1
20144 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20147 s/.\{148\}//
20148 t nl
20149 :delim
20151 s/\(.\{148\}\)..*/\1/
20152 t more2
20153 s/["\\]/\\&/g; s/^/"/; s/$/"/
20156 :more2
20157 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20160 s/.\{148\}//
20161 t delim
20162 ' <conf$$subs.awk | sed '
20163 /^[^""]/{
20165 s/\n//
20167 ' >>$CONFIG_STATUS || ac_write_fail=1
20168 rm -f conf$$subs.awk
20169 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20170 _ACAWK
20171 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20172 for (key in S) S_is_set[key] = 1
20173 FS = "\a"
20177 line = $ 0
20178 nfields = split(line, field, "@")
20179 substed = 0
20180 len = length(field[1])
20181 for (i = 2; i < nfields; i++) {
20182 key = field[i]
20183 keylen = length(key)
20184 if (S_is_set[key]) {
20185 value = S[key]
20186 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20187 len += length(value) + length(field[++i])
20188 substed = 1
20189 } else
20190 len += 1 + keylen
20193 print line
20196 _ACAWK
20197 _ACEOF
20198 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20199 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20200 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20201 else
20203 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20204 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20205 _ACEOF
20207 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20208 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20209 # trailing colons and then remove the whole line if VPATH becomes empty
20210 # (actually we leave an empty line to preserve line numbers).
20211 if test "x$srcdir" = x.; then
20212 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20214 s///
20215 s/^/:/
20216 s/[ ]*$/:/
20217 s/:\$(srcdir):/:/g
20218 s/:\${srcdir}:/:/g
20219 s/:@srcdir@:/:/g
20220 s/^:*//
20221 s/:*$//
20223 s/\(=[ ]*\).*/\1/
20225 s/\n//
20226 s/^[^=]*=[ ]*$//
20230 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20231 fi # test -n "$CONFIG_FILES"
20233 # Set up the scripts for CONFIG_HEADERS section.
20234 # No need to generate them if there are no CONFIG_HEADERS.
20235 # This happens for instance with `./config.status Makefile'.
20236 if test -n "$CONFIG_HEADERS"; then
20237 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20238 BEGIN {
20239 _ACEOF
20241 # Transform confdefs.h into an awk script `defines.awk', embedded as
20242 # here-document in config.status, that substitutes the proper values into
20243 # config.h.in to produce config.h.
20245 # Create a delimiter string that does not exist in confdefs.h, to ease
20246 # handling of long lines.
20247 ac_delim='%!_!# '
20248 for ac_last_try in false false :; do
20249 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20250 if test -z "$ac_tt"; then
20251 break
20252 elif $ac_last_try; then
20253 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20254 else
20255 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20257 done
20259 # For the awk script, D is an array of macro values keyed by name,
20260 # likewise P contains macro parameters if any. Preserve backslash
20261 # newline sequences.
20263 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20264 sed -n '
20265 s/.\{148\}/&'"$ac_delim"'/g
20266 t rset
20267 :rset
20268 s/^[ ]*#[ ]*define[ ][ ]*/ /
20269 t def
20271 :def
20272 s/\\$//
20273 t bsnl
20274 s/["\\]/\\&/g
20275 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20276 D["\1"]=" \3"/p
20277 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20279 :bsnl
20280 s/["\\]/\\&/g
20281 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20282 D["\1"]=" \3\\\\\\n"\\/p
20283 t cont
20284 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20285 t cont
20287 :cont
20289 s/.\{148\}/&'"$ac_delim"'/g
20290 t clear
20291 :clear
20292 s/\\$//
20293 t bsnlc
20294 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20296 :bsnlc
20297 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20298 b cont
20299 ' <confdefs.h | sed '
20300 s/'"$ac_delim"'/"\\\
20301 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20303 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20304 for (key in D) D_is_set[key] = 1
20305 FS = "\a"
20307 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20308 line = \$ 0
20309 split(line, arg, " ")
20310 if (arg[1] == "#") {
20311 defundef = arg[2]
20312 mac1 = arg[3]
20313 } else {
20314 defundef = substr(arg[1], 2)
20315 mac1 = arg[2]
20317 split(mac1, mac2, "(") #)
20318 macro = mac2[1]
20319 prefix = substr(line, 1, index(line, defundef) - 1)
20320 if (D_is_set[macro]) {
20321 # Preserve the white space surrounding the "#".
20322 print prefix "define", macro P[macro] D[macro]
20323 next
20324 } else {
20325 # Replace #undef with comments. This is necessary, for example,
20326 # in the case of _POSIX_SOURCE, which is predefined and required
20327 # on some systems where configure will not decide to define it.
20328 if (defundef == "undef") {
20329 print "/*", prefix defundef, macro, "*/"
20330 next
20334 { print }
20335 _ACAWK
20336 _ACEOF
20337 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20338 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20339 fi # test -n "$CONFIG_HEADERS"
20342 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20343 shift
20344 for ac_tag
20346 case $ac_tag in
20347 :[FHLC]) ac_mode=$ac_tag; continue;;
20348 esac
20349 case $ac_mode$ac_tag in
20350 :[FHL]*:*);;
20351 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20352 :[FH]-) ac_tag=-:-;;
20353 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20354 esac
20355 ac_save_IFS=$IFS
20356 IFS=:
20357 set x $ac_tag
20358 IFS=$ac_save_IFS
20359 shift
20360 ac_file=$1
20361 shift
20363 case $ac_mode in
20364 :L) ac_source=$1;;
20365 :[FH])
20366 ac_file_inputs=
20367 for ac_f
20369 case $ac_f in
20370 -) ac_f="$ac_tmp/stdin";;
20371 *) # Look for the file first in the build tree, then in the source tree
20372 # (if the path is not absolute). The absolute path cannot be DOS-style,
20373 # because $ac_f cannot contain `:'.
20374 test -f "$ac_f" ||
20375 case $ac_f in
20376 [\\/$]*) false;;
20377 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20378 esac ||
20379 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20380 esac
20381 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20382 as_fn_append ac_file_inputs " '$ac_f'"
20383 done
20385 # Let's still pretend it is `configure' which instantiates (i.e., don't
20386 # use $as_me), people would be surprised to read:
20387 # /* config.h. Generated by config.status. */
20388 configure_input='Generated from '`
20389 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20390 `' by configure.'
20391 if test x"$ac_file" != x-; then
20392 configure_input="$ac_file. $configure_input"
20393 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20394 $as_echo "$as_me: creating $ac_file" >&6;}
20396 # Neutralize special characters interpreted by sed in replacement strings.
20397 case $configure_input in #(
20398 *\&* | *\|* | *\\* )
20399 ac_sed_conf_input=`$as_echo "$configure_input" |
20400 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20401 *) ac_sed_conf_input=$configure_input;;
20402 esac
20404 case $ac_tag in
20405 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20406 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20407 esac
20409 esac
20411 ac_dir=`$as_dirname -- "$ac_file" ||
20412 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20413 X"$ac_file" : 'X\(//\)[^/]' \| \
20414 X"$ac_file" : 'X\(//\)$' \| \
20415 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20416 $as_echo X"$ac_file" |
20417 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20418 s//\1/
20421 /^X\(\/\/\)[^/].*/{
20422 s//\1/
20425 /^X\(\/\/\)$/{
20426 s//\1/
20429 /^X\(\/\).*/{
20430 s//\1/
20433 s/.*/./; q'`
20434 as_dir="$ac_dir"; as_fn_mkdir_p
20435 ac_builddir=.
20437 case "$ac_dir" in
20438 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20440 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20441 # A ".." for each directory in $ac_dir_suffix.
20442 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20443 case $ac_top_builddir_sub in
20444 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20445 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20446 esac ;;
20447 esac
20448 ac_abs_top_builddir=$ac_pwd
20449 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20450 # for backward compatibility:
20451 ac_top_builddir=$ac_top_build_prefix
20453 case $srcdir in
20454 .) # We are building in place.
20455 ac_srcdir=.
20456 ac_top_srcdir=$ac_top_builddir_sub
20457 ac_abs_top_srcdir=$ac_pwd ;;
20458 [\\/]* | ?:[\\/]* ) # Absolute name.
20459 ac_srcdir=$srcdir$ac_dir_suffix;
20460 ac_top_srcdir=$srcdir
20461 ac_abs_top_srcdir=$srcdir ;;
20462 *) # Relative name.
20463 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20464 ac_top_srcdir=$ac_top_build_prefix$srcdir
20465 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20466 esac
20467 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20470 case $ac_mode in
20473 # CONFIG_FILE
20476 case $INSTALL in
20477 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20478 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20479 esac
20480 ac_MKDIR_P=$MKDIR_P
20481 case $MKDIR_P in
20482 [\\/$]* | ?:[\\/]* ) ;;
20483 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20484 esac
20485 _ACEOF
20487 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20488 # If the template does not know about datarootdir, expand it.
20489 # FIXME: This hack should be removed a few years after 2.60.
20490 ac_datarootdir_hack=; ac_datarootdir_seen=
20491 ac_sed_dataroot='
20492 /datarootdir/ {
20496 /@datadir@/p
20497 /@docdir@/p
20498 /@infodir@/p
20499 /@localedir@/p
20500 /@mandir@/p'
20501 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20502 *datarootdir*) ac_datarootdir_seen=yes;;
20503 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20504 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20505 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20506 _ACEOF
20507 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20508 ac_datarootdir_hack='
20509 s&@datadir@&$datadir&g
20510 s&@docdir@&$docdir&g
20511 s&@infodir@&$infodir&g
20512 s&@localedir@&$localedir&g
20513 s&@mandir@&$mandir&g
20514 s&\\\${datarootdir}&$datarootdir&g' ;;
20515 esac
20516 _ACEOF
20518 # Neutralize VPATH when `$srcdir' = `.'.
20519 # Shell code in configure.ac might set extrasub.
20520 # FIXME: do we really want to maintain this feature?
20521 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20522 ac_sed_extra="$ac_vpsub
20523 $extrasub
20524 _ACEOF
20525 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20527 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20528 s|@configure_input@|$ac_sed_conf_input|;t t
20529 s&@top_builddir@&$ac_top_builddir_sub&;t t
20530 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20531 s&@srcdir@&$ac_srcdir&;t t
20532 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20533 s&@top_srcdir@&$ac_top_srcdir&;t t
20534 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20535 s&@builddir@&$ac_builddir&;t t
20536 s&@abs_builddir@&$ac_abs_builddir&;t t
20537 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20538 s&@INSTALL@&$ac_INSTALL&;t t
20539 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20540 $ac_datarootdir_hack
20542 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20543 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20545 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20546 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20547 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20548 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20549 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20550 which seems to be undefined. Please make sure it is defined" >&5
20551 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20552 which seems to be undefined. Please make sure it is defined" >&2;}
20554 rm -f "$ac_tmp/stdin"
20555 case $ac_file in
20556 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20557 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20558 esac \
20559 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20563 # CONFIG_HEADER
20565 if test x"$ac_file" != x-; then
20567 $as_echo "/* $configure_input */" \
20568 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20569 } >"$ac_tmp/config.h" \
20570 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20571 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20572 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20573 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20574 else
20575 rm -f "$ac_file"
20576 mv "$ac_tmp/config.h" "$ac_file" \
20577 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20579 else
20580 $as_echo "/* $configure_input */" \
20581 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20582 || as_fn_error $? "could not create -" "$LINENO" 5
20587 # CONFIG_LINK
20590 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20592 else
20593 # Prefer the file from the source tree if names are identical.
20594 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20595 ac_source=$srcdir/$ac_source
20598 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20599 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20601 if test ! -r "$ac_source"; then
20602 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20604 rm -f "$ac_file"
20606 # Try a relative symlink, then a hard link, then a copy.
20607 case $ac_source in
20608 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20609 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20610 esac
20611 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20612 ln "$ac_source" "$ac_file" 2>/dev/null ||
20613 cp -p "$ac_source" "$ac_file" ||
20614 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20617 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20618 $as_echo "$as_me: executing $ac_file commands" >&6;}
20620 esac
20623 case $ac_file$ac_mode in
20624 "check_win32_symlinks":C)
20625 # Links sometimes fail undetected on Mingw -
20626 # so here we detect it and warn the user
20627 for FILE in $CONFIG_LINKS
20629 # test -e works for symlinks in the MinGW console
20630 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20631 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20632 done
20634 "src/include/pg_config.h":H)
20635 # Update timestamp for pg_config.h (see Makefile.global)
20636 echo >src/include/stamp-h
20638 "src/include/pg_config_ext.h":H)
20639 # Update timestamp for pg_config_ext.h (see Makefile.global)
20640 echo >src/include/stamp-ext-h
20642 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20644 esac
20645 done # for ac_tag
20648 as_fn_exit 0
20649 _ACEOF
20650 ac_clean_files=$ac_clean_files_save
20652 test $ac_write_fail = 0 ||
20653 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20656 # configure is writing to config.log, and then calls config.status.
20657 # config.status does its own redirection, appending to config.log.
20658 # Unfortunately, on DOS this fails, as config.log is still kept open
20659 # by configure, so config.status won't be able to write to it; its
20660 # output is simply discarded. So we exec the FD to /dev/null,
20661 # effectively closing config.log, so it can be properly (re)opened and
20662 # appended to by config.status. When coming back to configure, we
20663 # need to make the FD available again.
20664 if test "$no_create" != yes; then
20665 ac_cs_success=:
20666 ac_config_status_args=
20667 test "$silent" = yes &&
20668 ac_config_status_args="$ac_config_status_args --quiet"
20669 exec 5>/dev/null
20670 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20671 exec 5>>config.log
20672 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20673 # would make configure fail if this is the last instruction.
20674 $ac_cs_success || as_fn_exit 1
20676 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20677 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20678 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20682 # Ensure that any meson build directories would reconfigure and see that
20683 # there's a conflicting in-tree build and can error out.
20684 if test "$vpath_build" = "no"; then
20685 touch meson.build